Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
f6dbff55
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看板
提交
f6dbff55
编写于
12月 13, 2007
作者:
C
Chris Mason
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Btrfs: Reorder extent back refs to differentiate btree blocks from file data
Signed-off-by:
N
Chris Mason
<
chris.mason@oracle.com
>
上级
6caab489
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
10 addition
and
10 deletion
+10
-10
fs/btrfs/ctree.h
fs/btrfs/ctree.h
+2
-2
fs/btrfs/extent-tree.c
fs/btrfs/extent-tree.c
+8
-8
未找到文件。
fs/btrfs/ctree.h
浏览文件 @
f6dbff55
...
...
@@ -37,11 +37,12 @@ extern struct kmem_cache *btrfs_path_cachep;
#define BTRFS_MAGIC "_B2RfS_M"
#define BTRFS_MAX_LEVEL 8
#define BTRFS_ROOT_TREE_OBJECTID 1ULL
#define BTRFS_EXTENT_TREE_OBJECTID 2ULL
#define BTRFS_FS_TREE_OBJECTID 3ULL
#define BTRFS_ROOT_TREE_DIR_OBJECTID 4ULL
#define BTRFS_FIRST_FREE_OBJECTID
5
ULL
#define BTRFS_FIRST_FREE_OBJECTID
256
ULL
/*
* we can actually store much bigger names, but lets not confuse the rest
...
...
@@ -107,7 +108,6 @@ struct btrfs_header {
u8
level
;
}
__attribute__
((
__packed__
));
#define BTRFS_MAX_LEVEL 8
#define BTRFS_NODEPTRS_PER_BLOCK(r) (((r)->nodesize - \
sizeof(struct btrfs_header)) / \
sizeof(struct btrfs_key_ptr))
...
...
fs/btrfs/extent-tree.c
浏览文件 @
f6dbff55
...
...
@@ -520,13 +520,13 @@ static int lookup_extent_backref(struct btrfs_trans_handle *trans,
*
* When a tree block is created, back references are inserted:
*
* (root->root_key.objectid, trans->transid or zero, l
owest_key_objectid, level
)
* (root->root_key.objectid, trans->transid or zero, l
evel, lowest_key_objectid
)
*
* When a tree block is cow'd in a reference counted root,
* new back references are added for all the blocks it points to.
* These are of the form (trans->transid will have increased since creation):
*
* (root->root_key.objectid, trans->transid, l
owest_key_objectid, level
)
* (root->root_key.objectid, trans->transid, l
evel, lowest_key_objectid
)
*
* Because the lowest_key_objectid and the level are just hints
* they are not used when backrefs are deleted. When a backref is deleted:
...
...
@@ -702,7 +702,7 @@ int btrfs_inc_root_ref(struct btrfs_trans_handle *trans,
}
return
btrfs_inc_extent_ref
(
trans
,
root
,
root
->
node
->
start
,
root
->
node
->
len
,
owner_objectid
,
generation
,
key_objectid
,
level
);
generation
,
level
,
key_objectid
);
}
int
btrfs_inc_ref
(
struct
btrfs_trans_handle
*
trans
,
struct
btrfs_root
*
root
,
...
...
@@ -750,8 +750,8 @@ int btrfs_inc_ref(struct btrfs_trans_handle *trans, struct btrfs_root *root,
ret
=
btrfs_inc_extent_ref
(
trans
,
root
,
bytenr
,
btrfs_level_size
(
root
,
level
-
1
),
root
->
root_key
.
objectid
,
trans
->
transid
,
key
.
objectid
,
level
-
1
);
trans
->
transid
,
level
-
1
,
key
.
objectid
);
if
(
ret
)
{
faili
=
i
;
goto
fail
;
...
...
@@ -1063,8 +1063,8 @@ static int finish_current_insert(struct btrfs_trans_handle *trans, struct
}
err
=
btrfs_insert_extent_backref
(
trans
,
extent_root
,
path
,
start
,
extent_root
->
root_key
.
objectid
,
0
,
btrfs_disk_key_objectid
(
&
first
)
,
level
);
0
,
level
,
btrfs_disk_key_objectid
(
&
first
)
);
BUG_ON
(
err
);
free_extent_buffer
(
eb
);
}
...
...
@@ -1640,7 +1640,7 @@ struct extent_buffer *__btrfs_alloc_free_block(struct btrfs_trans_handle *trans,
ret
=
btrfs_alloc_extent
(
trans
,
root
,
blocksize
,
root_objectid
,
ref_generation
,
first_objectid
,
level
,
empty_size
,
hint
,
level
,
first_objectid
,
empty_size
,
hint
,
(
u64
)
-
1
,
&
ins
,
0
);
if
(
ret
)
{
BUG_ON
(
ret
>
0
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录