Skip to content

Commit eadab41

Browse files
committed
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 <choffman@redhat.com>
1 parent 59bc218 commit eadab41

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

src/mds/MDCache.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12511,6 +12511,9 @@ void MDCache::force_readonly()
1251112511
mds->mdlog->flush();
1251212512
}
1251312513

12514+
void MDCache::maybe_fragment(CDir *dir) {
12515+
mds->balancer->maybe_fragment(dir, false);
12516+
}
1251412517

1251512518
// ==============================================================
1251612519
// debug crap

src/mds/MDCache.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,8 @@ class MDCache {
269269
bool is_readonly() { return readonly; }
270270
void force_readonly();
271271

272+
void maybe_fragment(CDir* dir);
273+
272274
static file_layout_t gen_default_file_layout(const MDSMap &mdsmap);
273275
static file_layout_t gen_default_log_layout(const MDSMap &mdsmap);
274276

src/mds/ScrubStack.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,7 @@ void ScrubStack::scrub_dirfrag(CDir *dir, bool *done)
471471
<< " log and `damage ls` output for details";
472472
}
473473

474+
mdcache->maybe_fragment(dir);
474475
dir->scrub_finished();
475476
dir->auth_unpin(this);
476477

0 commit comments

Comments
 (0)