From: Sage Weil Date: Sun, 12 Dec 2010 22:39:48 +0000 (-0800) Subject: mds: fix replay/resent vs completed request check X-Git-Tag: v0.24~24 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=9add26be7698b55e31d9dff73537f1a726f9ee86;p=ceph.git mds: fix replay/resent vs completed request check If it is a _replayed_ request, we should always send a simple ack if it is completed, because the client doesn't not care about any additional caps. If it is a _resent_ request, then we want to return useful caps on open or create requests, even if any modification side-effects have already been committed. The additional checks for completed already exist in the create and open handlers. Signed-off-by: Sage Weil --- diff --git a/src/mds/Server.cc b/src/mds/Server.cc index effca20a9597f..35af027dc6ea2 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -1061,10 +1061,11 @@ void Server::handle_client_request(MClientRequest *req) // they have a high request rate. } - // retry? - if ((req->get_retry_attempt() || req->is_replay()) && - ((req->get_op() != CEPH_MDS_OP_OPEN) && - (req->get_op() != CEPH_MDS_OP_CREATE))) { + // completed request? + if (req->is_replay() || + (req->get_retry_attempt() && + req->get_op() != CEPH_MDS_OP_OPEN && + req->get_op() != CEPH_MDS_OP_CREATE)) { assert(session); if (session->have_completed_request(req->get_reqid().tid)) { dout(5) << "already completed " << req->get_reqid() << dendl; @@ -1077,6 +1078,7 @@ void Server::handle_client_request(MClientRequest *req) return; } } + // trim completed_request list if (req->get_oldest_client_tid() > 0) { dout(15) << " oldest_client_tid=" << req->get_oldest_client_tid() << dendl;