Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
a1516c89
Commit
a1516c89
authored
Mar 14, 2007
by
Chris Mason
Committed by
David Woodhouse
Mar 14, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Btrfs: reorder key offset and flags
Signed-off-by:
Chris Mason
<
chris.mason@oracle.com
>
parent
123abc88
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
8 deletions
+9
-8
fs/btrfs/TODO
fs/btrfs/TODO
+0
-1
fs/btrfs/ctree.h
fs/btrfs/ctree.h
+2
-2
fs/btrfs/print-tree.c
fs/btrfs/print-tree.c
+7
-5
No files found.
fs/btrfs/TODO
View file @
a1516c89
* cleanup, add more error checking, get rid of BUG_ONs
* Make IO functions look more like the page cache
* Fix ENOSPC handling
* make blocksize a mkfs parameter instead of #define
* make a real mkfs and superblock
* Do checksumming
* Define FS objects in terms of different item types
...
...
fs/btrfs/ctree.h
View file @
a1516c89
...
...
@@ -26,14 +26,14 @@
*/
struct
btrfs_disk_key
{
__le64
objectid
;
__le32
flags
;
__le64
offset
;
__le32
flags
;
}
__attribute__
((
__packed__
));
struct
btrfs_key
{
u64
objectid
;
u32
flags
;
u64
offset
;
u32
flags
;
}
__attribute__
((
__packed__
));
/*
...
...
fs/btrfs/print-tree.c
View file @
a1516c89
...
...
@@ -18,11 +18,11 @@ void btrfs_print_leaf(struct btrfs_root *root, struct btrfs_leaf *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 %
Lu %
u) itemoff %d itemsize %d
\n
"
,
i
,
btrfs_key_objectid
(
&
item
->
key
),
btrfs_key_flags
(
&
item
->
key
),
btrfs_key_offset
(
&
item
->
key
),
btrfs_key_flags
(
&
item
->
key
),
btrfs_item_offset
(
item
),
btrfs_item_size
(
item
));
printf
(
"
\t\t
item data %.*s
\n
"
,
btrfs_item_size
(
item
),
...
...
@@ -55,10 +55,12 @@ void btrfs_print_tree(struct btrfs_root *root, struct btrfs_buffer *t)
(
u32
)
BTRFS_NODEPTRS_PER_BLOCK
(
root
)
-
nr
);
fflush
(
stdout
);
for
(
i
=
0
;
i
<
nr
;
i
++
)
{
printf
(
"
\t
key %d (%Lu %
u %L
u) block %Lu
\n
"
,
printf
(
"
\t
key %d (%Lu %
Lu %
u) block %Lu
\n
"
,
i
,
c
->
ptrs
[
i
].
key
.
objectid
,
c
->
ptrs
[
i
].
key
.
flags
,
c
->
ptrs
[
i
].
key
.
offset
,
btrfs_node_blockptr
(
c
,
i
));
c
->
ptrs
[
i
].
key
.
objectid
,
c
->
ptrs
[
i
].
key
.
offset
,
c
->
ptrs
[
i
].
key
.
flags
,
btrfs_node_blockptr
(
c
,
i
));
fflush
(
stdout
);
}
for
(
i
=
0
;
i
<
nr
;
i
++
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment