Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
b64c7f3b
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看板
提交
b64c7f3b
编写于
3月 22, 2014
作者:
J
J. Bruce Fields
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
nfsd4: kill WRITE64
Signed-off-by:
N
J. Bruce Fields
<
bfields@redhat.com
>
上级
c373b0a4
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
24 addition
and
28 deletion
+24
-28
fs/nfsd/nfs4xdr.c
fs/nfsd/nfs4xdr.c
+24
-28
未找到文件。
fs/nfsd/nfs4xdr.c
浏览文件 @
b64c7f3b
...
...
@@ -1683,10 +1683,6 @@ nfsd4_decode_compound(struct nfsd4_compoundargs *argp)
DECODE_TAIL
;
}
#define WRITE64(n) do { \
*p++ = htonl((u32)((n) >> 32)); \
*p++ = htonl((u32)(n)); \
} while (0)
#define WRITEMEM(ptr,nbytes) do { if (nbytes > 0) { \
*(p + XDR_QUADLEN(nbytes) -1) = 0; \
memcpy(p, ptr, nbytes); \
...
...
@@ -2204,7 +2200,7 @@ nfsd4_encode_fattr(struct xdr_stream *xdr, struct svc_fh *fhp,
p
=
xdr_reserve_space
(
xdr
,
8
);
if
(
!
p
)
goto
out_resource
;
WRITE64
(
stat
.
size
);
p
=
xdr_encode_hyper
(
p
,
stat
.
size
);
}
if
(
bmval0
&
FATTR4_WORD0_LINK_SUPPORT
)
{
p
=
xdr_reserve_space
(
xdr
,
4
);
...
...
@@ -2229,12 +2225,12 @@ nfsd4_encode_fattr(struct xdr_stream *xdr, struct svc_fh *fhp,
if
(
!
p
)
goto
out_resource
;
if
(
exp
->
ex_fslocs
.
migrated
)
{
WRITE64
(
NFS4_REFERRAL_FSID_MAJOR
);
WRITE64
(
NFS4_REFERRAL_FSID_MINOR
);
p
=
xdr_encode_hyper
(
p
,
NFS4_REFERRAL_FSID_MAJOR
);
p
=
xdr_encode_hyper
(
p
,
NFS4_REFERRAL_FSID_MINOR
);
}
else
switch
(
fsid_source
(
fhp
))
{
case
FSIDSOURCE_FSID
:
WRITE64
(
(
u64
)
exp
->
ex_fsid
);
WRITE64
(
(
u64
)
0
);
p
=
xdr_encode_hyper
(
p
,
(
u64
)
exp
->
ex_fsid
);
p
=
xdr_encode_hyper
(
p
,
(
u64
)
0
);
break
;
case
FSIDSOURCE_DEV
:
*
p
++
=
cpu_to_be32
(
0
);
...
...
@@ -2337,25 +2333,25 @@ nfsd4_encode_fattr(struct xdr_stream *xdr, struct svc_fh *fhp,
p
=
xdr_reserve_space
(
xdr
,
8
);
if
(
!
p
)
goto
out_resource
;
WRITE64
(
stat
.
ino
);
p
=
xdr_encode_hyper
(
p
,
stat
.
ino
);
}
if
(
bmval0
&
FATTR4_WORD0_FILES_AVAIL
)
{
p
=
xdr_reserve_space
(
xdr
,
8
);
if
(
!
p
)
goto
out_resource
;
WRITE64
(
(
u64
)
statfs
.
f_ffree
);
p
=
xdr_encode_hyper
(
p
,
(
u64
)
statfs
.
f_ffree
);
}
if
(
bmval0
&
FATTR4_WORD0_FILES_FREE
)
{
p
=
xdr_reserve_space
(
xdr
,
8
);
if
(
!
p
)
goto
out_resource
;
WRITE64
(
(
u64
)
statfs
.
f_ffree
);
p
=
xdr_encode_hyper
(
p
,
(
u64
)
statfs
.
f_ffree
);
}
if
(
bmval0
&
FATTR4_WORD0_FILES_TOTAL
)
{
p
=
xdr_reserve_space
(
xdr
,
8
);
if
(
!
p
)
goto
out_resource
;
WRITE64
(
(
u64
)
statfs
.
f_files
);
p
=
xdr_encode_hyper
(
p
,
(
u64
)
statfs
.
f_files
);
}
if
(
bmval0
&
FATTR4_WORD0_FS_LOCATIONS
)
{
status
=
nfsd4_encode_fs_locations
(
xdr
,
rqstp
,
exp
);
...
...
@@ -2372,7 +2368,7 @@ nfsd4_encode_fattr(struct xdr_stream *xdr, struct svc_fh *fhp,
p
=
xdr_reserve_space
(
xdr
,
8
);
if
(
!
p
)
goto
out_resource
;
WRITE64
(
exp
->
ex_path
.
mnt
->
mnt_sb
->
s_maxbytes
);
p
=
xdr_encode_hyper
(
p
,
exp
->
ex_path
.
mnt
->
mnt_sb
->
s_maxbytes
);
}
if
(
bmval0
&
FATTR4_WORD0_MAXLINK
)
{
p
=
xdr_reserve_space
(
xdr
,
4
);
...
...
@@ -2390,13 +2386,13 @@ nfsd4_encode_fattr(struct xdr_stream *xdr, struct svc_fh *fhp,
p
=
xdr_reserve_space
(
xdr
,
8
);
if
(
!
p
)
goto
out_resource
;
WRITE64
(
(
u64
)
svc_max_payload
(
rqstp
));
p
=
xdr_encode_hyper
(
p
,
(
u64
)
svc_max_payload
(
rqstp
));
}
if
(
bmval0
&
FATTR4_WORD0_MAXWRITE
)
{
p
=
xdr_reserve_space
(
xdr
,
8
);
if
(
!
p
)
goto
out_resource
;
WRITE64
(
(
u64
)
svc_max_payload
(
rqstp
));
p
=
xdr_encode_hyper
(
p
,
(
u64
)
svc_max_payload
(
rqstp
));
}
if
(
bmval1
&
FATTR4_WORD1_MODE
)
{
p
=
xdr_reserve_space
(
xdr
,
4
);
...
...
@@ -2438,34 +2434,34 @@ nfsd4_encode_fattr(struct xdr_stream *xdr, struct svc_fh *fhp,
if
(
!
p
)
goto
out_resource
;
dummy64
=
(
u64
)
statfs
.
f_bavail
*
(
u64
)
statfs
.
f_bsize
;
WRITE64
(
dummy64
);
p
=
xdr_encode_hyper
(
p
,
dummy64
);
}
if
(
bmval1
&
FATTR4_WORD1_SPACE_FREE
)
{
p
=
xdr_reserve_space
(
xdr
,
8
);
if
(
!
p
)
goto
out_resource
;
dummy64
=
(
u64
)
statfs
.
f_bfree
*
(
u64
)
statfs
.
f_bsize
;
WRITE64
(
dummy64
);
p
=
xdr_encode_hyper
(
p
,
dummy64
);
}
if
(
bmval1
&
FATTR4_WORD1_SPACE_TOTAL
)
{
p
=
xdr_reserve_space
(
xdr
,
8
);
if
(
!
p
)
goto
out_resource
;
dummy64
=
(
u64
)
statfs
.
f_blocks
*
(
u64
)
statfs
.
f_bsize
;
WRITE64
(
dummy64
);
p
=
xdr_encode_hyper
(
p
,
dummy64
);
}
if
(
bmval1
&
FATTR4_WORD1_SPACE_USED
)
{
p
=
xdr_reserve_space
(
xdr
,
8
);
if
(
!
p
)
goto
out_resource
;
dummy64
=
(
u64
)
stat
.
blocks
<<
9
;
WRITE64
(
dummy64
);
p
=
xdr_encode_hyper
(
p
,
dummy64
);
}
if
(
bmval1
&
FATTR4_WORD1_TIME_ACCESS
)
{
p
=
xdr_reserve_space
(
xdr
,
12
);
if
(
!
p
)
goto
out_resource
;
WRITE64
(
(
s64
)
stat
.
atime
.
tv_sec
);
p
=
xdr_encode_hyper
(
p
,
(
s64
)
stat
.
atime
.
tv_sec
);
*
p
++
=
cpu_to_be32
(
stat
.
atime
.
tv_nsec
);
}
if
(
bmval1
&
FATTR4_WORD1_TIME_DELTA
)
{
...
...
@@ -2480,14 +2476,14 @@ nfsd4_encode_fattr(struct xdr_stream *xdr, struct svc_fh *fhp,
p
=
xdr_reserve_space
(
xdr
,
12
);
if
(
!
p
)
goto
out_resource
;
WRITE64
(
(
s64
)
stat
.
ctime
.
tv_sec
);
p
=
xdr_encode_hyper
(
p
,
(
s64
)
stat
.
ctime
.
tv_sec
);
*
p
++
=
cpu_to_be32
(
stat
.
ctime
.
tv_nsec
);
}
if
(
bmval1
&
FATTR4_WORD1_TIME_MODIFY
)
{
p
=
xdr_reserve_space
(
xdr
,
12
);
if
(
!
p
)
goto
out_resource
;
WRITE64
(
(
s64
)
stat
.
mtime
.
tv_sec
);
p
=
xdr_encode_hyper
(
p
,
(
s64
)
stat
.
mtime
.
tv_sec
);
*
p
++
=
cpu_to_be32
(
stat
.
mtime
.
tv_nsec
);
}
if
(
bmval1
&
FATTR4_WORD1_MOUNTED_ON_FILEID
)
{
...
...
@@ -2501,7 +2497,7 @@ nfsd4_encode_fattr(struct xdr_stream *xdr, struct svc_fh *fhp,
if
(
ignore_crossmnt
==
0
&&
dentry
==
exp
->
ex_path
.
mnt
->
mnt_root
)
get_parent_attributes
(
exp
,
&
stat
);
WRITE64
(
stat
.
ino
);
p
=
xdr_encode_hyper
(
p
,
stat
.
ino
);
}
if
(
bmval2
&
FATTR4_WORD2_SECURITY_LABEL
)
{
status
=
nfsd4_encode_security_label
(
xdr
,
rqstp
,
context
,
...
...
@@ -2892,15 +2888,15 @@ nfsd4_encode_lock_denied(struct xdr_stream *xdr, struct nfsd4_lock_denied *ld)
}
return
nfserr_resource
;
}
WRITE64
(
ld
->
ld_start
);
WRITE64
(
ld
->
ld_length
);
p
=
xdr_encode_hyper
(
p
,
ld
->
ld_start
);
p
=
xdr_encode_hyper
(
p
,
ld
->
ld_length
);
*
p
++
=
cpu_to_be32
(
ld
->
ld_type
);
if
(
conf
->
len
)
{
WRITEMEM
(
&
ld
->
ld_clientid
,
8
);
*
p
++
=
cpu_to_be32
(
conf
->
len
);
WRITEMEM
(
conf
->
data
,
conf
->
len
);
}
else
{
/* non - nfsv4 lock in conflict, no clientid nor owner */
WRITE64
(
(
u64
)
0
);
/* clientid */
p
=
xdr_encode_hyper
(
p
,
(
u64
)
0
);
/* clientid */
*
p
++
=
cpu_to_be32
(
0
);
/* length of owner name */
}
return
nfserr_denied
;
...
...
@@ -3650,7 +3646,7 @@ nfsd4_encode_exchange_id(struct nfsd4_compoundres *resp, __be32 nfserr,
return
nfserr_resource
;
/* The server_owner struct */
WRITE64
(
minor_id
);
/* Minor id */
p
=
xdr_encode_hyper
(
p
,
minor_id
);
/* Minor id */
/* major id */
*
p
++
=
cpu_to_be32
(
major_id_sz
);
WRITEMEM
(
major_id
,
major_id_sz
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录