Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
2642498f
Commit
2642498f
authored
Feb 07, 2004
by
Trond Myklebust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RPC/NFSv4: Allow lease RENEW calls to be soft (i.e. to time
out) despite the mount being hard.
parent
dce9f3bf
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
7 deletions
+13
-7
fs/nfs/nfs4proc.c
fs/nfs/nfs4proc.c
+2
-1
include/linux/sunrpc/sched.h
include/linux/sunrpc/sched.h
+2
-0
net/sunrpc/clnt.c
net/sunrpc/clnt.c
+2
-2
net/sunrpc/sched.c
net/sunrpc/sched.c
+4
-1
net/sunrpc/xprt.c
net/sunrpc/xprt.c
+3
-3
No files found.
fs/nfs/nfs4proc.c
View file @
2642498f
...
...
@@ -1639,7 +1639,8 @@ nfs4_proc_async_renew(struct nfs4_client *clp)
.
rpc_cred
=
clp
->
cl_cred
,
};
return
rpc_call_async
(
clp
->
cl_rpcclient
,
&
msg
,
0
,
renew_done
,
(
void
*
)
jiffies
);
return
rpc_call_async
(
clp
->
cl_rpcclient
,
&
msg
,
RPC_TASK_SOFT
,
renew_done
,
(
void
*
)
jiffies
);
}
int
...
...
include/linux/sunrpc/sched.h
View file @
2642498f
...
...
@@ -108,6 +108,7 @@ typedef void (*rpc_action)(struct rpc_task *);
#define RPC_TASK_ROOTCREDS 0x0040
/* force root creds */
#define RPC_TASK_DYNAMIC 0x0080
/* task was kmalloc'ed */
#define RPC_TASK_KILLED 0x0100
/* task was killed */
#define RPC_TASK_SOFT 0x0200
/* Use soft timeouts */
#define RPC_IS_ASYNC(t) ((t)->tk_flags & RPC_TASK_ASYNC)
#define RPC_IS_SETUID(t) ((t)->tk_flags & RPC_TASK_SETUID)
...
...
@@ -117,6 +118,7 @@ typedef void (*rpc_action)(struct rpc_task *);
#define RPC_ASSASSINATED(t) ((t)->tk_flags & RPC_TASK_KILLED)
#define RPC_IS_ACTIVATED(t) ((t)->tk_active)
#define RPC_DO_CALLBACK(t) ((t)->tk_callback != NULL)
#define RPC_IS_SOFT(t) ((t)->tk_flags & RPC_TASK_SOFT)
#define RPC_TASK_SLEEPING 0
#define RPC_TASK_RUNNING 1
...
...
net/sunrpc/clnt.c
View file @
2642498f
...
...
@@ -798,7 +798,7 @@ call_timeout(struct rpc_task *task)
to
->
to_retries
=
clnt
->
cl_timeout
.
to_retries
;
dprintk
(
"RPC: %4d call_timeout (major)
\n
"
,
task
->
tk_pid
);
if
(
clnt
->
cl_softrtry
)
{
if
(
RPC_IS_SOFT
(
task
)
)
{
if
(
clnt
->
cl_chatty
)
printk
(
KERN_NOTICE
"%s: server %s not responding, timed out
\n
"
,
clnt
->
cl_protname
,
clnt
->
cl_server
);
...
...
@@ -841,7 +841,7 @@ call_decode(struct rpc_task *task)
}
if
(
task
->
tk_status
<
12
)
{
if
(
!
clnt
->
cl_softrtry
)
{
if
(
!
RPC_IS_SOFT
(
task
)
)
{
task
->
tk_action
=
call_bind
;
clnt
->
cl_stats
->
rpcretrans
++
;
goto
out_retry
;
...
...
net/sunrpc/sched.c
View file @
2642498f
...
...
@@ -731,8 +731,11 @@ rpc_init_task(struct rpc_task *task, struct rpc_clnt *clnt,
list_add
(
&
task
->
tk_task
,
&
all_tasks
);
spin_unlock
(
&
rpc_sched_lock
);
if
(
clnt
)
if
(
clnt
)
{
atomic_inc
(
&
clnt
->
cl_users
);
if
(
clnt
->
cl_softrtry
)
task
->
tk_flags
|=
RPC_TASK_SOFT
;
}
#ifdef RPC_DEBUG
task
->
tk_magic
=
0xf00baa
;
...
...
net/sunrpc/xprt.c
View file @
2642498f
...
...
@@ -488,7 +488,7 @@ xprt_connect(struct rpc_task *task)
case
-
ECONNREFUSED
:
case
-
ECONNRESET
:
case
-
ENOTCONN
:
if
(
!
task
->
tk_client
->
cl_softrtry
)
{
if
(
!
RPC_IS_SOFT
(
task
)
)
{
rpc_delay
(
task
,
RPC_REESTABLISH_TIMEOUT
);
task
->
tk_status
=
-
ENOTCONN
;
break
;
...
...
@@ -496,7 +496,7 @@ xprt_connect(struct rpc_task *task)
default:
/* Report myriad other possible returns. If this file
* system is soft mounted, just error out, like Solaris. */
if
(
task
->
tk_client
->
cl_softrtry
)
{
if
(
RPC_IS_SOFT
(
task
)
)
{
printk
(
KERN_WARNING
"RPC: error %d connecting to server %s, exiting
\n
"
,
-
status
,
task
->
tk_client
->
cl_server
);
...
...
@@ -530,7 +530,7 @@ xprt_connect_status(struct rpc_task *task)
}
/* if soft mounted, just cause this RPC to fail */
if
(
task
->
tk_client
->
cl_softrtry
)
if
(
RPC_IS_SOFT
(
task
)
)
task
->
tk_status
=
-
EIO
;
switch
(
task
->
tk_status
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment