HomeFreeBSD

nfsd: Fix handling of Open/Create for the pNFS server

Description

nfsd: Fix handling of Open/Create for the pNFS server

When the MDS of a pNFS service receives an Open/Create
and the file already exists, it must do a Setattr of
size == 0. Without this patch, this was eroneously
done via a VOP_SETAATR() call, which would set the
length of the MDS file to 0 (which is already is,
since all data lives on the DSs).

This patch fixes the problem by doing a nfsvno_setattr()
instead of VOP_SETATTR(), which knows to do a proxied
Setattr on the DSs.

For a non-pNFS server, the change has no effect, since
nfsvno_setattr() only does a VOP_SETATTR() for that case.

This was found during a recent IETF NFSv4 testing event.

(cherry picked from commit f32bf50d43be1e898cebf751ce749b07d1301b8f)

Details

Provenance
rmacklemAuthored on May 4 2022, 8:52 PM
Parents
rGc543b9983220: igc: Increase rx_buffer_size local variable to 32b
Branches
Unknown
Tags
Unknown