diff mbox

[6/6] mds: clear inode dirty after slave rename finishes.

Message ID 1359340106-24257-7-git-send-email-zheng.z.yan@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Yan, Zheng Jan. 28, 2013, 2:28 a.m. UTC
From: "Yan, Zheng" <zheng.z.yan@intel.com>

The inode is linked to a non-auth directory, so remove it from LogSegment's
dirty inode list.

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

Patch

diff --git a/src/mds/Server.cc b/src/mds/Server.cc
index 6dc3b9c..8080650 100644
--- a/src/mds/Server.cc
+++ b/src/mds/Server.cc
@@ -6345,7 +6345,10 @@  void Server::_logged_slave_rename(MDRequest *mdr,
     // remove mdr auth pin
     mdr->auth_unpin(srcdnl->get_inode());
     mdr->more()->is_inode_exporter = true;
-    
+
+    if (srcdnl->get_inode()->is_dirty())
+      srcdnl->get_inode()->mark_clean();
+
     dout(10) << " exported srci " << *srcdnl->get_inode() << dendl;
   }