btrfs-progs: switch %Lu to %llu format

The %Lu format is not standard and we use %llu everywhere else, so
switch the remaining cases.

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2021-06-11 23:07:50 +02:00
parent ab0d369525
commit b1f374dd1d
11 changed files with 23 additions and 23 deletions

View file

@ -596,7 +596,7 @@ static int corrupt_inode(struct btrfs_trans_handle *trans,
goto out;
if (ret) {
if (!path->slots[0]) {
fprintf(stderr, "Couldn't find inode %Lu\n", inode);
fprintf(stderr, "Couldn't find inode %llu\n", inode);
ret = -ENOENT;
goto out;
}
@ -606,7 +606,7 @@ static int corrupt_inode(struct btrfs_trans_handle *trans,
btrfs_item_key_to_cpu(path->nodes[0], &key, path->slots[0]);
if (key.objectid != inode) {
fprintf(stderr, "Couldn't find inode %Lu\n", inode);
fprintf(stderr, "Couldn't find inode %llu\n", inode);
ret = -ENOENT;
goto out;
}

View file

@ -122,7 +122,7 @@ static int __print_mapping_info(struct btrfs_fs_info *fs_info, u64 logical,
for (i = 0; i < multi->num_stripes; i++) {
device = multi->stripes[i].dev;
fprintf(info_file,
"mirror %d logical %Lu physical %Lu device %s\n",
"mirror %d logical %llu physical %llu device %s\n",
mirror_num, logical + cur_offset,
multi->stripes[0].physical,
device->name);

View file

@ -256,7 +256,7 @@ static void print_seek_histogram(struct root_stats *stat)
if (group_count) {
gticks = group_count / tick_interval;
printf("\t\t%*Lu - %*Lu: %*Lu ", digits, group_start,
printf("\t\t%*llu - %*llu: %*llu ", digits, group_start,
digits, group_end, digits, group_count);
if (gticks) {
for (i = 0; i < gticks; i++)
@ -271,7 +271,7 @@ static void print_seek_histogram(struct root_stats *stat)
if (ticks <= 2)
continue;
printf("\t\t%*Lu - %*Lu: %*Lu ", digits, seek->distance,
printf("\t\t%*llu - %*llu: %*llu ", digits, seek->distance,
digits, seek->distance, digits, seek->count);
for (i = 0; i < ticks; i++)
printf("#");
@ -281,7 +281,7 @@ static void print_seek_histogram(struct root_stats *stat)
u64 gticks;
gticks = group_count / tick_interval;
printf("\t\t%*Lu - %*Lu: %*Lu ", digits, group_start,
printf("\t\t%*llu - %*llu: %*llu ", digits, group_start,
digits, group_end, digits, group_count);
if (gticks) {
for (i = 0; i < gticks; i++)

View file

@ -334,7 +334,7 @@ static int copy_one_inline(struct btrfs_root *root, int fd,
done = pwrite(fd, outbuf, ram_size, pos);
free(outbuf);
if (done < ram_size) {
fprintf(stderr, "Short compressed inline write, wanted %Lu, "
fprintf(stderr, "Short compressed inline write, wanted %llu, "
"did %zd: %d\n", ram_size, done, errno);
return -1;
}
@ -1023,7 +1023,7 @@ static int search_dir(struct btrfs_root *root, struct btrfs_key *key,
}
btrfs_item_key_to_cpu(leaf, &found_key, path.slots[0]);
if (found_key.objectid != key->objectid) {
pr_verbose(2, "Found objectid=%Lu, key=%llu\n",
pr_verbose(2, "Found objectid=%llu, key=%llu\n",
found_key.objectid, key->objectid);
break;
}
@ -1245,7 +1245,7 @@ static int do_list_roots(struct btrfs_root *root)
read_extent_buffer(leaf, &ri, offset, sizeof(ri));
printf(" tree ");
btrfs_print_key(&disk_key);
printf(" %Lu level %d\n", btrfs_root_bytenr(&ri),
printf(" %llu level %d\n", btrfs_root_bytenr(&ri),
btrfs_root_level(&ri));
path.slots[0]++;
}
@ -1357,7 +1357,7 @@ again:
if (found_key.type != key.type)
continue;
printf("Using objectid %Lu for first dir\n",
printf("Using objectid %llu for first dir\n",
found_key.objectid);
*objectid = found_key.objectid;
ret = 0;

View file

@ -529,7 +529,7 @@ static int ext2_copy_single_xattr(struct btrfs_trans_handle *trans,
strncat(namebuf, EXT2_EXT_ATTR_NAME(entry), entry->e_name_len);
if (name_len + datalen > BTRFS_LEAF_DATA_SIZE(root->fs_info) -
sizeof(struct btrfs_item) - sizeof(struct btrfs_dir_item)) {
fprintf(stderr, "skip large xattr on inode %Lu name %.*s\n",
fprintf(stderr, "skip large xattr on inode %llu name %.*s\n",
objectid - INO_OFFSET, name_len, namebuf);
goto out;
}

View file

@ -501,7 +501,7 @@ int btrfs_cow_block(struct btrfs_trans_handle *trans,
int ret;
/*
if (trans->transaction != root->fs_info->running_transaction) {
printk(KERN_CRIT "trans %Lu running %Lu\n", trans->transid,
printk(KERN_CRIT "trans %llu running %llu\n", trans->transid,
root->fs_info->running_transaction->transid);
WARN_ON(1);
}

View file

@ -316,7 +316,7 @@ int read_whole_eb(struct btrfs_fs_info *info, struct extent_buffer *eb, int mirr
ret = btrfs_map_block(info, READ, eb->start + offset,
&read_len, &multi, mirror, NULL);
if (ret) {
printk("Couldn't map the block %Lu\n", eb->start + offset);
printk("Couldn't map the block %llu\n", eb->start + offset);
kfree(multi);
return -EIO;
}

View file

@ -1421,7 +1421,7 @@ again:
if (ret != 0) {
btrfs_print_leaf(path->nodes[0], BTRFS_PRINT_TREE_DEFAULT);
printk("failed to find block number %Lu\n",
printk("failed to find block number %llu\n",
(unsigned long long)bytenr);
BUG();
}

View file

@ -836,7 +836,7 @@ int read_data_from_disk(struct btrfs_fs_info *info, void *buf, u64 offset,
ret = btrfs_map_block(info, READ, offset, &read_len, &multi,
mirror, NULL);
if (ret) {
fprintf(stderr, "Couldn't map the block %Lu\n",
fprintf(stderr, "Couldn't map the block %llu\n",
offset);
return -EIO;
}
@ -852,13 +852,13 @@ int read_data_from_disk(struct btrfs_fs_info *info, void *buf, u64 offset,
multi->stripes[0].physical);
kfree(multi);
if (ret < 0) {
fprintf(stderr, "Error reading %Lu, %d\n", offset,
fprintf(stderr, "Error reading %llu, %d\n", offset,
ret);
return ret;
}
if (ret != read_len) {
fprintf(stderr, "Short read for %Lu, read %d, "
"read_len %Lu\n", offset, ret, read_len);
fprintf(stderr, "Short read for %llu, read %d, "
"read_len %llu\n", offset, ret, read_len);
return -EIO;
}
@ -890,7 +890,7 @@ int write_data_to_disk(struct btrfs_fs_info *info, void *buf, u64 offset,
ret = btrfs_map_block(info, WRITE, offset, &this_len, &multi,
mirror, &raid_map);
if (ret) {
fprintf(stderr, "Couldn't map the block %Lu\n",
fprintf(stderr, "Couldn't map the block %llu\n",
offset);
return -EIO;
}

View file

@ -112,7 +112,7 @@ static int io_ctl_prepare_pages(struct io_ctl *io_ctl, struct btrfs_root *root,
if (ret) {
fprintf(stderr,
"Couldn't find file extent item for free space inode"
" %Lu\n", ino);
" %llu\n", ino);
btrfs_release_path(path);
return -EINVAL;
}
@ -183,7 +183,7 @@ static int io_ctl_check_generation(struct io_ctl *io_ctl, u64 generation)
gen = io_ctl->cur;
if (le64_to_cpu(*gen) != generation) {
printk("btrfs: space cache generation "
"(%Lu) does not match inode (%Lu)\n", *gen,
"(%llu) does not match inode (%llu)\n", *gen,
generation);
io_ctl_unmap_page(io_ctl);
return -EIO;

View file

@ -296,7 +296,7 @@ static void print_dev_item(struct extent_buffer *eb,
(unsigned long)btrfs_device_fsid(dev_item),
BTRFS_UUID_SIZE);
uuid_unparse(fsid, fsid_str);
printf("\t\tdevid %llu total_bytes %llu bytes_used %Lu\n"
printf("\t\tdevid %llu total_bytes %llu bytes_used %llu\n"
"\t\tio_align %u io_width %u sector_size %u type %llu\n"
"\t\tgeneration %llu start_offset %llu dev_group %u\n"
"\t\tseek_speed %hhu bandwidth %hhu\n"
@ -1359,7 +1359,7 @@ void btrfs_print_leaf(struct extent_buffer *eb, unsigned int mode)
struct btrfs_dir_log_item *dlog;
dlog = btrfs_item_ptr(eb, i, struct btrfs_dir_log_item);
printf("\t\tdir log end %Lu\n",
printf("\t\tdir log end %llu\n",
(unsigned long long)btrfs_dir_log_end(eb, dlog));
break;
}