ly changes in a procfs seq_file. No locking, no state changes, no dependency impact. Extremely low regression risk. The proc output format gains two lines (“Block size”, “Segment size”) and reorders “# of Sections”; procfs output is not a stable ABI, and this is a correctness fix. - Stable criteria: - Fixes a real bug that affects users on non-4KB page systems. - Small, localized change; no architectural modifications. - Minimal risk of regression; no functional side effects. - Touches a filesystem but only its proc reporting path. - No “Cc: stable” tag, but the fix is obvious and self-contained. Conclusion: This is a safe, correctness-only fix improving accuracy of f2fs diagnostics on 16KB/64KB page systems and should be backported. fs/f2fs/sysfs.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c index f736052dea50a..902ffb3faa1ff 100644 --- a/fs/f2fs/sysfs.c +++ b/fs/f2fs/sysfs.c @@ -1723,12 +1723,15 @@ static int __maybe_unused disk_map_seq_show(struct seq_file *seq, seq_printf(seq, " Main : 0x%010x (%10d)\n", SM_I(sbi)->main_blkaddr, le32_to_cpu(F2FS_RAW_SUPER(sbi)->segment_count_main)); - seq_printf(seq, " # of Sections : %12d\n", - le32_to_cpu(F2FS_RAW_SUPER(sbi)->section_count)); + seq_printf(seq, " Block size : %12lu KB\n", F2FS_BLKSIZE >> 10); + seq_printf(seq, " Segment size : %12d MB\n", + (BLKS_PER_SEG(sbi) << (F2FS_BLKSIZE_BITS - 10)) >> 10); seq_printf(seq, " Segs/Sections : %12d\n", SEGS_PER_SEC(sbi)); seq_printf(seq, " Section size : %12d MB\n", - SEGS_PER_SEC(sbi) << 1); + (BLKS_PER_SEC(sbi) << (F2FS_BLKSIZE_BITS - 10)) >> 10); + seq_printf(seq, " # of Sections : %12d\n", + le32_to_cpu(F2FS_RAW_SUPER(sbi)->section_count)); if (!f2fs_is_multi_device(sbi)) return 0; -- 2.51.0[PATCH AUTOSEL 6.17-6.12] f2fs: fix wrong layout information on 16KB pageSasha Levin undefinedpatches@lists.linux.dev, stable@vger.kernel.org undefined undefined undefined undefined undefinedh,