Re: [f2fs-dev] [PATCH v2 15/20] f2fs: support subpage blocks in atomic writes
From: Chao Yu
Date: Tue Nov 17 2026 - 06:39:45 EST
On 11/16/26 12:08, Daeho Jeong wrote:
> From: Daeho Jeong <daehojeong@xxxxxxxxxx>
>
> Writeback already writes dirty blocks to the COW inode per block. Make
> write_begin of atomic files reserve and read COW blocks per block as
> well, and remove the -EOPNOTSUPP checks. Skipping the read of the
> blocks that a write fully covers also applies to large folios when the
> block size equals PAGE_SIZE.
>
> Aborting atomic writes drops the page cache and restores i_size without
> i_gc_rwsem[WRITE] and invalidate_lock. With subpage blocks, a page fault
> in between can make a folio writable with only the blocks within the
> smaller i_size prepared, and a read can zero-fill the blocks beyond it
> and mark them uptodate, while they are inside the restored i_size. GC
> reads through the page cache as well once FI_ATOMIC_FILE is cleared, and
> then moves the zeroes. Hold both locks across it as
> f2fs_ioc_start_atomic_write() does, except at eviction, where no one
> else uses the inode.
>
> Signed-off-by: Daeho Jeong <daehojeong@xxxxxxxxxx>
Reviewed-by: Chao Yu <chao@xxxxxxxxxx>
Thanks,