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 <dro...@google.com> --- fsck/fsck.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.43.0.rc0.421.g78406f8d94-goog _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel