Commit Graph

15 Commits

Author SHA1 Message Date
ru
522e9c2b7b Fix -Wundef. 2005-12-04 02:12:43 +00:00
rwatson
c479a90eb8 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
das
31c9390595 - Don't call rpcclnt_realign() if we don't have any mbufs to realign.
- Remove a bogus and unneeded null pointer check.

Found by:	Coverity Prevent analysis tool
Approved by:	alfred
2005-03-19 01:16:25 +00:00
imp
f0bf889d0d /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
rees
f24213beb7 fix array index out of bounds in rpc->rc_srtt[], rpc->rc_sdrtt[]
Noticed by: tedu
Approved by: alfred
2004-07-15 22:21:25 +00:00
rwatson
f1f1364540 Constify 'rpcclnt_backoff'. 2004-07-12 19:37:08 +00:00
kan
97b7fb767e Reset callout if in nfs_timeout and rpcclnt_timeout functions. Timer
are supposed to continue firing as long as there is work to do, not
stop after the first invocation.

This is damage control after a patch that has been committed prematurely.

Tested by:	kris
2004-03-28 05:55:27 +00:00
rees
4bf96c35a5 only do nfs rpc callouts if there is work to do.
Submitted by:	kan
Approved by:	alfred
2004-03-25 21:48:09 +00:00
kan
edfb020c30 Convert from timeout to callout API. 2004-03-07 16:23:03 +00:00
alfred
ffaedccd58 Don't panic because of RPC proto mismatches. Whitespace cleanup.
Submitted by: Jim Rees <rees@umich.edu>
2004-01-17 21:25:05 +00:00
alfred
7dfc5abc07 Prevent a panic when mounting a v2/v3 only server with mount_nfs4.
Submitted by: Jim Rees <rees@umich.edu>
Reported/testing: Florian C. Smeets <flo@kasimir.com>
2004-01-13 01:04:36 +00:00
alfred
0447b5115d Fix a panic when attempting a v4 op against a v3/v2-only server.
It happens because rpcclnt_request is incorrectly returning 0 in the case
of an rpc mismatch or auth error.

Submitted by: Jim Rees <rees@umich.edu>
2004-01-10 02:59:54 +00:00
alfred
9059a984da Use %zu to printf a size_t instead of an int cast.
Requested by: jmallett, wollman
2003-11-15 01:58:47 +00:00
alfred
6763fe0b20 Fix compilation warnings on sparc.
Cast sizeof to int for printing with %d.
2003-11-15 01:24:46 +00:00
alfred
5b076fe9da University of Michigan's Citi NFSv4 kernel client code.
Submitted by: Jim Rees <rees@umich.edu>
2003-11-14 20:54:10 +00:00