]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/cephfs: scrub the subdir/ after data scan 34410/head
authorXiubo Li <xiubli@redhat.com>
Thu, 9 Apr 2020 08:30:31 +0000 (04:30 -0400)
committerXiubo Li <xiubli@redhat.com>
Mon, 13 Apr 2020 04:13:35 +0000 (00:13 -0400)
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 <xiubli@redhat.com>
qa/tasks/cephfs/test_data_scan.py

index c5a07d2ccf75779842d9eb3426e4775ae84c4879..cbd5109adb25f8595357b3fcbd23189ead56b025 100644 (file)
@@ -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/"])