summaryrefslogtreecommitdiff
path: root/extent-tree.c
diff options
context:
space:
mode:
authorAlex Chiang <achiang@hp.com>2008-04-01 10:52:22 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2008-04-01 10:52:22 -0400
commit857e9a2a63495be26347591b4d7f167b3e1e88bc (patch)
treeabf8012fbb5fe46681fe49c17fe71eaa85271187 /extent-tree.c
parent5b4fe4f80fe620faff695ab1c3931b621ffb775e (diff)
btrfs-progs: Fix printf format casting errors
We get lots of warnings of the flavor: utils.c:441: warning: format '%Lu' expects type 'long long unsigned int' but argument 2 has type 'u64' And thanks to -Werror, the build fails. Clean up these printfs by properly casting the arg to the format specified. Signed-off-by: Alex Chiang <achiang@hp.com>
Diffstat (limited to 'extent-tree.c')
-rw-r--r--extent-tree.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/extent-tree.c b/extent-tree.c
index 9696aabf..b9cf92f6 100644
--- a/extent-tree.c
+++ b/extent-tree.c
@@ -225,7 +225,8 @@ again:
out:
cache = btrfs_lookup_block_group(root->fs_info, search_start);
if (!cache) {
- printk("Unable to find block group for %Lu\n", search_start);
+ printk("Unable to find block group for %llu\n",
+ (unsigned long long)search_start);
WARN_ON(1);
}
return -ENOSPC;
@@ -680,7 +681,8 @@ static int lookup_extent_ref(struct btrfs_trans_handle *trans,
goto out;
if (ret != 0) {
btrfs_print_leaf(root, path->nodes[0]);
- printk("failed to find block number %Lu\n", bytenr);
+ printk("failed to find block number %llu\n",
+ (unsigned long long)bytenr);
BUG();
}
l = path->nodes[0];
@@ -1046,7 +1048,7 @@ static int do_chunk_alloc(struct btrfs_trans_handle *trans,
ret = btrfs_alloc_chunk(trans, extent_root, &start, &num_bytes, flags);
if (ret == -ENOSPC) {
-printk("space info full %Lu\n", flags);
+printk("space info full %llu\n", (unsigned long long)flags);
space_info->full = 1;
return 0;
}
@@ -1315,10 +1317,13 @@ static int __free_extent(struct btrfs_trans_handle *trans, struct btrfs_root
} else {
btrfs_print_leaf(extent_root, path->nodes[0]);
WARN_ON(1);
- printk("Unable to find ref byte nr %Lu root %Lu "
- " gen %Lu owner %Lu offset %Lu\n", bytenr,
- root_objectid, ref_generation, owner_objectid,
- owner_offset);
+ printk("Unable to find ref byte nr %llu root %llu "
+ " gen %llu owner %llu offset %llu\n",
+ (unsigned long long)bytenr,
+ (unsigned long long)root_objectid,
+ (unsigned long long)ref_generation,
+ (unsigned long long)owner_objectid,
+ (unsigned long long)owner_offset);
}
if (!found_extent) {
btrfs_release_path(extent_root, path);
@@ -1720,8 +1725,9 @@ int btrfs_alloc_extent(struct btrfs_trans_handle *trans,
update_block:
ret = update_block_group(trans, root, ins->objectid, ins->offset, 1, 0);
if (ret) {
- printk("update block group failed for %Lu %Lu\n",
- ins->objectid, ins->offset);
+ printk("update block group failed for %llu %llu\n",
+ (unsigned long long)ins->objectid,
+ (unsigned long long)ins->offset);
BUG();
}
return 0;