]> 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>
Wed, 1 Nov 2023 15:37:11 +0000 (15:37 +0000)
Add dirfrag split and merge to scrub process.

Fixes: https://tracker.ceph.com/issues/57481
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
src/mds/MDCache.cc
src/mds/MDCache.h
src/mds/ScrubStack.cc

index 0c812936fdcc5dae60ba24644681f98ca3a9a4e6..22f54abe696f42c41e846d76f61524bb7d3ddf82 100644 (file)
@@ -12511,6 +12511,9 @@ void MDCache::force_readonly()
   mds->mdlog->flush();
 }
 
+void MDCache::maybe_fragment(CDir *dir) {
+  mds->balancer->maybe_fragment(dir, false);
+}
 
 // ==============================================================
 // debug crap
index 5c1f34da4df076109cd36d2245a3eda345355602..6bea3dff3fb69e0f38e9bab5f03ac38f6c35c3b7 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 6d799343f1496c2f7c0a414a67215d9185f1c0a2..793839ccb317e4fa5979f70d7036cf900406ac41 100644 (file)
@@ -471,6 +471,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);