From: Yan, Zheng Date: Fri, 12 May 2017 08:31:51 +0000 (+0800) Subject: qa/tasks/cephfs: use getattr to guarantee inode is in client cache X-Git-Tag: v12.1.0~57^2~50^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1a48359f34d2285b7946318d0a1f346727a9c016;p=ceph.git qa/tasks/cephfs: use getattr to guarantee inode is in client cache When selinux is enabled, kernel client may releases inodes (without uptodate xattr) in readdir reply immediately after processing the reply. The reason is that linking the inode to dentry causes deadlock if xattr is not uptodate. We can use stat(2) syscall to guarantee that kernel client caches an inode. Fixes: http://tracker.ceph.com/issues/19912 Signed-off-by: "Yan, Zheng" --- diff --git a/qa/tasks/cephfs/test_client_recovery.py b/qa/tasks/cephfs/test_client_recovery.py index 4b4085a91570..9387b0d676de 100644 --- a/qa/tasks/cephfs/test_client_recovery.py +++ b/qa/tasks/cephfs/test_client_recovery.py @@ -315,7 +315,7 @@ class TestClientRecovery(CephFSTestCase): self.mount_a.run_shell(["touch", "f{0}".format(i)]) # Populate mount_b's cache - self.mount_b.run_shell(["ls"]) + self.mount_b.run_shell(["ls", "-l"]) client_id = self.mount_b.get_global_id() num_caps = self._session_num_caps(client_id)