freebsd-skq/sys/fs/nfsserver
rmacklem fe1e9037da Fix the pNFS server's reporting of SpaceUsed (va_bytes).
The pNFS server currently reports SpaceUsed (va_bytes) for the metadata
file. This in not correct, since the metadata file is always empty and,
as such, va_bytes is just the allocation for the empty file.
This patch adds va_bytes to the list of attributes acquired from the
DS for a file, so that it includes the allocated data size and is updated
when the file is written.
For files created on a pNFS server before this patch is applied, the
va_bytes value is estimated by rounding va_size up to a multiple of
BLKDEV_IOSIZE. Once the file is written after this patch has been
applied to the metadata server, the va_bytes returned for the file
will be correct.

This patch only affects a pNFS metadata server.

Found during testing of the NFSv4.2 pNFS server for the Allocate operation.
(Not yet in head/current.)

MFC after:	2 weeks
2019-11-22 00:22:55 +00:00
..
nfs_fha_new.c
nfs_fha_new.h
nfs_nfsdcache.c
nfs_nfsdkrpc.c Push down td in nfsrvd_dorpc() - make it use curthread instead 2019-03-04 13:02:36 +00:00
nfs_nfsdport.c Fix the pNFS server's reporting of SpaceUsed (va_bytes). 2019-11-22 00:22:55 +00:00
nfs_nfsdserv.c Add support for the ModeSetMasked attribute to the NFSv4.1 server. 2019-04-19 23:35:08 +00:00
nfs_nfsdsocket.c Don't pass td to nfsd_fhtovp(), it's unused. 2019-03-04 13:18:04 +00:00
nfs_nfsdstate.c Delete the unused "nd" argument for nfsrv_checkdsattr(). 2019-09-04 22:37:28 +00:00
nfs_nfsdsubs.c Merge the pNFS server code from projects/pnfs-planb-server into head. 2018-06-12 19:36:32 +00:00