]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: Add fragment to scrub
authorChristopher Hoffman <choffman@redhat.com>
Thu, 14 Sep 2023 15:11:26 +0000 (15:11 +0000)
committerChristopher Hoffman <choffman@redhat.com>
Mon, 15 Apr 2024 14:31:11 +0000 (14:31 +0000)
Add dirfrag split and merge to scrub process.

Fixes: https://tracker.ceph.com/issues/57481
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
(cherry picked from commit eadab41eab7220bd749a8217944157050c9513b4)

src/mds/MDCache.cc
src/mds/MDCache.h
src/mds/ScrubStack.cc

index 0226ce32f719a70ebeb56c9a86f29c2b2a4dc0ac..aa1fc2f5808d1b6a5b95bae7471add5d87554fc7 100644 (file)
@@ -12638,6 +12638,9 @@ void MDCache::force_readonly()
   mds->mdlog->flush();
 }
 
+void MDCache::maybe_fragment(CDir *dir) {
+  mds->balancer->maybe_fragment(dir, false);
+}
 
 // ==============================================================
 // debug crap
index 7ac4f95627889ad3fc7afa3bc6fc091065152c29..a542745225f923102d4f7635a3b10c9d3f920ec8 100644 (file)
@@ -275,6 +275,8 @@ class MDCache {
   bool is_readonly() { return readonly; }
   void force_readonly();
 
+  void maybe_fragment(CDir* dir);
+
   static file_layout_t gen_default_file_layout(const MDSMap &mdsmap);
   static file_layout_t gen_default_log_layout(const MDSMap &mdsmap);
 
index bc70939784b84a00d67763ca6c6bd3fe360c8ed7..28392f533668c0df4e2f5716ac978ce4dd61d894 100644 (file)
@@ -470,6 +470,7 @@ void ScrubStack::scrub_dirfrag(CDir *dir, bool *done)
                  << " log and `damage ls` output for details";
   }
 
+  mdcache->maybe_fragment(dir);
   dir->scrub_finished();
   dir->auth_unpin(this);