]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: include authority of the overwrited inode in rename witnesses
authorYan, Zheng <zheng.z.yan@intel.com>
Wed, 26 Mar 2014 15:03:56 +0000 (23:03 +0800)
committerYan, Zheng <zheng.z.yan@intel.com>
Fri, 28 Mar 2014 18:08:14 +0000 (02:08 +0800)
Rename operation needs to adjust the overwrited inode's link count.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
src/mds/Server.cc

index d2a43c8583292f9843f744c0458e59322e1d81f3..33870d1bc6eafa595ff53bd96a0e77621b75c00c 100644 (file)
@@ -5647,6 +5647,8 @@ void Server::handle_client_rename(MDRequest *mdr)
   else
     witnesses.insert(srcdn->authority().first);
   destdn->list_replicas(witnesses);
+  if (destdnl->is_remote() && !oldin->is_auth())
+    witnesses.insert(oldin->authority().first);
   dout(10) << " witnesses " << witnesses << ", have " << mdr->more()->witnessed << dendl;