From c0acc29c990cbf6e1ea0a2d7565984b0318584a2 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Mon, 30 Jan 2017 10:33:01 +0100 Subject: [PATCH] btrfs-progs: convert: use wider types types for inode counts for progress reports Signed-off-by: David Sterba --- convert/main.c | 9 +++++---- convert/source-fs.h | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/convert/main.c b/convert/main.c index 2f6ec428..5a2da312 100644 --- a/convert/main.c +++ b/convert/main.c @@ -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); } diff --git a/convert/source-fs.h b/convert/source-fs.h index b6a159e5..41d1153d 100644 --- a/convert/source-fs.h +++ b/convert/source-fs.h @@ -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; };