Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
7cf75962
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看板
提交
7cf75962
编写于
2月 26, 2007
作者:
C
Chris Mason
提交者:
David Woodhouse
2月 26, 2007
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Btrfs: u64 cleanups
Signed-off-by:
N
Chris Mason
<
chris.mason@oracle.com
>
上级
c673024a
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
17 addition
and
17 deletion
+17
-17
fs/btrfs/Makefile
fs/btrfs/Makefile
+1
-1
fs/btrfs/extent-tree.c
fs/btrfs/extent-tree.c
+2
-2
fs/btrfs/kerncompat.h
fs/btrfs/kerncompat.h
+1
-1
fs/btrfs/print-tree.c
fs/btrfs/print-tree.c
+5
-5
fs/btrfs/random-test.c
fs/btrfs/random-test.c
+8
-8
未找到文件。
fs/btrfs/Makefile
浏览文件 @
7cf75962
...
...
@@ -17,6 +17,6 @@ tester: $(objects) random-test.o
$(objects)
:
$(headers)
clean
:
rm
ctree
*
.o
rm
debug-tree tester
*
.o
fs/btrfs/extent-tree.c
浏览文件 @
7cf75962
...
...
@@ -42,7 +42,7 @@ static int del_pending_extents(struct ctree_root *extent_root)
ret
=
search_slot
(
extent_root
,
&
key
,
&
path
,
0
);
if
(
ret
)
{
print_tree
(
extent_root
,
extent_root
->
node
);
printf
(
"unable to find %
l
u
\n
"
,
key
.
objectid
);
printf
(
"unable to find %
L
u
\n
"
,
key
.
objectid
);
BUG
();
// FIXME undo it and return sane
return
ret
;
...
...
@@ -86,7 +86,7 @@ int free_extent(struct ctree_root *root, u64 blocknr, u64 num_blocks)
ret
=
search_slot
(
extent_root
,
&
key
,
&
path
,
0
);
if
(
ret
)
{
print_tree
(
extent_root
,
extent_root
->
node
);
printf
(
"failed to find %
l
u
\n
"
,
key
.
objectid
);
printf
(
"failed to find %
L
u
\n
"
,
key
.
objectid
);
BUG
();
}
ret
=
del_item
(
extent_root
,
&
path
);
...
...
fs/btrfs/kerncompat.h
浏览文件 @
7cf75962
...
...
@@ -15,7 +15,7 @@
#define BUG() abort()
typedef
unsigned
int
u32
;
typedef
unsigned
long
u64
;
typedef
unsigned
long
long
u64
;
typedef
unsigned
char
u8
;
typedef
unsigned
short
u16
;
...
...
fs/btrfs/print-tree.c
浏览文件 @
7cf75962
...
...
@@ -11,19 +11,19 @@ void print_leaf(struct leaf *l)
int
nr
=
l
->
header
.
nritems
;
struct
item
*
item
;
struct
extent_item
*
ei
;
printf
(
"leaf %
l
u total ptrs %d free space %d
\n
"
,
l
->
header
.
blocknr
,
nr
,
printf
(
"leaf %
L
u total ptrs %d free space %d
\n
"
,
l
->
header
.
blocknr
,
nr
,
leaf_free_space
(
l
));
fflush
(
stdout
);
for
(
i
=
0
;
i
<
nr
;
i
++
)
{
item
=
l
->
items
+
i
;
printf
(
"
\t
item %d key (%
lu %u %l
u) itemoff %d itemsize %d
\n
"
,
printf
(
"
\t
item %d key (%
Lu %u %L
u) itemoff %d itemsize %d
\n
"
,
i
,
item
->
key
.
objectid
,
item
->
key
.
flags
,
item
->
key
.
offset
,
item
->
offset
,
item
->
size
);
fflush
(
stdout
);
printf
(
"
\t\t
item data %.*s
\n
"
,
item
->
size
,
l
->
data
+
item
->
offset
);
ei
=
(
struct
extent_item
*
)(
l
->
data
+
item
->
offset
);
printf
(
"
\t\t
extent data %u %
l
u
\n
"
,
ei
->
refs
,
ei
->
owner
);
printf
(
"
\t\t
extent data %u %
L
u
\n
"
,
ei
->
refs
,
ei
->
owner
);
fflush
(
stdout
);
}
}
...
...
@@ -43,12 +43,12 @@ void print_tree(struct ctree_root *root, struct tree_buffer *t)
print_leaf
((
struct
leaf
*
)
c
);
return
;
}
printf
(
"node %
l
u level %d total ptrs %d free spc %lu
\n
"
,
t
->
blocknr
,
printf
(
"node %
L
u level %d total ptrs %d free spc %lu
\n
"
,
t
->
blocknr
,
node_level
(
c
->
header
.
flags
),
c
->
header
.
nritems
,
NODEPTRS_PER_BLOCK
-
c
->
header
.
nritems
);
fflush
(
stdout
);
for
(
i
=
0
;
i
<
nr
;
i
++
)
{
printf
(
"
\t
key %d (%
lu %u %lu) block %l
u
\n
"
,
printf
(
"
\t
key %d (%
Lu %u %Lu) block %L
u
\n
"
,
i
,
c
->
keys
[
i
].
objectid
,
c
->
keys
[
i
].
flags
,
c
->
keys
[
i
].
offset
,
c
->
blockptrs
[
i
]);
...
...
fs/btrfs/random-test.c
浏览文件 @
7cf75962
...
...
@@ -42,7 +42,7 @@ static int ins_one(struct ctree_root *root, struct radix_tree_root *radix)
char
buf
[
128
];
init_path
(
&
path
);
ret
=
setup_key
(
radix
,
&
key
,
0
);
sprintf
(
buf
,
"str-%
l
u
\n
"
,
key
.
objectid
);
sprintf
(
buf
,
"str-%
L
u
\n
"
,
key
.
objectid
);
ret
=
insert_item
(
root
,
&
key
,
buf
,
strlen
(
buf
));
if
(
ret
)
goto
error
;
...
...
@@ -54,7 +54,7 @@ static int ins_one(struct ctree_root *root, struct radix_tree_root *radix)
goto
error
;
return
ret
;
error:
printf
(
"failed to insert %
l
u
\n
"
,
key
.
objectid
);
printf
(
"failed to insert %
L
u
\n
"
,
key
.
objectid
);
return
-
1
;
}
...
...
@@ -68,10 +68,10 @@ static int insert_dup(struct ctree_root *root, struct radix_tree_root *radix)
ret
=
setup_key
(
radix
,
&
key
,
1
);
if
(
ret
<
0
)
return
0
;
sprintf
(
buf
,
"str-%
l
u
\n
"
,
key
.
objectid
);
sprintf
(
buf
,
"str-%
L
u
\n
"
,
key
.
objectid
);
ret
=
insert_item
(
root
,
&
key
,
buf
,
strlen
(
buf
));
if
(
ret
!=
-
EEXIST
)
{
printf
(
"insert on %
l
u gave us %d
\n
"
,
key
.
objectid
,
ret
);
printf
(
"insert on %
L
u gave us %d
\n
"
,
key
.
objectid
,
ret
);
return
1
;
}
return
0
;
...
...
@@ -99,7 +99,7 @@ static int del_one(struct ctree_root *root, struct radix_tree_root *radix)
goto
error
;
return
0
;
error:
printf
(
"failed to delete %
l
u
\n
"
,
key
.
objectid
);
printf
(
"failed to delete %
L
u
\n
"
,
key
.
objectid
);
return
-
1
;
}
...
...
@@ -118,7 +118,7 @@ static int lookup_item(struct ctree_root *root, struct radix_tree_root *radix)
goto
error
;
return
0
;
error:
printf
(
"unable to find key %
l
u
\n
"
,
key
.
objectid
);
printf
(
"unable to find key %
L
u
\n
"
,
key
.
objectid
);
return
-
1
;
}
...
...
@@ -137,7 +137,7 @@ static int lookup_enoent(struct ctree_root *root, struct radix_tree_root *radix)
goto
error
;
return
0
;
error:
printf
(
"able to find key that should not exist %
l
u
\n
"
,
key
.
objectid
);
printf
(
"able to find key that should not exist %
L
u
\n
"
,
key
.
objectid
);
return
-
1
;
}
...
...
@@ -148,7 +148,7 @@ static int fill_radix(struct ctree_root *root, struct radix_tree_root *radix)
{
struct
ctree_path
path
;
struct
key
key
;
u
64
found
;
u
nsigned
long
found
;
int
ret
;
int
slot
;
int
i
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录