Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xiphi1978
linux
提交
a4f78750
L
linux
项目概览
xiphi1978
/
linux
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a4f78750
编写于
6月 29, 2017
作者:
D
David Sterba
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
btrfs: get fs_info from eb in btrfs_print_leaf, remove argument
Signed-off-by:
N
David Sterba
<
dsterba@suse.com
>
上级
f1b8a1e8
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
17 addition
and
15 deletion
+17
-15
fs/btrfs/ctree.c
fs/btrfs/ctree.c
+7
-7
fs/btrfs/disk-io.c
fs/btrfs/disk-io.c
+1
-1
fs/btrfs/extent-tree.c
fs/btrfs/extent-tree.c
+3
-3
fs/btrfs/print-tree.c
fs/btrfs/print-tree.c
+4
-2
fs/btrfs/print-tree.h
fs/btrfs/print-tree.h
+1
-1
fs/btrfs/root-tree.c
fs/btrfs/root-tree.c
+1
-1
未找到文件。
fs/btrfs/ctree.c
浏览文件 @
a4f78750
...
...
@@ -4650,7 +4650,7 @@ void btrfs_truncate_item(struct btrfs_fs_info *fs_info,
btrfs_mark_buffer_dirty
(
leaf
);
if
(
btrfs_leaf_free_space
(
fs_info
,
leaf
)
<
0
)
{
btrfs_print_leaf
(
fs_info
,
leaf
);
btrfs_print_leaf
(
leaf
);
BUG
();
}
}
...
...
@@ -4679,7 +4679,7 @@ void btrfs_extend_item(struct btrfs_fs_info *fs_info, struct btrfs_path *path,
data_end
=
leaf_data_end
(
fs_info
,
leaf
);
if
(
btrfs_leaf_free_space
(
fs_info
,
leaf
)
<
data_size
)
{
btrfs_print_leaf
(
fs_info
,
leaf
);
btrfs_print_leaf
(
leaf
);
BUG
();
}
slot
=
path
->
slots
[
0
];
...
...
@@ -4687,7 +4687,7 @@ void btrfs_extend_item(struct btrfs_fs_info *fs_info, struct btrfs_path *path,
BUG_ON
(
slot
<
0
);
if
(
slot
>=
nritems
)
{
btrfs_print_leaf
(
fs_info
,
leaf
);
btrfs_print_leaf
(
leaf
);
btrfs_crit
(
fs_info
,
"slot %d too large, nritems %d"
,
slot
,
nritems
);
BUG_ON
(
1
);
...
...
@@ -4718,7 +4718,7 @@ void btrfs_extend_item(struct btrfs_fs_info *fs_info, struct btrfs_path *path,
btrfs_mark_buffer_dirty
(
leaf
);
if
(
btrfs_leaf_free_space
(
fs_info
,
leaf
)
<
0
)
{
btrfs_print_leaf
(
fs_info
,
leaf
);
btrfs_print_leaf
(
leaf
);
BUG
();
}
}
...
...
@@ -4757,7 +4757,7 @@ void setup_items_for_insert(struct btrfs_root *root, struct btrfs_path *path,
data_end
=
leaf_data_end
(
fs_info
,
leaf
);
if
(
btrfs_leaf_free_space
(
fs_info
,
leaf
)
<
total_size
)
{
btrfs_print_leaf
(
fs_info
,
leaf
);
btrfs_print_leaf
(
leaf
);
btrfs_crit
(
fs_info
,
"not enough freespace need %u have %d"
,
total_size
,
btrfs_leaf_free_space
(
fs_info
,
leaf
));
BUG
();
...
...
@@ -4767,7 +4767,7 @@ void setup_items_for_insert(struct btrfs_root *root, struct btrfs_path *path,
unsigned
int
old_data
=
btrfs_item_end_nr
(
leaf
,
slot
);
if
(
old_data
<
data_end
)
{
btrfs_print_leaf
(
fs_info
,
leaf
);
btrfs_print_leaf
(
leaf
);
btrfs_crit
(
fs_info
,
"slot %d old_data %d data_end %d"
,
slot
,
old_data
,
data_end
);
BUG_ON
(
1
);
...
...
@@ -4811,7 +4811,7 @@ void setup_items_for_insert(struct btrfs_root *root, struct btrfs_path *path,
btrfs_mark_buffer_dirty
(
leaf
);
if
(
btrfs_leaf_free_space
(
fs_info
,
leaf
)
<
0
)
{
btrfs_print_leaf
(
fs_info
,
leaf
);
btrfs_print_leaf
(
leaf
);
BUG
();
}
}
...
...
fs/btrfs/disk-io.c
浏览文件 @
a4f78750
...
...
@@ -3984,7 +3984,7 @@ void btrfs_mark_buffer_dirty(struct extent_buffer *buf)
fs_info
->
dirty_metadata_batch
);
#ifdef CONFIG_BTRFS_FS_CHECK_INTEGRITY
if
(
btrfs_header_level
(
buf
)
==
0
&&
check_leaf
(
root
,
buf
))
{
btrfs_print_leaf
(
fs_info
,
buf
);
btrfs_print_leaf
(
buf
);
ASSERT
(
0
);
}
#endif
...
...
fs/btrfs/extent-tree.c
浏览文件 @
a4f78750
...
...
@@ -6960,7 +6960,7 @@ static int __btrfs_free_extent(struct btrfs_trans_handle *trans,
"umm, got %d back from search, was looking for %llu"
,
ret
,
bytenr
);
if
(
ret
>
0
)
btrfs_print_leaf
(
info
,
path
->
nodes
[
0
]);
btrfs_print_leaf
(
path
->
nodes
[
0
]);
}
if
(
ret
<
0
)
{
btrfs_abort_transaction
(
trans
,
ret
);
...
...
@@ -6969,7 +6969,7 @@ static int __btrfs_free_extent(struct btrfs_trans_handle *trans,
extent_slot
=
path
->
slots
[
0
];
}
}
else
if
(
WARN_ON
(
ret
==
-
ENOENT
))
{
btrfs_print_leaf
(
info
,
path
->
nodes
[
0
]);
btrfs_print_leaf
(
path
->
nodes
[
0
]);
btrfs_err
(
info
,
"unable to find ref byte nr %llu parent %llu root %llu owner %llu offset %llu"
,
bytenr
,
parent
,
root_objectid
,
owner_objectid
,
...
...
@@ -7006,7 +7006,7 @@ static int __btrfs_free_extent(struct btrfs_trans_handle *trans,
btrfs_err
(
info
,
"umm, got %d back from search, was looking for %llu"
,
ret
,
bytenr
);
btrfs_print_leaf
(
info
,
path
->
nodes
[
0
]);
btrfs_print_leaf
(
path
->
nodes
[
0
]);
}
if
(
ret
<
0
)
{
btrfs_abort_transaction
(
trans
,
ret
);
...
...
fs/btrfs/print-tree.c
浏览文件 @
a4f78750
...
...
@@ -161,8 +161,9 @@ static void print_uuid_item(struct extent_buffer *l, unsigned long offset,
}
}
void
btrfs_print_leaf
(
struct
btrfs_fs_info
*
fs_info
,
struct
extent_buffer
*
l
)
void
btrfs_print_leaf
(
struct
extent_buffer
*
l
)
{
struct
btrfs_fs_info
*
fs_info
;
int
i
;
u32
type
,
nr
;
struct
btrfs_item
*
item
;
...
...
@@ -180,6 +181,7 @@ void btrfs_print_leaf(struct btrfs_fs_info *fs_info, struct extent_buffer *l)
if
(
!
l
)
return
;
fs_info
=
l
->
fs_info
;
nr
=
btrfs_header_nritems
(
l
);
btrfs_info
(
fs_info
,
"leaf %llu total ptrs %d free space %d"
,
...
...
@@ -329,7 +331,7 @@ void btrfs_print_tree(struct btrfs_fs_info *fs_info, struct extent_buffer *c)
nr
=
btrfs_header_nritems
(
c
);
level
=
btrfs_header_level
(
c
);
if
(
level
==
0
)
{
btrfs_print_leaf
(
fs_info
,
c
);
btrfs_print_leaf
(
c
);
return
;
}
btrfs_info
(
fs_info
,
...
...
fs/btrfs/print-tree.h
浏览文件 @
a4f78750
...
...
@@ -18,6 +18,6 @@
#ifndef __PRINT_TREE_
#define __PRINT_TREE_
void
btrfs_print_leaf
(
struct
btrfs_fs_info
*
fs_info
,
struct
extent_buffer
*
l
);
void
btrfs_print_leaf
(
struct
extent_buffer
*
l
);
void
btrfs_print_tree
(
struct
btrfs_fs_info
*
fs_info
,
struct
extent_buffer
*
c
);
#endif
fs/btrfs/root-tree.c
浏览文件 @
a4f78750
...
...
@@ -151,7 +151,7 @@ int btrfs_update_root(struct btrfs_trans_handle *trans, struct btrfs_root
}
if
(
ret
!=
0
)
{
btrfs_print_leaf
(
fs_info
,
path
->
nodes
[
0
]);
btrfs_print_leaf
(
path
->
nodes
[
0
]);
btrfs_crit
(
fs_info
,
"unable to update root key %llu %u %llu"
,
key
->
objectid
,
key
->
type
,
key
->
offset
);
BUG_ON
(
1
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录