]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: report correct error for ictx->state->close() 45000/head
authorIlya Dryomov <idryomov@gmail.com>
Tue, 7 Sep 2021 19:01:51 +0000 (21:01 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Sun, 13 Feb 2022 16:03:26 +0000 (17:03 +0100)
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 22903c3965b15245b464540ccfb3404bf45f0627)

src/librbd/api/Image.cc

index 6a1be53f732f2fd1d30e5c9846812a433f6401a7..00675072b4b660ef82cb16fefc68057b301af089 100644 (file)
@@ -310,8 +310,8 @@ int Image<I>::list_descendants(
       return 0;
     }
     lderr(cct) << "failed to open descendant " << image_id
-                     << " from pool " << io_ctx.get_pool_name() << ":"
-                     << cpp_strerror(r) << dendl;
+               << " from pool " << io_ctx.get_pool_name() << ":"
+               << cpp_strerror(r) << dendl;
     return r;
   }
 
@@ -320,8 +320,8 @@ int Image<I>::list_descendants(
   int r1 = ictx->state->close();
   if (r1 < 0) {
     lderr(cct) << "error when closing descendant " << image_id
-                     << " from pool " << io_ctx.get_pool_name() << ":"
-                     << cpp_strerror(r) << dendl;
+               << " from pool " << io_ctx.get_pool_name() << ":"
+               << cpp_strerror(r1) << dendl;
   }
 
   return r;