]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: maybe_fragment earlier in openc
authorJohn Spray <john.spray@redhat.com>
Thu, 17 Nov 2016 17:05:19 +0000 (17:05 +0000)
committerJohn Spray <john.spray@redhat.com>
Thu, 24 Nov 2016 10:36:42 +0000 (10:36 +0000)
Check it during the initial request, not just
on completion, so that when doing lots of creates
we get a chance to split the directory before
it zooms past the size threshold.

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

index e94bd92d5a4bf8699615cb04689b2ecfaa5f662d..7c8702d2bcde755ac36438bddedcbe0684e79611 100644 (file)
@@ -3285,6 +3285,11 @@ void Server::handle_client_openc(MDRequestRef& mdr)
   }
 
   journal_and_reply(mdr, in, dn, le, fin);
+
+  // We hit_dir (via hit_inode) in our finish callback, but by then we might
+  // have overshot the split size (multiple opencs in flight), so here is
+  // an early chance to split the dir if this openc makes it oversized.
+  mds->balancer->maybe_fragment(dir, false);
 }