Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
50828d7e
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看板
提交
50828d7e
编写于
7月 12, 2011
作者:
T
Trond Myklebust
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
NFS: Cache rpc_ops in struct nfs_pageio_descriptor
Signed-off-by:
N
Trond Myklebust
<
Trond.Myklebust@netapp.com
>
上级
275acaaf
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
16 addition
and
24 deletion
+16
-24
fs/nfs/read.c
fs/nfs/read.c
+8
-11
fs/nfs/write.c
fs/nfs/write.c
+7
-13
include/linux/nfs_page.h
include/linux/nfs_page.h
+1
-0
未找到文件。
fs/nfs/read.c
浏览文件 @
50828d7e
...
@@ -327,6 +327,7 @@ static int nfs_pagein_multi(struct nfs_pageio_descriptor *desc, struct list_head
...
@@ -327,6 +327,7 @@ static int nfs_pagein_multi(struct nfs_pageio_descriptor *desc, struct list_head
}
while
(
nbytes
!=
0
);
}
while
(
nbytes
!=
0
);
atomic_set
(
&
req
->
wb_complete
,
requests
);
atomic_set
(
&
req
->
wb_complete
,
requests
);
ClearPageError
(
page
);
ClearPageError
(
page
);
desc
->
pg_rpc_callops
=
&
nfs_read_partial_ops
;
return
ret
;
return
ret
;
out_bad:
out_bad:
while
(
!
list_empty
(
res
))
{
while
(
!
list_empty
(
res
))
{
...
@@ -367,6 +368,7 @@ static int nfs_pagein_one(struct nfs_pageio_descriptor *desc, struct list_head *
...
@@ -367,6 +368,7 @@ static int nfs_pagein_one(struct nfs_pageio_descriptor *desc, struct list_head *
nfs_read_rpcsetup
(
req
,
data
,
desc
->
pg_count
,
0
);
nfs_read_rpcsetup
(
req
,
data
,
desc
->
pg_count
,
0
);
list_add
(
&
data
->
list
,
res
);
list_add
(
&
data
->
list
,
res
);
desc
->
pg_rpc_callops
=
&
nfs_read_full_ops
;
out:
out:
return
ret
;
return
ret
;
}
}
...
@@ -376,19 +378,14 @@ int nfs_generic_pg_readpages(struct nfs_pageio_descriptor *desc)
...
@@ -376,19 +378,14 @@ int nfs_generic_pg_readpages(struct nfs_pageio_descriptor *desc)
LIST_HEAD
(
head
);
LIST_HEAD
(
head
);
int
ret
;
int
ret
;
if
(
desc
->
pg_bsize
<
PAGE_CACHE_SIZE
)
{
if
(
desc
->
pg_bsize
<
PAGE_CACHE_SIZE
)
ret
=
nfs_pagein_multi
(
desc
,
&
head
);
ret
=
nfs_pagein_multi
(
desc
,
&
head
);
if
(
ret
==
0
)
else
ret
=
nfs_do_multiple_reads
(
&
head
,
&
nfs_read_partial_ops
,
desc
->
pg_lseg
);
}
else
{
ret
=
nfs_pagein_one
(
desc
,
&
head
);
ret
=
nfs_pagein_one
(
desc
,
&
head
);
if
(
ret
==
0
)
ret
=
nfs_do_multiple_reads
(
&
head
,
if
(
ret
==
0
)
&
nfs_read_full_ops
,
ret
=
nfs_do_multiple_reads
(
&
head
,
desc
->
pg_rpc_callops
,
desc
->
pg_lseg
);
desc
->
pg_lseg
);
}
put_lseg
(
desc
->
pg_lseg
);
put_lseg
(
desc
->
pg_lseg
);
desc
->
pg_lseg
=
NULL
;
desc
->
pg_lseg
=
NULL
;
return
ret
;
return
ret
;
...
...
fs/nfs/write.c
浏览文件 @
50828d7e
...
@@ -975,6 +975,7 @@ static int nfs_flush_multi(struct nfs_pageio_descriptor *desc, struct list_head
...
@@ -975,6 +975,7 @@ static int nfs_flush_multi(struct nfs_pageio_descriptor *desc, struct list_head
offset
+=
len
;
offset
+=
len
;
}
while
(
nbytes
!=
0
);
}
while
(
nbytes
!=
0
);
atomic_set
(
&
req
->
wb_complete
,
requests
);
atomic_set
(
&
req
->
wb_complete
,
requests
);
desc
->
pg_rpc_callops
=
&
nfs_write_partial_ops
;
return
ret
;
return
ret
;
out_bad:
out_bad:
...
@@ -1031,6 +1032,7 @@ static int nfs_flush_one(struct nfs_pageio_descriptor *desc, struct list_head *r
...
@@ -1031,6 +1032,7 @@ static int nfs_flush_one(struct nfs_pageio_descriptor *desc, struct list_head *r
/* Set up the argument struct */
/* Set up the argument struct */
nfs_write_rpcsetup
(
req
,
data
,
desc
->
pg_count
,
0
,
desc
->
pg_ioflags
);
nfs_write_rpcsetup
(
req
,
data
,
desc
->
pg_count
,
0
,
desc
->
pg_ioflags
);
list_add
(
&
data
->
list
,
res
);
list_add
(
&
data
->
list
,
res
);
desc
->
pg_rpc_callops
=
&
nfs_write_full_ops
;
out:
out:
return
ret
;
return
ret
;
}
}
...
@@ -1040,21 +1042,13 @@ int nfs_generic_pg_writepages(struct nfs_pageio_descriptor *desc)
...
@@ -1040,21 +1042,13 @@ int nfs_generic_pg_writepages(struct nfs_pageio_descriptor *desc)
LIST_HEAD
(
head
);
LIST_HEAD
(
head
);
int
ret
;
int
ret
;
if
(
desc
->
pg_bsize
<
PAGE_CACHE_SIZE
)
{
if
(
desc
->
pg_bsize
<
PAGE_CACHE_SIZE
)
ret
=
nfs_flush_multi
(
desc
,
&
head
);
ret
=
nfs_flush_multi
(
desc
,
&
head
);
if
(
ret
==
0
)
else
ret
=
nfs_do_multiple_writes
(
&
head
,
&
nfs_write_partial_ops
,
desc
->
pg_lseg
,
desc
->
pg_ioflags
);
}
else
{
ret
=
nfs_flush_one
(
desc
,
&
head
);
ret
=
nfs_flush_one
(
desc
,
&
head
);
if
(
ret
==
0
)
if
(
ret
==
0
)
ret
=
nfs_do_multiple_writes
(
&
head
,
ret
=
nfs_do_multiple_writes
(
&
head
,
desc
->
pg_rpc_callops
,
&
nfs_write_full_ops
,
desc
->
pg_lseg
,
desc
->
pg_ioflags
);
desc
->
pg_lseg
,
desc
->
pg_ioflags
);
}
put_lseg
(
desc
->
pg_lseg
);
put_lseg
(
desc
->
pg_lseg
);
desc
->
pg_lseg
=
NULL
;
desc
->
pg_lseg
=
NULL
;
return
ret
;
return
ret
;
...
...
include/linux/nfs_page.h
浏览文件 @
50828d7e
...
@@ -74,6 +74,7 @@ struct nfs_pageio_descriptor {
...
@@ -74,6 +74,7 @@ struct nfs_pageio_descriptor {
const
struct
nfs_pageio_ops
*
pg_ops
;
const
struct
nfs_pageio_ops
*
pg_ops
;
int
pg_ioflags
;
int
pg_ioflags
;
int
pg_error
;
int
pg_error
;
const
struct
rpc_call_ops
*
pg_rpc_callops
;
struct
pnfs_layout_segment
*
pg_lseg
;
struct
pnfs_layout_segment
*
pg_lseg
;
};
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录