Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
8b289b2c
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
8b289b2c
编写于
10月 19, 2011
作者:
J
J. Bruce Fields
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
nfsd4: implement new 4.1 open reclaim types
Signed-off-by:
N
J. Bruce Fields
<
bfields@redhat.com
>
上级
a8d86cd7
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
28 addition
and
15 deletion
+28
-15
fs/nfsd/nfs4proc.c
fs/nfsd/nfs4proc.c
+3
-12
fs/nfsd/nfs4state.c
fs/nfsd/nfs4state.c
+8
-2
fs/nfsd/nfs4xdr.c
fs/nfsd/nfs4xdr.c
+13
-0
include/linux/nfs4.h
include/linux/nfs4.h
+4
-1
未找到文件。
fs/nfsd/nfs4proc.c
浏览文件 @
8b289b2c
...
...
@@ -366,12 +366,6 @@ nfsd4_open(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
switch
(
open
->
op_claim_type
)
{
case
NFS4_OPEN_CLAIM_DELEGATE_CUR
:
case
NFS4_OPEN_CLAIM_NULL
:
/*
* (1) set CURRENT_FH to the file being opened,
* creating it if necessary, (2) set open->op_cinfo,
* (3) set open->op_truncate if the file is to be
* truncated after opening, (4) do permission checking.
*/
status
=
do_open_lookup
(
rqstp
,
&
cstate
->
current_fh
,
open
);
if
(
status
)
...
...
@@ -379,17 +373,14 @@ nfsd4_open(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
break
;
case
NFS4_OPEN_CLAIM_PREVIOUS
:
open
->
op_openowner
->
oo_flags
|=
NFS4_OO_CONFIRMED
;
/*
* The CURRENT_FH is already set to the file being
* opened. (1) set open->op_cinfo, (2) set
* open->op_truncate if the file is to be truncated
* after opening, (3) do permission checking.
*/
case
NFS4_OPEN_CLAIM_FH
:
case
NFS4_OPEN_CLAIM_DELEG_CUR_FH
:
status
=
do_open_fhandle
(
rqstp
,
&
cstate
->
current_fh
,
open
);
if
(
status
)
goto
out
;
break
;
case
NFS4_OPEN_CLAIM_DELEG_PREV_FH
:
case
NFS4_OPEN_CLAIM_DELEGATE_PREV
:
open
->
op_openowner
->
oo_flags
|=
NFS4_OO_CONFIRMED
;
dprintk
(
"NFSD: unsupported OPEN claim type %d
\n
"
,
...
...
fs/nfsd/nfs4state.c
浏览文件 @
8b289b2c
...
...
@@ -2587,6 +2587,12 @@ static struct nfs4_delegation *find_deleg_stateid(struct nfs4_client *cl, statei
return
delegstateid
(
ret
);
}
static
bool
nfsd4_is_deleg_cur
(
struct
nfsd4_open
*
open
)
{
return
open
->
op_claim_type
==
NFS4_OPEN_CLAIM_DELEGATE_CUR
||
open
->
op_claim_type
==
NFS4_OPEN_CLAIM_DELEG_CUR_FH
;
}
static
__be32
nfs4_check_deleg
(
struct
nfs4_client
*
cl
,
struct
nfs4_file
*
fp
,
struct
nfsd4_open
*
open
,
struct
nfs4_delegation
**
dp
)
...
...
@@ -2602,7 +2608,7 @@ nfs4_check_deleg(struct nfs4_client *cl, struct nfs4_file *fp, struct nfsd4_open
if
(
status
)
*
dp
=
NULL
;
out:
if
(
open
->
op_claim_type
!=
NFS4_OPEN_CLAIM_DELEGATE_CUR
)
if
(
!
nfsd4_is_deleg_cur
(
open
)
)
return
nfs_ok
;
if
(
status
)
return
status
;
...
...
@@ -2879,7 +2885,7 @@ nfsd4_process_open2(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nf
goto
out
;
}
else
{
status
=
nfserr_bad_stateid
;
if
(
open
->
op_claim_type
==
NFS4_OPEN_CLAIM_DELEGATE_CUR
)
if
(
nfsd4_is_deleg_cur
(
open
)
)
goto
out
;
status
=
nfserr_jukebox
;
fp
=
open
->
op_file
;
...
...
fs/nfsd/nfs4xdr.c
浏览文件 @
8b289b2c
...
...
@@ -803,6 +803,19 @@ nfsd4_decode_open(struct nfsd4_compoundargs *argp, struct nfsd4_open *open)
if
((
status
=
check_filename
(
open
->
op_fname
.
data
,
open
->
op_fname
.
len
,
nfserr_inval
)))
return
status
;
break
;
case
NFS4_OPEN_CLAIM_FH
:
case
NFS4_OPEN_CLAIM_DELEG_PREV_FH
:
if
(
argp
->
minorversion
<
1
)
goto
xdr_error
;
/* void */
break
;
case
NFS4_OPEN_CLAIM_DELEG_CUR_FH
:
if
(
argp
->
minorversion
<
1
)
goto
xdr_error
;
status
=
nfsd4_decode_stateid
(
argp
,
&
open
->
op_delegate_stateid
);
if
(
status
)
return
status
;
break
;
default:
goto
xdr_error
;
}
...
...
include/linux/nfs4.h
浏览文件 @
8b289b2c
...
...
@@ -410,7 +410,10 @@ enum open_claim_type4 {
NFS4_OPEN_CLAIM_NULL
=
0
,
NFS4_OPEN_CLAIM_PREVIOUS
=
1
,
NFS4_OPEN_CLAIM_DELEGATE_CUR
=
2
,
NFS4_OPEN_CLAIM_DELEGATE_PREV
=
3
NFS4_OPEN_CLAIM_DELEGATE_PREV
=
3
,
NFS4_OPEN_CLAIM_FH
=
4
,
/* 4.1 */
NFS4_OPEN_CLAIM_DELEG_CUR_FH
=
5
,
/* 4.1 */
NFS4_OPEN_CLAIM_DELEG_PREV_FH
=
6
,
/* 4.1 */
};
enum
opentype4
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录