From: Zhi Zhang Date: Mon, 20 Nov 2017 09:11:45 +0000 (+0800) Subject: os/FuseStore: fix incorrect used space statistics for fuse's statfs interface X-Git-Tag: v13.0.2~791^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cbda01c95e958090575b87bfee6c4b7415a65019;p=ceph.git os/FuseStore: fix incorrect used space statistics for fuse's statfs interface Signed-off-by: Zhi Zhang --- diff --git a/src/os/FuseStore.cc b/src/os/FuseStore.cc index 724909c55c6..ffad0c86738 100644 --- a/src/os/FuseStore.cc +++ b/src/os/FuseStore.cc @@ -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; }