]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test/libcephfs: put inodes after lookup 43164/head
authorPatrick Donnelly <pdonnell@redhat.com>
Tue, 14 Sep 2021 17:02:12 +0000 (13:02 -0400)
committerPatrick Donnelly <pdonnell@redhat.com>
Tue, 14 Sep 2021 17:02:12 +0000 (13:02 -0400)
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 <pdonnell@redhat.com>
src/test/libcephfs/test.cc

index 443253fdd3278174f170ab2149f6ff417b54ddcc..75b66798e24086765c20060ab8927b1875c3722c 100644 (file)
@@ -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));