From: Xiubo Li Date: Thu, 9 Apr 2020 08:30:31 +0000 (-0400) Subject: qa/cephfs: scrub the subdir/ after data scan X-Git-Tag: v16.1.0~2571^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=62e9820c3eb7311b886bed1a8c06da59bd7f301a;p=ceph.git 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 --- diff --git a/qa/tasks/cephfs/test_data_scan.py b/qa/tasks/cephfs/test_data_scan.py index c5a07d2ccf7..cbd5109adb2 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/"])