1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-20 11:11:24 +00:00
freebsd/sys/nfsclient
Robert Watson 84d2b7df26 Add GIANT_REQUIRED and WITNESS sleep warnings to uprintf() and tprintf(),
as they both interact with the tty code (!MPSAFE) and may sleep if the
tty buffer is full (per comment).

Modify all consumers of uprintf() and tprintf() to hold Giant around
calls into these functions.  In most cases, this means adding an
acquisition of Giant immediately around the function.  In some cases
(nfs_timer()), it means acquiring Giant higher up in the callout.

With these changes, UFS no longer panics on SMP when either blocks are
exhausted or inodes are exhausted under load due to races in the tty
code when running without Giant.

NB: Some reduction in calls to uprintf() in the svr4 code is probably
desirable.

NB: In the case of nfs_timer(), calling uprintf() while holding a mutex,
or even in a callout at all, is a bad idea, and will generate warnings
and potential upset.  This needs to be fixed, but was a problem before
this change.

NB: uprintf()/tprintf() sleeping is generally a bad ideas, as is having
non-MPSAFE tty code.

MFC after:	1 week
2005-09-19 16:51:43 +00:00
..
bootp_subr.c When netbooting, as soon as we've figured out which interface we booted 2005-04-26 20:45:29 +00:00
krpc_subr.c MFp4: use the function to fix the packet header length instead of rolling 2005-03-16 08:13:08 +00:00
krpc.h
nfs_bio.c Remove the NFS client rslock. The rslock was used to serialize 2005-07-21 22:46:56 +00:00
nfs_diskless.c While I'm here, list the new kenv (boot.netif.name) along with the others. 2005-04-26 20:47:59 +00:00
nfs_lock.c
nfs_lock.h
nfs_nfsiod.c Drop Giant before calling kthread_exit(). 2005-02-07 18:21:50 +00:00
nfs_node.c In nfs_nget() if two threads race on the same filehandle, the loser should 2005-07-27 15:05:31 +00:00
nfs_socket.c Add GIANT_REQUIRED and WITNESS sleep warnings to uprintf() and tprintf(), 2005-09-19 16:51:43 +00:00
nfs_subs.c Make nfs_timer() MPSAFE. With this change, the bottom half of the NFS 2005-07-19 21:27:25 +00:00
nfs_vfsops.c Fix a serious deadlock with the NFS client. Given a large enough 2005-06-10 23:50:41 +00:00
nfs_vnops.c - cache_lookup() relocks the parent in the DOTDOT case for us. 2005-04-14 07:08:34 +00:00
nfs.h Make nfs_timer() MPSAFE. With this change, the bottom half of the NFS 2005-07-19 21:27:25 +00:00
nfsargs.h Fix a serious deadlock with the NFS client. Given a large enough 2005-06-10 23:50:41 +00:00
nfsdiskless.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
nfsm_subs.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
nfsmount.h Fix a serious deadlock with the NFS client. Given a large enough 2005-06-10 23:50:41 +00:00
nfsnode.h Remove the NFS client rslock. The rslock was used to serialize 2005-07-21 22:46:56 +00:00
nfsstats.h /* -> /*- for license, minor formatting changes 2005-01-07 01:45:51 +00:00
nlminfo.h