Re: [PATCH v3] f2fs: issue multi-device flushes in parallel

Chao Yu <[email protected]>
Newsgroups org.kernel.vger.linux-kernel,net.sourceforge.lists.linux-f2fs-devel
Message-ID <[email protected]>
On 8/6/26 11:39, Yonggil Song wrote:
> 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 <[email protected]>
Reviewed-by: Chao Yu <[email protected]>

Thanks,
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.