From: John Spray Date: Thu, 24 Nov 2016 10:28:09 +0000 (+0000) Subject: mds: try fragmenting new fragments during split X-Git-Tag: v11.1.0~137^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3210ee7781982435ddb6ef2e98a9f981ababc274;p=ceph.git mds: try fragmenting new fragments during split In case insertions have occurred during the split that would immediately take the new fragments over the split threshold. Signed-off-by: John Spray --- diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index eeb5d3a8534c..d89480f12de7 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -11315,6 +11315,12 @@ void MDCache::_fragment_finish(dirfrag_t basedirfrag, list& resultfrags) for (const auto &dir : resultfrags) { dir->state_clear(CDir::STATE_FRAGMENTING); dir->auth_unpin(this); + + // In case the resulting fragments are beyond the split size, + // we might need to split them again right away (they could + // have been taking inserts between unfreezing and getting + // here) + mds->balancer->maybe_fragment(dir, false); } if (mds->logger) {