From: Sage Weil Date: Wed, 6 Mar 2013 03:12:21 +0000 (-0800) Subject: mds: pass created_ino back to client on replayed requests X-Git-Tag: v0.60~121^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3a7233bc8b199c97fbde9c1e44370353f0504af8;p=ceph.git mds: pass created_ino back to client on replayed requests After an MDS restart, the client will resend uncommitted requests. Use the information we now have in the session_info_t to pass the created ino back via the extra_bl payload in the reply. Fixes: #4034 Signed-off-by: Sage Weil --- diff --git a/src/mds/Server.cc b/src/mds/Server.cc index da2c03447f4c..d3acd15a0fd6 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -1099,7 +1099,13 @@ void Server::handle_client_request(MClientRequest *req) inodeno_t created; if (session->have_completed_request(req->get_reqid().tid, &created)) { dout(5) << "already completed " << req->get_reqid() << dendl; - mds->messenger->send_message(new MClientReply(req, 0), req->get_connection()); + MClientReply *reply = new MClientReply(req, 0); + if (created != inodeno_t()) { + bufferlist extra; + ::encode(created, extra); + reply->set_extra_bl(extra); + } + mds->messenger->send_message(reply, req->get_connection()); if (req->is_replay()) mds->queue_one_replay();