freebsd-nq/sys/fs/nfs
John Baldwin a120a7a3cd Rework the handling of stop signals in the NFS client. The changes in
195702, 195703, and 195821 prevented a thread from suspending while holding
locks inside of NFS by forcing the thread to fail sleeps with EINTR or
ERESTART but defer the thread suspension to the user boundary.  However,
this had the effect that stopping a process during an NFS request could
abort the request and trigger EINTR errors that were visible to userland
processes (previously the thread would have suspended and completed the
request once it was resumed).

This change instead effectively masks stop signals while in the NFS client.
It uses the existing TDF_SBDRY flag to effect this since SIGSTOP cannot
be masked directly.  Also, instead of setting PBDRY on individual sleeps,
the NFS client now sets the TDF_SBDRY flag around each NFS request and
stop signals are masked for all sleeps during that region (the previous
change missed sleeps in lockmgr locks).  The end result is that stop
signals sent to threads performing an NFS request are completely
ignored until after the NFS request has finished processing and the
thread prepares to return to userland.  This restores the behavior of
stop signals being transparent to userland processes while still
preventing threads from suspending while holding NFS locks.

Reviewed by:	kib
MFC after:	1 month
2013-02-06 17:06:51 +00:00
..
nfs_commonacl.c
nfs_commonkrpc.c Rework the handling of stop signals in the NFS client. The changes in 2013-02-06 17:06:51 +00:00
nfs_commonport.c Move the NFSv4.1 client patches over from projects/nfsv4.1-client 2012-12-08 22:52:39 +00:00
nfs_commonsubs.c Assert that the mbuf in the chain has sane length. Proper place for 2013-02-01 16:57:02 +00:00
nfs_var.h Move the NFSv4.1 client patches over from projects/nfsv4.1-client 2012-12-08 22:52:39 +00:00
nfs.h Further cleanups to use of timestamps in NFS: 2013-01-25 15:25:24 +00:00
nfscl.h Move the NFSv4.1 client patches over from projects/nfsv4.1-client 2012-12-08 22:52:39 +00:00
nfsclstate.h Move the NFSv4.1 client patches over from projects/nfsv4.1-client 2012-12-08 22:52:39 +00:00
nfsdport.h
nfskpiport.h
nfsm_subs.h Mechanically substitute flags from historic mbuf allocator with 2012-12-05 08:04:20 +00:00
nfsport.h Further cleanups to use of timestamps in NFS: 2013-01-25 15:25:24 +00:00
nfsproto.h Move the NFSv4.1 client patches over from projects/nfsv4.1-client 2012-12-08 22:52:39 +00:00
nfsrvcache.h
nfsrvstate.h
nfsv4_errstr.h
rpcv2.h
xdr_subs.h