diff options
author | Daniel Rosenberg <drosen@google.com> | 2023-11-17 18:03:07 -0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2023-11-28 10:55:50 -0800 |
commit | 779bc5060641953674b32c5c8ddf4929ed261956 (patch) | |
tree | ce64aada57f0b713c451abfef618f7f3cd4ea1c9 | |
parent | 370d070e02f0954c41906e40a9d505b083b353e1 (diff) | |
download | f2fs-tools-779bc5060641953674b32c5c8ddf4929ed261956.tar.gz |
f2fs-tools: Fix debug size print
The conversion from block size to MB in this debug statement assumes a
block size of 4K. This switches it to properly use the filesystem's
block size.
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r-- | fsck/fsck.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fsck/fsck.c b/fsck/fsck.c index 55eddca..509b485 100644 --- a/fsck/fsck.c +++ b/fsck/fsck.c @@ -3494,7 +3494,8 @@ int fsck_verify(struct f2fs_sb_info *sbi) max_blks = SM_I(sbi)->main_blkaddr + (data_secs + node_secs) * BLKS_PER_SEC(sbi); printf("[FSCK] Max image size: %"PRIu64" MB, Free space: %"PRIu64" MB\n", - max_blks >> 8, free_blks >> 8); + max_blks >> (20 - F2FS_BLKSIZE_BITS), + free_blks >> (20 - F2FS_BLKSIZE_BITS)); printf("[FSCK] Unreachable nat entries "); if (nr_unref_nid == 0x0) { printf(" [Ok..] [0x%x]\n", nr_unref_nid); |