Whamcloud - gitweb
LU-9176 osd-zfs: improve statfs estimate for ZFS 43/25743/3
authorAndreas Dilger <andreas.dilger@intel.com>
Fri, 3 Mar 2017 09:40:46 +0000 (02:40 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 16 Mar 2017 21:38:36 +0000 (21:38 +0000)
commit5e2b17964fd880a9763ba66151aab6091fb4813c
tree352eb73955b811e5dd0dccf9dbf50207593bb73b
parent2895e8a53a8d25d9548d6fcf47af480db4c4b1d7
LU-9176 osd-zfs: improve statfs estimate for ZFS

When a ZFS filesystem is newly formatted, there are 128 OI ZAPs and
96 object directories, but only a handful of regular files.  This
skews the average MDT file size to be much larger than regular files,
which in turn makes the estimated total number of files on the MDT
much too small.

Improve the inode size estimate when the filesystem has few files to
be closer to the expected long term average so that the reported total
inode count is reasonable for a new or otherwise empty filesystem.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Ic40af2057d8b21e0ee4d9bb3b13b7f6786d0d406
Reviewed-on: https://review.whamcloud.com/25743
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Ned Bass <bass6@llnl.gov>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/osd-zfs/osd_handler.c
lustre/osd-zfs/osd_internal.h