diff options
author | Chris Mason <chris.mason@oracle.com> | 2007-02-26 10:55:42 -0500 |
---|---|---|
committer | David Woodhouse <dwmw2@hera.kernel.org> | 2007-02-26 10:55:42 -0500 |
commit | 41903fe666ff8e7b1d47ac7b2f5f9a91c7749498 (patch) | |
tree | 9d82f4d5c41cfac22a507f7e76530ebbff785043 /fs/btrfs | |
parent | 7cf75962acd27ed0f819df791486e7b803c7109c (diff) |
Btrfs: 32bit cleanups
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/print-tree.c | 2 | ||||
-rw-r--r-- | fs/btrfs/random-test.c | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/fs/btrfs/print-tree.c b/fs/btrfs/print-tree.c index 1d591270f4c4..a9a14223e186 100644 --- a/fs/btrfs/print-tree.c +++ b/fs/btrfs/print-tree.c | |||
@@ -43,7 +43,7 @@ void print_tree(struct ctree_root *root, struct tree_buffer *t) | |||
43 | print_leaf((struct leaf *)c); | 43 | print_leaf((struct leaf *)c); |
44 | return; | 44 | return; |
45 | } | 45 | } |
46 | printf("node %Lu level %d total ptrs %d free spc %lu\n", t->blocknr, | 46 | printf("node %Lu level %d total ptrs %d free spc %u\n", t->blocknr, |
47 | node_level(c->header.flags), c->header.nritems, | 47 | node_level(c->header.flags), c->header.nritems, |
48 | NODEPTRS_PER_BLOCK - c->header.nritems); | 48 | NODEPTRS_PER_BLOCK - c->header.nritems); |
49 | fflush(stdout); | 49 | fflush(stdout); |
diff --git a/fs/btrfs/random-test.c b/fs/btrfs/random-test.c index 111a248bd5c2..7078263acc3d 100644 --- a/fs/btrfs/random-test.c +++ b/fs/btrfs/random-test.c | |||
@@ -40,15 +40,16 @@ static int ins_one(struct ctree_root *root, struct radix_tree_root *radix) | |||
40 | struct key key; | 40 | struct key key; |
41 | int ret; | 41 | int ret; |
42 | char buf[128]; | 42 | char buf[128]; |
43 | unsigned long oid; | ||
43 | init_path(&path); | 44 | init_path(&path); |
44 | ret = setup_key(radix, &key, 0); | 45 | ret = setup_key(radix, &key, 0); |
45 | sprintf(buf, "str-%Lu\n", key.objectid); | 46 | sprintf(buf, "str-%Lu\n", key.objectid); |
46 | ret = insert_item(root, &key, buf, strlen(buf)); | 47 | ret = insert_item(root, &key, buf, strlen(buf)); |
47 | if (ret) | 48 | if (ret) |
48 | goto error; | 49 | goto error; |
50 | oid = (unsigned long)key.objectid; | ||
49 | radix_tree_preload(GFP_KERNEL); | 51 | radix_tree_preload(GFP_KERNEL); |
50 | ret = radix_tree_insert(radix, key.objectid, | 52 | ret = radix_tree_insert(radix, oid, (void *)oid); |
51 | (void *)key.objectid); | ||
52 | radix_tree_preload_end(); | 53 | radix_tree_preload_end(); |
53 | if (ret) | 54 | if (ret) |
54 | goto error; | 55 | goto error; |