]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/filestore/FileStore: only offset=len=0 mean read all data of object.
authorJianpeng Ma <jianpeng.ma@intel.com>
Mon, 14 Mar 2016 15:42:39 +0000 (23:42 +0800)
committerJianpeng Ma <jianpeng.ma@intel.com>
Mon, 14 Mar 2016 15:42:39 +0000 (23:42 +0800)
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
src/os/filestore/FileStore.cc

index 6cd4134ce94aca9ae18bff019b213dd411ca7822..19a855788a848389428180ff31fd8bfb79d53518 100644 (file)
@@ -2973,7 +2973,7 @@ int FileStore::read(
     return r;
   }
 
-  if (len == 0) {
+  if (offset == 0 && len == 0) {
     struct stat st;
     memset(&st, 0, sizeof(struct stat));
     int r = ::fstat(**fd, &st);