summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-02-26 18:55:01 +0300
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-02-26 18:55:01 +0300
commit7cf75962acd27ed0f819df791486e7b803c7109c (patch)
treec8e85b451c563355906d80561679492acfd482f1 /fs
parentc673024aba596e57c07196cb3400cdcc9d28f3aa (diff)
downloadlinux-7cf75962acd27ed0f819df791486e7b803c7109c.tar.xz
Btrfs: u64 cleanups
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/Makefile2
-rw-r--r--fs/btrfs/extent-tree.c4
-rw-r--r--fs/btrfs/kerncompat.h2
-rw-r--r--fs/btrfs/print-tree.c10
-rw-r--r--fs/btrfs/random-test.c16
5 files changed, 17 insertions, 17 deletions
diff --git a/fs/btrfs/Makefile b/fs/btrfs/Makefile
index 855e8f499e37..ea9b6665da34 100644
--- a/fs/btrfs/Makefile
+++ b/fs/btrfs/Makefile
@@ -17,6 +17,6 @@ tester: $(objects) random-test.o
$(objects) : $(headers)
clean :
- rm ctree *.o
+ rm debug-tree tester *.o
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 2b663ef84496..26321524c186 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -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 %lu\n", key.objectid);
+ printf("unable to find %Lu\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 %lu\n", key.objectid);
+ printf("failed to find %Lu\n", key.objectid);
BUG();
}
ret = del_item(extent_root, &path);
diff --git a/fs/btrfs/kerncompat.h b/fs/btrfs/kerncompat.h
index 347ca06205c2..f5efc5f0fff0 100644
--- a/fs/btrfs/kerncompat.h
+++ b/fs/btrfs/kerncompat.h
@@ -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;
diff --git a/fs/btrfs/print-tree.c b/fs/btrfs/print-tree.c
index 594d23b5b24c..1d591270f4c4 100644
--- a/fs/btrfs/print-tree.c
+++ b/fs/btrfs/print-tree.c
@@ -11,19 +11,19 @@ void print_leaf(struct leaf *l)
int nr = l->header.nritems;
struct item *item;
struct extent_item *ei;
- printf("leaf %lu total ptrs %d free space %d\n", l->header.blocknr, nr,
+ printf("leaf %Lu 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("\titem %d key (%lu %u %lu) itemoff %d itemsize %d\n",
+ printf("\titem %d key (%Lu %u %Lu) itemoff %d itemsize %d\n",
i,
item->key.objectid, item->key.flags, item->key.offset,
item->offset, item->size);
fflush(stdout);
printf("\t\titem data %.*s\n", item->size, l->data+item->offset);
ei = (struct extent_item *)(l->data + item->offset);
- printf("\t\textent data %u %lu\n", ei->refs, ei->owner);
+ printf("\t\textent data %u %Lu\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 %lu level %d total ptrs %d free spc %lu\n", t->blocknr,
+ printf("node %Lu 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("\tkey %d (%lu %u %lu) block %lu\n",
+ printf("\tkey %d (%Lu %u %Lu) block %Lu\n",
i,
c->keys[i].objectid, c->keys[i].flags, c->keys[i].offset,
c->blockptrs[i]);
diff --git a/fs/btrfs/random-test.c b/fs/btrfs/random-test.c
index 3c8c68d55d2f..111a248bd5c2 100644
--- a/fs/btrfs/random-test.c
+++ b/fs/btrfs/random-test.c
@@ -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-%lu\n", key.objectid);
+ sprintf(buf, "str-%Lu\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 %lu\n", key.objectid);
+ printf("failed to insert %Lu\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-%lu\n", key.objectid);
+ sprintf(buf, "str-%Lu\n", key.objectid);
ret = insert_item(root, &key, buf, strlen(buf));
if (ret != -EEXIST) {
- printf("insert on %lu gave us %d\n", key.objectid, ret);
+ printf("insert on %Lu 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 %lu\n", key.objectid);
+ printf("failed to delete %Lu\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 %lu\n", key.objectid);
+ printf("unable to find key %Lu\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 %lu\n", key.objectid);
+ printf("able to find key that should not exist %Lu\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;
- u64 found;
+ unsigned long found;
int ret;
int slot;
int i;