From: Patrick Donnelly Date: Wed, 15 Dec 2021 15:06:34 +0000 (-0500) Subject: qa: test reintegration with directory limits X-Git-Tag: v17.1.0~183^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fe46985a638ee1588855ef41e617b3ef33cde82f;p=ceph.git qa: test reintegration with directory limits Signed-off-by: Patrick Donnelly --- diff --git a/qa/tasks/cephfs/test_strays.py b/qa/tasks/cephfs/test_strays.py index 6e96ee4d529e..e39803fd5c5f 100644 --- a/qa/tasks/cephfs/test_strays.py +++ b/qa/tasks/cephfs/test_strays.py @@ -345,6 +345,35 @@ class TestStrays(CephFSTestCase): self.await_data_pool_empty() + def test_reintegration_limit(self): + """ + That the reintegration is not blocked by full directories. + """ + + LOW_LIMIT = 50 + self.config_set('mds', 'mds_bal_fragment_size_max', str(LOW_LIMIT)) + time.sleep(10) # for config to reach MDS; async create is fast!! + + last_reintegrated = self.get_mdc_stat("strays_reintegrated") + self.mount_a.run_shell_payload(""" + mkdir a b + for i in `seq 1 50`; do + touch a/"$i" + ln a/"$i" b/"$i" + done + sync -f a b + rm a/* + """) + + self.wait_until_equal( + lambda: self.get_mdc_stat("num_strays"), + expect_val=0, + timeout=60 + ) + curr_reintegrated = self.get_mdc_stat("strays_reintegrated") + self.assertGreater(curr_reintegrated, last_reintegrated) + + def test_hardlink_reintegration(self): """ That removal of primary dentry of hardlinked inode results