On 5/27/26 20:06, Wenjie Qi wrote: > A partial atomic write reserves a block in the COW inode before reading the > original data page for the untouched bytes in that page. > > If that read fails, write_begin returns an error but leaves the COW inode > entry as NEW_ADDR. A retry of the same partial write then finds the COW > entry, treats it as existing COW data, and f2fs_write_begin() zeroes the > whole folio because blkaddr is NEW_ADDR. > > If the retry is committed, the bytes outside the retried write range are > committed as zeroes instead of preserving the original file contents. > > Only use the COW inode as the read source when it already has a real data > block. If the COW entry is still NEW_ADDR, treat it as a reservation to > reuse: keep reading the old data from the original inode and avoid > reserving or accounting the same atomic block again. >
Cc: [email protected] > Fixes: 3db1de0e582c ("f2fs: change the current atomic write way") > Signed-off-by: Wenjie Qi <[email protected]> Reviewed-by: Chao Yu <[email protected]> Thanks, _______________________________________________ Linux-f2fs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
