aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/auth.c
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2010-02-04 12:42:20 -0500
committerSage Weil <sage@newdream.net>2010-02-10 18:04:48 -0500
commit07c8739c521cb029d0f3549556aae2d304513978 (patch)
tree096f9775bfa1ca3092e9a5e223b0df4d5bcf0bc0 /fs/ceph/auth.c
parent9bd2e6f8ba71facf1cadb7154a7e0e4d345a6aba (diff)
ceph: add struct version to auth encoding
Inlucde struct version in encoding. This will streamline future protocol changes. Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/auth.c')
-rw-r--r--fs/ceph/auth.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ceph/auth.c b/fs/ceph/auth.c
index d5872d4f92bf..b34ce0e41b4c 100644
--- a/fs/ceph/auth.c
+++ b/fs/ceph/auth.c
@@ -107,8 +107,11 @@ int ceph_auth_build_hello(struct ceph_auth_client *ac, void *buf, size_t len)
107 lenp = p; 107 lenp = p;
108 p += sizeof(u32); 108 p += sizeof(u32);
109 109
110 ceph_decode_need(&p, end, 1 + sizeof(u32), bad);
111 ceph_encode_8(&p, 1);
110 num = ARRAY_SIZE(supported_protocols); 112 num = ARRAY_SIZE(supported_protocols);
111 ceph_encode_32(&p, num); 113 ceph_encode_32(&p, num);
114 ceph_decode_need(&p, end, num * sizeof(u32), bad);
112 for (i = 0; i < num; i++) 115 for (i = 0; i < num; i++)
113 ceph_encode_32(&p, supported_protocols[i]); 116 ceph_encode_32(&p, supported_protocols[i]);
114 117