Skip to contentSkip to conversation

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

PATCH New Yan, Zheng 1 participant 1 message Dec 17, 2012

lore
Share & tools
lore

Yan, Zheng

author
#0 lore raw

PATCH 1/1 mds: don't journal null dentry for overwrited remote linkage.

From: "Yan, Zheng" <[email protected]>

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.

---
 src/mds/Server.cc | 4 ----
 2 files changed, 1 insertion(+), 5 deletions(-)
src/mds/Server.cc +0 -4
index ba43656..d354adb 100644
@@ -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);
-      }
     }
   }
 
Signature · 1 line
1.7.11.7