From cbda01c95e958090575b87bfee6c4b7415a65019 Mon Sep 17 00:00:00 2001 From: Zhi Zhang Date: Mon, 20 Nov 2017 17:11:45 +0800 Subject: [PATCH] os/FuseStore: fix incorrect used space statistics for fuse's statfs interface Signed-off-by: Zhi Zhang --- src/os/FuseStore.cc | 3 +++ 1 file changed, 3 insertions(+) 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; } -- 2.47.3