Skip to content

Commit a33be64

Browse files
author
Jaegeuk Kim
committed
f2fs: fix wrong layout information on 16KB page
This patch fixes to support different block size. Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
1 parent d023626 commit a33be64

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

fs/f2fs/sysfs.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1768,12 +1768,15 @@ static int __maybe_unused disk_map_seq_show(struct seq_file *seq,
17681768
seq_printf(seq, " Main : 0x%010x (%10d)\n",
17691769
SM_I(sbi)->main_blkaddr,
17701770
le32_to_cpu(F2FS_RAW_SUPER(sbi)->segment_count_main));
1771-
seq_printf(seq, " # of Sections : %12d\n",
1772-
le32_to_cpu(F2FS_RAW_SUPER(sbi)->section_count));
1771+
seq_printf(seq, " Block size : %12lu KB\n", F2FS_BLKSIZE >> 10);
1772+
seq_printf(seq, " Segment size : %12d MB\n",
1773+
(BLKS_PER_SEG(sbi) << (F2FS_BLKSIZE_BITS - 10)) >> 10);
17731774
seq_printf(seq, " Segs/Sections : %12d\n",
17741775
SEGS_PER_SEC(sbi));
17751776
seq_printf(seq, " Section size : %12d MB\n",
1776-
SEGS_PER_SEC(sbi) << 1);
1777+
(BLKS_PER_SEC(sbi) << (F2FS_BLKSIZE_BITS - 10)) >> 10);
1778+
seq_printf(seq, " # of Sections : %12d\n",
1779+
le32_to_cpu(F2FS_RAW_SUPER(sbi)->section_count));
17771780

17781781
if (!f2fs_is_multi_device(sbi))
17791782
return 0;

0 commit comments

Comments
 (0)