Re: [PATCH v8 13/15] f2fs: handle block cloning within the same large folio

From: Chao Yu

Date: Wed Oct 28 2026 - 21:36:14 EST


On 10/28/26 23:44, Nanzhe Zhao wrote:
> From: Nanzhe Zhao <zhaonanzhe@xxxxxxxxxx>
>
> With large folios, the source and destination block in __clone_blkaddrs()
> can belong to the same folio during same-inode operations such as
> collapse range and insert range.
>
> In that case, locking the source folio and then looking up the
> destination folio can try to lock the same folio again. It also copies
> from and to offset 0, which is only correct for order-0 folios.
>
> Detect the same-inode, same-folio case before looking up the destination
> folio. Then in this case,we reserve the destination block explicitly.
>
> Signed-off-by: Nanzhe Zhao <zhaonanzhe@xxxxxxxxxx>
Reviewed-by: Chao Yu <chao@xxxxxxxxxx>

Thanks,