]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: fix Client::_read return 20997/head
authorYan, Zheng <zyan@redhat.com>
Thu, 22 Mar 2018 03:01:03 +0000 (11:01 +0800)
committerYan, Zheng <zyan@redhat.com>
Thu, 22 Mar 2018 03:01:36 +0000 (11:01 +0800)
when reading from inline data, it return 0. introduced by commit
608aafb9 "client: cleanup ::_read return"

Fixes: http://tracker.ceph.com/issues/23436
Signed-off-by: Yan, Zheng <zyan@redhat.com>
src/client/Client.cc

index 6c464d5a3669740c0e9ba4d90206e444e381b241..1209d4ab3c83fd3d08dfeefe8a9d98f86f641155 100644 (file)
@@ -8788,7 +8788,6 @@ retry:
       uninline_data(in, onuninline.get());
     } else {
       uint32_t len = in->inline_data.length();
-
       uint64_t endoff = offset + size;
       if (endoff > in->size)
         endoff = in->size;
@@ -8803,7 +8802,7 @@ retry:
       } else if ((uint64_t)offset < endoff) {
         bl->append_zero(endoff - offset);
       }
-
+      r = endoff - offset;
       goto success;
     }
   }