summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorCen Zhang <zzzccc427@gmail.com>2026-05-06 04:07:09 +0300
committerJaegeuk Kim <jaegeuk@kernel.org>2026-06-22 22:52:34 +0300
commitb952837f734c3a627877bf922408dac04588a643 (patch)
tree1a7731dfa59503272fd8c3173c1e219ae372dfb6 /scripts
parentdd3114870771562036fdcf5abe813956f36d224d (diff)
downloadlinux-b952837f734c3a627877bf922408dac04588a643.tar.xz
f2fs: annotate lockless last_time[] accesses
f2fs stores mount-wide activity timestamps in sbi->last_time[] and samples them from background discard, GC, and balance paths without a dedicated lock. The timestamps are used as best-effort heuristics to decide whether background work should run now or sleep a bit longer. The current helpers use plain loads and stores, so KCSAN can report races between frequent foreground updates and background readers. Exact freshness is not required here, but the intentional lockless accesses should be marked explicitly. Use WRITE_ONCE() in f2fs_update_time() and READ_ONCE() in f2fs_time_over() and f2fs_time_to_wait(). This preserves the existing heuristic behavior and avoids adding locking to hot paths. Signed-off-by: Cen Zhang <zzzccc427@gmail.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions