aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-03-14 14:26:53 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-03-14 14:26:53 -0400
commita1516c8921ce2c148b69493e858d95bc79c92f01 (patch)
tree3ebe5781aa7f89bd4c78c649941917c272f81f99
parent123abc88c9087b9c5605566ee3491aaef17fd837 (diff)
Btrfs: reorder key offset and flags
Signed-off-by: Chris Mason <chris.mason@oracle.com>
-rw-r--r--fs/btrfs/TODO1
-rw-r--r--fs/btrfs/ctree.h4
-rw-r--r--fs/btrfs/print-tree.c12
3 files changed, 9 insertions, 8 deletions
diff --git a/fs/btrfs/TODO b/fs/btrfs/TODO
index ff90e5eaf431..8142be88d71c 100644
--- a/fs/btrfs/TODO
+++ b/fs/btrfs/TODO
@@ -1,7 +1,6 @@
1* cleanup, add more error checking, get rid of BUG_ONs 1* cleanup, add more error checking, get rid of BUG_ONs
2* Make IO functions look more like the page cache 2* Make IO functions look more like the page cache
3* Fix ENOSPC handling 3* Fix ENOSPC handling
4* make blocksize a mkfs parameter instead of #define
5* make a real mkfs and superblock 4* make a real mkfs and superblock
6* Do checksumming 5* Do checksumming
7* Define FS objects in terms of different item types 6* Define FS objects in terms of different item types
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index c61ad0f69be9..73ebc824924a 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -26,14 +26,14 @@
26 */ 26 */
27struct btrfs_disk_key { 27struct btrfs_disk_key {
28 __le64 objectid; 28 __le64 objectid;
29 __le32 flags;
30 __le64 offset; 29 __le64 offset;
30 __le32 flags;
31} __attribute__ ((__packed__)); 31} __attribute__ ((__packed__));
32 32
33struct btrfs_key { 33struct btrfs_key {
34 u64 objectid; 34 u64 objectid;
35 u32 flags;
36 u64 offset; 35 u64 offset;
36 u32 flags;
37} __attribute__ ((__packed__)); 37} __attribute__ ((__packed__));
38 38
39/* 39/*
diff --git a/fs/btrfs/print-tree.c b/fs/btrfs/print-tree.c
index 7a189eaa589f..4c710190343d 100644
--- a/fs/btrfs/print-tree.c
+++ b/fs/btrfs/print-tree.c
@@ -18,11 +18,11 @@ void btrfs_print_leaf(struct btrfs_root *root, struct btrfs_leaf *l)
18 fflush(stdout); 18 fflush(stdout);
19 for (i = 0 ; i < nr ; i++) { 19 for (i = 0 ; i < nr ; i++) {
20 item = l->items + i; 20 item = l->items + i;
21 printf("\titem %d key (%Lu %u %Lu) itemoff %d itemsize %d\n", 21 printf("\titem %d key (%Lu %Lu %u) itemoff %d itemsize %d\n",
22 i, 22 i,
23 btrfs_key_objectid(&item->key), 23 btrfs_key_objectid(&item->key),
24 btrfs_key_flags(&item->key),
25 btrfs_key_offset(&item->key), 24 btrfs_key_offset(&item->key),
25 btrfs_key_flags(&item->key),
26 btrfs_item_offset(item), 26 btrfs_item_offset(item),
27 btrfs_item_size(item)); 27 btrfs_item_size(item));
28 printf("\t\titem data %.*s\n", btrfs_item_size(item), 28 printf("\t\titem data %.*s\n", btrfs_item_size(item),
@@ -55,10 +55,12 @@ void btrfs_print_tree(struct btrfs_root *root, struct btrfs_buffer *t)
55 (u32)BTRFS_NODEPTRS_PER_BLOCK(root) - nr); 55 (u32)BTRFS_NODEPTRS_PER_BLOCK(root) - nr);
56 fflush(stdout); 56 fflush(stdout);
57 for (i = 0; i < nr; i++) { 57 for (i = 0; i < nr; i++) {
58 printf("\tkey %d (%Lu %u %Lu) block %Lu\n", 58 printf("\tkey %d (%Lu %Lu %u) block %Lu\n",
59 i, 59 i,
60 c->ptrs[i].key.objectid, c->ptrs[i].key.flags, 60 c->ptrs[i].key.objectid,
61 c->ptrs[i].key.offset, btrfs_node_blockptr(c, i)); 61 c->ptrs[i].key.offset,
62 c->ptrs[i].key.flags,
63 btrfs_node_blockptr(c, i));
62 fflush(stdout); 64 fflush(stdout);
63 } 65 }
64 for (i = 0; i < nr; i++) { 66 for (i = 0; i < nr; i++) {