From 62e9820c3eb7311b886bed1a8c06da59bd7f301a Mon Sep 17 00:00:00 2001 From: Xiubo Li Date: Thu, 9 Apr 2020 04:30:31 -0400 Subject: [PATCH] qa/cephfs: scrub the subdir/ after data scan This will make sure the rstat between subdir's inode and dirfrag are matched. Fixes: https://tracker.ceph.com/issues/44380 Signed-off-by: Xiubo Li --- qa/tasks/cephfs/test_data_scan.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/qa/tasks/cephfs/test_data_scan.py b/qa/tasks/cephfs/test_data_scan.py index c5a07d2ccf757..cbd5109adb25f 100644 --- a/qa/tasks/cephfs/test_data_scan.py +++ b/qa/tasks/cephfs/test_data_scan.py @@ -510,6 +510,11 @@ class TestDataScan(CephFSTestCase): keys = self._dirfrag_keys(frag_obj_id) self.assertListEqual(sorted(keys), sorted(["%s_head" % f for f in file_names])) + # run scrub to update and make sure rstat.rbytes info in subdir inode and dirfrag + # are matched + out_json = self.fs.rank_tell(["scrub", "start", "/subdir", "repair", "recursive"]) + self.assertNotEqual(out_json, None) + # Remove the whole 'sudbdir' directory self.mount_a.run_shell(["rm", "-rf", "subdir/"]) -- 2.39.5