]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Return 0 when the offset of read exceed the length of object
authorHaomai Wang <haomaiwang@gmail.com>
Fri, 21 Feb 2014 04:22:24 +0000 (12:22 +0800)
committerHaomai Wang <haomaiwang@gmail.com>
Sat, 22 Feb 2014 13:05:00 +0000 (21:05 +0800)
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
src/os/KeyValueStore.cc

index 082ff96bb5cfebb7c486fae6618d8130b44be042..b2705e6f6c286e00228e81f01078d8662e5c8adc 100644 (file)
@@ -1626,10 +1626,9 @@ int KeyValueStore::_generic_read(StripObjectMap::StripObjectHeader &header,
   int r;
 
   if (header.max_size < offset) {
-    r = -EINVAL;
     dout(10) << __func__ << " " << header.cid << "/" << header.oid << ")"
              << " offset exceed the length of bl"<< dendl;
-    return r;
+    return 0;
   }
 
   if (len == 0)