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
a2118c33
Commit
a2118c33
authored
Jun 16, 2010
by
Trond Myklebust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NFSv41: Don't store session state in the nfs_client->cl_state
Signed-off-by:
Trond Myklebust
<
Trond.Myklebust@netapp.com
>
parent
df896455
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
5 deletions
+10
-5
fs/nfs/nfs4_fs.h
fs/nfs/nfs4_fs.h
+4
-1
fs/nfs/nfs4proc.c
fs/nfs/nfs4proc.c
+2
-2
fs/nfs/nfs4state.c
fs/nfs/nfs4state.c
+4
-2
No files found.
fs/nfs/nfs4_fs.h
View file @
a2118c33
...
@@ -45,10 +45,13 @@ enum nfs4_client_state {
...
@@ -45,10 +45,13 @@ enum nfs4_client_state {
NFS4CLNT_RECLAIM_NOGRACE
,
NFS4CLNT_RECLAIM_NOGRACE
,
NFS4CLNT_DELEGRETURN
,
NFS4CLNT_DELEGRETURN
,
NFS4CLNT_SESSION_RESET
,
NFS4CLNT_SESSION_RESET
,
NFS4CLNT_SESSION_DRAINING
,
NFS4CLNT_RECALL_SLOT
,
NFS4CLNT_RECALL_SLOT
,
};
};
enum
nfs4_session_state
{
NFS4_SESSION_DRAINING
,
};
/*
/*
* struct rpc_sequence ensures that RPC calls are sent in the exact
* struct rpc_sequence ensures that RPC calls are sent in the exact
* order that they appear on the list.
* order that they appear on the list.
...
...
fs/nfs/nfs4proc.c
View file @
a2118c33
...
@@ -356,7 +356,7 @@ static void nfs41_check_drain_session_complete(struct nfs4_session *ses)
...
@@ -356,7 +356,7 @@ static void nfs41_check_drain_session_complete(struct nfs4_session *ses)
{
{
struct
rpc_task
*
task
;
struct
rpc_task
*
task
;
if
(
!
test_bit
(
NFS4
CLNT_SESSION_DRAINING
,
&
ses
->
clp
->
cl
_state
))
{
if
(
!
test_bit
(
NFS4
_SESSION_DRAINING
,
&
ses
->
session
_state
))
{
task
=
rpc_wake_up_next
(
&
ses
->
fc_slot_table
.
slot_tbl_waitq
);
task
=
rpc_wake_up_next
(
&
ses
->
fc_slot_table
.
slot_tbl_waitq
);
if
(
task
)
if
(
task
)
rpc_task_set_priority
(
task
,
RPC_PRIORITY_PRIVILEGED
);
rpc_task_set_priority
(
task
,
RPC_PRIORITY_PRIVILEGED
);
...
@@ -489,7 +489,7 @@ static int nfs41_setup_sequence(struct nfs4_session *session,
...
@@ -489,7 +489,7 @@ static int nfs41_setup_sequence(struct nfs4_session *session,
tbl
=
&
session
->
fc_slot_table
;
tbl
=
&
session
->
fc_slot_table
;
spin_lock
(
&
tbl
->
slot_tbl_lock
);
spin_lock
(
&
tbl
->
slot_tbl_lock
);
if
(
test_bit
(
NFS4
CLNT_SESSION_DRAINING
,
&
session
->
clp
->
cl
_state
)
&&
if
(
test_bit
(
NFS4
_SESSION_DRAINING
,
&
session
->
session
_state
)
&&
!
rpc_task_has_priority
(
task
,
RPC_PRIORITY_PRIVILEGED
))
{
!
rpc_task_has_priority
(
task
,
RPC_PRIORITY_PRIVILEGED
))
{
/*
/*
* The state manager will wait until the slot table is empty.
* The state manager will wait until the slot table is empty.
...
...
fs/nfs/nfs4state.c
View file @
a2118c33
...
@@ -145,7 +145,9 @@ static void nfs4_end_drain_session(struct nfs_client *clp)
...
@@ -145,7 +145,9 @@ static void nfs4_end_drain_session(struct nfs_client *clp)
struct
nfs4_session
*
ses
=
clp
->
cl_session
;
struct
nfs4_session
*
ses
=
clp
->
cl_session
;
int
max_slots
;
int
max_slots
;
if
(
test_and_clear_bit
(
NFS4CLNT_SESSION_DRAINING
,
&
clp
->
cl_state
))
{
if
(
ses
==
NULL
)
return
;
if
(
test_and_clear_bit
(
NFS4_SESSION_DRAINING
,
&
ses
->
session_state
))
{
spin_lock
(
&
ses
->
fc_slot_table
.
slot_tbl_lock
);
spin_lock
(
&
ses
->
fc_slot_table
.
slot_tbl_lock
);
max_slots
=
ses
->
fc_slot_table
.
max_slots
;
max_slots
=
ses
->
fc_slot_table
.
max_slots
;
while
(
max_slots
--
)
{
while
(
max_slots
--
)
{
...
@@ -167,7 +169,7 @@ static int nfs4_begin_drain_session(struct nfs_client *clp)
...
@@ -167,7 +169,7 @@ static int nfs4_begin_drain_session(struct nfs_client *clp)
struct
nfs4_slot_table
*
tbl
=
&
ses
->
fc_slot_table
;
struct
nfs4_slot_table
*
tbl
=
&
ses
->
fc_slot_table
;
spin_lock
(
&
tbl
->
slot_tbl_lock
);
spin_lock
(
&
tbl
->
slot_tbl_lock
);
set_bit
(
NFS4
CLNT_SESSION_DRAINING
,
&
clp
->
cl
_state
);
set_bit
(
NFS4
_SESSION_DRAINING
,
&
ses
->
session
_state
);
if
(
tbl
->
highest_used_slotid
!=
-
1
)
{
if
(
tbl
->
highest_used_slotid
!=
-
1
)
{
INIT_COMPLETION
(
ses
->
complete
);
INIT_COMPLETION
(
ses
->
complete
);
spin_unlock
(
&
tbl
->
slot_tbl_lock
);
spin_unlock
(
&
tbl
->
slot_tbl_lock
);
...
...
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