Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
97dc1359
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看板
提交
97dc1359
编写于
6月 16, 2010
作者:
T
Trond Myklebust
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
NFSv41: Clean up the NFSv4.1 minor version specific operations
Signed-off-by:
N
Trond Myklebust
<
Trond.Myklebust@netapp.com
>
上级
a2118c33
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
39 addition
and
14 deletion
+39
-14
fs/nfs/client.c
fs/nfs/client.c
+6
-8
fs/nfs/nfs4_fs.h
fs/nfs/nfs4_fs.h
+11
-0
fs/nfs/nfs4proc.c
fs/nfs/nfs4proc.c
+20
-1
include/linux/nfs_fs_sb.h
include/linux/nfs_fs_sb.h
+2
-5
未找到文件。
fs/nfs/client.c
浏览文件 @
97dc1359
...
...
@@ -150,6 +150,7 @@ static struct nfs_client *nfs_alloc_client(const struct nfs_client_initdata *cl_
clp
->
cl_boot_time
=
CURRENT_TIME
;
clp
->
cl_state
=
1
<<
NFS4CLNT_LEASE_EXPIRED
;
clp
->
cl_minorversion
=
cl_init
->
minorversion
;
clp
->
cl_mvops
=
nfs_v4_minor_ops
[
cl_init
->
minorversion
];
#endif
cred
=
rpc_lookup_machine_cred
();
if
(
!
IS_ERR
(
cred
))
...
...
@@ -178,7 +179,7 @@ static void nfs4_clear_client_minor_version(struct nfs_client *clp)
clp
->
cl_session
=
NULL
;
}
clp
->
cl_
call_sync
=
_nfs4_call_sync
;
clp
->
cl_
mvops
=
nfs_v4_minor_ops
[
0
]
;
#endif
/* CONFIG_NFS_V4_1 */
}
...
...
@@ -188,7 +189,7 @@ static void nfs4_clear_client_minor_version(struct nfs_client *clp)
static
void
nfs4_destroy_callback
(
struct
nfs_client
*
clp
)
{
if
(
__test_and_clear_bit
(
NFS_CS_CALLBACK
,
&
clp
->
cl_res_state
))
nfs_callback_down
(
clp
->
cl_m
inor
version
);
nfs_callback_down
(
clp
->
cl_m
vops
->
minor_
version
);
}
static
void
nfs4_shutdown_client
(
struct
nfs_client
*
clp
)
...
...
@@ -1126,7 +1127,7 @@ static int nfs4_init_callback(struct nfs_client *clp)
return
error
;
}
error
=
nfs_callback_up
(
clp
->
cl_m
inor
version
,
error
=
nfs_callback_up
(
clp
->
cl_m
vops
->
minor_
version
,
clp
->
cl_rpcclient
->
cl_xprt
);
if
(
error
<
0
)
{
dprintk
(
"%s: failed to start callback. Error = %d
\n
"
,
...
...
@@ -1143,10 +1144,8 @@ static int nfs4_init_callback(struct nfs_client *clp)
*/
static
int
nfs4_init_client_minor_version
(
struct
nfs_client
*
clp
)
{
clp
->
cl_call_sync
=
_nfs4_call_sync
;
#if defined(CONFIG_NFS_V4_1)
if
(
clp
->
cl_m
inor
version
)
{
if
(
clp
->
cl_m
vops
->
minor_
version
)
{
struct
nfs4_session
*
session
=
NULL
;
/*
* Create the session and mark it expired.
...
...
@@ -1158,7 +1157,6 @@ static int nfs4_init_client_minor_version(struct nfs_client *clp)
return
-
ENOMEM
;
clp
->
cl_session
=
session
;
clp
->
cl_call_sync
=
_nfs4_call_sync_session
;
}
#endif
/* CONFIG_NFS_V4_1 */
...
...
@@ -1454,7 +1452,7 @@ struct nfs_server *nfs4_create_referral_server(struct nfs_clone_mount *data,
data
->
authflavor
,
parent_server
->
client
->
cl_xprt
->
prot
,
parent_server
->
client
->
cl_timeout
,
parent_client
->
cl_m
inor
version
);
parent_client
->
cl_m
vops
->
minor_
version
);
if
(
error
<
0
)
goto
error
;
...
...
fs/nfs/nfs4_fs.h
浏览文件 @
97dc1359
...
...
@@ -52,6 +52,16 @@ enum nfs4_session_state {
NFS4_SESSION_DRAINING
,
};
struct
nfs4_minor_version_ops
{
u32
minor_version
;
int
(
*
call_sync
)(
struct
nfs_server
*
server
,
struct
rpc_message
*
msg
,
struct
nfs4_sequence_args
*
args
,
struct
nfs4_sequence_res
*
res
,
int
cache_reply
);
};
/*
* struct rpc_sequence ensures that RPC calls are sent in the exact
* order that they appear on the list.
...
...
@@ -260,6 +270,7 @@ 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
];
...
...
fs/nfs/nfs4proc.c
浏览文件 @
97dc1359
...
...
@@ -667,7 +667,7 @@ int _nfs4_call_sync(struct nfs_server *server,
}
#define nfs4_call_sync(server, msg, args, res, cache_reply) \
(server)->nfs_client->cl_call_sync((server), (msg), &(args)->seq_args, \
(server)->nfs_client->cl_
mvops->
call_sync((server), (msg), &(args)->seq_args, \
&(res)->seq_res, (cache_reply))
static
void
update_changeattr
(
struct
inode
*
dir
,
struct
nfs4_change_info
*
cinfo
)
...
...
@@ -5353,6 +5353,18 @@ struct nfs4_state_maintenance_ops nfs41_state_renewal_ops = {
};
#endif
static
const
struct
nfs4_minor_version_ops
nfs_v4_0_minor_ops
=
{
.
minor_version
=
0
,
.
call_sync
=
_nfs4_call_sync
,
};
#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
,
};
#endif
/*
* Per minor version reboot and network partition recovery ops
*/
...
...
@@ -5378,6 +5390,13 @@ struct nfs4_state_maintenance_ops *nfs4_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)
[
1
]
=
&
nfs_v4_1_minor_ops
,
#endif
};
static
const
struct
inode_operations
nfs4_file_inode_operations
=
{
.
permission
=
nfs_permission
,
.
getattr
=
nfs_getattr
,
...
...
include/linux/nfs_fs_sb.h
浏览文件 @
97dc1359
...
...
@@ -15,6 +15,7 @@ struct nlm_host;
struct
nfs4_sequence_args
;
struct
nfs4_sequence_res
;
struct
nfs_server
;
struct
nfs4_minor_version_ops
;
/*
* The nfs_client identifies our client state to the server.
...
...
@@ -70,11 +71,7 @@ struct nfs_client {
*/
char
cl_ipaddr
[
48
];
unsigned
char
cl_id_uniquifier
;
int
(
*
cl_call_sync
)(
struct
nfs_server
*
server
,
struct
rpc_message
*
msg
,
struct
nfs4_sequence_args
*
args
,
struct
nfs4_sequence_res
*
res
,
int
cache_reply
);
const
struct
nfs4_minor_version_ops
*
cl_mvops
;
#endif
/* CONFIG_NFS_V4 */
#ifdef CONFIG_NFS_V4_1
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录