summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYan, Zheng <zheng.z.yan@intel.com>2013-09-19 13:43:39 +0800
committerYan, Zheng <zheng.z.yan@intel.com>2013-09-24 08:45:55 +0800
commit53c115daa7b4914bbc12a9f83dda8910da9d457d (patch)
treeab38a0e6d9ef4517463d0355f4935c43635f28f9
parentf7bd5a8f4c4927709949c5034c65ddac055e44f7 (diff)
downloadceph-53c115daa7b4914bbc12a9f83dda8910da9d457d.tar.gz
mds: don't fragmentate stray directory
the code that prepares stray dentry assumes that stray inode contains single dirfrag and we never freeze the stray inode's dirfrag. Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
-rw-r--r--src/mds/MDCache.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc
index 1296e8abb1a..994b9916114 100644
--- a/src/mds/MDCache.cc
+++ b/src/mds/MDCache.cc
@@ -10873,8 +10873,8 @@ bool MDCache::can_fragment(CInode *diri, list<CDir*>& dirs)
dout(7) << "can_fragment: i won't merge|split anything in stray" << dendl;
return false;
}
- if (diri->is_mdsdir() || diri->ino() == MDS_INO_CEPH) {
- dout(7) << "can_fragment: i won't fragment the mdsdir or .ceph" << dendl;
+ if (diri->is_mdsdir() || diri->is_stray() || diri->ino() == MDS_INO_CEPH) {
+ dout(7) << "can_fragment: i won't fragment the mdsdir or straydir or .ceph" << dendl;
return false;
}