Whamcloud - gitweb
LU-8124 osd-zfs: fix statfs small blocksize inode estimate 23/20123/7
authorAndreas Dilger <andreas.dilger@intel.com>
Tue, 10 May 2016 17:33:22 +0000 (11:33 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 26 Oct 2016 23:02:38 +0000 (23:02 +0000)
commit141037baa112f63f42c0f558ad3eec038712714d
treec4868c162d23c9221687fd65d46e6a0c4f1317ee
parentb596047cae1d3381cafae9c4132e1a84e99ca9d0
LU-8124 osd-zfs: fix statfs small blocksize inode estimate

When a small recordsize is specified for the MDT dataset (e.g. 4KB)
the current statfs estimate for the total number of dnodes available
is constrained to assume one dnode per 4KB block.  However, if the
ZFS sector size is 4KB (ashift=12) then the SA (xattr) spill block
will also be allocated in 4KB units and ditto'd, consuming 8.5KB per
dnode plus extra overhead (OI, directory ZAP, etc).  If lots of
directories are created, there will be up to 64KB of space consumed
per dnode.  This throws off the dnode estimations significantly.

Instead, do not constrain the statfs dnode calculation by the small
recordsize and use the actual average space per dnode when estimating
the total number of dnodes the filesystem can hold.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I5403a855a0bd3d9077ef0e661d2f262ffa2cab07
Reviewed-on: http://review.whamcloud.com/20123
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/osd-zfs/osd_handler.c
lustre/osd-zfs/osd_internal.h