]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
f2fs: introduce f2fs_schedule_timeout()
authorChao Yu <chao@kernel.org>
Wed, 12 Nov 2025 01:47:48 +0000 (09:47 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 4 Dec 2025 02:00:05 +0000 (02:00 +0000)
commit76e780d88c771921ea643fb8a6c8d0b08c17cb7b
tree0f0075ffa1bed2d5418dd9739f8dbb3d0a234f56
parent30a8496694f1a93328e5d7f19206380346918b5a
f2fs: introduce f2fs_schedule_timeout()

In f2fs retry logic, we will call f2fs_io_schedule_timeout() to sleep as
uninterruptible state (waiting for IO) for a while, however, in several
paths below, we are not blocked by IO:
- f2fs_write_single_data_page() return -EAGAIN due to racing on cp_rwsem.
- f2fs_flush_device_cache() failed to submit preflush command.
- __issue_discard_cmd_range() sleeps periodically in between two in batch
discard submissions.

So, in order to reveal state of task more accurate, let's introduce
f2fs_schedule_timeout() and call it in above paths in where we are waiting
for non-IO reasons.

Then we can get real reason of uninterruptible sleep for a thread in
tracepoint, perfetto, etc.

Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/checkpoint.c
fs/f2fs/compress.c
fs/f2fs/data.c
fs/f2fs/f2fs.h
fs/f2fs/segment.c
fs/f2fs/super.c