diff options
| author | Yonggil Song <yonggil.song@samsung.com> | 2026-08-06 12:39:18 +0900 |
|---|---|---|
| committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2026-08-07 21:40:25 +0000 |
| commit | e1116f8e98eaf76020561e8ab71a51bebfd23334 (patch) | |
| tree | e9eed09e4f2343711bc0fd6a76bc5abee5636ddd /include/uapi/linux | |
| parent | 5d59e6a3777c365dd63cf6b40e579460aed7afd6 (diff) | |
f2fs: issue multi-device flushes in parallel
On a multi-device setup, submit_flush_wait() walked the dirty devices
in order and aborted the whole loop on the first device whose flush
failed, leaving the remaining dirty devices un-flushed. Each device
still needs its own data made durable, so a failure on one device must
not skip the others. It also waited for one device's flush to complete
before issuing the next, even though the devices have independent
flush queues and could be flushed concurrently.
Flush every dirty device best-effort and in parallel instead: build
one PREFLUSH bio per dirty device, submit them all, then wait for
every completion, returning the first error seen (0 if all succeed).
This bounds the flush window by the slowest device rather than the sum
of all of them. No caller depends on the previous early-abort
behaviour -- fsync only checks whether the return value is zero
(fs/f2fs/file.c). The checkpoint path (f2fs_flush_device_cache) is
unaffected; this only touches the fsync flush path.
The per-device bio/completion array is small and bounded (at most
MAX_DEVICES entries), so allocate it with __GFP_NOFAIL rather than
keeping a separate serial fallback path for allocation failure.
Signed-off-by: Yonggil Song <yonggil.song@samsung.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'include/uapi/linux')
0 files changed, 0 insertions, 0 deletions
