]> 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:29:55 +0000 (14:29 +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 5480e6dcd5efef830b20d250c2817834b90c014f..bd69646df4feed32802fab6781fde481d71d646c 100644 (file)
@@ -12514,6 +12514,9 @@ void MDCache::force_readonly()
   mds->mdlog->flush();
 }
 
+void MDCache::maybe_fragment(CDir *dir) {
+  mds->balancer->maybe_fragment(dir, false);
+}
 
 // ==============================================================
 // debug crap
index f1b58c28d111b9f98524a4f024ebaaded9a63f8b..cc4604b9bcdd75c495eff845e3ce611879d82937 100644 (file)
@@ -269,6 +269,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 742c464f4d37a0d18e2ce64c41daebeea0742ef6..839bb09909fe95d194d5eb481f1570b0d50a890b 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);