]> git.michaelhowe.org Git - packages/o/openafs.git/commit
Use f_bsize for ZFS afs_fsfragsize
authorAndrew Deason <adeason@sinenomine.net>
Thu, 24 Sep 2009 17:02:55 +0000 (12:02 -0500)
committerDerrick Brashear <shadow|account-1000005@unknown>
Tue, 13 Oct 2009 12:34:49 +0000 (05:34 -0700)
commit78d8b8c5c19b8d6873b2d62beaa60cc7acba1840
tree0e88ce276b298bc7577e92a4dfbf5d22f37d4f74
parent82aa5b4e09ac8a550525efd0e357783a3b3aed88
Use f_bsize for ZFS afs_fsfragsize

On ZFS, the disk space files can use up can be rounded up to the next
recordsize boundary if they've been truncated. This can cause the Unix CM
to mis-estimate cache usage, since it truncates files fairly often, and
assumes the disk space used is the file length rounded up to the next
f_frsize.

Since the ZFS recordsize is available via the statvfs f_bsize, just
round up to that instead. There is still some additional file metadata
that takes up some additional space on disk, but according to ZFS people
I've spoken to about this, it cannot be known in advance. In practice,
the additional metadata storage doesn't appear to exceed about 10% of
the data storage, which should be acceptable.

FIXES 125365

Reviewed-on: http://gerrit.openafs.org/650
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Andrew Deason <adeason@sinenomine.net>
src/afs/afs_init.c