]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/FuseStore: fix incorrect used space statistics for fuse's statfs interface 19033/head
authorZhi Zhang <willzzhang@tencent.com>
Mon, 20 Nov 2017 09:11:45 +0000 (17:11 +0800)
committerZhi Zhang <willzzhang@tencent.com>
Mon, 20 Nov 2017 09:11:45 +0000 (17:11 +0800)
Signed-off-by: Zhi Zhang <zhangz.david@outlook.com>
src/os/FuseStore.cc

index 724909c55c6df76b81714233ceec4f0bfcfd6f87..ffad0c86738015b1d7cc7426b349ab86fa5a64ab 100644 (file)
@@ -1103,7 +1103,10 @@ static int os_statfs(const char *path, struct statvfs *stbuf)
   stbuf->f_bsize = 4096;   // LIES!
   stbuf->f_blocks = s.total / 4096;
   stbuf->f_bavail = s.available / 4096;
+  stbuf->f_bfree = stbuf->f_bavail;
 
+  ldout(fs->store->cct, 10) << __func__ << " " << path << ": " 
+    << stbuf->f_bavail << "/" << stbuf->f_blocks << dendl;
   return 0;
 }