Btrfs: 32bit cleanups
Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
parent
7cf75962ac
commit
41903fe666
|
@ -43,7 +43,7 @@ void print_tree(struct ctree_root *root, struct tree_buffer *t)
|
||||||
print_leaf((struct leaf *)c);
|
print_leaf((struct leaf *)c);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
printf("node %Lu level %d total ptrs %d free spc %lu\n", t->blocknr,
|
printf("node %Lu level %d total ptrs %d free spc %u\n", t->blocknr,
|
||||||
node_level(c->header.flags), c->header.nritems,
|
node_level(c->header.flags), c->header.nritems,
|
||||||
NODEPTRS_PER_BLOCK - c->header.nritems);
|
NODEPTRS_PER_BLOCK - c->header.nritems);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
|
|
|
@ -40,15 +40,16 @@ static int ins_one(struct ctree_root *root, struct radix_tree_root *radix)
|
||||||
struct key key;
|
struct key key;
|
||||||
int ret;
|
int ret;
|
||||||
char buf[128];
|
char buf[128];
|
||||||
|
unsigned long oid;
|
||||||
init_path(&path);
|
init_path(&path);
|
||||||
ret = setup_key(radix, &key, 0);
|
ret = setup_key(radix, &key, 0);
|
||||||
sprintf(buf, "str-%Lu\n", key.objectid);
|
sprintf(buf, "str-%Lu\n", key.objectid);
|
||||||
ret = insert_item(root, &key, buf, strlen(buf));
|
ret = insert_item(root, &key, buf, strlen(buf));
|
||||||
if (ret)
|
if (ret)
|
||||||
goto error;
|
goto error;
|
||||||
|
oid = (unsigned long)key.objectid;
|
||||||
radix_tree_preload(GFP_KERNEL);
|
radix_tree_preload(GFP_KERNEL);
|
||||||
ret = radix_tree_insert(radix, key.objectid,
|
ret = radix_tree_insert(radix, oid, (void *)oid);
|
||||||
(void *)key.objectid);
|
|
||||||
radix_tree_preload_end();
|
radix_tree_preload_end();
|
||||||
if (ret)
|
if (ret)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
Loading…
Reference in a new issue