From: Christopher Hoffman Date: Thu, 14 Sep 2023 15:11:26 +0000 (+0000) Subject: mds: Add fragment to scrub X-Git-Tag: v19.1.1~273^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=70747310eb9a0f206ae150834ba8984567a1bca4;p=ceph.git mds: Add fragment to scrub Add dirfrag split and merge to scrub process. Fixes: https://tracker.ceph.com/issues/57481 Signed-off-by: Christopher Hoffman (cherry picked from commit eadab41eab7220bd749a8217944157050c9513b4) --- diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 0226ce32f719..aa1fc2f5808d 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -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 diff --git a/src/mds/MDCache.h b/src/mds/MDCache.h index 7ac4f9562788..a542745225f9 100644 --- a/src/mds/MDCache.h +++ b/src/mds/MDCache.h @@ -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); diff --git a/src/mds/ScrubStack.cc b/src/mds/ScrubStack.cc index bc70939784b8..28392f533668 100644 --- a/src/mds/ScrubStack.cc +++ b/src/mds/ScrubStack.cc @@ -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);