Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pacific: mds: avoid ~mdsdir's scrubbing and reporting damage health status #49440

Merged
merged 2 commits into from Mar 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions qa/tasks/cephfs/test_scrub.py
Expand Up @@ -176,3 +176,12 @@ def test_scrub_backtrace(self):

def test_scrub_dup_inode(self):
self._scrub(DupInodeWorkload(self, self.fs, self.mount_a))

def test_mdsdir_scrub_backtrace(self):
damage_count = self._get_damage_count()
self.assertNotIn("MDS_DAMAGE", self.mds_cluster.mon_manager.get_mon_health()['checks'])

out_json = self.fs.run_scrub(["start", "~mdsdir", "recursive"])
self.assertEqual(self.fs.wait_until_scrub_complete(tag=out_json["scrub_tag"]), True)
self.assertEqual(self._get_damage_count(), damage_count)
self.assertNotIn("MDS_DAMAGE", self.mds_cluster.mon_manager.get_mon_health()['checks'])
4 changes: 4 additions & 0 deletions src/mds/CInode.cc
Expand Up @@ -4693,6 +4693,10 @@ void CInode::validate_disk_state(CInode::validated_data *results,
results->backtrace.error_str << "failed to read off disk; see retval";
// we probably have a new unwritten file!
// so skip the backtrace scrub for this entry and say that all's well
if (in->is_mdsdir()){
dout(20) << "forcing backtrace as passed since mdsdir actually doesn't have backtrace" << dendl;
results->backtrace.passed = true;
}
if (in->is_dirty_parent()) {
dout(20) << "forcing backtrace as passed since inode is dirty parent" << dendl;
results->backtrace.passed = true;
Expand Down