HomeFreeBSD

nfsd: Make Setxattr/Removexattr NFSv4.2 ops IO_SYNC

Description

nfsd: Make Setxattr/Removexattr NFSv4.2 ops IO_SYNC

When the NFS server does Setxattr or Removexattr, the
operations must be done IO_SYNC. If a server
crashes/reboots immediately after replying it must
have the extended attribute changes.

Since UFS does extended attributes asynchronously
by default and there is no "ioflag" argument in
the VOP calls, follow the VOP calls with VOP_FSYNC(),
to ensure the operation has been done synchronously.

This was found by inspection while investigating a
bug discovered during a recent IETF NFSv4 testing
event, where the Change attribute wasn't changed
in the operation reply.

This bug will take further work for ZFS and the
pNFS server configuration, but is now fixed for
a non-pNFS UFS exported file system.

MFC after: 1 month

Details

Provenance
rmacklemAuthored on Oct 16 2022, 8:27 PM
Parents
rGe6901a29bc43: kvm_close(3): Check kd->sparse_map != NULL before munmap
Branches
Unknown
Tags
Unknown