Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
21ca543e
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
21ca543e
编写于
11月 04, 2011
作者:
I
Ilya Dryomov
提交者:
Chris Mason
11月 06, 2011
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Btrfs: rename btrfs_bio multi -> bbio for consistency
Signed-off-by:
N
Chris Mason
<
chris.mason@oracle.com
>
上级
9510dc4c
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
15 addition
and
15 deletion
+15
-15
fs/btrfs/reada.c
fs/btrfs/reada.c
+15
-15
未找到文件。
fs/btrfs/reada.c
浏览文件 @
21ca543e
...
...
@@ -247,7 +247,7 @@ int btree_readahead_hook(struct btrfs_root *root, struct extent_buffer *eb,
static
struct
reada_zone
*
reada_find_zone
(
struct
btrfs_fs_info
*
fs_info
,
struct
btrfs_device
*
dev
,
u64
logical
,
struct
btrfs_bio
*
multi
)
struct
btrfs_bio
*
bbio
)
{
int
ret
;
int
looped
=
0
;
...
...
@@ -297,11 +297,11 @@ static struct reada_zone *reada_find_zone(struct btrfs_fs_info *fs_info,
kref_init
(
&
zone
->
refcnt
);
zone
->
elems
=
0
;
zone
->
device
=
dev
;
/* our device always sits at index 0 */
for
(
i
=
0
;
i
<
multi
->
num_stripes
;
++
i
)
{
for
(
i
=
0
;
i
<
bbio
->
num_stripes
;
++
i
)
{
/* bounds have already been checked */
zone
->
devs
[
i
]
=
multi
->
stripes
[
i
].
dev
;
zone
->
devs
[
i
]
=
bbio
->
stripes
[
i
].
dev
;
}
zone
->
ndevs
=
multi
->
num_stripes
;
zone
->
ndevs
=
bbio
->
num_stripes
;
spin_lock
(
&
fs_info
->
reada_lock
);
ret
=
radix_tree_insert
(
&
dev
->
reada_zones
,
...
...
@@ -327,7 +327,7 @@ static struct reada_extent *reada_find_extent(struct btrfs_root *root,
struct
reada_extent
*
re
=
NULL
;
struct
btrfs_fs_info
*
fs_info
=
root
->
fs_info
;
struct
btrfs_mapping_tree
*
map_tree
=
&
fs_info
->
mapping_tree
;
struct
btrfs_bio
*
multi
=
NULL
;
struct
btrfs_bio
*
bbio
=
NULL
;
struct
btrfs_device
*
dev
;
u32
blocksize
;
u64
length
;
...
...
@@ -361,21 +361,21 @@ static struct reada_extent *reada_find_extent(struct btrfs_root *root,
* map block
*/
length
=
blocksize
;
ret
=
btrfs_map_block
(
map_tree
,
REQ_WRITE
,
logical
,
&
length
,
&
multi
,
0
);
if
(
ret
||
!
multi
||
length
<
blocksize
)
ret
=
btrfs_map_block
(
map_tree
,
REQ_WRITE
,
logical
,
&
length
,
&
bbio
,
0
);
if
(
ret
||
!
bbio
||
length
<
blocksize
)
goto
error
;
if
(
multi
->
num_stripes
>
MAX_MIRRORS
)
{
if
(
bbio
->
num_stripes
>
MAX_MIRRORS
)
{
printk
(
KERN_ERR
"btrfs readahead: more than %d copies not "
"supported"
,
MAX_MIRRORS
);
goto
error
;
}
for
(
nzones
=
0
;
nzones
<
multi
->
num_stripes
;
++
nzones
)
{
for
(
nzones
=
0
;
nzones
<
bbio
->
num_stripes
;
++
nzones
)
{
struct
reada_zone
*
zone
;
dev
=
multi
->
stripes
[
nzones
].
dev
;
zone
=
reada_find_zone
(
fs_info
,
dev
,
logical
,
multi
);
dev
=
bbio
->
stripes
[
nzones
].
dev
;
zone
=
reada_find_zone
(
fs_info
,
dev
,
logical
,
bbio
);
if
(
!
zone
)
break
;
...
...
@@ -407,11 +407,11 @@ static struct reada_extent *reada_find_extent(struct btrfs_root *root,
goto
error
;
}
for
(
i
=
0
;
i
<
nzones
;
++
i
)
{
dev
=
multi
->
stripes
[
i
].
dev
;
dev
=
bbio
->
stripes
[
i
].
dev
;
ret
=
radix_tree_insert
(
&
dev
->
reada_extents
,
index
,
re
);
if
(
ret
)
{
while
(
--
i
>=
0
)
{
dev
=
multi
->
stripes
[
i
].
dev
;
dev
=
bbio
->
stripes
[
i
].
dev
;
BUG_ON
(
dev
==
NULL
);
radix_tree_delete
(
&
dev
->
reada_extents
,
index
);
}
...
...
@@ -423,7 +423,7 @@ static struct reada_extent *reada_find_extent(struct btrfs_root *root,
}
spin_unlock
(
&
fs_info
->
reada_lock
);
kfree
(
multi
);
kfree
(
bbio
);
return
re
;
error:
...
...
@@ -448,7 +448,7 @@ static struct reada_extent *reada_find_extent(struct btrfs_root *root,
kref_put
(
&
zone
->
refcnt
,
reada_zone_release
);
spin_unlock
(
&
fs_info
->
reada_lock
);
}
kfree
(
multi
);
kfree
(
bbio
);
kfree
(
re
);
if
(
looped
)
goto
again
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录