]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: check dir fragment to split dir if mkdir makes it oversized. 28381/head
authorchenerqi <chenerqi@chenerqideMacBook-Pro.local>
Wed, 10 Apr 2019 05:56:29 +0000 (13:56 +0800)
committerPrashant D <pdhange@redhat.com>
Tue, 4 Jun 2019 01:23:46 +0000 (21:23 -0400)
In handle_client_mkdir we hit_dir (via hit_inode) in mkdir finish callback, but by then we might have overshot the split size (multiple mkdir in flight), so check dir fragment for an early chance to split the dir if mkdir makes it oversized.

Fixes: https://tracker.ceph.com/issues/39166
Signed-off-by: Erqi Chen <bestchenerqi@126.com>
(cherry picked from commit 01b4818c26b744ef74ccb09586ec03478f6b1b61)

src/mds/Server.cc

index e19f033cfe68b8ab5258a2b5bb6ea2a8a0716699..63af8b899ff611d276c15d22932895841e203364 100644 (file)
@@ -5610,6 +5610,11 @@ void Server::handle_client_mkdir(MDRequestRef& mdr)
   le->metablob.add_opened_ino(newi->ino());
 
   journal_and_reply(mdr, newi, dn, le, new C_MDS_mknod_finish(this, mdr, dn, newi));
+
+  // We hit_dir (via hit_inode) in our finish callback, but by then we might
+  // have overshot the split size (multiple mkdir in flight), so here is
+  // an early chance to split the dir if this mkdir makes it oversized.
+  mds->balancer->maybe_fragment(dir, false);
 }