[PATCH] mds: don't journal null dentry for overwrited remote linkage.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Yan, Zheng" <zheng.z.yan@xxxxxxxxx>

Server::_rename_prepare() adds null dest dentry to the EMetaBlob if
the rename operation is overwriting remote linkage. This is incorrect
because null dentry are processed after primary and remote dentries
during journal replay. The erroneous null dentry makes rename dest
file disappear. The bug can causes undeletable directory.

Signed-off-by: Yan, Zheng <zheng.z.yan@xxxxxxxxx>
---
 src/mds/Server.cc | 4 ----
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/mds/Server.cc b/src/mds/Server.cc
index ba43656..d354adb 100644
--- a/src/mds/Server.cc
+++ b/src/mds/Server.cc
@@ -5709,10 +5709,6 @@ void Server::_rename_prepare(MDRequest *mdr,
 				    CEPH_NOSNAP, 0, destdnl);
 	metablob->add_primary_dentry(oldin->get_projected_parent_dn(), true, oldin);
       }
-      if (destdn->is_auth()) {
-	// auth for dn, not targeti
-	metablob->add_null_dentry(destdn, true);
-      }
     }
   }
 
-- 
1.7.11.7

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


[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux