Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
gsplhtlxg
clone-Linux
提交
cc0a9843
C
clone-Linux
项目概览
gsplhtlxg
/
clone-Linux
通知
2
Star
0
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
clone-Linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
cc0a9843
编写于
5月 28, 2012
作者:
T
Trond Myklebust
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
NFSv4: Add debugging printks to state manager
Signed-off-by:
N
Trond Myklebust
<
Trond.Myklebust@netapp.com
>
上级
fb13bfa7
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
33 addition
and
0 deletion
+33
-0
fs/nfs/nfs4state.c
fs/nfs/nfs4state.c
+33
-0
未找到文件。
fs/nfs/nfs4state.c
浏览文件 @
cc0a9843
...
...
@@ -1108,6 +1108,8 @@ void nfs4_schedule_lease_recovery(struct nfs_client *clp)
return
;
if
(
!
test_bit
(
NFS4CLNT_LEASE_EXPIRED
,
&
clp
->
cl_state
))
set_bit
(
NFS4CLNT_CHECK_LEASE
,
&
clp
->
cl_state
);
dprintk
(
"%s: scheduling lease recovery for server %s
\n
"
,
__func__
,
clp
->
cl_hostname
);
nfs4_schedule_state_manager
(
clp
);
}
EXPORT_SYMBOL_GPL
(
nfs4_schedule_lease_recovery
);
...
...
@@ -1124,6 +1126,8 @@ static void nfs40_handle_cb_pathdown(struct nfs_client *clp)
{
set_bit
(
NFS4CLNT_LEASE_EXPIRED
,
&
clp
->
cl_state
);
nfs_expire_all_delegations
(
clp
);
dprintk
(
"%s: handling CB_PATHDOWN recovery for server %s
\n
"
,
__func__
,
clp
->
cl_hostname
);
}
void
nfs4_schedule_path_down_recovery
(
struct
nfs_client
*
clp
)
...
...
@@ -1160,6 +1164,8 @@ void nfs4_schedule_stateid_recovery(const struct nfs_server *server, struct nfs4
struct
nfs_client
*
clp
=
server
->
nfs_client
;
nfs4_state_mark_reclaim_nograce
(
clp
,
state
);
dprintk
(
"%s: scheduling stateid recovery for server %s
\n
"
,
__func__
,
clp
->
cl_hostname
);
nfs4_schedule_state_manager
(
clp
);
}
EXPORT_SYMBOL_GPL
(
nfs4_schedule_stateid_recovery
);
...
...
@@ -1506,8 +1512,12 @@ static int nfs4_recovery_handle_error(struct nfs_client *clp, int error)
nfs4_warn_keyexpired
(
clp
->
cl_hostname
);
break
;
default:
dprintk
(
"%s: failed to handle error %d for server %s
\n
"
,
__func__
,
error
,
clp
->
cl_hostname
);
return
error
;
}
dprintk
(
"%s: handled error %d for server %s
\n
"
,
__func__
,
error
,
clp
->
cl_hostname
);
return
0
;
}
...
...
@@ -1605,15 +1615,21 @@ static int nfs4_handle_reclaim_lease_error(struct nfs_client *clp, int status)
case
-
NFS4ERR_MINOR_VERS_MISMATCH
:
if
(
clp
->
cl_cons_state
==
NFS_CS_SESSION_INITING
)
nfs_mark_client_ready
(
clp
,
-
EPROTONOSUPPORT
);
dprintk
(
"%s: exit with error %d for server %s
\n
"
,
__func__
,
-
EPROTONOSUPPORT
,
clp
->
cl_hostname
);
return
-
EPROTONOSUPPORT
;
case
-
EKEYEXPIRED
:
nfs4_warn_keyexpired
(
clp
->
cl_hostname
);
case
-
NFS4ERR_NOT_SAME
:
/* FixMe: implement recovery
* in nfs4_exchange_id */
default:
dprintk
(
"%s: exit with error %d for server %s
\n
"
,
__func__
,
status
,
clp
->
cl_hostname
);
return
status
;
}
set_bit
(
NFS4CLNT_LEASE_EXPIRED
,
&
clp
->
cl_state
);
dprintk
(
"%s: handled error %d for server %s
\n
"
,
__func__
,
status
,
clp
->
cl_hostname
);
return
0
;
}
...
...
@@ -1653,6 +1669,8 @@ EXPORT_SYMBOL_GPL(nfs4_schedule_session_recovery);
void
nfs41_handle_recall_slot
(
struct
nfs_client
*
clp
)
{
set_bit
(
NFS4CLNT_RECALL_SLOT
,
&
clp
->
cl_state
);
dprintk
(
"%s: scheduling slot recall for server %s
\n
"
,
__func__
,
clp
->
cl_hostname
);
nfs4_schedule_state_manager
(
clp
);
}
...
...
@@ -1662,6 +1680,8 @@ static void nfs4_reset_all_state(struct nfs_client *clp)
set_bit
(
NFS4CLNT_PURGE_STATE
,
&
clp
->
cl_state
);
clear_bit
(
NFS4CLNT_LEASE_CONFIRM
,
&
clp
->
cl_state
);
nfs4_state_start_reclaim_nograce
(
clp
);
dprintk
(
"%s: scheduling reset of all state for server %s!
\n
"
,
__func__
,
clp
->
cl_hostname
);
nfs4_schedule_state_manager
(
clp
);
}
}
...
...
@@ -1670,6 +1690,8 @@ static void nfs41_handle_server_reboot(struct nfs_client *clp)
{
if
(
test_and_set_bit
(
NFS4CLNT_LEASE_EXPIRED
,
&
clp
->
cl_state
)
==
0
)
{
nfs4_state_start_reclaim_reboot
(
clp
);
dprintk
(
"%s: server %s rebooted!
\n
"
,
__func__
,
clp
->
cl_hostname
);
nfs4_schedule_state_manager
(
clp
);
}
}
...
...
@@ -1677,12 +1699,15 @@ static void nfs41_handle_server_reboot(struct nfs_client *clp)
static
void
nfs41_handle_state_revoked
(
struct
nfs_client
*
clp
)
{
nfs4_reset_all_state
(
clp
);
dprintk
(
"%s: state revoked on server %s
\n
"
,
__func__
,
clp
->
cl_hostname
);
}
static
void
nfs41_handle_recallable_state_revoked
(
struct
nfs_client
*
clp
)
{
/* This will need to handle layouts too */
nfs_expire_all_delegations
(
clp
);
dprintk
(
"%s: Recallable state revoked on server %s!
\n
"
,
__func__
,
clp
->
cl_hostname
);
}
static
void
nfs41_handle_backchannel_fault
(
struct
nfs_client
*
clp
)
...
...
@@ -1690,6 +1715,8 @@ static void nfs41_handle_backchannel_fault(struct nfs_client *clp)
nfs_expire_all_delegations
(
clp
);
if
(
test_and_set_bit
(
NFS4CLNT_SESSION_RESET
,
&
clp
->
cl_state
)
==
0
)
nfs4_schedule_state_manager
(
clp
);
dprintk
(
"%s: server %s declared a backchannel fault
\n
"
,
__func__
,
clp
->
cl_hostname
);
}
static
void
nfs41_handle_cb_path_down
(
struct
nfs_client
*
clp
)
...
...
@@ -1740,6 +1767,8 @@ static int nfs4_reset_session(struct nfs_client *clp)
memset
(
clp
->
cl_session
->
sess_id
.
data
,
0
,
NFS4_MAX_SESSIONID_LEN
);
status
=
nfs4_proc_create_session
(
clp
,
cred
);
if
(
status
)
{
dprintk
(
"%s: session reset failed with status %d for server %s!
\n
"
,
__func__
,
status
,
clp
->
cl_hostname
);
status
=
nfs4_handle_reclaim_lease_error
(
clp
,
status
);
goto
out
;
}
...
...
@@ -1747,6 +1776,8 @@ static int nfs4_reset_session(struct nfs_client *clp)
/* create_session negotiated new slot table */
clear_bit
(
NFS4CLNT_RECALL_SLOT
,
&
clp
->
cl_state
);
clear_bit
(
NFS4CLNT_BIND_CONN_TO_SESSION
,
&
clp
->
cl_state
);
dprintk
(
"%s: session reset was successful for server %s!
\n
"
,
__func__
,
clp
->
cl_hostname
);
/* Let the state manager reestablish state */
if
(
!
test_bit
(
NFS4CLNT_LEASE_EXPIRED
,
&
clp
->
cl_state
))
...
...
@@ -1798,6 +1829,8 @@ static int nfs4_bind_conn_to_session(struct nfs_client *clp)
clear_bit
(
NFS4CLNT_BIND_CONN_TO_SESSION
,
&
clp
->
cl_state
);
switch
(
ret
)
{
case
0
:
dprintk
(
"%s: bind_conn_to_session was successful for server %s!
\n
"
,
__func__
,
clp
->
cl_hostname
);
break
;
case
-
NFS4ERR_DELAY
:
ssleep
(
1
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录