diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2017-07-14 16:08:54 +0200 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2017-07-17 14:54:59 +0200 |
commit | 914902af4f271884968f72c4fa144c723be2a699 (patch) | |
tree | 88abf861e628a05a173783099227ab5517d95789 /net/ceph | |
parent | libceph: use alloc_pg_mapping() in __decode_pg_upmap_items() (diff) | |
download | linux-914902af4f271884968f72c4fa144c723be2a699.tar.xz linux-914902af4f271884968f72c4fa144c723be2a699.zip |
libceph: don't call encode_request_finish() on MOSDBackoff messages
encode_request_finish() is for MOSDOp messages. Calling it on
MOSDBackoff ack-block messages corrupts them.
Fixes: a02a946dfe96 ("libceph: respect RADOS_BACKOFF backoffs")
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'net/ceph')
-rw-r--r-- | net/ceph/osd_client.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index 86a9737d8e3f..901bb8221366 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c @@ -5310,7 +5310,10 @@ static int invalidate_authorizer(struct ceph_connection *con) static void osd_reencode_message(struct ceph_msg *msg) { - encode_request_finish(msg); + int type = le16_to_cpu(msg->hdr.type); + + if (type == CEPH_MSG_OSD_OP) + encode_request_finish(msg); } static int osd_sign_message(struct ceph_msg *msg) |