Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
18ad0a9f
K
Kernel
项目概览
openeuler
/
Kernel
大约 1 年 前同步成功
通知
5
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
18ad0a9f
编写于
5月 25, 2011
作者:
B
Benny Halevy
提交者:
Boaz Harrosh
5月 29, 2011
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
NFSv4.1: change pg_test return type to bool
Signed-off-by:
N
Benny Halevy
<
bhalevy@panasas.com
>
上级
dfed206b
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
22 addition
and
23 deletion
+22
-23
fs/nfs/nfs4filelayout.c
fs/nfs/nfs4filelayout.c
+3
-3
fs/nfs/objlayout/objio_osd.c
fs/nfs/objlayout/objio_osd.c
+3
-4
fs/nfs/pagelist.c
fs/nfs/pagelist.c
+11
-11
fs/nfs/pnfs.c
fs/nfs/pnfs.c
+2
-2
fs/nfs/pnfs.h
fs/nfs/pnfs.h
+2
-2
include/linux/nfs_page.h
include/linux/nfs_page.h
+1
-1
未找到文件。
fs/nfs/nfs4filelayout.c
浏览文件 @
18ad0a9f
...
...
@@ -651,10 +651,10 @@ filelayout_alloc_lseg(struct pnfs_layout_hdr *layoutid,
/*
* filelayout_pg_test(). Called by nfs_can_coalesce_requests()
*
* return
1 :
coalesce page
* return
0 :
don't coalesce page
* return
true :
coalesce page
* return
false :
don't coalesce page
*/
int
bool
filelayout_pg_test
(
struct
nfs_pageio_descriptor
*
pgio
,
struct
nfs_page
*
prev
,
struct
nfs_page
*
req
)
{
...
...
fs/nfs/objlayout/objio_osd.c
浏览文件 @
18ad0a9f
...
...
@@ -991,14 +991,13 @@ ssize_t objio_write_pagelist(struct objlayout_io_state *ol_state, bool stable)
/*
* objlayout_pg_test(). Called by nfs_can_coalesce_requests()
*
* return 1 : coalesce page
* return 0 : don't coalesce page
* return true iff coalesce page
*/
int
bool
objlayout_pg_test
(
struct
nfs_pageio_descriptor
*
pgio
,
struct
nfs_page
*
prev
,
struct
nfs_page
*
req
)
{
return
1
;
return
true
;
}
static
struct
pnfs_layoutdriver_type
objlayout_type
=
{
...
...
fs/nfs/pagelist.c
浏览文件 @
18ad0a9f
...
...
@@ -244,29 +244,29 @@ void nfs_pageio_init(struct nfs_pageio_descriptor *desc,
*
* Return 'true' if this is the case, else return 'false'.
*/
static
int
nfs_can_coalesce_requests
(
struct
nfs_page
*
prev
,
static
bool
nfs_can_coalesce_requests
(
struct
nfs_page
*
prev
,
struct
nfs_page
*
req
,
struct
nfs_pageio_descriptor
*
pgio
)
{
if
(
req
->
wb_context
->
cred
!=
prev
->
wb_context
->
cred
)
return
0
;
return
false
;
if
(
req
->
wb_lock_context
->
lockowner
!=
prev
->
wb_lock_context
->
lockowner
)
return
0
;
return
false
;
if
(
req
->
wb_context
->
state
!=
prev
->
wb_context
->
state
)
return
0
;
return
false
;
if
(
req
->
wb_index
!=
(
prev
->
wb_index
+
1
))
return
0
;
return
false
;
if
(
req
->
wb_pgbase
!=
0
)
return
0
;
return
false
;
if
(
prev
->
wb_pgbase
+
prev
->
wb_bytes
!=
PAGE_CACHE_SIZE
)
return
0
;
return
false
;
/*
* Non-whole file layouts need to check that req is inside of
* pgio->pg_lseg.
*/
if
(
pgio
->
pg_test
&&
!
pgio
->
pg_test
(
pgio
,
prev
,
req
))
return
0
;
return
1
;
return
false
;
return
true
;
}
/**
...
...
fs/nfs/pnfs.c
浏览文件 @
18ad0a9f
...
...
@@ -1043,7 +1043,7 @@ pnfs_layout_process(struct nfs4_layoutget *lgp)
goto
out
;
}
int
bool
pnfs_generic_pg_test
(
struct
nfs_pageio_descriptor
*
pgio
,
struct
nfs_page
*
prev
,
struct
nfs_page
*
req
)
{
...
...
@@ -1070,7 +1070,7 @@ pnfs_generic_pg_test(struct nfs_pageio_descriptor *pgio, struct nfs_page *prev,
}
else
if
(
pgio
->
pg_lseg
&&
req_offset
(
req
)
>
end_offset
(
pgio
->
pg_lseg
->
pls_range
.
offset
,
pgio
->
pg_lseg
->
pls_range
.
length
))
return
0
;
return
false
;
return
NFS_SERVER
(
pgio
->
pg_inode
)
->
pnfs_curr_ld
->
pg_test
(
pgio
,
prev
,
req
);
}
...
...
fs/nfs/pnfs.h
浏览文件 @
18ad0a9f
...
...
@@ -87,7 +87,7 @@ struct pnfs_layoutdriver_type {
void
(
*
free_lseg
)
(
struct
pnfs_layout_segment
*
lseg
);
/* test for nfs page cache coalescing */
int
(
*
pg_test
)(
struct
nfs_pageio_descriptor
*
,
struct
nfs_page
*
,
struct
nfs_page
*
);
bool
(
*
pg_test
)(
struct
nfs_pageio_descriptor
*
,
struct
nfs_page
*
,
struct
nfs_page
*
);
/* Returns true if layoutdriver wants to divert this request to
* driver's commit routine.
...
...
@@ -158,7 +158,7 @@ enum pnfs_try_status pnfs_try_to_write_data(struct nfs_write_data *,
const
struct
rpc_call_ops
*
,
int
);
enum
pnfs_try_status
pnfs_try_to_read_data
(
struct
nfs_read_data
*
,
const
struct
rpc_call_ops
*
);
int
pnfs_generic_pg_test
(
struct
nfs_pageio_descriptor
*
pgio
,
struct
nfs_page
*
prev
,
struct
nfs_page
*
req
);
bool
pnfs_generic_pg_test
(
struct
nfs_pageio_descriptor
*
pgio
,
struct
nfs_page
*
prev
,
struct
nfs_page
*
req
);
int
pnfs_layout_process
(
struct
nfs4_layoutget
*
lgp
);
void
pnfs_free_lseg_list
(
struct
list_head
*
tmp_list
);
void
pnfs_destroy_layout
(
struct
nfs_inode
*
);
...
...
include/linux/nfs_page.h
浏览文件 @
18ad0a9f
...
...
@@ -68,7 +68,7 @@ struct nfs_pageio_descriptor {
int
pg_ioflags
;
int
pg_error
;
struct
pnfs_layout_segment
*
pg_lseg
;
int
(
*
pg_test
)(
struct
nfs_pageio_descriptor
*
,
struct
nfs_page
*
,
struct
nfs_page
*
);
bool
(
*
pg_test
)(
struct
nfs_pageio_descriptor
*
,
struct
nfs_page
*
,
struct
nfs_page
*
);
};
#define NFS_WBACK_BUSY(req) (test_bit(PG_BUSY,&(req)->wb_flags))
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录