Skip to content

Commit

Permalink
libceph: don't call encode_request_finish() on MOSDBackoff messages
Browse files Browse the repository at this point in the history
encode_request_finish() is for MOSDOp messages.  Calling it on
MOSDBackoff ack-block messages corrupts them.

Fixes: a02a946 ("libceph: respect RADOS_BACKOFF backoffs")
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
  • Loading branch information
idryomov committed Jul 17, 2017
1 parent f5cc689 commit 914902a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion net/ceph/osd_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 914902a

Please sign in to comment.