summaryrefslogtreecommitdiff
path: root/fs/ceph/mdsmap.c
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2009-11-03 15:17:56 -0800
committerSage Weil <sage@newdream.net>2009-11-03 15:17:56 -0800
commit63f2d211954b790fea0a9caeae605c7956535af6 (patch)
treeb49257aa54d9657539eeba014f9ff5f91f8495de /fs/ceph/mdsmap.c
parent859e7b149362475672e2a996f29b8f45cbb34d82 (diff)
downloadlinux-3.10-63f2d211954b790fea0a9caeae605c7956535af6.tar.gz
linux-3.10-63f2d211954b790fea0a9caeae605c7956535af6.tar.bz2
linux-3.10-63f2d211954b790fea0a9caeae605c7956535af6.zip
ceph: use fixed endian encoding for ceph_entity_addr
We exchange struct ceph_entity_addr over the wire and store it on disk. The sockaddr_storage.ss_family field, however, is host endianness. So, fix ss_family endianness to big endian when sending/receiving over the wire. Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/mdsmap.c')
-rw-r--r--fs/ceph/mdsmap.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ceph/mdsmap.c b/fs/ceph/mdsmap.c
index 80daea06447..4226c810ce2 100644
--- a/fs/ceph/mdsmap.c
+++ b/fs/ceph/mdsmap.c
@@ -86,6 +86,7 @@ struct ceph_mdsmap *ceph_mdsmap_decode(void **p, void *end)
ceph_decode_need(p, end, sizeof(addr) + 1 + sizeof(u32), bad);
ceph_decode_copy(p, &addr, sizeof(addr));
+ ceph_decode_addr(&addr);
infoversion = ceph_decode_8(p);
namelen = ceph_decode_32(p); /* skip mds name */
*p += namelen;