Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
eadf4598
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看板
提交
eadf4598
编写于
6月 22, 2005
作者:
T
Trond Myklebust
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[PATCH] NFS: Add debugging code to NFSv4 readdir
Signed-off-by:
N
Trond Myklebust
<
Trond.Myklebust@netapp.com
>
上级
6ebf3656
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
23 addition
and
0 deletion
+23
-0
fs/nfs/nfs4proc.c
fs/nfs/nfs4proc.c
+5
-0
fs/nfs/nfs4xdr.c
fs/nfs/nfs4xdr.c
+18
-0
未找到文件。
fs/nfs/nfs4proc.c
浏览文件 @
eadf4598
...
...
@@ -1722,6 +1722,10 @@ static int _nfs4_proc_readdir(struct dentry *dentry, struct rpc_cred *cred,
};
int
status
;
dprintk
(
"%s: dentry = %s/%s, cookie = %Lu
\n
"
,
__FUNCTION__
,
dentry
->
d_parent
->
d_name
.
name
,
dentry
->
d_name
.
name
,
(
unsigned
long
long
)
cookie
);
lock_kernel
();
nfs4_setup_readdir
(
cookie
,
NFS_COOKIEVERF
(
dir
),
dentry
,
&
args
);
res
.
pgbase
=
args
.
pgbase
;
...
...
@@ -1729,6 +1733,7 @@ static int _nfs4_proc_readdir(struct dentry *dentry, struct rpc_cred *cred,
if
(
status
==
0
)
memcpy
(
NFS_COOKIEVERF
(
dir
),
res
.
verifier
.
data
,
NFS4_VERIFIER_SIZE
);
unlock_kernel
();
dprintk
(
"%s: returns %d
\n
"
,
__FUNCTION__
,
status
);
return
status
;
}
...
...
fs/nfs/nfs4xdr.c
浏览文件 @
eadf4598
...
...
@@ -1035,6 +1035,13 @@ static int encode_readdir(struct xdr_stream *xdr, const struct nfs4_readdir_arg
attrs
[
1
]
&=
~
FATTR4_WORD1_MOUNTED_ON_FILEID
;
WRITE32
(
attrs
[
0
]
&
readdir
->
bitmask
[
0
]);
WRITE32
(
attrs
[
1
]
&
readdir
->
bitmask
[
1
]);
dprintk
(
"%s: cookie = %Lu, verifier = 0x%x%x, bitmap = 0x%x%x
\n
"
,
__FUNCTION__
,
(
unsigned
long
long
)
readdir
->
cookie
,
((
u32
*
)
readdir
->
verifier
.
data
)[
0
],
((
u32
*
)
readdir
->
verifier
.
data
)[
1
],
attrs
[
0
]
&
readdir
->
bitmask
[
0
],
attrs
[
1
]
&
readdir
->
bitmask
[
1
]);
/* set up reply kvec
* toplevel_status + taglen + rescount + OP_PUTFH + status
...
...
@@ -1043,6 +1050,9 @@ static int encode_readdir(struct xdr_stream *xdr, const struct nfs4_readdir_arg
replen
=
(
RPC_REPHDRSIZE
+
auth
->
au_rslack
+
9
)
<<
2
;
xdr_inline_pages
(
&
req
->
rq_rcv_buf
,
replen
,
readdir
->
pages
,
readdir
->
pgbase
,
readdir
->
count
);
dprintk
(
"%s: inlined page args = (%u, %p, %u, %u)
\n
"
,
__FUNCTION__
,
replen
,
readdir
->
pages
,
readdir
->
pgbase
,
readdir
->
count
);
return
0
;
}
...
...
@@ -3066,6 +3076,11 @@ static int decode_readdir(struct xdr_stream *xdr, struct rpc_rqst *req, struct n
return
status
;
READ_BUF
(
8
);
COPYMEM
(
readdir
->
verifier
.
data
,
8
);
dprintk
(
"%s: verifier = 0x%x%x
\n
"
,
__FUNCTION__
,
((
u32
*
)
readdir
->
verifier
.
data
)[
0
],
((
u32
*
)
readdir
->
verifier
.
data
)[
1
]);
hdrlen
=
(
char
*
)
p
-
(
char
*
)
iov
->
iov_base
;
recvd
=
rcvbuf
->
len
-
hdrlen
;
...
...
@@ -3080,12 +3095,14 @@ static int decode_readdir(struct xdr_stream *xdr, struct rpc_rqst *req, struct n
for
(
nr
=
0
;
*
p
++
;
nr
++
)
{
if
(
p
+
3
>
end
)
goto
short_pkt
;
dprintk
(
"cookie = %Lu, "
,
*
((
unsigned
long
long
*
)
p
));
p
+=
2
;
/* cookie */
len
=
ntohl
(
*
p
++
);
/* filename length */
if
(
len
>
NFS4_MAXNAMLEN
)
{
printk
(
KERN_WARNING
"NFS: giant filename in readdir (len 0x%x)
\n
"
,
len
);
goto
err_unmap
;
}
dprintk
(
"filename = %*s
\n
"
,
len
,
(
char
*
)
p
);
p
+=
XDR_QUADLEN
(
len
);
if
(
p
+
1
>
end
)
goto
short_pkt
;
...
...
@@ -3105,6 +3122,7 @@ static int decode_readdir(struct xdr_stream *xdr, struct rpc_rqst *req, struct n
kunmap_atomic
(
kaddr
,
KM_USER0
);
return
0
;
short_pkt:
dprintk
(
"%s: short packet at entry %d
\n
"
,
__FUNCTION__
,
nr
);
entry
[
0
]
=
entry
[
1
]
=
0
;
/* truncate listing ? */
if
(
!
nr
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录