diff options
author | Yan, Zheng <zheng.z.yan@intel.com> | 2013-09-19 13:34:39 +0800 |
---|---|---|
committer | Yan, Zheng <zheng.z.yan@intel.com> | 2013-10-05 11:31:11 +0800 |
commit | f989396ea562144c7cbc9de5ca606b451a121f88 (patch) | |
tree | 6fdaf2b83213413bc8cfdb87d02d39ec756dcfc4 | |
parent | 7515335b89309065e5770dbe6aeff33b36853e48 (diff) | |
download | ceph-f989396ea562144c7cbc9de5ca606b451a121f88.tar.gz |
mds: properly store fragmenting dirfrags
fragmenting dirfrag does not exist on the object store. So all non-null
dentries should be included when committing a fragmenting dirfrag.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
-rw-r--r-- | src/mds/CDir.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mds/CDir.cc b/src/mds/CDir.cc index c77ca180a6f..1b3c7e63456 100644 --- a/src/mds/CDir.cc +++ b/src/mds/CDir.cc @@ -1851,7 +1851,8 @@ CDir::map_t::iterator CDir::_commit_partial(ObjectOperation& m, try_trim_snap_dentry(dn, *snaps)) continue; - if (!dn->is_dirty()) + if (!dn->is_dirty() && + (!dn->state_test(CDentry::STATE_FRAGMENTING) || dn->get_linkage()->is_null())) continue; // skip clean dentries if (dn->get_linkage()->is_null()) { @@ -1995,7 +1996,8 @@ void CDir::_commit(version_t want) unsigned max_write_size = cache->max_dir_commit_size; if (is_complete() && - (num_dirty > (num_head_items*g_conf->mds_dir_commit_ratio))) { + ((num_dirty > (num_head_items*g_conf->mds_dir_commit_ratio)) || + state_test(CDir::STATE_FRAGMENTING))) { fnode.snap_purged_thru = realm->get_last_destroyed(); committed_dn = _commit_full(m, snaps, max_write_size); } else { |