diff options
| author | Trond Myklebust <trond.myklebust@fys.uio.no> | 2004-03-13 11:40:04 -0500 |
|---|---|---|
| committer | Trond Myklebust <trond.myklebust@fys.uio.no> | 2004-03-13 11:40:04 -0500 |
| commit | d55e1a05ed4ffe8fcbe388e98639dd4578b7296a (patch) | |
| tree | 0b325b9884fe372bae371525a6b13c4233a18ca4 /include/linux | |
| parent | 4a50d68c0ff3117cd04cec4f2fd37dac9c82d203 (diff) | |
RPC: Sync rpc_set_timeo() up to the 2.4.x version. In particular, this will
ensure that the timeout shift is clamped to a maximum value of 8.
RPC: Fix by Olaf Kirch to the rpc scheduler to ensure sync tasks respect the
"intr" mount flag.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/sunrpc/timer.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/linux/sunrpc/timer.h b/include/linux/sunrpc/timer.h index 1d0d3a0d64ec..a67fd734c73b 100644 --- a/include/linux/sunrpc/timer.h +++ b/include/linux/sunrpc/timer.h @@ -25,9 +25,18 @@ extern unsigned long rpc_calc_rto(struct rpc_rtt *rt, unsigned timer); static inline void rpc_set_timeo(struct rpc_rtt *rt, int timer, int ntimeo) { + int *t; if (!timer) return; - rt->ntimeouts[timer-1] = ntimeo; + t = &rt->ntimeouts[timer-1]; + if (ntimeo < *t) { + if (*t > 0) + (*t)--; + } else { + if (ntimeo > 8) + ntimeo = 8; + *t = ntimeo; + } } static inline int rpc_ntimeo(struct rpc_rtt *rt, int timer) |
