HomeFreeBSD

Don't set a file's size for the MDS file of a pNFS service.

Description

Don't set a file's size for the MDS file of a pNFS service.

When a pNFS service is running, the size of the files created on the MDS
are normally 0, since the data is written to the data files on the DS(s).
However, without this patch, if a Setattr with a non-zero size was done by
a client, the MDS file was set to that size. This was thought to be benign,
but it turns out that files with a non-zero size plus extended attributes
can cause a "ffs_truncate3" panic in UFS. Although the exact cause of this
panic() has not been isolated, this patch avoids the panic() and leaves
the MDS files in a consistent state of always having a size == 0.
Note that these MDS files never store data. The patch also includes an
unnecessary initialization of savsize in case some compiler or static
analyser complains it might not be initialized.
This patch only affects the NFS server when pNFS is enabled via the "-p"
command line option on nfsd.

Details

Provenance
rmacklemAuthored on
Parents
rS337961: Add the possibility to mark packets urgent based on their length.
Branches
Unknown
Tags
Unknown