From: "Yan, Zheng" <zheng.z....@intel.com>

_rename_finish() does not send dentry link/unlink message to replicas.
We should prevent dentries that are modified by the rename operation
from getting new replicas when the rename operation is committing. So
don't mark xlocks "done" and early reply for rename

Signed-off-by: Yan, Zheng <zheng.z....@intel.com>
---
 src/mds/Server.cc | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/mds/Server.cc b/src/mds/Server.cc
index eced76f..4492341 100644
--- a/src/mds/Server.cc
+++ b/src/mds/Server.cc
@@ -796,6 +796,14 @@ void Server::early_reply(MDRequest *mdr, CInode *tracei, 
CDentry *tracedn)
     return;
   }
 
+  // _rename_finish() does not send dentry link/unlink message to replicas.
+  // so do not mark xlocks "done", the xlocks prevent srcdn and destdn from
+  // getting new replica.
+  if (mdr->client_request->get_op() == CEPH_MDS_OP_RENAME) {
+    dout(10) << "early_reply - rename, not allowed" << dendl;
+    return;
+  }
+
   MClientRequest *req = mdr->client_request;
   entity_inst_t client_inst = req->get_source_inst();
   if (client_inst.name.is_mds())
-- 
1.7.11.7

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to