Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
90a893c7
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看板
提交
90a893c7
编写于
9月 22, 2014
作者:
J
Jaegeuk Kim
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
f2fs: use MAX_BIO_BLOCKS(sbi)
This patch cleans up a simple macro. Signed-off-by:
N
Jaegeuk Kim
<
jaegeuk@kernel.org
>
上级
c52e1b10
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
8 addition
and
9 deletion
+8
-9
fs/f2fs/checkpoint.c
fs/f2fs/checkpoint.c
+1
-2
fs/f2fs/data.c
fs/f2fs/data.c
+1
-1
fs/f2fs/node.c
fs/f2fs/node.c
+1
-1
fs/f2fs/segment.c
fs/f2fs/segment.c
+1
-1
fs/f2fs/segment.h
fs/f2fs/segment.h
+4
-4
未找到文件。
fs/f2fs/checkpoint.c
浏览文件 @
90a893c7
...
...
@@ -83,8 +83,7 @@ struct page *get_meta_page_ra(struct f2fs_sb_info *sbi, pgoff_t index)
f2fs_put_page
(
page
,
0
);
if
(
readahead
)
ra_meta_pages
(
sbi
,
index
,
MAX_BIO_BLOCKS
(
max_hw_blocks
(
sbi
)),
META_POR
);
ra_meta_pages
(
sbi
,
index
,
MAX_BIO_BLOCKS
(
sbi
),
META_POR
);
return
get_meta_page
(
sbi
,
index
);
}
...
...
fs/f2fs/data.c
浏览文件 @
90a893c7
...
...
@@ -193,7 +193,7 @@ void f2fs_submit_page_mbio(struct f2fs_sb_info *sbi, struct page *page,
__submit_merged_bio
(
io
);
alloc_new:
if
(
io
->
bio
==
NULL
)
{
int
bio_blocks
=
MAX_BIO_BLOCKS
(
max_hw_blocks
(
sbi
)
);
int
bio_blocks
=
MAX_BIO_BLOCKS
(
sbi
);
io
->
bio
=
__bio_alloc
(
sbi
,
blk_addr
,
bio_blocks
,
is_read
);
io
->
fio
=
*
fio
;
...
...
fs/f2fs/node.c
浏览文件 @
90a893c7
...
...
@@ -1697,7 +1697,7 @@ int restore_node_summary(struct f2fs_sb_info *sbi,
struct
f2fs_summary
*
sum_entry
;
struct
inode
*
inode
=
sbi
->
sb
->
s_bdev
->
bd_inode
;
block_t
addr
;
int
bio_blocks
=
MAX_BIO_BLOCKS
(
max_hw_blocks
(
sbi
)
);
int
bio_blocks
=
MAX_BIO_BLOCKS
(
sbi
);
struct
page
*
pages
[
bio_blocks
];
int
i
,
idx
,
last_offset
,
nrpages
,
err
=
0
;
...
...
fs/f2fs/segment.c
浏览文件 @
90a893c7
...
...
@@ -1757,7 +1757,7 @@ static void build_sit_entries(struct f2fs_sb_info *sbi)
int
sit_blk_cnt
=
SIT_BLK_CNT
(
sbi
);
unsigned
int
i
,
start
,
end
;
unsigned
int
readed
,
start_blk
=
0
;
int
nrpages
=
MAX_BIO_BLOCKS
(
max_hw_blocks
(
sbi
)
);
int
nrpages
=
MAX_BIO_BLOCKS
(
sbi
);
do
{
readed
=
ra_meta_pages
(
sbi
,
start_blk
,
nrpages
,
META_SIT
);
...
...
fs/f2fs/segment.h
浏览文件 @
90a893c7
...
...
@@ -93,8 +93,8 @@
(((sector_t)blk_addr) << (sbi)->log_sectors_per_block)
#define SECTOR_TO_BLOCK(sbi, sectors) \
(sectors >> (sbi)->log_sectors_per_block)
#define MAX_BIO_BLOCKS(
max_hw_blocks)
\
(
min((int)max_hw_blocks
, BIO_MAX_PAGES))
#define MAX_BIO_BLOCKS(
sbi)
\
(
(int)min((int)max_hw_blocks(sbi)
, BIO_MAX_PAGES))
/*
* indicate a block allocation direction: RIGHT and LEFT.
...
...
@@ -728,7 +728,7 @@ static inline int nr_pages_to_skip(struct f2fs_sb_info *sbi, int type)
else
if
(
type
==
NODE
)
return
3
*
sbi
->
blocks_per_seg
;
else
if
(
type
==
META
)
return
MAX_BIO_BLOCKS
(
max_hw_blocks
(
sbi
)
);
return
MAX_BIO_BLOCKS
(
sbi
);
else
return
0
;
}
...
...
@@ -751,7 +751,7 @@ static inline long nr_pages_to_write(struct f2fs_sb_info *sbi, int type,
else
if
(
type
==
NODE
)
desired
=
3
*
max_hw_blocks
(
sbi
);
else
desired
=
MAX_BIO_BLOCKS
(
max_hw_blocks
(
sbi
)
);
desired
=
MAX_BIO_BLOCKS
(
sbi
);
wbc
->
nr_to_write
=
desired
;
return
desired
-
nr_to_write
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录