diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2016-02-03 14:25:48 (GMT) |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2016-02-04 17:26:08 (GMT) |
commit | b0b31a8ffe54abf0a455bcaee54dd92f08817164 (patch) | |
tree | 480d423ed4593586fbc11839ce127389f121e720 /net | |
parent | 97db9a88186e3a7d3a1942370c836bf221d3ab90 (diff) | |
download | linux-b0b31a8ffe54abf0a455bcaee54dd92f08817164.tar.xz |
libceph: MOSDOpReply v7 encoding
Empty request_redirect_t (struct ceph_request_redirect in the kernel
client) is now encoded with a bool. NEW_OSDOPREPLY_ENCODING feature
bit overlaps with already supported CRUSH_TUNABLES5.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Sage Weil <sage@redhat.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/ceph/osd_client.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index f8f2359..3534e12 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c @@ -1770,6 +1770,7 @@ static void handle_reply(struct ceph_osd_client *osdc, struct ceph_msg *msg) u32 osdmap_epoch; int already_completed; u32 bytes; + u8 decode_redir; unsigned int i; tid = le64_to_cpu(msg->hdr.tid); @@ -1841,6 +1842,15 @@ static void handle_reply(struct ceph_osd_client *osdc, struct ceph_msg *msg) p += 8 + 4; /* skip replay_version */ p += 8; /* skip user_version */ + if (le16_to_cpu(msg->hdr.version) >= 7) + ceph_decode_8_safe(&p, end, decode_redir, bad_put); + else + decode_redir = 1; + } else { + decode_redir = 0; + } + + if (decode_redir) { err = ceph_redirect_decode(&p, end, &redir); if (err) goto bad_put; |