HomeFreeBSD

nfsclient: add nfs node locking around uses of n_direofoffset

Description

nfsclient: add nfs node locking around uses of n_direofoffset

During code inspection I noticed that the n_direofoffset field
of the NFS node was being manipulated without any lock being
held to make it SMP safe.
This patch adds locking of the NFS node's mutex around
handling of n_direofoffset to make it SMP safe.

I have not seen any failure that could be attributed to n_direofoffset
being manipulated concurrently by multiple processors, but I think this
is possible, since directories are read with shared vnode
locking, plus locks only on individual buffer cache blocks.
However, there have been as yet unexplained issues w.r.t reading
large directories over NFS that could have conceivably been caused
by concurrent manipulation of n_direofoffset.

MFC after: 2 weeks

Details

Provenance
rmacklemAuthored on Feb 28 2021, 10:53 PM
Parents
rGc7d27b225df8: newsyslog(8): Implement a new 'E' flag to not rotate empty log files
Branches
Unknown
Tags
Unknown