libmultipath: change reservation_key to a be64
authorBenjamin Marzinski <bmarzins@redhat.com>
Fri, 15 Sep 2017 22:25:32 +0000 (17:25 -0500)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Wed, 20 Sep 2017 12:09:58 +0000 (14:09 +0200)
commite4c4d2c0c3345718dbb9a2d85e69f33ab5ca7c9d
treed9aa379a0a75b1310459338f561caa3ef318eeb0
parent512fc8966538b09b09bf602b446f96015a1ef657
libmultipath: change reservation_key to a be64

The reservation key is currently being stored as any array of 8 unsigned
chars.  This is exactly the same in-memory representation as a big
endian 64 bit integer. However, the code for dealing with a big endian
64 bit integer is much simpler, so switch to use that instead.  Instead
of directly using a uint64_t, which could cause problems if people
forgot the conversion from cpu order to big endian, Martin suggested
using a structure and some helper macros to store it.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
libmpathpersist/mpath_persist.c
libmultipath/byteorder.h [new file with mode: 0644]
libmultipath/config.c
libmultipath/config.h
libmultipath/dict.c
libmultipath/propsel.c
libmultipath/structs.h
multipathd/main.c