]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: more reasonable statfs ffree 36127/head
authorredickwang <redickwang@tencent.com>
Thu, 16 Jul 2020 02:34:39 +0000 (10:34 +0800)
committerredickwang <redickwang@tencent.com>
Tue, 22 Sep 2020 03:13:52 +0000 (11:13 +0800)
'ceph-fuse 1038 - - - /cephfs'
is more reasonable than
'ceph-fuse 1038 1038 0 100% /cephfs'

Fixs: https://tracker.ceph.com/issues/47568

Signed-off-by: redickwang <redickwang@tencent.com>
src/client/Client.cc

index 3bb4749808eee62e3382a01d4f634349fc9bfdb8..2d8a20f9271b804b743e3d467de073496a2f1f90 100755 (executable)
@@ -10164,7 +10164,7 @@ int Client::statfs(const char *path, struct statvfs *stbuf,
   stbuf->f_frsize = 1 << CEPH_BLOCK_SHIFT;
   stbuf->f_bsize = 1 << CEPH_BLOCK_SHIFT;
   stbuf->f_files = total_files_on_fs;
-  stbuf->f_ffree = 0;
+  stbuf->f_ffree = -1;
   stbuf->f_favail = -1;
   stbuf->f_fsid = -1;       // ??
   stbuf->f_flag = 0;        // ??