Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xiphi1978
linux
提交
3eb0314d
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,发现更多精彩内容 >>
提交
3eb0314d
编写于
4月 05, 2007
作者:
C
Chris Mason
提交者:
David Woodhouse
4月 05, 2007
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Btrfs: uuids
Signed-off-by:
N
Chris Mason
<
chris.mason@oracle.com
>
上级
5be6f7f1
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
13 addition
and
4 deletion
+13
-4
fs/btrfs/TODO
fs/btrfs/TODO
+0
-1
fs/btrfs/ctree.c
fs/btrfs/ctree.c
+12
-0
fs/btrfs/super.c
fs/btrfs/super.c
+1
-3
未找到文件。
fs/btrfs/TODO
浏览文件 @
3eb0314d
...
...
@@ -3,7 +3,6 @@
* Add block mapping tree (simple dm layer)
* Make allocator smarter
* add a block group to struct inode
* Make directory hashing work on 32 bit
* Make sure nobh stuff is working properly for cows
* Do actual block accounting
* Check compat and incompat flags on the inode
...
...
fs/btrfs/ctree.c
浏览文件 @
3eb0314d
...
...
@@ -200,6 +200,10 @@ static int check_leaf(struct btrfs_root *root, struct btrfs_path *path,
static
int
check_block
(
struct
btrfs_root
*
root
,
struct
btrfs_path
*
path
,
int
level
)
{
struct
btrfs_node
*
node
=
btrfs_buffer_node
(
path
->
nodes
[
level
]);
if
(
memcmp
(
node
->
header
.
fsid
,
root
->
fs_info
->
disk_super
->
fsid
,
sizeof
(
node
->
header
.
fsid
)))
BUG
();
if
(
level
==
0
)
return
check_leaf
(
root
,
path
,
level
);
return
check_node
(
root
,
path
,
level
);
...
...
@@ -687,6 +691,8 @@ static int insert_new_root(struct btrfs_trans_handle *trans, struct btrfs_root
btrfs_set_header_parentid
(
&
c
->
header
,
btrfs_header_parentid
(
btrfs_buffer_header
(
root
->
node
)));
lower
=
btrfs_buffer_node
(
path
->
nodes
[
level
-
1
]);
memcpy
(
c
->
header
.
fsid
,
root
->
fs_info
->
disk_super
->
fsid
,
sizeof
(
c
->
header
.
fsid
));
if
(
btrfs_is_leaf
(
lower
))
lower_key
=
&
((
struct
btrfs_leaf
*
)
lower
)
->
items
[
0
].
key
;
else
...
...
@@ -780,6 +786,8 @@ static int split_node(struct btrfs_trans_handle *trans, struct btrfs_root
btrfs_set_header_generation
(
&
split
->
header
,
trans
->
transid
);
btrfs_set_header_parentid
(
&
split
->
header
,
btrfs_header_parentid
(
btrfs_buffer_header
(
root
->
node
)));
memcpy
(
split
->
header
.
fsid
,
root
->
fs_info
->
disk_super
->
fsid
,
sizeof
(
split
->
header
.
fsid
));
mid
=
(
c_nritems
+
1
)
/
2
;
btrfs_memcpy
(
root
,
split
,
split
->
ptrs
,
c
->
ptrs
+
mid
,
(
c_nritems
-
mid
)
*
sizeof
(
struct
btrfs_key_ptr
));
...
...
@@ -1139,6 +1147,8 @@ static int split_leaf(struct btrfs_trans_handle *trans, struct btrfs_root
btrfs_set_header_level
(
&
right
->
header
,
0
);
btrfs_set_header_parentid
(
&
right
->
header
,
btrfs_header_parentid
(
btrfs_buffer_header
(
root
->
node
)));
memcpy
(
right
->
header
.
fsid
,
root
->
fs_info
->
disk_super
->
fsid
,
sizeof
(
right
->
header
.
fsid
));
if
(
mid
<=
slot
)
{
if
(
nritems
==
1
||
leaf_space_used
(
l
,
mid
,
nritems
-
mid
)
+
space_needed
>
...
...
@@ -1229,6 +1239,8 @@ static int split_leaf(struct btrfs_trans_handle *trans, struct btrfs_root
btrfs_set_header_level
(
&
right
->
header
,
0
);
btrfs_set_header_parentid
(
&
right
->
header
,
btrfs_header_parentid
(
btrfs_buffer_header
(
root
->
node
)));
memcpy
(
right
->
header
.
fsid
,
root
->
fs_info
->
disk_super
->
fsid
,
sizeof
(
right
->
header
.
fsid
));
btrfs_cpu_key_to_disk
(
&
disk_key
,
ins_key
);
btrfs_set_header_nritems
(
&
right
->
header
,
0
);
wret
=
insert_ptr
(
trans
,
root
,
path
,
...
...
fs/btrfs/super.c
浏览文件 @
3eb0314d
...
...
@@ -483,10 +483,8 @@ static int btrfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
if
(
btrfs_disk_key_objectid
(
&
item
->
key
)
!=
key
.
objectid
)
break
;
if
(
btrfs_disk_key_offset
(
&
item
->
key
)
>
root
->
fs_info
->
highest_inode
)
{
printk
(
"stopping at highest inode %Lu
\n
"
,
root
->
fs_info
->
highest_inode
);
root
->
fs_info
->
highest_inode
)
break
;
}
if
(
btrfs_disk_key_type
(
&
item
->
key
)
!=
BTRFS_DIR_INDEX_KEY
)
continue
;
if
(
btrfs_disk_key_offset
(
&
item
->
key
)
<
filp
->
f_pos
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录