From: Xiubo Li Date: Tue, 28 May 2024 04:23:57 +0000 (+0800) Subject: mds: encode the correct extra info depending on the feature bits X-Git-Tag: testing/wip-jcollin-testing-20240711.125835-reef~6^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=0a5ce2994a1c41643dc724b21a319250cf426248;p=ceph-ci.git mds: encode the correct extra info depending on the feature bits In the client side it will decode the extra info depending on the feature bits, but if we always encode it with the old version then the client could crash or gets the corrupted data. More detail please see "parse_reply_info_create()" in kclient code. Fixes: https://tracker.ceph.com/issues/63265 Signed-off-by: Xiubo Li (cherry picked from commit 1f1198b81b2442e5d6c0566bdade2f5d7dd23d12) --- diff --git a/src/mds/Server.cc b/src/mds/Server.cc index e80e4c2433a..90b1169dcae 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -2560,7 +2560,7 @@ void Server::handle_client_request(const cref_t &req) auto reply = make_message(*req, 0); if (created != inodeno_t()) { bufferlist extra; - encode(created, extra); + set_reply_extra_bl(req, created, extra); reply->set_extra_bl(extra); } mds->send_message_client(reply, session);