summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-04-21 14:50:04 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2026-04-21 14:50:04 -0700
commitd46dd0d88341e45f8e0226fdef5462f5270898fc (patch)
treee7413796e3ed09bf8c060470d7b71348e9e036de /include
parentbb0bc49a1cef574646eb25d74709c5ff200903a8 (diff)
parentcb8ff3ead9a3fc43727980be58c7099506f65261 (diff)
Merge tag 'f2fs-for-7.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs
Pull f2fs updates from Jaegeuk Kim: "In this round, the changes primarily focus on resolving race conditions, memory safety issues (UAF), and improving the robustness of garbage collection (GC), and folio management. Enhancements: - add page-order information for large folio reads in iostat - add defrag_blocks sysfs node Bug fixes: - fix uninitialized kobject put in f2fs_init_sysfs() - disallow setting an extension to both cold and hot - fix node_cnt race between extent node destroy and writeback - preserve previous reserve_{blocks,node} value when remount - freeze GC and discard threads quickly - fix false alarm of lockdep on cp_global_sem lock - fix data loss caused by incorrect use of nat_entry flag - skip empty sections in f2fs_get_victim - fix inline data not being written to disk in writeback path - fix fsck inconsistency caused by FGGC of node block - fix fsck inconsistency caused by incorrect nat_entry flag usage - call f2fs_handle_critical_error() to set cp_error flag - fix fiemap boundary handling when read extent cache is incomplete - fix use-after-free of sbi in f2fs_compress_write_end_io() - fix UAF caused by decrementing sbi->nr_pages[] in f2fs_write_end_io() - fix incorrect file address mapping when inline inode is unwritten - fix incomplete search range in f2fs_get_victim when f2fs_need_rand_seg is enabled - avoid memory leak in f2fs_rename()" * tag 'f2fs-for-7.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (35 commits) f2fs: add page-order information for large folio reads in iostat f2fs: do not support mmap write for large folio f2fs: fix uninitialized kobject put in f2fs_init_sysfs() f2fs: protect extension_list reading with sb_lock in f2fs_sbi_show() f2fs: disallow setting an extension to both cold and hot f2fs: fix node_cnt race between extent node destroy and writeback f2fs: allow empty mount string for Opt_usr|grp|projjquota f2fs: fix to preserve previous reserve_{blocks,node} value when remount f2fs: invalidate block device page cache on umount f2fs: fix to freeze GC and discard threads quickly f2fs: fix to avoid uninit-value access in f2fs_sanity_check_node_footer f2fs: fix false alarm of lockdep on cp_global_sem lock f2fs: fix data loss caused by incorrect use of nat_entry flag f2fs: fix to skip empty sections in f2fs_get_victim f2fs: fix inline data not being written to disk in writeback path f2fs: fix fsck inconsistency caused by FGGC of node block f2fs: fix fsck inconsistency caused by incorrect nat_entry flag usage f2fs: fix to do sanity check on dcc->discard_cmd_cnt conditionally f2fs: refactor node footer flag setting related code f2fs: refactor f2fs_move_node_folio function ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/f2fs_fs.h3
-rw-r--r--include/trace/events/f2fs.h21
2 files changed, 20 insertions, 4 deletions
diff --git a/include/linux/f2fs_fs.h b/include/linux/f2fs_fs.h
index dc41722fcc9d..829a59399dac 100644
--- a/include/linux/f2fs_fs.h
+++ b/include/linux/f2fs_fs.h
@@ -80,6 +80,9 @@ enum stop_cp_reason {
STOP_CP_REASON_NO_SEGMENT,
STOP_CP_REASON_CORRUPTED_FREE_BITMAP,
STOP_CP_REASON_CORRUPTED_NID,
+ STOP_CP_REASON_READ_META,
+ STOP_CP_REASON_READ_NODE,
+ STOP_CP_REASON_READ_DATA,
STOP_CP_REASON_MAX,
};
diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h
index 05a46908acd9..b5188d2671d7 100644
--- a/include/trace/events/f2fs.h
+++ b/include/trace/events/f2fs.h
@@ -2116,9 +2116,10 @@ DEFINE_EVENT(f2fs_zip_end, f2fs_decompress_pages_end,
#ifdef CONFIG_F2FS_IOSTAT
TRACE_EVENT(f2fs_iostat,
- TP_PROTO(struct f2fs_sb_info *sbi, unsigned long long *iostat),
+ TP_PROTO(struct f2fs_sb_info *sbi, unsigned long long *iostat,
+ unsigned long long *read_folio_count),
- TP_ARGS(sbi, iostat),
+ TP_ARGS(sbi, iostat, read_folio_count),
TP_STRUCT__entry(
__field(dev_t, dev)
@@ -2150,6 +2151,7 @@ TRACE_EVENT(f2fs_iostat,
__field(unsigned long long, fs_mrio)
__field(unsigned long long, fs_discard)
__field(unsigned long long, fs_reset_zone)
+ __array(unsigned long long, read_folio_count, 11)
),
TP_fast_assign(
@@ -2182,6 +2184,9 @@ TRACE_EVENT(f2fs_iostat,
__entry->fs_mrio = iostat[FS_META_READ_IO];
__entry->fs_discard = iostat[FS_DISCARD_IO];
__entry->fs_reset_zone = iostat[FS_ZONE_RESET_IO];
+ memset(__entry->read_folio_count, 0, sizeof(__entry->read_folio_count));
+ memcpy(__entry->read_folio_count, read_folio_count,
+ sizeof(unsigned long long) * min_t(int, NR_PAGE_ORDERS, 11));
),
TP_printk("dev = (%d,%d), "
@@ -2194,7 +2199,9 @@ TRACE_EVENT(f2fs_iostat,
"app [read=%llu (direct=%llu, buffered=%llu), mapped=%llu], "
"compr(buffered=%llu, mapped=%llu)], "
"fs [data=%llu, (gc_data=%llu, cdata=%llu), "
- "node=%llu, meta=%llu]",
+ "node=%llu, meta=%llu], "
+ "read_folio_count [0=%llu, 1=%llu, 2=%llu, 3=%llu, 4=%llu, "
+ "5=%llu, 6=%llu, 7=%llu, 8=%llu, 9=%llu, 10=%llu]",
show_dev(__entry->dev), __entry->app_wio, __entry->app_dio,
__entry->app_bio, __entry->app_mio, __entry->app_bcdio,
__entry->app_mcdio, __entry->fs_dio, __entry->fs_cdio,
@@ -2205,7 +2212,13 @@ TRACE_EVENT(f2fs_iostat,
__entry->app_rio, __entry->app_drio, __entry->app_brio,
__entry->app_mrio, __entry->app_bcrio, __entry->app_mcrio,
__entry->fs_drio, __entry->fs_gdrio,
- __entry->fs_cdrio, __entry->fs_nrio, __entry->fs_mrio)
+ __entry->fs_cdrio, __entry->fs_nrio, __entry->fs_mrio,
+ __entry->read_folio_count[0], __entry->read_folio_count[1],
+ __entry->read_folio_count[2], __entry->read_folio_count[3],
+ __entry->read_folio_count[4], __entry->read_folio_count[5],
+ __entry->read_folio_count[6], __entry->read_folio_count[7],
+ __entry->read_folio_count[8], __entry->read_folio_count[9],
+ __entry->read_folio_count[10])
);
#ifndef __F2FS_IOSTAT_LATENCY_TYPE