]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephfs/test_auto_repair.py: flush journal after umount
authorYan, Zheng <zyan@redhat.com>
Mon, 29 Jun 2015 09:37:23 +0000 (17:37 +0800)
committerJohn Spray <jspray@redhat.com>
Wed, 1 Jul 2015 10:47:14 +0000 (11:47 +0100)
When client capabilities get released, MDS may update corresponding
inodes' client writable range and mark those inodes dirty. The auto
repair test expects MDS to trim inodes from its cache, but MDS can't
trim dirty inodes. So we should flush journal after umount.

Fixes: #12172
Signed-off-by: Yan, Zheng <zyan@redhat.com>
(cherry picked from commit 835ad8b8f3038290846c612b66f3bffcc5755338)

tasks/cephfs/test_auto_repair.py

index 3d3732c8c7f3109b218e6f2a271889ddd728d238..a0013e0fc2b9ba146fb74e278a9d63b7d9098f75 100644 (file)
@@ -37,11 +37,12 @@ class TestMDSAutoRepair(CephFSTestCase):
         # create more files in another directory. make sure MDS trim dentries in testdir1
         self.mount_a.run_shell(["sudo", "bash", "-c", create_script.format("testdir2")])
 
+        # drop inodes caps
+        self.mount_a.umount_wait()
+
         # flush journal entries to dirfrag objects
         self.fs.mds_asok(['flush', 'journal'])
 
-        # drop inodes caps
-        self.mount_a.umount_wait()
         self.mount_a.mount()
         self.mount_a.wait_until_mounted()