diff options
| author | Trond Myklebust <trond.myklebust@fys.uio.no> | 2004-02-07 17:00:03 +0100 |
|---|---|---|
| committer | Trond Myklebust <trond.myklebust@fys.uio.no> | 2004-02-07 17:00:03 +0100 |
| commit | ab91d13dcba1d0b69394fa1b0a3b034db71316ca (patch) | |
| tree | 47d6861adb33ddf41095bf14dcb2f7f33272cd62 /include/linux | |
| parent | 2642498f5cd2b90e55736e8cfd312c05f63301e3 (diff) | |
RPC: Ensure that we disconnect TCP sockets if there has been no
NFS traffic for the last 5 minutes. This code also affects
NFSv2/v3.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/sunrpc/xprt.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 8472b1c5ad2e..393e6dc6a268 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h @@ -163,6 +163,12 @@ struct rpc_xprt { tcp_offset; /* fragment offset */ unsigned long tcp_copied, /* copied to request */ tcp_flags; + /* + * Disconnection of idle sockets + */ + struct work_struct task_cleanup; + struct timer_list timer; + unsigned long last_used; /* * Send stuff @@ -202,6 +208,7 @@ int xprt_clear_backlog(struct rpc_xprt *); void xprt_sock_setbufsize(struct rpc_xprt *); #define XPRT_CONNECT 0 +#define XPRT_LOCKED 1 #define xprt_connected(xp) (test_bit(XPRT_CONNECT, &(xp)->sockstate)) #define xprt_set_connected(xp) (set_bit(XPRT_CONNECT, &(xp)->sockstate)) |
