Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
c48f4f35
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
c48f4f35
编写于
6月 16, 2010
作者:
T
Trond Myklebust
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
NFSv41: Convert the various reboot recovery ops etc to minor version ops
Signed-off-by:
N
Trond Myklebust
<
Trond.Myklebust@netapp.com
>
上级
97dc1359
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
18 addition
and
38 deletion
+18
-38
fs/nfs/nfs4_fs.h
fs/nfs/nfs4_fs.h
+3
-3
fs/nfs/nfs4proc.c
fs/nfs/nfs4proc.c
+6
-25
fs/nfs/nfs4renewd.c
fs/nfs/nfs4renewd.c
+2
-2
fs/nfs/nfs4state.c
fs/nfs/nfs4state.c
+7
-8
未找到文件。
fs/nfs/nfs4_fs.h
浏览文件 @
c48f4f35
...
...
@@ -60,6 +60,9 @@ struct nfs4_minor_version_ops {
struct
nfs4_sequence_args
*
args
,
struct
nfs4_sequence_res
*
res
,
int
cache_reply
);
const
struct
nfs4_state_recovery_ops
*
reboot_recovery_ops
;
const
struct
nfs4_state_recovery_ops
*
nograce_recovery_ops
;
const
struct
nfs4_state_maintenance_ops
*
state_renewal_ops
;
};
/*
...
...
@@ -233,8 +236,6 @@ extern int nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *fh
extern
int
nfs4_proc_fs_locations
(
struct
inode
*
dir
,
const
struct
qstr
*
name
,
struct
nfs4_fs_locations
*
fs_locations
,
struct
page
*
page
);
extern
struct
nfs4_state_recovery_ops
*
nfs4_reboot_recovery_ops
[];
extern
struct
nfs4_state_recovery_ops
*
nfs4_nograce_recovery_ops
[];
#if defined(CONFIG_NFS_V4_1)
static
inline
struct
nfs4_session
*
nfs4_get_session
(
const
struct
nfs_server
*
server
)
{
...
...
@@ -271,7 +272,6 @@ static inline int nfs4_init_session(struct nfs_server *server)
#endif
/* CONFIG_NFS_V4_1 */
extern
const
struct
nfs4_minor_version_ops
*
nfs_v4_minor_ops
[];
extern
struct
nfs4_state_maintenance_ops
*
nfs4_state_renewal_ops
[];
extern
const
u32
nfs4_fattr_bitmap
[
2
];
extern
const
u32
nfs4_statfs_bitmap
[
2
];
...
...
fs/nfs/nfs4proc.c
浏览文件 @
c48f4f35
...
...
@@ -5356,40 +5356,21 @@ struct nfs4_state_maintenance_ops nfs41_state_renewal_ops = {
static
const
struct
nfs4_minor_version_ops
nfs_v4_0_minor_ops
=
{
.
minor_version
=
0
,
.
call_sync
=
_nfs4_call_sync
,
.
reboot_recovery_ops
=
&
nfs40_reboot_recovery_ops
,
.
nograce_recovery_ops
=
&
nfs40_nograce_recovery_ops
,
.
state_renewal_ops
=
&
nfs40_state_renewal_ops
,
};
#if defined(CONFIG_NFS_V4_1)
static
const
struct
nfs4_minor_version_ops
nfs_v4_1_minor_ops
=
{
.
minor_version
=
1
,
.
call_sync
=
_nfs4_call_sync_session
,
.
reboot_recovery_ops
=
&
nfs41_reboot_recovery_ops
,
.
nograce_recovery_ops
=
&
nfs41_nograce_recovery_ops
,
.
state_renewal_ops
=
&
nfs41_state_renewal_ops
,
};
#endif
/*
* Per minor version reboot and network partition recovery ops
*/
struct
nfs4_state_recovery_ops
*
nfs4_reboot_recovery_ops
[]
=
{
&
nfs40_reboot_recovery_ops
,
#if defined(CONFIG_NFS_V4_1)
&
nfs41_reboot_recovery_ops
,
#endif
};
struct
nfs4_state_recovery_ops
*
nfs4_nograce_recovery_ops
[]
=
{
&
nfs40_nograce_recovery_ops
,
#if defined(CONFIG_NFS_V4_1)
&
nfs41_nograce_recovery_ops
,
#endif
};
struct
nfs4_state_maintenance_ops
*
nfs4_state_renewal_ops
[]
=
{
&
nfs40_state_renewal_ops
,
#if defined(CONFIG_NFS_V4_1)
&
nfs41_state_renewal_ops
,
#endif
};
const
struct
nfs4_minor_version_ops
*
nfs_v4_minor_ops
[]
=
{
[
0
]
=
&
nfs_v4_0_minor_ops
,
#if defined(CONFIG_NFS_V4_1)
...
...
fs/nfs/nfs4renewd.c
浏览文件 @
c48f4f35
...
...
@@ -54,14 +54,14 @@
void
nfs4_renew_state
(
struct
work_struct
*
work
)
{
struct
nfs4_state_maintenance_ops
*
ops
;
const
struct
nfs4_state_maintenance_ops
*
ops
;
struct
nfs_client
*
clp
=
container_of
(
work
,
struct
nfs_client
,
cl_renewd
.
work
);
struct
rpc_cred
*
cred
;
long
lease
;
unsigned
long
last
,
now
;
ops
=
nfs4_state_renewal_ops
[
clp
->
cl_minorversion
]
;
ops
=
clp
->
cl_mvops
->
state_renewal_ops
;
dprintk
(
"%s: start
\n
"
,
__func__
);
/* Are there any active superblocks? */
if
(
list_empty
(
&
clp
->
cl_superblocks
))
...
...
fs/nfs/nfs4state.c
浏览文件 @
c48f4f35
...
...
@@ -1122,8 +1122,7 @@ static void nfs4_state_end_reclaim_reboot(struct nfs_client *clp)
if
(
!
test_and_clear_bit
(
NFS4CLNT_RECLAIM_REBOOT
,
&
clp
->
cl_state
))
return
;
nfs4_reclaim_complete
(
clp
,
nfs4_reboot_recovery_ops
[
clp
->
cl_minorversion
]);
nfs4_reclaim_complete
(
clp
,
clp
->
cl_mvops
->
reboot_recovery_ops
);
for
(
pos
=
rb_first
(
&
clp
->
cl_state_owners
);
pos
!=
NULL
;
pos
=
rb_next
(
pos
))
{
sp
=
rb_entry
(
pos
,
struct
nfs4_state_owner
,
so_client_node
);
...
...
@@ -1213,8 +1212,8 @@ static int nfs4_do_reclaim(struct nfs_client *clp, const struct nfs4_state_recov
static
int
nfs4_check_lease
(
struct
nfs_client
*
clp
)
{
struct
rpc_cred
*
cred
;
struct
nfs4_state_maintenance_ops
*
ops
=
nfs4_state_renewal_ops
[
clp
->
cl_minorversion
]
;
const
struct
nfs4_state_maintenance_ops
*
ops
=
clp
->
cl_mvops
->
state_renewal_ops
;
int
status
=
-
NFS4ERR_EXPIRED
;
/* Is the client already known to have an expired lease? */
...
...
@@ -1237,8 +1236,8 @@ static int nfs4_check_lease(struct nfs_client *clp)
static
int
nfs4_reclaim_lease
(
struct
nfs_client
*
clp
)
{
struct
rpc_cred
*
cred
;
struct
nfs4_state_recovery_ops
*
ops
=
nfs4_reboot_recovery_ops
[
clp
->
cl_minorversion
]
;
const
struct
nfs4_state_recovery_ops
*
ops
=
clp
->
cl_mvops
->
reboot_recovery_ops
;
int
status
=
-
ENOENT
;
cred
=
ops
->
get_clid_cred
(
clp
);
...
...
@@ -1446,7 +1445,7 @@ static void nfs4_state_manager(struct nfs_client *clp)
/* First recover reboot state... */
if
(
test_bit
(
NFS4CLNT_RECLAIM_REBOOT
,
&
clp
->
cl_state
))
{
status
=
nfs4_do_reclaim
(
clp
,
nfs4_reboot_recovery_ops
[
clp
->
cl_minorversion
]
);
clp
->
cl_mvops
->
reboot_recovery_ops
);
if
(
test_bit
(
NFS4CLNT_LEASE_EXPIRED
,
&
clp
->
cl_state
)
||
test_bit
(
NFS4CLNT_SESSION_RESET
,
&
clp
->
cl_state
))
continue
;
...
...
@@ -1460,7 +1459,7 @@ static void nfs4_state_manager(struct nfs_client *clp)
/* Now recover expired state... */
if
(
test_and_clear_bit
(
NFS4CLNT_RECLAIM_NOGRACE
,
&
clp
->
cl_state
))
{
status
=
nfs4_do_reclaim
(
clp
,
nfs4_nograce_recovery_ops
[
clp
->
cl_minorversion
]
);
clp
->
cl_mvops
->
nograce_recovery_ops
);
if
(
test_bit
(
NFS4CLNT_LEASE_EXPIRED
,
&
clp
->
cl_state
)
||
test_bit
(
NFS4CLNT_SESSION_RESET
,
&
clp
->
cl_state
)
||
test_bit
(
NFS4CLNT_RECLAIM_REBOOT
,
&
clp
->
cl_state
))
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录