btrfs-progs: convert: use wider types types for inode counts for progress reports

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2017-01-30 10:33:01 +01:00
parent 0a5d16eca7
commit c0acc29c99
2 changed files with 7 additions and 6 deletions

View File

@ -55,14 +55,15 @@ static void *print_copied_inodes(void *p)
{
struct task_ctx *priv = p;
const char work_indicator[] = { '.', 'o', 'O', 'o' };
uint32_t count = 0;
u64 count = 0;
task_period_start(priv->info, 1000 /* 1s */);
while (1) {
count++;
printf("copy inodes [%c] [%10d/%10d]\r",
work_indicator[count % 4], priv->cur_copy_inodes,
priv->max_copy_inodes);
printf("copy inodes [%c] [%10llu/%10llu]\r",
work_indicator[count % 4],
(unsigned long long)priv->cur_copy_inodes,
(unsigned long long)priv->max_copy_inodes);
fflush(stdout);
task_period_wait(priv->info);
}

View File

@ -22,8 +22,8 @@
#define CONV_IMAGE_SUBVOL_OBJECTID BTRFS_FIRST_FREE_OBJECTID
struct task_ctx {
uint32_t max_copy_inodes;
uint32_t cur_copy_inodes;
u64 max_copy_inodes;
u64 cur_copy_inodes;
struct task_info *info;
};