Re: [f2fs-dev] [PATCH v2 04/14] f2fs: support atomic file large folios buffered write

From: Chao Yu

Date: Wed Sep 23 2026 - 03:23:41 EST


On 9/23/26 11:21, Nanzhe Zhao wrote:
> I think I can extract the duplicate logic in a helper and the full change
> may be like this?
Alright, is there a way to relocate below code block before f2fs_balance_fs()?

if (folio_test_large(folio)) {
if (f2fs_is_atomic_file(inode))
err = prepare_large_folio_atomic_write_begin(inode,
mapping, folio, pos, len);
else
err = prepare_large_folio_write_begin(inode,
folio, pos, len);
if (!err)
return 0;
if (err == -EAGAIN) {
f2fs_folio_put(folio, true);
goto repeat;
}
goto put_folio;
}

Thanks,