From: John Spray Date: Thu, 17 Nov 2016 17:05:19 +0000 (+0000) Subject: mds: maybe_fragment earlier in openc X-Git-Tag: v11.1.0~137^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ed134e7d098c026c7c75344b04412694ecfcef94;p=ceph.git mds: maybe_fragment earlier in openc 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 --- diff --git a/src/mds/Server.cc b/src/mds/Server.cc index e94bd92d5a4b..7c8702d2bcde 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -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); }