提交 c1c9ff7c 编写于 作者: G Geert Uytterhoeven 提交者: Chris Mason

Btrfs: Remove superfluous casts from u64 to unsigned long long

u64 is "unsigned long long" on all architectures now, so there's no need to
cast it when formatting it using the "ll" length modifier.
Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: NJosef Bacik <jbacik@fusionio.com>
Signed-off-by: NChris Mason <chris.mason@fusionio.com>
上级 1cb048f5
...@@ -295,10 +295,9 @@ static int __resolve_indirect_ref(struct btrfs_fs_info *fs_info, ...@@ -295,10 +295,9 @@ static int __resolve_indirect_ref(struct btrfs_fs_info *fs_info,
ret = btrfs_search_old_slot(root, &ref->key_for_search, path, time_seq); ret = btrfs_search_old_slot(root, &ref->key_for_search, path, time_seq);
pr_debug("search slot in root %llu (level %d, ref count %d) returned " pr_debug("search slot in root %llu (level %d, ref count %d) returned "
"%d for key (%llu %u %llu)\n", "%d for key (%llu %u %llu)\n",
(unsigned long long)ref->root_id, level, ref->count, ret, ref->root_id, level, ref->count, ret,
(unsigned long long)ref->key_for_search.objectid, ref->key_for_search.objectid, ref->key_for_search.type,
ref->key_for_search.type, ref->key_for_search.offset);
(unsigned long long)ref->key_for_search.offset);
if (ret < 0) if (ret < 0)
goto out; goto out;
...@@ -1328,8 +1327,7 @@ int extent_from_logical(struct btrfs_fs_info *fs_info, u64 logical, ...@@ -1328,8 +1327,7 @@ int extent_from_logical(struct btrfs_fs_info *fs_info, u64 logical,
found_key->type != BTRFS_METADATA_ITEM_KEY) || found_key->type != BTRFS_METADATA_ITEM_KEY) ||
found_key->objectid > logical || found_key->objectid > logical ||
found_key->objectid + size <= logical) { found_key->objectid + size <= logical) {
pr_debug("logical %llu is not within any extent\n", pr_debug("logical %llu is not within any extent\n", logical);
(unsigned long long)logical);
return -ENOENT; return -ENOENT;
} }
...@@ -1342,11 +1340,8 @@ int extent_from_logical(struct btrfs_fs_info *fs_info, u64 logical, ...@@ -1342,11 +1340,8 @@ int extent_from_logical(struct btrfs_fs_info *fs_info, u64 logical,
pr_debug("logical %llu is at position %llu within the extent (%llu " pr_debug("logical %llu is at position %llu within the extent (%llu "
"EXTENT_ITEM %llu) flags %#llx size %u\n", "EXTENT_ITEM %llu) flags %#llx size %u\n",
(unsigned long long)logical, logical, logical - found_key->objectid, found_key->objectid,
(unsigned long long)(logical - found_key->objectid), found_key->offset, flags, item_size);
(unsigned long long)found_key->objectid,
(unsigned long long)found_key->offset,
(unsigned long long)flags, item_size);
WARN_ON(!flags_ret); WARN_ON(!flags_ret);
if (flags_ret) { if (flags_ret) {
...@@ -1518,7 +1513,7 @@ int iterate_extent_inodes(struct btrfs_fs_info *fs_info, ...@@ -1518,7 +1513,7 @@ int iterate_extent_inodes(struct btrfs_fs_info *fs_info,
while (!ret && (root_node = ulist_next(roots, &root_uiter))) { while (!ret && (root_node = ulist_next(roots, &root_uiter))) {
pr_debug("root %llu references leaf %llu, data list " pr_debug("root %llu references leaf %llu, data list "
"%#llx\n", root_node->val, ref_node->val, "%#llx\n", root_node->val, ref_node->val,
(long long)ref_node->aux); ref_node->aux);
ret = iterate_leaf_refs((struct extent_inode_elem *) ret = iterate_leaf_refs((struct extent_inode_elem *)
(uintptr_t)ref_node->aux, (uintptr_t)ref_node->aux,
root_node->val, root_node->val,
...@@ -1610,9 +1605,8 @@ static int iterate_inode_refs(u64 inum, struct btrfs_root *fs_root, ...@@ -1610,9 +1605,8 @@ static int iterate_inode_refs(u64 inum, struct btrfs_root *fs_root,
name_len = btrfs_inode_ref_name_len(eb, iref); name_len = btrfs_inode_ref_name_len(eb, iref);
/* path must be released before calling iterate()! */ /* path must be released before calling iterate()! */
pr_debug("following ref at offset %u for inode %llu in " pr_debug("following ref at offset %u for inode %llu in "
"tree %llu\n", cur, "tree %llu\n", cur, found_key.objectid,
(unsigned long long)found_key.objectid, fs_root->objectid);
(unsigned long long)fs_root->objectid);
ret = iterate(parent, name_len, ret = iterate(parent, name_len,
(unsigned long)(iref + 1), eb, ctx); (unsigned long)(iref + 1), eb, ctx);
if (ret) if (ret)
......
此差异已折叠。
...@@ -132,9 +132,8 @@ static int check_compressed_csum(struct inode *inode, ...@@ -132,9 +132,8 @@ static int check_compressed_csum(struct inode *inode,
printk(KERN_INFO "btrfs csum failed ino %llu " printk(KERN_INFO "btrfs csum failed ino %llu "
"extent %llu csum %u " "extent %llu csum %u "
"wanted %u mirror %d\n", "wanted %u mirror %d\n",
(unsigned long long)btrfs_ino(inode), btrfs_ino(inode), disk_start, csum, *cb_sum,
(unsigned long long)disk_start, cb->mirror_num);
csum, *cb_sum, cb->mirror_num);
ret = -EIO; ret = -EIO;
goto fail; goto fail;
} }
......
...@@ -1383,14 +1383,12 @@ noinline int btrfs_cow_block(struct btrfs_trans_handle *trans, ...@@ -1383,14 +1383,12 @@ noinline int btrfs_cow_block(struct btrfs_trans_handle *trans,
if (trans->transaction != root->fs_info->running_transaction) if (trans->transaction != root->fs_info->running_transaction)
WARN(1, KERN_CRIT "trans %llu running %llu\n", WARN(1, KERN_CRIT "trans %llu running %llu\n",
(unsigned long long)trans->transid, trans->transid,
(unsigned long long)
root->fs_info->running_transaction->transid); root->fs_info->running_transaction->transid);
if (trans->transid != root->fs_info->generation) if (trans->transid != root->fs_info->generation)
WARN(1, KERN_CRIT "trans %llu running %llu\n", WARN(1, KERN_CRIT "trans %llu running %llu\n",
(unsigned long long)trans->transid, trans->transid, root->fs_info->generation);
(unsigned long long)root->fs_info->generation);
if (!should_cow_block(trans, root, buf)) { if (!should_cow_block(trans, root, buf)) {
*cow_ret = buf; *cow_ret = buf;
......
...@@ -1474,10 +1474,8 @@ int btrfs_insert_delayed_dir_index(struct btrfs_trans_handle *trans, ...@@ -1474,10 +1474,8 @@ int btrfs_insert_delayed_dir_index(struct btrfs_trans_handle *trans,
printk(KERN_ERR "err add delayed dir index item(name: %s) into " printk(KERN_ERR "err add delayed dir index item(name: %s) into "
"the insertion tree of the delayed node" "the insertion tree of the delayed node"
"(root id: %llu, inode id: %llu, errno: %d)\n", "(root id: %llu, inode id: %llu, errno: %d)\n",
name, name, delayed_node->root->objectid,
(unsigned long long)delayed_node->root->objectid, delayed_node->inode_id, ret);
(unsigned long long)delayed_node->inode_id,
ret);
BUG(); BUG();
} }
mutex_unlock(&delayed_node->mutex); mutex_unlock(&delayed_node->mutex);
...@@ -1548,9 +1546,7 @@ int btrfs_delete_delayed_dir_index(struct btrfs_trans_handle *trans, ...@@ -1548,9 +1546,7 @@ int btrfs_delete_delayed_dir_index(struct btrfs_trans_handle *trans,
printk(KERN_ERR "err add delayed dir index item(index: %llu) " printk(KERN_ERR "err add delayed dir index item(index: %llu) "
"into the deletion tree of the delayed node" "into the deletion tree of the delayed node"
"(root id: %llu, inode id: %llu, errno: %d)\n", "(root id: %llu, inode id: %llu, errno: %d)\n",
(unsigned long long)index, index, node->root->objectid, node->inode_id,
(unsigned long long)node->root->objectid,
(unsigned long long)node->inode_id,
ret); ret);
BUG(); BUG();
} }
......
...@@ -148,7 +148,7 @@ int btrfs_init_dev_replace(struct btrfs_fs_info *fs_info) ...@@ -148,7 +148,7 @@ int btrfs_init_dev_replace(struct btrfs_fs_info *fs_info)
!btrfs_test_opt(dev_root, DEGRADED)) { !btrfs_test_opt(dev_root, DEGRADED)) {
ret = -EIO; ret = -EIO;
pr_warn("btrfs: cannot mount because device replace operation is ongoing and\n" "srcdev (devid %llu) is missing, need to run 'btrfs dev scan'?\n", pr_warn("btrfs: cannot mount because device replace operation is ongoing and\n" "srcdev (devid %llu) is missing, need to run 'btrfs dev scan'?\n",
(unsigned long long)src_devid); src_devid);
} }
if (!dev_replace->tgtdev && if (!dev_replace->tgtdev &&
!btrfs_test_opt(dev_root, DEGRADED)) { !btrfs_test_opt(dev_root, DEGRADED)) {
......
...@@ -303,9 +303,8 @@ static int csum_tree_block(struct btrfs_root *root, struct extent_buffer *buf, ...@@ -303,9 +303,8 @@ static int csum_tree_block(struct btrfs_root *root, struct extent_buffer *buf,
printk_ratelimited(KERN_INFO "btrfs: %s checksum verify " printk_ratelimited(KERN_INFO "btrfs: %s checksum verify "
"failed on %llu wanted %X found %X " "failed on %llu wanted %X found %X "
"level %d\n", "level %d\n",
root->fs_info->sb->s_id, root->fs_info->sb->s_id, buf->start,
(unsigned long long)buf->start, val, found, val, found, btrfs_header_level(buf));
btrfs_header_level(buf));
if (result != (char *)&inline_result) if (result != (char *)&inline_result)
kfree(result); kfree(result);
return 1; return 1;
...@@ -346,9 +345,7 @@ static int verify_parent_transid(struct extent_io_tree *io_tree, ...@@ -346,9 +345,7 @@ static int verify_parent_transid(struct extent_io_tree *io_tree,
} }
printk_ratelimited("parent transid verify failed on %llu wanted %llu " printk_ratelimited("parent transid verify failed on %llu wanted %llu "
"found %llu\n", "found %llu\n",
(unsigned long long)eb->start, eb->start, parent_transid, btrfs_header_generation(eb));
(unsigned long long)parent_transid,
(unsigned long long)btrfs_header_generation(eb));
ret = 1; ret = 1;
clear_extent_buffer_uptodate(eb); clear_extent_buffer_uptodate(eb);
out: out:
...@@ -513,8 +510,7 @@ static int check_tree_block_fsid(struct btrfs_root *root, ...@@ -513,8 +510,7 @@ static int check_tree_block_fsid(struct btrfs_root *root,
#define CORRUPT(reason, eb, root, slot) \ #define CORRUPT(reason, eb, root, slot) \
printk(KERN_CRIT "btrfs: corrupt leaf, %s: block=%llu," \ printk(KERN_CRIT "btrfs: corrupt leaf, %s: block=%llu," \
"root=%llu, slot=%d\n", reason, \ "root=%llu, slot=%d\n", reason, \
(unsigned long long)btrfs_header_bytenr(eb), \ btrfs_header_bytenr(eb), root->objectid, slot)
(unsigned long long)root->objectid, slot)
static noinline int check_leaf(struct btrfs_root *root, static noinline int check_leaf(struct btrfs_root *root,
struct extent_buffer *leaf) struct extent_buffer *leaf)
...@@ -614,14 +610,13 @@ static int btree_readpage_end_io_hook(struct btrfs_io_bio *io_bio, ...@@ -614,14 +610,13 @@ static int btree_readpage_end_io_hook(struct btrfs_io_bio *io_bio,
if (found_start != eb->start) { if (found_start != eb->start) {
printk_ratelimited(KERN_INFO "btrfs bad tree block start " printk_ratelimited(KERN_INFO "btrfs bad tree block start "
"%llu %llu\n", "%llu %llu\n",
(unsigned long long)found_start, found_start, eb->start);
(unsigned long long)eb->start);
ret = -EIO; ret = -EIO;
goto err; goto err;
} }
if (check_tree_block_fsid(root, eb)) { if (check_tree_block_fsid(root, eb)) {
printk_ratelimited(KERN_INFO "btrfs bad fsid on block %llu\n", printk_ratelimited(KERN_INFO "btrfs bad fsid on block %llu\n",
(unsigned long long)eb->start); eb->start);
ret = -EIO; ret = -EIO;
goto err; goto err;
} }
...@@ -2405,7 +2400,7 @@ int open_ctree(struct super_block *sb, ...@@ -2405,7 +2400,7 @@ int open_ctree(struct super_block *sb,
if (features) { if (features) {
printk(KERN_ERR "BTRFS: couldn't mount because of " printk(KERN_ERR "BTRFS: couldn't mount because of "
"unsupported optional features (%Lx).\n", "unsupported optional features (%Lx).\n",
(unsigned long long)features); features);
err = -EINVAL; err = -EINVAL;
goto fail_alloc; goto fail_alloc;
} }
...@@ -2475,7 +2470,7 @@ int open_ctree(struct super_block *sb, ...@@ -2475,7 +2470,7 @@ int open_ctree(struct super_block *sb,
if (!(sb->s_flags & MS_RDONLY) && features) { if (!(sb->s_flags & MS_RDONLY) && features) {
printk(KERN_ERR "BTRFS: couldn't mount RDWR because of " printk(KERN_ERR "BTRFS: couldn't mount RDWR because of "
"unsupported option features (%Lx).\n", "unsupported option features (%Lx).\n",
(unsigned long long)features); features);
err = -EINVAL; err = -EINVAL;
goto fail_alloc; goto fail_alloc;
} }
...@@ -3681,9 +3676,7 @@ void btrfs_mark_buffer_dirty(struct extent_buffer *buf) ...@@ -3681,9 +3676,7 @@ void btrfs_mark_buffer_dirty(struct extent_buffer *buf)
if (transid != root->fs_info->generation) if (transid != root->fs_info->generation)
WARN(1, KERN_CRIT "btrfs transid mismatch buffer %llu, " WARN(1, KERN_CRIT "btrfs transid mismatch buffer %llu, "
"found %llu running %llu\n", "found %llu running %llu\n",
(unsigned long long)buf->start, buf->start, transid, root->fs_info->generation);
(unsigned long long)transid,
(unsigned long long)root->fs_info->generation);
was_dirty = set_extent_buffer_dirty(buf); was_dirty = set_extent_buffer_dirty(buf);
if (!was_dirty) if (!was_dirty)
__percpu_counter_add(&root->fs_info->dirty_metadata_bytes, __percpu_counter_add(&root->fs_info->dirty_metadata_bytes,
......
...@@ -5718,7 +5718,7 @@ static int __btrfs_free_extent(struct btrfs_trans_handle *trans, ...@@ -5718,7 +5718,7 @@ static int __btrfs_free_extent(struct btrfs_trans_handle *trans,
if (ret) { if (ret) {
btrfs_err(info, "umm, got %d back from search, was looking for %llu", btrfs_err(info, "umm, got %d back from search, was looking for %llu",
ret, (unsigned long long)bytenr); ret, bytenr);
if (ret > 0) if (ret > 0)
btrfs_print_leaf(extent_root, btrfs_print_leaf(extent_root,
path->nodes[0]); path->nodes[0]);
...@@ -5734,11 +5734,8 @@ static int __btrfs_free_extent(struct btrfs_trans_handle *trans, ...@@ -5734,11 +5734,8 @@ static int __btrfs_free_extent(struct btrfs_trans_handle *trans,
WARN_ON(1); WARN_ON(1);
btrfs_err(info, btrfs_err(info,
"unable to find ref byte nr %llu parent %llu root %llu owner %llu offset %llu", "unable to find ref byte nr %llu parent %llu root %llu owner %llu offset %llu",
(unsigned long long)bytenr, bytenr, parent, root_objectid, owner_objectid,
(unsigned long long)parent, owner_offset);
(unsigned long long)root_objectid,
(unsigned long long)owner_objectid,
(unsigned long long)owner_offset);
} else { } else {
btrfs_abort_transaction(trans, extent_root, ret); btrfs_abort_transaction(trans, extent_root, ret);
goto out; goto out;
...@@ -5767,7 +5764,7 @@ static int __btrfs_free_extent(struct btrfs_trans_handle *trans, ...@@ -5767,7 +5764,7 @@ static int __btrfs_free_extent(struct btrfs_trans_handle *trans,
-1, 1); -1, 1);
if (ret) { if (ret) {
btrfs_err(info, "umm, got %d back from search, was looking for %llu", btrfs_err(info, "umm, got %d back from search, was looking for %llu",
ret, (unsigned long long)bytenr); ret, bytenr);
btrfs_print_leaf(extent_root, path->nodes[0]); btrfs_print_leaf(extent_root, path->nodes[0]);
} }
if (ret < 0) { if (ret < 0) {
...@@ -6529,19 +6526,15 @@ static void dump_space_info(struct btrfs_space_info *info, u64 bytes, ...@@ -6529,19 +6526,15 @@ static void dump_space_info(struct btrfs_space_info *info, u64 bytes,
spin_lock(&info->lock); spin_lock(&info->lock);
printk(KERN_INFO "space_info %llu has %llu free, is %sfull\n", printk(KERN_INFO "space_info %llu has %llu free, is %sfull\n",
(unsigned long long)info->flags, info->flags,
(unsigned long long)(info->total_bytes - info->bytes_used - info->total_bytes - info->bytes_used - info->bytes_pinned -
info->bytes_pinned - info->bytes_reserved - info->bytes_reserved - info->bytes_readonly,
info->bytes_readonly),
(info->full) ? "" : "not "); (info->full) ? "" : "not ");
printk(KERN_INFO "space_info total=%llu, used=%llu, pinned=%llu, " printk(KERN_INFO "space_info total=%llu, used=%llu, pinned=%llu, "
"reserved=%llu, may_use=%llu, readonly=%llu\n", "reserved=%llu, may_use=%llu, readonly=%llu\n",
(unsigned long long)info->total_bytes, info->total_bytes, info->bytes_used, info->bytes_pinned,
(unsigned long long)info->bytes_used, info->bytes_reserved, info->bytes_may_use,
(unsigned long long)info->bytes_pinned, info->bytes_readonly);
(unsigned long long)info->bytes_reserved,
(unsigned long long)info->bytes_may_use,
(unsigned long long)info->bytes_readonly);
spin_unlock(&info->lock); spin_unlock(&info->lock);
if (!dump_block_groups) if (!dump_block_groups)
...@@ -6552,12 +6545,9 @@ static void dump_space_info(struct btrfs_space_info *info, u64 bytes, ...@@ -6552,12 +6545,9 @@ static void dump_space_info(struct btrfs_space_info *info, u64 bytes,
list_for_each_entry(cache, &info->block_groups[index], list) { list_for_each_entry(cache, &info->block_groups[index], list) {
spin_lock(&cache->lock); spin_lock(&cache->lock);
printk(KERN_INFO "block group %llu has %llu bytes, %llu used %llu pinned %llu reserved %s\n", printk(KERN_INFO "block group %llu has %llu bytes, %llu used %llu pinned %llu reserved %s\n",
(unsigned long long)cache->key.objectid, cache->key.objectid, cache->key.offset,
(unsigned long long)cache->key.offset, btrfs_block_group_used(&cache->item), cache->pinned,
(unsigned long long)btrfs_block_group_used(&cache->item), cache->reserved, cache->ro ? "[readonly]" : "");
(unsigned long long)cache->pinned,
(unsigned long long)cache->reserved,
cache->ro ? "[readonly]" : "");
btrfs_dump_free_space(cache, bytes); btrfs_dump_free_space(cache, bytes);
spin_unlock(&cache->lock); spin_unlock(&cache->lock);
} }
...@@ -6594,8 +6584,7 @@ int btrfs_reserve_extent(struct btrfs_root *root, ...@@ -6594,8 +6584,7 @@ int btrfs_reserve_extent(struct btrfs_root *root,
sinfo = __find_space_info(root->fs_info, flags); sinfo = __find_space_info(root->fs_info, flags);
btrfs_err(root->fs_info, "allocation failed flags %llu, wanted %llu", btrfs_err(root->fs_info, "allocation failed flags %llu, wanted %llu",
(unsigned long long)flags, flags, num_bytes);
(unsigned long long)num_bytes);
if (sinfo) if (sinfo)
dump_space_info(sinfo, num_bytes, 1); dump_space_info(sinfo, num_bytes, 1);
} }
...@@ -6615,7 +6604,7 @@ static int __btrfs_free_reserved_extent(struct btrfs_root *root, ...@@ -6615,7 +6604,7 @@ static int __btrfs_free_reserved_extent(struct btrfs_root *root,
cache = btrfs_lookup_block_group(root->fs_info, start); cache = btrfs_lookup_block_group(root->fs_info, start);
if (!cache) { if (!cache) {
btrfs_err(root->fs_info, "Unable to find block group for %llu", btrfs_err(root->fs_info, "Unable to find block group for %llu",
(unsigned long long)start); start);
return -ENOSPC; return -ENOSPC;
} }
...@@ -6711,8 +6700,7 @@ static int alloc_reserved_file_extent(struct btrfs_trans_handle *trans, ...@@ -6711,8 +6700,7 @@ static int alloc_reserved_file_extent(struct btrfs_trans_handle *trans,
ret = update_block_group(root, ins->objectid, ins->offset, 1); ret = update_block_group(root, ins->objectid, ins->offset, 1);
if (ret) { /* -ENOENT, logic error */ if (ret) { /* -ENOENT, logic error */
btrfs_err(fs_info, "update block group failed for %llu %llu", btrfs_err(fs_info, "update block group failed for %llu %llu",
(unsigned long long)ins->objectid, ins->objectid, ins->offset);
(unsigned long long)ins->offset);
BUG(); BUG();
} }
return ret; return ret;
...@@ -6784,8 +6772,7 @@ static int alloc_reserved_tree_block(struct btrfs_trans_handle *trans, ...@@ -6784,8 +6772,7 @@ static int alloc_reserved_tree_block(struct btrfs_trans_handle *trans,
ret = update_block_group(root, ins->objectid, root->leafsize, 1); ret = update_block_group(root, ins->objectid, root->leafsize, 1);
if (ret) { /* -ENOENT, logic error */ if (ret) { /* -ENOENT, logic error */
btrfs_err(fs_info, "update block group failed for %llu %llu", btrfs_err(fs_info, "update block group failed for %llu %llu",
(unsigned long long)ins->objectid, ins->objectid, ins->offset);
(unsigned long long)ins->offset);
BUG(); BUG();
} }
return ret; return ret;
......
...@@ -61,9 +61,8 @@ void btrfs_leak_debug_check(void) ...@@ -61,9 +61,8 @@ void btrfs_leak_debug_check(void)
state = list_entry(states.next, struct extent_state, leak_list); state = list_entry(states.next, struct extent_state, leak_list);
printk(KERN_ERR "btrfs state leak: start %llu end %llu " printk(KERN_ERR "btrfs state leak: start %llu end %llu "
"state %lu in tree %p refs %d\n", "state %lu in tree %p refs %d\n",
(unsigned long long)state->start, state->start, state->end, state->state, state->tree,
(unsigned long long)state->end, atomic_read(&state->refs));
state->state, state->tree, atomic_read(&state->refs));
list_del(&state->leak_list); list_del(&state->leak_list);
kmem_cache_free(extent_state_cache, state); kmem_cache_free(extent_state_cache, state);
} }
...@@ -71,8 +70,8 @@ void btrfs_leak_debug_check(void) ...@@ -71,8 +70,8 @@ void btrfs_leak_debug_check(void)
while (!list_empty(&buffers)) { while (!list_empty(&buffers)) {
eb = list_entry(buffers.next, struct extent_buffer, leak_list); eb = list_entry(buffers.next, struct extent_buffer, leak_list);
printk(KERN_ERR "btrfs buffer leak start %llu len %lu " printk(KERN_ERR "btrfs buffer leak start %llu len %lu "
"refs %d\n", (unsigned long long)eb->start, "refs %d\n",
eb->len, atomic_read(&eb->refs)); eb->start, eb->len, atomic_read(&eb->refs));
list_del(&eb->leak_list); list_del(&eb->leak_list);
kmem_cache_free(extent_buffer_cache, eb); kmem_cache_free(extent_buffer_cache, eb);
} }
...@@ -88,11 +87,7 @@ static inline void __btrfs_debug_check_extent_io_range(const char *caller, ...@@ -88,11 +87,7 @@ static inline void __btrfs_debug_check_extent_io_range(const char *caller,
if (end >= PAGE_SIZE && (end % 2) == 0 && end != isize - 1) { if (end >= PAGE_SIZE && (end % 2) == 0 && end != isize - 1) {
printk_ratelimited(KERN_DEBUG printk_ratelimited(KERN_DEBUG
"btrfs: %s: ino %llu isize %llu odd range [%llu,%llu]\n", "btrfs: %s: ino %llu isize %llu odd range [%llu,%llu]\n",
caller, caller, btrfs_ino(inode), isize, start, end);
(unsigned long long)btrfs_ino(inode),
(unsigned long long)isize,
(unsigned long long)start,
(unsigned long long)end);
} }
} }
#else #else
...@@ -388,8 +383,7 @@ static int insert_state(struct extent_io_tree *tree, ...@@ -388,8 +383,7 @@ static int insert_state(struct extent_io_tree *tree,
if (end < start) if (end < start)
WARN(1, KERN_ERR "btrfs end < start %llu %llu\n", WARN(1, KERN_ERR "btrfs end < start %llu %llu\n",
(unsigned long long)end, end, start);
(unsigned long long)start);
state->start = start; state->start = start;
state->end = end; state->end = end;
...@@ -400,9 +394,8 @@ static int insert_state(struct extent_io_tree *tree, ...@@ -400,9 +394,8 @@ static int insert_state(struct extent_io_tree *tree,
struct extent_state *found; struct extent_state *found;
found = rb_entry(node, struct extent_state, rb_node); found = rb_entry(node, struct extent_state, rb_node);
printk(KERN_ERR "btrfs found node %llu %llu on insert of " printk(KERN_ERR "btrfs found node %llu %llu on insert of "
"%llu %llu\n", (unsigned long long)found->start, "%llu %llu\n",
(unsigned long long)found->end, found->start, found->end, start, end);
(unsigned long long)start, (unsigned long long)end);
return -EEXIST; return -EEXIST;
} }
state->tree = tree; state->tree = tree;
...@@ -3298,8 +3291,7 @@ static int __extent_writepage(struct page *page, struct writeback_control *wbc, ...@@ -3298,8 +3291,7 @@ static int __extent_writepage(struct page *page, struct writeback_control *wbc,
if (!PageWriteback(page)) { if (!PageWriteback(page)) {
printk(KERN_ERR "btrfs warning page %lu not " printk(KERN_ERR "btrfs warning page %lu not "
"writeback, cur %llu end %llu\n", "writeback, cur %llu end %llu\n",
page->index, (unsigned long long)cur, page->index, cur, end);
(unsigned long long)end);
} }
ret = submit_extent_page(write_flags, tree, page, ret = submit_extent_page(write_flags, tree, page,
...@@ -4923,8 +4915,8 @@ int map_private_extent_buffer(struct extent_buffer *eb, unsigned long start, ...@@ -4923,8 +4915,8 @@ int map_private_extent_buffer(struct extent_buffer *eb, unsigned long start,
if (start + min_len > eb->len) { if (start + min_len > eb->len) {
WARN(1, KERN_ERR "btrfs bad mapping eb start %llu len %lu, " WARN(1, KERN_ERR "btrfs bad mapping eb start %llu len %lu, "
"wanted %lu %lu\n", (unsigned long long)eb->start, "wanted %lu %lu\n",
eb->len, start, min_len); eb->start, eb->len, start, min_len);
return -EINVAL; return -EINVAL;
} }
......
...@@ -248,9 +248,7 @@ static int __btrfs_lookup_bio_sums(struct btrfs_root *root, ...@@ -248,9 +248,7 @@ static int __btrfs_lookup_bio_sums(struct btrfs_root *root,
} else { } else {
printk(KERN_INFO "btrfs no csum found " printk(KERN_INFO "btrfs no csum found "
"for inode %llu start %llu\n", "for inode %llu start %llu\n",
(unsigned long long) btrfs_ino(inode), offset);
btrfs_ino(inode),
(unsigned long long)offset);
} }
item = NULL; item = NULL;
btrfs_release_path(path); btrfs_release_path(path);
......
...@@ -673,8 +673,7 @@ static int __load_free_space_cache(struct btrfs_root *root, struct inode *inode, ...@@ -673,8 +673,7 @@ static int __load_free_space_cache(struct btrfs_root *root, struct inode *inode,
btrfs_err(root->fs_info, btrfs_err(root->fs_info,
"free space inode generation (%llu) " "free space inode generation (%llu) "
"did not match free space cache generation (%llu)", "did not match free space cache generation (%llu)",
(unsigned long long)BTRFS_I(inode)->generation, BTRFS_I(inode)->generation, generation);
(unsigned long long)generation);
return 0; return 0;
} }
...@@ -1991,8 +1990,7 @@ void btrfs_dump_free_space(struct btrfs_block_group_cache *block_group, ...@@ -1991,8 +1990,7 @@ void btrfs_dump_free_space(struct btrfs_block_group_cache *block_group,
if (info->bytes >= bytes && !block_group->ro) if (info->bytes >= bytes && !block_group->ro)
count++; count++;
printk(KERN_CRIT "entry offset %llu, bytes %llu, bitmap %s\n", printk(KERN_CRIT "entry offset %llu, bytes %llu, bitmap %s\n",
(unsigned long long)info->offset, info->offset, info->bytes,
(unsigned long long)info->bytes,
(info->bitmap) ? "yes" : "no"); (info->bitmap) ? "yes" : "no");
} }
printk(KERN_INFO "block group has cluster?: %s\n", printk(KERN_INFO "block group has cluster?: %s\n",
......
...@@ -2786,8 +2786,7 @@ static int btrfs_readpage_end_io_hook(struct btrfs_io_bio *io_bio, ...@@ -2786,8 +2786,7 @@ static int btrfs_readpage_end_io_hook(struct btrfs_io_bio *io_bio,
zeroit: zeroit:
if (__ratelimit(&_rs)) if (__ratelimit(&_rs))
btrfs_info(root->fs_info, "csum failed ino %llu off %llu csum %u expected csum %u", btrfs_info(root->fs_info, "csum failed ino %llu off %llu csum %u expected csum %u",
(unsigned long long)btrfs_ino(page->mapping->host), btrfs_ino(page->mapping->host), start, csum, csum_expected);
(unsigned long long)start, csum, csum_expected);
memset(kaddr + offset, 1, end - start + 1); memset(kaddr + offset, 1, end - start + 1);
flush_dcache_page(page); flush_dcache_page(page);
kunmap_atomic(kaddr); kunmap_atomic(kaddr);
...@@ -3572,8 +3571,7 @@ static int __btrfs_unlink_inode(struct btrfs_trans_handle *trans, ...@@ -3572,8 +3571,7 @@ static int __btrfs_unlink_inode(struct btrfs_trans_handle *trans,
if (ret) { if (ret) {
btrfs_info(root->fs_info, btrfs_info(root->fs_info,
"failed to delete reference to %.*s, inode %llu parent %llu", "failed to delete reference to %.*s, inode %llu parent %llu",
name_len, name, name_len, name, ino, dir_ino);
(unsigned long long)ino, (unsigned long long)dir_ino);
btrfs_abort_transaction(trans, root, ret); btrfs_abort_transaction(trans, root, ret);
goto err; goto err;
} }
...@@ -6081,10 +6079,7 @@ struct extent_map *btrfs_get_extent(struct inode *inode, struct page *page, ...@@ -6081,10 +6079,7 @@ struct extent_map *btrfs_get_extent(struct inode *inode, struct page *page,
btrfs_release_path(path); btrfs_release_path(path);
if (em->start > start || extent_map_end(em) <= start) { if (em->start > start || extent_map_end(em) <= start) {
btrfs_err(root->fs_info, "bad extent! em: [%llu %llu] passed [%llu %llu]", btrfs_err(root->fs_info, "bad extent! em: [%llu %llu] passed [%llu %llu]",
(unsigned long long)em->start, em->start, em->len, start, len);
(unsigned long long)em->len,
(unsigned long long)start,
(unsigned long long)len);
err = -EIO; err = -EIO;
goto out; goto out;
} }
...@@ -6753,9 +6748,8 @@ static void btrfs_endio_direct_read(struct bio *bio, int err) ...@@ -6753,9 +6748,8 @@ static void btrfs_endio_direct_read(struct bio *bio, int err)
flush_dcache_page(bvec->bv_page); flush_dcache_page(bvec->bv_page);
if (csum != csums[index]) { if (csum != csums[index]) {
btrfs_err(root->fs_info, "csum failed ino %llu off %llu csum %u expected csum %u", btrfs_err(root->fs_info, "csum failed ino %llu off %llu csum %u expected csum %u",
(unsigned long long)btrfs_ino(inode), btrfs_ino(inode), start, csum,
(unsigned long long)start, csums[index]);
csum, csums[index]);
err = -EIO; err = -EIO;
} }
} }
...@@ -6843,7 +6837,7 @@ static void btrfs_end_dio_bio(struct bio *bio, int err) ...@@ -6843,7 +6837,7 @@ static void btrfs_end_dio_bio(struct bio *bio, int err)
if (err) { if (err) {
printk(KERN_ERR "btrfs direct IO failed ino %llu rw %lu " printk(KERN_ERR "btrfs direct IO failed ino %llu rw %lu "
"sector %#Lx len %u err no %d\n", "sector %#Lx len %u err no %d\n",
(unsigned long long)btrfs_ino(dip->inode), bio->bi_rw, btrfs_ino(dip->inode), bio->bi_rw,
(unsigned long long)bio->bi_sector, bio->bi_size, err); (unsigned long long)bio->bi_sector, bio->bi_size, err);
dip->errors = 1; dip->errors = 1;
...@@ -7775,7 +7769,7 @@ void btrfs_destroy_inode(struct inode *inode) ...@@ -7775,7 +7769,7 @@ void btrfs_destroy_inode(struct inode *inode)
if (test_bit(BTRFS_INODE_HAS_ORPHAN_ITEM, if (test_bit(BTRFS_INODE_HAS_ORPHAN_ITEM,
&BTRFS_I(inode)->runtime_flags)) { &BTRFS_I(inode)->runtime_flags)) {
btrfs_info(root->fs_info, "inode %llu still on the orphan list", btrfs_info(root->fs_info, "inode %llu still on the orphan list",
(unsigned long long)btrfs_ino(inode)); btrfs_ino(inode));
atomic_dec(&root->orphan_inodes); atomic_dec(&root->orphan_inodes);
} }
...@@ -7785,8 +7779,7 @@ void btrfs_destroy_inode(struct inode *inode) ...@@ -7785,8 +7779,7 @@ void btrfs_destroy_inode(struct inode *inode)
break; break;
else { else {
btrfs_err(root->fs_info, "found ordered extent %llu %llu on inode cleanup", btrfs_err(root->fs_info, "found ordered extent %llu %llu on inode cleanup",
(unsigned long long)ordered->file_offset, ordered->file_offset, ordered->len);
(unsigned long long)ordered->len);
btrfs_remove_ordered_extent(inode, ordered); btrfs_remove_ordered_extent(inode, ordered);
btrfs_put_ordered_extent(ordered); btrfs_put_ordered_extent(ordered);
btrfs_put_ordered_extent(ordered); btrfs_put_ordered_extent(ordered);
......
...@@ -1421,14 +1421,13 @@ static noinline int btrfs_ioctl_resize(struct file *file, ...@@ -1421,14 +1421,13 @@ static noinline int btrfs_ioctl_resize(struct file *file,
ret = -EINVAL; ret = -EINVAL;
goto out_free; goto out_free;
} }
printk(KERN_INFO "btrfs: resizing devid %llu\n", printk(KERN_INFO "btrfs: resizing devid %llu\n", devid);
(unsigned long long)devid);
} }
device = btrfs_find_device(root->fs_info, devid, NULL, NULL); device = btrfs_find_device(root->fs_info, devid, NULL, NULL);
if (!device) { if (!device) {
printk(KERN_INFO "btrfs: resizer unable to find device %llu\n", printk(KERN_INFO "btrfs: resizer unable to find device %llu\n",
(unsigned long long)devid); devid);
ret = -ENODEV; ret = -ENODEV;
goto out_free; goto out_free;
} }
...@@ -1436,7 +1435,7 @@ static noinline int btrfs_ioctl_resize(struct file *file, ...@@ -1436,7 +1435,7 @@ static noinline int btrfs_ioctl_resize(struct file *file,
if (!device->writeable) { if (!device->writeable) {
printk(KERN_INFO "btrfs: resizer unable to apply on " printk(KERN_INFO "btrfs: resizer unable to apply on "
"readonly device %llu\n", "readonly device %llu\n",
(unsigned long long)devid); devid);
ret = -EPERM; ret = -EPERM;
goto out_free; goto out_free;
} }
...@@ -1488,8 +1487,7 @@ static noinline int btrfs_ioctl_resize(struct file *file, ...@@ -1488,8 +1487,7 @@ static noinline int btrfs_ioctl_resize(struct file *file,
new_size *= root->sectorsize; new_size *= root->sectorsize;
printk_in_rcu(KERN_INFO "btrfs: new size for %s is %llu\n", printk_in_rcu(KERN_INFO "btrfs: new size for %s is %llu\n",
rcu_str_deref(device->name), rcu_str_deref(device->name), new_size);
(unsigned long long)new_size);
if (new_size > old_size) { if (new_size > old_size) {
trans = btrfs_start_transaction(root, 0); trans = btrfs_start_transaction(root, 0);
......
...@@ -67,7 +67,7 @@ static void ordered_data_tree_panic(struct inode *inode, int errno, ...@@ -67,7 +67,7 @@ static void ordered_data_tree_panic(struct inode *inode, int errno,
{ {
struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb); struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
btrfs_panic(fs_info, errno, "Inconsistency in ordered tree at offset " btrfs_panic(fs_info, errno, "Inconsistency in ordered tree at offset "
"%llu\n", (unsigned long long)offset); "%llu\n", offset);
} }
/* /*
...@@ -336,14 +336,12 @@ int btrfs_dec_test_first_ordered_pending(struct inode *inode, ...@@ -336,14 +336,12 @@ int btrfs_dec_test_first_ordered_pending(struct inode *inode,
*file_offset = dec_end; *file_offset = dec_end;
if (dec_start > dec_end) { if (dec_start > dec_end) {
printk(KERN_CRIT "bad ordering dec_start %llu end %llu\n", printk(KERN_CRIT "bad ordering dec_start %llu end %llu\n",
(unsigned long long)dec_start, dec_start, dec_end);
(unsigned long long)dec_end);
} }
to_dec = dec_end - dec_start; to_dec = dec_end - dec_start;
if (to_dec > entry->bytes_left) { if (to_dec > entry->bytes_left) {
printk(KERN_CRIT "bad ordered accounting left %llu size %llu\n", printk(KERN_CRIT "bad ordered accounting left %llu size %llu\n",
(unsigned long long)entry->bytes_left, entry->bytes_left, to_dec);
(unsigned long long)to_dec);
} }
entry->bytes_left -= to_dec; entry->bytes_left -= to_dec;
if (!uptodate) if (!uptodate)
...@@ -403,8 +401,7 @@ int btrfs_dec_test_ordered_pending(struct inode *inode, ...@@ -403,8 +401,7 @@ int btrfs_dec_test_ordered_pending(struct inode *inode,
if (io_size > entry->bytes_left) { if (io_size > entry->bytes_left) {
printk(KERN_CRIT "bad ordered accounting left %llu size %llu\n", printk(KERN_CRIT "bad ordered accounting left %llu size %llu\n",
(unsigned long long)entry->bytes_left, entry->bytes_left, io_size);
(unsigned long long)io_size);
} }
entry->bytes_left -= io_size; entry->bytes_left -= io_size;
if (!uptodate) if (!uptodate)
......
...@@ -26,14 +26,12 @@ static void print_chunk(struct extent_buffer *eb, struct btrfs_chunk *chunk) ...@@ -26,14 +26,12 @@ static void print_chunk(struct extent_buffer *eb, struct btrfs_chunk *chunk)
int i; int i;
printk(KERN_INFO "\t\tchunk length %llu owner %llu type %llu " printk(KERN_INFO "\t\tchunk length %llu owner %llu type %llu "
"num_stripes %d\n", "num_stripes %d\n",
(unsigned long long)btrfs_chunk_length(eb, chunk), btrfs_chunk_length(eb, chunk), btrfs_chunk_owner(eb, chunk),
(unsigned long long)btrfs_chunk_owner(eb, chunk), btrfs_chunk_type(eb, chunk), num_stripes);
(unsigned long long)btrfs_chunk_type(eb, chunk),
num_stripes);
for (i = 0 ; i < num_stripes ; i++) { for (i = 0 ; i < num_stripes ; i++) {
printk(KERN_INFO "\t\t\tstripe %d devid %llu offset %llu\n", i, printk(KERN_INFO "\t\t\tstripe %d devid %llu offset %llu\n", i,
(unsigned long long)btrfs_stripe_devid_nr(eb, chunk, i), btrfs_stripe_devid_nr(eb, chunk, i),
(unsigned long long)btrfs_stripe_offset_nr(eb, chunk, i)); btrfs_stripe_offset_nr(eb, chunk, i));
} }
} }
static void print_dev_item(struct extent_buffer *eb, static void print_dev_item(struct extent_buffer *eb,
...@@ -41,18 +39,18 @@ static void print_dev_item(struct extent_buffer *eb, ...@@ -41,18 +39,18 @@ static void print_dev_item(struct extent_buffer *eb,
{ {
printk(KERN_INFO "\t\tdev item devid %llu " printk(KERN_INFO "\t\tdev item devid %llu "
"total_bytes %llu bytes used %llu\n", "total_bytes %llu bytes used %llu\n",
(unsigned long long)btrfs_device_id(eb, dev_item), btrfs_device_id(eb, dev_item),
(unsigned long long)btrfs_device_total_bytes(eb, dev_item), btrfs_device_total_bytes(eb, dev_item),
(unsigned long long)btrfs_device_bytes_used(eb, dev_item)); btrfs_device_bytes_used(eb, dev_item));
} }
static void print_extent_data_ref(struct extent_buffer *eb, static void print_extent_data_ref(struct extent_buffer *eb,
struct btrfs_extent_data_ref *ref) struct btrfs_extent_data_ref *ref)
{ {
printk(KERN_INFO "\t\textent data backref root %llu " printk(KERN_INFO "\t\textent data backref root %llu "
"objectid %llu offset %llu count %u\n", "objectid %llu offset %llu count %u\n",
(unsigned long long)btrfs_extent_data_ref_root(eb, ref), btrfs_extent_data_ref_root(eb, ref),
(unsigned long long)btrfs_extent_data_ref_objectid(eb, ref), btrfs_extent_data_ref_objectid(eb, ref),
(unsigned long long)btrfs_extent_data_ref_offset(eb, ref), btrfs_extent_data_ref_offset(eb, ref),
btrfs_extent_data_ref_count(eb, ref)); btrfs_extent_data_ref_count(eb, ref));
} }
...@@ -87,9 +85,8 @@ static void print_extent_item(struct extent_buffer *eb, int slot) ...@@ -87,9 +85,8 @@ static void print_extent_item(struct extent_buffer *eb, int slot)
flags = btrfs_extent_flags(eb, ei); flags = btrfs_extent_flags(eb, ei);
printk(KERN_INFO "\t\textent refs %llu gen %llu flags %llu\n", printk(KERN_INFO "\t\textent refs %llu gen %llu flags %llu\n",
(unsigned long long)btrfs_extent_refs(eb, ei), btrfs_extent_refs(eb, ei), btrfs_extent_generation(eb, ei),
(unsigned long long)btrfs_extent_generation(eb, ei), flags);
(unsigned long long)flags);
if (flags & BTRFS_EXTENT_FLAG_TREE_BLOCK) { if (flags & BTRFS_EXTENT_FLAG_TREE_BLOCK) {
struct btrfs_tree_block_info *info; struct btrfs_tree_block_info *info;
...@@ -97,9 +94,8 @@ static void print_extent_item(struct extent_buffer *eb, int slot) ...@@ -97,9 +94,8 @@ static void print_extent_item(struct extent_buffer *eb, int slot)
btrfs_tree_block_key(eb, info, &key); btrfs_tree_block_key(eb, info, &key);
printk(KERN_INFO "\t\ttree block key (%llu %u %llu) " printk(KERN_INFO "\t\ttree block key (%llu %u %llu) "
"level %d\n", "level %d\n",
(unsigned long long)btrfs_disk_key_objectid(&key), btrfs_disk_key_objectid(&key), key.type,
key.type, btrfs_disk_key_offset(&key),
(unsigned long long)btrfs_disk_key_offset(&key),
btrfs_tree_block_level(eb, info)); btrfs_tree_block_level(eb, info));
iref = (struct btrfs_extent_inline_ref *)(info + 1); iref = (struct btrfs_extent_inline_ref *)(info + 1);
} else { } else {
...@@ -115,11 +111,11 @@ static void print_extent_item(struct extent_buffer *eb, int slot) ...@@ -115,11 +111,11 @@ static void print_extent_item(struct extent_buffer *eb, int slot)
switch (type) { switch (type) {
case BTRFS_TREE_BLOCK_REF_KEY: case BTRFS_TREE_BLOCK_REF_KEY:
printk(KERN_INFO "\t\ttree block backref " printk(KERN_INFO "\t\ttree block backref "
"root %llu\n", (unsigned long long)offset); "root %llu\n", offset);
break; break;
case BTRFS_SHARED_BLOCK_REF_KEY: case BTRFS_SHARED_BLOCK_REF_KEY:
printk(KERN_INFO "\t\tshared block backref " printk(KERN_INFO "\t\tshared block backref "
"parent %llu\n", (unsigned long long)offset); "parent %llu\n", offset);
break; break;
case BTRFS_EXTENT_DATA_REF_KEY: case BTRFS_EXTENT_DATA_REF_KEY:
dref = (struct btrfs_extent_data_ref *)(&iref->offset); dref = (struct btrfs_extent_data_ref *)(&iref->offset);
...@@ -129,8 +125,7 @@ static void print_extent_item(struct extent_buffer *eb, int slot) ...@@ -129,8 +125,7 @@ static void print_extent_item(struct extent_buffer *eb, int slot)
sref = (struct btrfs_shared_data_ref *)(iref + 1); sref = (struct btrfs_shared_data_ref *)(iref + 1);
printk(KERN_INFO "\t\tshared data backref " printk(KERN_INFO "\t\tshared data backref "
"parent %llu count %u\n", "parent %llu count %u\n",
(unsigned long long)offset, offset, btrfs_shared_data_ref_count(eb, sref));
btrfs_shared_data_ref_count(eb, sref));
break; break;
default: default:
BUG(); BUG();
...@@ -148,9 +143,9 @@ static void print_extent_ref_v0(struct extent_buffer *eb, int slot) ...@@ -148,9 +143,9 @@ static void print_extent_ref_v0(struct extent_buffer *eb, int slot)
ref0 = btrfs_item_ptr(eb, slot, struct btrfs_extent_ref_v0); ref0 = btrfs_item_ptr(eb, slot, struct btrfs_extent_ref_v0);
printk("\t\textent back ref root %llu gen %llu " printk("\t\textent back ref root %llu gen %llu "
"owner %llu num_refs %lu\n", "owner %llu num_refs %lu\n",
(unsigned long long)btrfs_ref_root_v0(eb, ref0), btrfs_ref_root_v0(eb, ref0),
(unsigned long long)btrfs_ref_generation_v0(eb, ref0), btrfs_ref_generation_v0(eb, ref0),
(unsigned long long)btrfs_ref_objectid_v0(eb, ref0), btrfs_ref_objectid_v0(eb, ref0),
(unsigned long)btrfs_ref_count_v0(eb, ref0)); (unsigned long)btrfs_ref_count_v0(eb, ref0));
} }
#endif #endif
...@@ -196,39 +191,34 @@ void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *l) ...@@ -196,39 +191,34 @@ void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *l)
nr = btrfs_header_nritems(l); nr = btrfs_header_nritems(l);
btrfs_info(root->fs_info, "leaf %llu total ptrs %d free space %d", btrfs_info(root->fs_info, "leaf %llu total ptrs %d free space %d",
(unsigned long long)btrfs_header_bytenr(l), nr, btrfs_header_bytenr(l), nr, btrfs_leaf_free_space(root, l));
btrfs_leaf_free_space(root, l));
for (i = 0 ; i < nr ; i++) { for (i = 0 ; i < nr ; i++) {
item = btrfs_item_nr(l, i); item = btrfs_item_nr(l, i);
btrfs_item_key_to_cpu(l, &key, i); btrfs_item_key_to_cpu(l, &key, i);
type = btrfs_key_type(&key); type = btrfs_key_type(&key);
printk(KERN_INFO "\titem %d key (%llu %u %llu) itemoff %d " printk(KERN_INFO "\titem %d key (%llu %u %llu) itemoff %d "
"itemsize %d\n", "itemsize %d\n",
i, i, key.objectid, type, key.offset,
(unsigned long long)key.objectid, type,
(unsigned long long)key.offset,
btrfs_item_offset(l, item), btrfs_item_size(l, item)); btrfs_item_offset(l, item), btrfs_item_size(l, item));
switch (type) { switch (type) {
case BTRFS_INODE_ITEM_KEY: case BTRFS_INODE_ITEM_KEY:
ii = btrfs_item_ptr(l, i, struct btrfs_inode_item); ii = btrfs_item_ptr(l, i, struct btrfs_inode_item);
printk(KERN_INFO "\t\tinode generation %llu size %llu " printk(KERN_INFO "\t\tinode generation %llu size %llu "
"mode %o\n", "mode %o\n",
(unsigned long long)
btrfs_inode_generation(l, ii), btrfs_inode_generation(l, ii),
(unsigned long long)btrfs_inode_size(l, ii), btrfs_inode_size(l, ii),
btrfs_inode_mode(l, ii)); btrfs_inode_mode(l, ii));
break; break;
case BTRFS_DIR_ITEM_KEY: case BTRFS_DIR_ITEM_KEY:
di = btrfs_item_ptr(l, i, struct btrfs_dir_item); di = btrfs_item_ptr(l, i, struct btrfs_dir_item);
btrfs_dir_item_key_to_cpu(l, di, &found_key); btrfs_dir_item_key_to_cpu(l, di, &found_key);
printk(KERN_INFO "\t\tdir oid %llu type %u\n", printk(KERN_INFO "\t\tdir oid %llu type %u\n",
(unsigned long long)found_key.objectid, found_key.objectid,
btrfs_dir_type(l, di)); btrfs_dir_type(l, di));
break; break;
case BTRFS_ROOT_ITEM_KEY: case BTRFS_ROOT_ITEM_KEY:
ri = btrfs_item_ptr(l, i, struct btrfs_root_item); ri = btrfs_item_ptr(l, i, struct btrfs_root_item);
printk(KERN_INFO "\t\troot data bytenr %llu refs %u\n", printk(KERN_INFO "\t\troot data bytenr %llu refs %u\n",
(unsigned long long)
btrfs_disk_root_bytenr(l, ri), btrfs_disk_root_bytenr(l, ri),
btrfs_disk_root_refs(l, ri)); btrfs_disk_root_refs(l, ri));
break; break;
...@@ -264,17 +254,12 @@ void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *l) ...@@ -264,17 +254,12 @@ void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *l)
} }
printk(KERN_INFO "\t\textent data disk bytenr %llu " printk(KERN_INFO "\t\textent data disk bytenr %llu "
"nr %llu\n", "nr %llu\n",
(unsigned long long)
btrfs_file_extent_disk_bytenr(l, fi), btrfs_file_extent_disk_bytenr(l, fi),
(unsigned long long)
btrfs_file_extent_disk_num_bytes(l, fi)); btrfs_file_extent_disk_num_bytes(l, fi));
printk(KERN_INFO "\t\textent data offset %llu " printk(KERN_INFO "\t\textent data offset %llu "
"nr %llu ram %llu\n", "nr %llu ram %llu\n",
(unsigned long long)
btrfs_file_extent_offset(l, fi), btrfs_file_extent_offset(l, fi),
(unsigned long long)
btrfs_file_extent_num_bytes(l, fi), btrfs_file_extent_num_bytes(l, fi),
(unsigned long long)
btrfs_file_extent_ram_bytes(l, fi)); btrfs_file_extent_ram_bytes(l, fi));
break; break;
case BTRFS_EXTENT_REF_V0_KEY: case BTRFS_EXTENT_REF_V0_KEY:
...@@ -288,7 +273,6 @@ void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *l) ...@@ -288,7 +273,6 @@ void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *l)
bi = btrfs_item_ptr(l, i, bi = btrfs_item_ptr(l, i,
struct btrfs_block_group_item); struct btrfs_block_group_item);
printk(KERN_INFO "\t\tblock group used %llu\n", printk(KERN_INFO "\t\tblock group used %llu\n",
(unsigned long long)
btrfs_disk_block_group_used(l, bi)); btrfs_disk_block_group_used(l, bi));
break; break;
case BTRFS_CHUNK_ITEM_KEY: case BTRFS_CHUNK_ITEM_KEY:
...@@ -305,13 +289,9 @@ void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *l) ...@@ -305,13 +289,9 @@ void btrfs_print_leaf(struct btrfs_root *root, struct extent_buffer *l)
printk(KERN_INFO "\t\tdev extent chunk_tree %llu\n" printk(KERN_INFO "\t\tdev extent chunk_tree %llu\n"
"\t\tchunk objectid %llu chunk offset %llu " "\t\tchunk objectid %llu chunk offset %llu "
"length %llu\n", "length %llu\n",
(unsigned long long)
btrfs_dev_extent_chunk_tree(l, dev_extent), btrfs_dev_extent_chunk_tree(l, dev_extent),
(unsigned long long)
btrfs_dev_extent_chunk_objectid(l, dev_extent), btrfs_dev_extent_chunk_objectid(l, dev_extent),
(unsigned long long)
btrfs_dev_extent_chunk_offset(l, dev_extent), btrfs_dev_extent_chunk_offset(l, dev_extent),
(unsigned long long)
btrfs_dev_extent_length(l, dev_extent)); btrfs_dev_extent_length(l, dev_extent));
break; break;
case BTRFS_DEV_STATS_KEY: case BTRFS_DEV_STATS_KEY:
...@@ -344,16 +324,13 @@ void btrfs_print_tree(struct btrfs_root *root, struct extent_buffer *c) ...@@ -344,16 +324,13 @@ void btrfs_print_tree(struct btrfs_root *root, struct extent_buffer *c)
return; return;
} }
btrfs_info(root->fs_info, "node %llu level %d total ptrs %d free spc %u", btrfs_info(root->fs_info, "node %llu level %d total ptrs %d free spc %u",
(unsigned long long)btrfs_header_bytenr(c), btrfs_header_bytenr(c), level, nr,
level, nr, (u32)BTRFS_NODEPTRS_PER_BLOCK(root) - nr); (u32)BTRFS_NODEPTRS_PER_BLOCK(root) - nr);
for (i = 0; i < nr; i++) { for (i = 0; i < nr; i++) {
btrfs_node_key_to_cpu(c, &key, i); btrfs_node_key_to_cpu(c, &key, i);
printk(KERN_INFO "\tkey %d (%llu %u %llu) block %llu\n", printk(KERN_INFO "\tkey %d (%llu %u %llu) block %llu\n",
i, i, key.objectid, key.type, key.offset,
(unsigned long long)key.objectid, btrfs_node_blockptr(c, i));
key.type,
(unsigned long long)key.offset,
(unsigned long long)btrfs_node_blockptr(c, i));
} }
for (i = 0; i < nr; i++) { for (i = 0; i < nr; i++) {
struct extent_buffer *next = read_tree_block(root, struct extent_buffer *next = read_tree_block(root,
......
...@@ -398,8 +398,7 @@ int btrfs_read_qgroup_config(struct btrfs_fs_info *fs_info) ...@@ -398,8 +398,7 @@ int btrfs_read_qgroup_config(struct btrfs_fs_info *fs_info)
if (ret == -ENOENT) { if (ret == -ENOENT) {
printk(KERN_WARNING printk(KERN_WARNING
"btrfs: orphan qgroup relation 0x%llx->0x%llx\n", "btrfs: orphan qgroup relation 0x%llx->0x%llx\n",
(unsigned long long)found_key.objectid, found_key.objectid, found_key.offset);
(unsigned long long)found_key.offset);
ret = 0; /* ignore the error */ ret = 0; /* ignore the error */
} }
if (ret) if (ret)
...@@ -1163,7 +1162,7 @@ int btrfs_limit_qgroup(struct btrfs_trans_handle *trans, ...@@ -1163,7 +1162,7 @@ int btrfs_limit_qgroup(struct btrfs_trans_handle *trans,
if (ret) { if (ret) {
fs_info->qgroup_flags |= BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT; fs_info->qgroup_flags |= BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT;
printk(KERN_INFO "unable to update quota limit for %llu\n", printk(KERN_INFO "unable to update quota limit for %llu\n",
(unsigned long long)qgroupid); qgroupid);
} }
spin_lock(&fs_info->qgroup_lock); spin_lock(&fs_info->qgroup_lock);
...@@ -1873,10 +1872,9 @@ qgroup_rescan_leaf(struct btrfs_fs_info *fs_info, struct btrfs_path *path, ...@@ -1873,10 +1872,9 @@ qgroup_rescan_leaf(struct btrfs_fs_info *fs_info, struct btrfs_path *path,
path, 1, 0); path, 1, 0);
pr_debug("current progress key (%llu %u %llu), search_slot ret %d\n", pr_debug("current progress key (%llu %u %llu), search_slot ret %d\n",
(unsigned long long)fs_info->qgroup_rescan_progress.objectid, fs_info->qgroup_rescan_progress.objectid,
fs_info->qgroup_rescan_progress.type, fs_info->qgroup_rescan_progress.type,
(unsigned long long)fs_info->qgroup_rescan_progress.offset, fs_info->qgroup_rescan_progress.offset, ret);
ret);
if (ret) { if (ret) {
/* /*
......
...@@ -335,7 +335,7 @@ static void backref_tree_panic(struct rb_node *rb_node, int errno, u64 bytenr) ...@@ -335,7 +335,7 @@ static void backref_tree_panic(struct rb_node *rb_node, int errno, u64 bytenr)
if (bnode->root) if (bnode->root)
fs_info = bnode->root->fs_info; fs_info = bnode->root->fs_info;
btrfs_panic(fs_info, errno, "Inconsistency in backref cache " btrfs_panic(fs_info, errno, "Inconsistency in backref cache "
"found at offset %llu\n", (unsigned long long)bytenr); "found at offset %llu\n", bytenr);
} }
/* /*
...@@ -4234,8 +4234,7 @@ int btrfs_relocate_block_group(struct btrfs_root *extent_root, u64 group_start) ...@@ -4234,8 +4234,7 @@ int btrfs_relocate_block_group(struct btrfs_root *extent_root, u64 group_start)
} }
printk(KERN_INFO "btrfs: relocating block group %llu flags %llu\n", printk(KERN_INFO "btrfs: relocating block group %llu flags %llu\n",
(unsigned long long)rc->block_group->key.objectid, rc->block_group->key.objectid, rc->block_group->flags);
(unsigned long long)rc->block_group->flags);
ret = btrfs_start_all_delalloc_inodes(fs_info, 0); ret = btrfs_start_all_delalloc_inodes(fs_info, 0);
if (ret < 0) { if (ret < 0) {
...@@ -4257,7 +4256,7 @@ int btrfs_relocate_block_group(struct btrfs_root *extent_root, u64 group_start) ...@@ -4257,7 +4256,7 @@ int btrfs_relocate_block_group(struct btrfs_root *extent_root, u64 group_start)
break; break;
printk(KERN_INFO "btrfs: found %llu extents\n", printk(KERN_INFO "btrfs: found %llu extents\n",
(unsigned long long)rc->extents_found); rc->extents_found);
if (rc->stage == MOVE_DATA_EXTENTS && rc->found_file_extent) { if (rc->stage == MOVE_DATA_EXTENTS && rc->found_file_extent) {
btrfs_wait_ordered_range(rc->data_inode, 0, (u64)-1); btrfs_wait_ordered_range(rc->data_inode, 0, (u64)-1);
......
...@@ -155,8 +155,7 @@ int btrfs_update_root(struct btrfs_trans_handle *trans, struct btrfs_root ...@@ -155,8 +155,7 @@ int btrfs_update_root(struct btrfs_trans_handle *trans, struct btrfs_root
if (ret != 0) { if (ret != 0) {
btrfs_print_leaf(root, path->nodes[0]); btrfs_print_leaf(root, path->nodes[0]);
printk(KERN_CRIT "unable to update root key %llu %u %llu\n", printk(KERN_CRIT "unable to update root key %llu %u %llu\n",
(unsigned long long)key->objectid, key->type, key->objectid, key->type, key->offset);
(unsigned long long)key->offset);
BUG_ON(1); BUG_ON(1);
} }
......
...@@ -754,8 +754,7 @@ static void scrub_fixup_nodatasum(struct btrfs_work *work) ...@@ -754,8 +754,7 @@ static void scrub_fixup_nodatasum(struct btrfs_work *work)
num_uncorrectable_read_errors); num_uncorrectable_read_errors);
printk_ratelimited_in_rcu(KERN_ERR printk_ratelimited_in_rcu(KERN_ERR
"btrfs: unable to fixup (nodatasum) error at logical %llu on dev %s\n", "btrfs: unable to fixup (nodatasum) error at logical %llu on dev %s\n",
(unsigned long long)fixup->logical, fixup->logical, rcu_str_deref(fixup->dev->name));
rcu_str_deref(fixup->dev->name));
} }
btrfs_free_path(path); btrfs_free_path(path);
...@@ -1154,8 +1153,7 @@ static int scrub_handle_errored_block(struct scrub_block *sblock_to_check) ...@@ -1154,8 +1153,7 @@ static int scrub_handle_errored_block(struct scrub_block *sblock_to_check)
spin_unlock(&sctx->stat_lock); spin_unlock(&sctx->stat_lock);
printk_ratelimited_in_rcu(KERN_ERR printk_ratelimited_in_rcu(KERN_ERR
"btrfs: fixed up error at logical %llu on dev %s\n", "btrfs: fixed up error at logical %llu on dev %s\n",
(unsigned long long)logical, logical, rcu_str_deref(dev->name));
rcu_str_deref(dev->name));
} }
} else { } else {
did_not_correct_error: did_not_correct_error:
...@@ -1164,8 +1162,7 @@ static int scrub_handle_errored_block(struct scrub_block *sblock_to_check) ...@@ -1164,8 +1162,7 @@ static int scrub_handle_errored_block(struct scrub_block *sblock_to_check)
spin_unlock(&sctx->stat_lock); spin_unlock(&sctx->stat_lock);
printk_ratelimited_in_rcu(KERN_ERR printk_ratelimited_in_rcu(KERN_ERR
"btrfs: unable to fixup (regular) error at logical %llu on dev %s\n", "btrfs: unable to fixup (regular) error at logical %llu on dev %s\n",
(unsigned long long)logical, logical, rcu_str_deref(dev->name));
rcu_str_deref(dev->name));
} }
out: out:
...@@ -2455,8 +2452,7 @@ static noinline_for_stack int scrub_stripe(struct scrub_ctx *sctx, ...@@ -2455,8 +2452,7 @@ static noinline_for_stack int scrub_stripe(struct scrub_ctx *sctx,
printk(KERN_ERR printk(KERN_ERR
"btrfs scrub: tree block %llu spanning " "btrfs scrub: tree block %llu spanning "
"stripes, ignored. logical=%llu\n", "stripes, ignored. logical=%llu\n",
(unsigned long long)key.objectid, key.objectid, logical);
(unsigned long long)logical);
goto next; goto next;
} }
...@@ -3176,9 +3172,7 @@ static void copy_nocow_pages_worker(struct btrfs_work *work) ...@@ -3176,9 +3172,7 @@ static void copy_nocow_pages_worker(struct btrfs_work *work)
nocow_ctx); nocow_ctx);
if (ret != 0 && ret != -ENOENT) { if (ret != 0 && ret != -ENOENT) {
pr_warn("iterate_inodes_from_logical() failed: log %llu, phys %llu, len %llu, mir %llu, ret %d\n", pr_warn("iterate_inodes_from_logical() failed: log %llu, phys %llu, len %llu, mir %llu, ret %d\n",
(unsigned long long)logical, logical, physical_for_dev_replace, len,
(unsigned long long)physical_for_dev_replace,
(unsigned long long)len,
(unsigned long long)mirror_num, ret); (unsigned long long)mirror_num, ret);
not_written = 1; not_written = 1;
goto out; goto out;
......
...@@ -522,7 +522,7 @@ int btrfs_parse_options(struct btrfs_root *root, char *options) ...@@ -522,7 +522,7 @@ int btrfs_parse_options(struct btrfs_root *root, char *options)
root->sectorsize); root->sectorsize);
} }
printk(KERN_INFO "btrfs: max_inline at %llu\n", printk(KERN_INFO "btrfs: max_inline at %llu\n",
(unsigned long long)info->max_inline); info->max_inline);
} else { } else {
ret = -ENOMEM; ret = -ENOMEM;
goto out; goto out;
...@@ -537,7 +537,7 @@ int btrfs_parse_options(struct btrfs_root *root, char *options) ...@@ -537,7 +537,7 @@ int btrfs_parse_options(struct btrfs_root *root, char *options)
kfree(num); kfree(num);
printk(KERN_INFO printk(KERN_INFO
"btrfs: allocations start at %llu\n", "btrfs: allocations start at %llu\n",
(unsigned long long)info->alloc_start); info->alloc_start);
} else { } else {
ret = -ENOMEM; ret = -ENOMEM;
goto out; goto out;
...@@ -947,11 +947,9 @@ static int btrfs_show_options(struct seq_file *seq, struct dentry *dentry) ...@@ -947,11 +947,9 @@ static int btrfs_show_options(struct seq_file *seq, struct dentry *dentry)
if (btrfs_test_opt(root, NOBARRIER)) if (btrfs_test_opt(root, NOBARRIER))
seq_puts(seq, ",nobarrier"); seq_puts(seq, ",nobarrier");
if (info->max_inline != 8192 * 1024) if (info->max_inline != 8192 * 1024)
seq_printf(seq, ",max_inline=%llu", seq_printf(seq, ",max_inline=%llu", info->max_inline);
(unsigned long long)info->max_inline);
if (info->alloc_start != 0) if (info->alloc_start != 0)
seq_printf(seq, ",alloc_start=%llu", seq_printf(seq, ",alloc_start=%llu", info->alloc_start);
(unsigned long long)info->alloc_start);
if (info->thread_pool_size != min_t(unsigned long, if (info->thread_pool_size != min_t(unsigned long,
num_online_cpus() + 2, 8)) num_online_cpus() + 2, 8))
seq_printf(seq, ",thread_pool=%d", info->thread_pool_size); seq_printf(seq, ",thread_pool=%d", info->thread_pool_size);
......
...@@ -1948,8 +1948,7 @@ int btrfs_clean_one_deleted_snapshot(struct btrfs_root *root) ...@@ -1948,8 +1948,7 @@ int btrfs_clean_one_deleted_snapshot(struct btrfs_root *root)
list_del_init(&root->root_list); list_del_init(&root->root_list);
spin_unlock(&fs_info->trans_lock); spin_unlock(&fs_info->trans_lock);
pr_debug("btrfs: cleaner removing %llu\n", pr_debug("btrfs: cleaner removing %llu\n", root->objectid);
(unsigned long long)root->objectid);
btrfs_kill_all_delayed_nodes(root); btrfs_kill_all_delayed_nodes(root);
......
...@@ -914,8 +914,7 @@ int btrfs_scan_one_device(const char *path, fmode_t flags, void *holder, ...@@ -914,8 +914,7 @@ int btrfs_scan_one_device(const char *path, fmode_t flags, void *holder,
printk(KERN_INFO "device fsid %pU ", disk_super->fsid); printk(KERN_INFO "device fsid %pU ", disk_super->fsid);
} }
printk(KERN_CONT "devid %llu transid %llu %s\n", printk(KERN_CONT "devid %llu transid %llu %s\n", devid, transid, path);
(unsigned long long)devid, (unsigned long long)transid, path);
ret = device_list_add(path, disk_super, devid, fs_devices_ret); ret = device_list_add(path, disk_super, devid, fs_devices_ret);
if (!ret && fs_devices_ret) if (!ret && fs_devices_ret)
...@@ -3159,7 +3158,7 @@ int btrfs_balance(struct btrfs_balance_control *bctl, ...@@ -3159,7 +3158,7 @@ int btrfs_balance(struct btrfs_balance_control *bctl,
(bctl->data.target & ~allowed))) { (bctl->data.target & ~allowed))) {
printk(KERN_ERR "btrfs: unable to start balance with target " printk(KERN_ERR "btrfs: unable to start balance with target "
"data profile %llu\n", "data profile %llu\n",
(unsigned long long)bctl->data.target); bctl->data.target);
ret = -EINVAL; ret = -EINVAL;
goto out; goto out;
} }
...@@ -3168,7 +3167,7 @@ int btrfs_balance(struct btrfs_balance_control *bctl, ...@@ -3168,7 +3167,7 @@ int btrfs_balance(struct btrfs_balance_control *bctl,
(bctl->meta.target & ~allowed))) { (bctl->meta.target & ~allowed))) {
printk(KERN_ERR "btrfs: unable to start balance with target " printk(KERN_ERR "btrfs: unable to start balance with target "
"metadata profile %llu\n", "metadata profile %llu\n",
(unsigned long long)bctl->meta.target); bctl->meta.target);
ret = -EINVAL; ret = -EINVAL;
goto out; goto out;
} }
...@@ -3177,7 +3176,7 @@ int btrfs_balance(struct btrfs_balance_control *bctl, ...@@ -3177,7 +3176,7 @@ int btrfs_balance(struct btrfs_balance_control *bctl,
(bctl->sys.target & ~allowed))) { (bctl->sys.target & ~allowed))) {
printk(KERN_ERR "btrfs: unable to start balance with target " printk(KERN_ERR "btrfs: unable to start balance with target "
"system profile %llu\n", "system profile %llu\n",
(unsigned long long)bctl->sys.target); bctl->sys.target);
ret = -EINVAL; ret = -EINVAL;
goto out; goto out;
} }
...@@ -4652,8 +4651,7 @@ static int __btrfs_map_block(struct btrfs_fs_info *fs_info, int rw, ...@@ -4652,8 +4651,7 @@ static int __btrfs_map_block(struct btrfs_fs_info *fs_info, int rw,
if (!em) { if (!em) {
btrfs_crit(fs_info, "unable to find logical %llu len %llu", btrfs_crit(fs_info, "unable to find logical %llu len %llu",
(unsigned long long)logical, logical, *length);
(unsigned long long)*length);
return -EINVAL; return -EINVAL;
} }
...@@ -5524,9 +5522,7 @@ int btrfs_map_bio(struct btrfs_root *root, int rw, struct bio *bio, ...@@ -5524,9 +5522,7 @@ int btrfs_map_bio(struct btrfs_root *root, int rw, struct bio *bio,
if (map_length < length) { if (map_length < length) {
btrfs_crit(root->fs_info, "mapping failed logical %llu bio len %llu len %llu", btrfs_crit(root->fs_info, "mapping failed logical %llu bio len %llu len %llu",
(unsigned long long)logical, logical, length, map_length);
(unsigned long long)length,
(unsigned long long)map_length);
BUG(); BUG();
} }
...@@ -5846,8 +5842,7 @@ static int read_one_dev(struct btrfs_root *root, ...@@ -5846,8 +5842,7 @@ static int read_one_dev(struct btrfs_root *root,
return -EIO; return -EIO;
if (!device) { if (!device) {
btrfs_warn(root->fs_info, "devid %llu missing", btrfs_warn(root->fs_info, "devid %llu missing", devid);
(unsigned long long)devid);
device = add_missing_dev(root, devid, dev_uuid); device = add_missing_dev(root, devid, dev_uuid);
if (!device) if (!device)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册