libceph: don't call ->reencode_message() more than once per message
authorIlya Dryomov <idryomov@gmail.com>
Wed, 26 Jul 2017 07:59:15 +0000 (09:59 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 1 Aug 2017 14:46:43 +0000 (16:46 +0200)
commit4690faf00cf838392ce038202a85ac0d5f1df598
tree97424e686197e1bc440723548a312248aee27e9d
parent986e89898acb3d8f750f259a90cb73afca426b58
libceph: don't call ->reencode_message() more than once per message

Reencoding an already reencoded message is a bad idea.  This could
happen on Policy::stateful_server connections (!CEPH_MSG_CONNECT_LOSSY),
such as MDS sessions.

This didn't pop up in testing because currently only OSD requests are
reencoded and OSD sessions are always lossy.

Fixes: 98ad5ebd1505 ("libceph: ceph_connection_operations::reencode_message() method")
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
net/ceph/messenger.c