]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: report correct error for ictx->state->close() 44999/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 15:59:28 +0000 (16:59 +0100)
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 22903c3965b15245b464540ccfb3404bf45f0627)

src/librbd/api/Image.cc

index 4997d4117bc3cc0e8ff0dc3839b3ac2a5df60d66..55d0e15b8af95c03ef593dd0551235d39ec7aa69 100644 (file)
@@ -318,8 +318,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;
   }
 
@@ -328,8 +328,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;