]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
client: Match functionality of nonblocking_read_sync read_sync
authorChristopher Hoffman <choffman@redhat.com>
Wed, 23 Jul 2025 19:08:08 +0000 (19:08 +0000)
committerChristopher Hoffman <choffman@redhat.com>
Thu, 18 Sep 2025 18:52:41 +0000 (18:52 +0000)
If ENOENT is returned from OSDs, set r = 0 to match read_sync
functionality.

Fixes: https://tracker.ceph.com/issues/72143
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
Resolves: rhbz#2379330
(cherry picked from commit b8c99a418885f3334f9ccace0a8beb57077a48cb)

src/client/Client.cc

index 26e7ac14b15be53a2fdb08abf33eb9c41f4c390c..75cd4fe21a29efca885ee293311bc55a9a2790b7 100644 (file)
@@ -11249,7 +11249,7 @@ void Client::C_Read_Sync_NonBlocking::finish(int r)
 
   if (r == -ENOENT) {
     // if we get ENOENT from OSD, assume 0 bytes returned
-    goto success;
+    r = 0;
   } else if (r < 0) {
     // pass error to caller
     goto error;