Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
6caf2c82
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看板
提交
6caf2c82
编写于
10月 27, 2005
作者:
T
Trond Myklebust
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
NFSv4: Add post-op attributes to nfs4_proc_rename()
Signed-off-by:
N
Trond Myklebust
<
Trond.Myklebust@netapp.com
>
上级
91ba2eee
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
41 addition
and
7 deletion
+41
-7
fs/nfs/nfs4proc.c
fs/nfs/nfs4proc.c
+13
-2
fs/nfs/nfs4xdr.c
fs/nfs/nfs4xdr.c
+24
-5
include/linux/nfs_xdr.h
include/linux/nfs_xdr.h
+4
-0
未找到文件。
fs/nfs/nfs4proc.c
浏览文件 @
6caf2c82
...
...
@@ -1685,13 +1685,20 @@ static int nfs4_proc_unlink_done(struct dentry *dir, struct rpc_task *task)
static
int
_nfs4_proc_rename
(
struct
inode
*
old_dir
,
struct
qstr
*
old_name
,
struct
inode
*
new_dir
,
struct
qstr
*
new_name
)
{
struct
nfs_server
*
server
=
NFS_SERVER
(
old_dir
);
struct
nfs4_rename_arg
arg
=
{
.
old_dir
=
NFS_FH
(
old_dir
),
.
new_dir
=
NFS_FH
(
new_dir
),
.
old_name
=
old_name
,
.
new_name
=
new_name
,
.
bitmask
=
server
->
attr_bitmask
,
};
struct
nfs_fattr
old_fattr
,
new_fattr
;
struct
nfs4_rename_res
res
=
{
.
server
=
server
,
.
old_fattr
=
&
old_fattr
,
.
new_fattr
=
&
new_fattr
,
};
struct
nfs4_rename_res
res
=
{
};
struct
rpc_message
msg
=
{
.
rpc_proc
=
&
nfs4_procedures
[
NFSPROC4_CLNT_RENAME
],
.
rpc_argp
=
&
arg
,
...
...
@@ -1699,11 +1706,15 @@ static int _nfs4_proc_rename(struct inode *old_dir, struct qstr *old_name,
};
int
status
;
status
=
rpc_call_sync
(
NFS_CLIENT
(
old_dir
),
&
msg
,
0
);
nfs_fattr_init
(
res
.
old_fattr
);
nfs_fattr_init
(
res
.
new_fattr
);
status
=
rpc_call_sync
(
server
->
client
,
&
msg
,
0
);
if
(
!
status
)
{
update_changeattr
(
old_dir
,
&
res
.
old_cinfo
);
nfs_post_op_update_inode
(
old_dir
,
res
.
old_fattr
);
update_changeattr
(
new_dir
,
&
res
.
new_cinfo
);
nfs_post_op_update_inode
(
new_dir
,
res
.
new_fattr
);
}
return
status
;
}
...
...
fs/nfs/nfs4xdr.c
浏览文件 @
6caf2c82
...
...
@@ -314,12 +314,18 @@ static int nfs_stat_to_errno(int);
encode_putfh_maxsz + \
encode_savefh_maxsz + \
encode_putfh_maxsz + \
encode_rename_maxsz)
encode_rename_maxsz + \
encode_getattr_maxsz + \
encode_restorefh_maxsz + \
encode_getattr_maxsz)
#define NFS4_dec_rename_sz (compound_decode_hdr_maxsz + \
decode_putfh_maxsz + \
decode_savefh_maxsz + \
decode_putfh_maxsz + \
decode_rename_maxsz)
decode_rename_maxsz + \
decode_getattr_maxsz + \
decode_restorefh_maxsz + \
decode_getattr_maxsz)
#define NFS4_enc_link_sz (compound_encode_hdr_maxsz + \
encode_putfh_maxsz + \
encode_savefh_maxsz + \
...
...
@@ -1339,7 +1345,7 @@ static int nfs4_xdr_enc_rename(struct rpc_rqst *req, uint32_t *p, const struct n
{
struct
xdr_stream
xdr
;
struct
compound_hdr
hdr
=
{
.
nops
=
4
,
.
nops
=
7
,
};
int
status
;
...
...
@@ -1351,7 +1357,13 @@ static int nfs4_xdr_enc_rename(struct rpc_rqst *req, uint32_t *p, const struct n
goto
out
;
if
((
status
=
encode_putfh
(
&
xdr
,
args
->
new_dir
))
!=
0
)
goto
out
;
status
=
encode_rename
(
&
xdr
,
args
->
old_name
,
args
->
new_name
);
if
((
status
=
encode_rename
(
&
xdr
,
args
->
old_name
,
args
->
new_name
))
!=
0
)
goto
out
;
if
((
status
=
encode_getfattr
(
&
xdr
,
args
->
bitmask
))
!=
0
)
goto
out
;
if
((
status
=
encode_restorefh
(
&
xdr
))
!=
0
)
goto
out
;
status
=
encode_getfattr
(
&
xdr
,
args
->
bitmask
);
out:
return
status
;
}
...
...
@@ -3533,7 +3545,14 @@ static int nfs4_xdr_dec_rename(struct rpc_rqst *rqstp, uint32_t *p, struct nfs4_
goto
out
;
if
((
status
=
decode_putfh
(
&
xdr
))
!=
0
)
goto
out
;
status
=
decode_rename
(
&
xdr
,
&
res
->
old_cinfo
,
&
res
->
new_cinfo
);
if
((
status
=
decode_rename
(
&
xdr
,
&
res
->
old_cinfo
,
&
res
->
new_cinfo
))
!=
0
)
goto
out
;
/* Current FH is target directory */
if
(
decode_getfattr
(
&
xdr
,
res
->
new_fattr
,
res
->
server
)
!=
0
)
goto
out
;
if
((
status
=
decode_restorefh
(
&
xdr
))
!=
0
)
goto
out
;
decode_getfattr
(
&
xdr
,
res
->
old_fattr
,
res
->
server
);
out:
return
status
;
}
...
...
include/linux/nfs_xdr.h
浏览文件 @
6caf2c82
...
...
@@ -630,11 +630,15 @@ struct nfs4_rename_arg {
const
struct
nfs_fh
*
new_dir
;
const
struct
qstr
*
old_name
;
const
struct
qstr
*
new_name
;
const
u32
*
bitmask
;
};
struct
nfs4_rename_res
{
const
struct
nfs_server
*
server
;
struct
nfs4_change_info
old_cinfo
;
struct
nfs_fattr
*
old_fattr
;
struct
nfs4_change_info
new_cinfo
;
struct
nfs_fattr
*
new_fattr
;
};
struct
nfs4_setclientid
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录