From b7b66ac95e406076608df24424ac6d95d72a9ac6 Mon Sep 17 00:00:00 2001 From: Greg Farnum Date: Wed, 13 Apr 2011 10:36:05 -0700 Subject: [PATCH] mds: update rstats on stray dir when you rename over existing inode. Signed-off-by: Greg Farnum --- src/mds/Server.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mds/Server.cc b/src/mds/Server.cc index 47649d468e713..cc54d882af202 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -5129,9 +5129,11 @@ void Server::_rename_prepare(MDRequest *mdr, int predirty_dir = silent ? 0:PREDIRTY_DIR; // sub off target - if (destdn->is_auth() && !destdnl->is_null()) + if (destdn->is_auth() && !destdnl->is_null()) { mdcache->predirty_journal_parents(mdr, metablob, destdnl->get_inode(), destdn->get_dir(), (destdnl->is_primary() ? PREDIRTY_PRIMARY:0)|predirty_dir, -1); + mdcache->predirty_journal_parents(mdr, metablob, destdnl->get_inode(), straydn->get_dir(), PREDIRTY_PRIMARY|PREDIRTY_DIR, 1); + } // move srcdn int predirty_primary = (srcdnl->is_primary() && srcdn->get_dir() != destdn->get_dir()) ? PREDIRTY_PRIMARY:0; -- 2.39.5