]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: try fragmenting new fragments during split
authorJohn Spray <john.spray@redhat.com>
Thu, 24 Nov 2016 10:28:09 +0000 (10:28 +0000)
committerJohn Spray <john.spray@redhat.com>
Thu, 24 Nov 2016 10:37:53 +0000 (10:37 +0000)
In case insertions have occurred during the split that would
immediately take the new fragments over the split threshold.

Signed-off-by: John Spray <john.spray@redhat.com>
src/mds/MDCache.cc

index eeb5d3a8534c69ae917e4df257b8b0c764287850..d89480f12de79d15d489547a427019d3f9dfdf8e 100644 (file)
@@ -11315,6 +11315,12 @@ void MDCache::_fragment_finish(dirfrag_t basedirfrag, list<CDir*>& 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) {