Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
fccb84c9
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看板
提交
fccb84c9
编写于
9月 29, 2014
作者:
D
David Sterba
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
btrfs: move checks for DUMMY_ROOT into a helper
Signed-off-by:
N
David Sterba
<
dsterba@suse.cz
>
上级
7ec20afb
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
23 addition
and
21 deletion
+23
-21
fs/btrfs/ctree.c
fs/btrfs/ctree.c
+2
-3
fs/btrfs/ctree.h
fs/btrfs/ctree.h
+9
-0
fs/btrfs/disk-io.c
fs/btrfs/disk-io.c
+1
-3
fs/btrfs/extent-tree.c
fs/btrfs/extent-tree.c
+7
-9
fs/btrfs/qgroup.c
fs/btrfs/qgroup.c
+4
-6
未找到文件。
fs/btrfs/ctree.c
浏览文件 @
fccb84c9
...
@@ -1506,10 +1506,9 @@ static inline int should_cow_block(struct btrfs_trans_handle *trans,
...
@@ -1506,10 +1506,9 @@ static inline int should_cow_block(struct btrfs_trans_handle *trans,
struct
btrfs_root
*
root
,
struct
btrfs_root
*
root
,
struct
extent_buffer
*
buf
)
struct
extent_buffer
*
buf
)
{
{
#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
if
(
btrfs_test_is_dummy_root
(
root
))
if
(
unlikely
(
test_bit
(
BTRFS_ROOT_DUMMY_ROOT
,
&
root
->
state
)))
return
0
;
return
0
;
#endif
/* ensure we can see the force_cow */
/* ensure we can see the force_cow */
smp_rmb
();
smp_rmb
();
...
...
fs/btrfs/ctree.h
浏览文件 @
fccb84c9
...
@@ -4131,4 +4131,13 @@ int btrfs_verify_qgroup_counts(struct btrfs_fs_info *fs_info, u64 qgroupid,
...
@@ -4131,4 +4131,13 @@ int btrfs_verify_qgroup_counts(struct btrfs_fs_info *fs_info, u64 qgroupid,
u64
rfer
,
u64
excl
);
u64
rfer
,
u64
excl
);
#endif
#endif
static
inline
int
btrfs_test_is_dummy_root
(
struct
btrfs_root
*
root
)
{
#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
if
(
unlikely
(
test_bit
(
BTRFS_ROOT_DUMMY_ROOT
,
&
root
->
state
)))
return
1
;
#endif
return
0
;
}
#endif
#endif
fs/btrfs/disk-io.c
浏览文件 @
fccb84c9
...
@@ -1130,11 +1130,9 @@ struct extent_buffer *btrfs_find_tree_block(struct btrfs_root *root,
...
@@ -1130,11 +1130,9 @@ struct extent_buffer *btrfs_find_tree_block(struct btrfs_root *root,
struct
extent_buffer
*
btrfs_find_create_tree_block
(
struct
btrfs_root
*
root
,
struct
extent_buffer
*
btrfs_find_create_tree_block
(
struct
btrfs_root
*
root
,
u64
bytenr
,
u32
blocksize
)
u64
bytenr
,
u32
blocksize
)
{
{
#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
if
(
btrfs_test_is_dummy_root
(
root
))
if
(
unlikely
(
test_bit
(
BTRFS_ROOT_DUMMY_ROOT
,
&
root
->
state
)))
return
alloc_test_extent_buffer
(
root
->
fs_info
,
bytenr
,
return
alloc_test_extent_buffer
(
root
->
fs_info
,
bytenr
,
blocksize
);
blocksize
);
#endif
return
alloc_extent_buffer
(
root
->
fs_info
,
bytenr
,
blocksize
);
return
alloc_extent_buffer
(
root
->
fs_info
,
bytenr
,
blocksize
);
}
}
...
...
fs/btrfs/extent-tree.c
浏览文件 @
fccb84c9
...
@@ -3073,10 +3073,10 @@ static int __btrfs_mod_ref(struct btrfs_trans_handle *trans,
...
@@ -3073,10 +3073,10 @@ static int __btrfs_mod_ref(struct btrfs_trans_handle *trans,
int
(
*
process_func
)(
struct
btrfs_trans_handle
*
,
struct
btrfs_root
*
,
int
(
*
process_func
)(
struct
btrfs_trans_handle
*
,
struct
btrfs_root
*
,
u64
,
u64
,
u64
,
u64
,
u64
,
u64
,
int
);
u64
,
u64
,
u64
,
u64
,
u64
,
u64
,
int
);
#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
if
(
unlikely
(
test_bit
(
BTRFS_ROOT_DUMMY_ROOT
,
&
root
->
state
)
))
if
(
btrfs_test_is_dummy_root
(
root
))
return
0
;
return
0
;
#endif
ref_root
=
btrfs_header_owner
(
buf
);
ref_root
=
btrfs_header_owner
(
buf
);
nritems
=
btrfs_header_nritems
(
buf
);
nritems
=
btrfs_header_nritems
(
buf
);
level
=
btrfs_header_level
(
buf
);
level
=
btrfs_header_level
(
buf
);
...
@@ -6264,10 +6264,9 @@ int btrfs_free_extent(struct btrfs_trans_handle *trans, struct btrfs_root *root,
...
@@ -6264,10 +6264,9 @@ int btrfs_free_extent(struct btrfs_trans_handle *trans, struct btrfs_root *root,
int
ret
;
int
ret
;
struct
btrfs_fs_info
*
fs_info
=
root
->
fs_info
;
struct
btrfs_fs_info
*
fs_info
=
root
->
fs_info
;
#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
if
(
btrfs_test_is_dummy_root
(
root
))
if
(
unlikely
(
test_bit
(
BTRFS_ROOT_DUMMY_ROOT
,
&
root
->
state
)))
return
0
;
return
0
;
#endif
add_pinned_bytes
(
root
->
fs_info
,
num_bytes
,
owner
,
root_objectid
);
add_pinned_bytes
(
root
->
fs_info
,
num_bytes
,
owner
,
root_objectid
);
/*
/*
...
@@ -7336,15 +7335,14 @@ struct extent_buffer *btrfs_alloc_free_block(struct btrfs_trans_handle *trans,
...
@@ -7336,15 +7335,14 @@ struct extent_buffer *btrfs_alloc_free_block(struct btrfs_trans_handle *trans,
bool
skinny_metadata
=
btrfs_fs_incompat
(
root
->
fs_info
,
bool
skinny_metadata
=
btrfs_fs_incompat
(
root
->
fs_info
,
SKINNY_METADATA
);
SKINNY_METADATA
);
#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
if
(
btrfs_test_is_dummy_root
(
root
))
{
if
(
unlikely
(
test_bit
(
BTRFS_ROOT_DUMMY_ROOT
,
&
root
->
state
)))
{
buf
=
btrfs_init_new_buffer
(
trans
,
root
,
root
->
alloc_bytenr
,
buf
=
btrfs_init_new_buffer
(
trans
,
root
,
root
->
alloc_bytenr
,
blocksize
,
level
);
blocksize
,
level
);
if
(
!
IS_ERR
(
buf
))
if
(
!
IS_ERR
(
buf
))
root
->
alloc_bytenr
+=
blocksize
;
root
->
alloc_bytenr
+=
blocksize
;
return
buf
;
return
buf
;
}
}
#endif
block_rsv
=
use_block_rsv
(
trans
,
root
,
blocksize
);
block_rsv
=
use_block_rsv
(
trans
,
root
,
blocksize
);
if
(
IS_ERR
(
block_rsv
))
if
(
IS_ERR
(
block_rsv
))
return
ERR_CAST
(
block_rsv
);
return
ERR_CAST
(
block_rsv
);
...
...
fs/btrfs/qgroup.c
浏览文件 @
fccb84c9
...
@@ -539,10 +539,9 @@ static int add_qgroup_item(struct btrfs_trans_handle *trans,
...
@@ -539,10 +539,9 @@ static int add_qgroup_item(struct btrfs_trans_handle *trans,
struct
extent_buffer
*
leaf
;
struct
extent_buffer
*
leaf
;
struct
btrfs_key
key
;
struct
btrfs_key
key
;
#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
if
(
btrfs_test_is_dummy_root
(
quota_root
))
if
(
unlikely
(
test_bit
(
BTRFS_ROOT_DUMMY_ROOT
,
&
quota_root
->
state
)))
return
0
;
return
0
;
#endif
path
=
btrfs_alloc_path
();
path
=
btrfs_alloc_path
();
if
(
!
path
)
if
(
!
path
)
return
-
ENOMEM
;
return
-
ENOMEM
;
...
@@ -698,10 +697,9 @@ static int update_qgroup_info_item(struct btrfs_trans_handle *trans,
...
@@ -698,10 +697,9 @@ static int update_qgroup_info_item(struct btrfs_trans_handle *trans,
int
ret
;
int
ret
;
int
slot
;
int
slot
;
#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
if
(
btrfs_test_is_dummy_root
(
root
))
if
(
unlikely
(
test_bit
(
BTRFS_ROOT_DUMMY_ROOT
,
&
root
->
state
)))
return
0
;
return
0
;
#endif
key
.
objectid
=
0
;
key
.
objectid
=
0
;
key
.
type
=
BTRFS_QGROUP_INFO_KEY
;
key
.
type
=
BTRFS_QGROUP_INFO_KEY
;
key
.
offset
=
qgroup
->
qgroupid
;
key
.
offset
=
qgroup
->
qgroupid
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录