From c0252063b94d811dc7863058999856ac5614d1eb Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Tue, 14 Sep 2021 13:02:12 -0400 Subject: [PATCH] test/libcephfs: put inodes after lookup Otherwise, the client umount will hang due to inability to trim the inodes looked up using the low-level interface. This results in slow-op warnings and an eviction: 2021-09-11T17:23:31.097+0000 7f99c3522700 0 log_channel(cluster) log [WRN] : evicting unresponsive client smithi176 (9756), after 303.924 seconds 2021-09-11T17:23:31.097+0000 7f99c3522700 10 mds.0.server autoclosing stale session client.9756 172.21.15.176:0/3891214934 last renewed caps 303.924s ago From: /ceph/teuthology-archive/yuriw-2021-09-11_16:21:09-smoke-pacific-distro-basic-smithi/6385038/remote/smithi175/log/ceph-mds.b.log.gz Fixes: https://tracker.ceph.com/issues/52572 Signed-off-by: Patrick Donnelly --- src/test/libcephfs/test.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/test/libcephfs/test.cc b/src/test/libcephfs/test.cc index 443253fdd32..75b66798e24 100644 --- a/src/test/libcephfs/test.cc +++ b/src/test/libcephfs/test.cc @@ -3536,11 +3536,16 @@ TEST(LibCephFS, LookupMdsPrivateInos) { ASSERT_EQ(-ESTALE, ceph_ll_lookup_inode(cmount, ino, &inode)); } else if (ino == CEPH_INO_ROOT || ino == CEPH_INO_GLOBAL_SNAPREALM) { ASSERT_EQ(0, ceph_ll_lookup_inode(cmount, ino, &inode)); + ceph_ll_put(cmount, inode); } else if (ino == CEPH_INO_LOST_AND_FOUND) { // the ino 3 will only exists after the recovery tool ran, so // it may return -ESTALE with a fresh fs cluster int r = ceph_ll_lookup_inode(cmount, ino, &inode); - ASSERT_TRUE(r == -ESTALE || r == 0); + if (r == 0) { + ceph_ll_put(cmount, inode); + } else { + ASSERT_TRUE(r == -ESTALE); + } } else { // currently the ino 0 and 4~99 is not useded yet. ASSERT_EQ(-ESTALE, ceph_ll_lookup_inode(cmount, ino, &inode)); -- 2.39.5