Re: [PATCH v2 12/13] ext4: add large folios support for moving extents
From: Jan Kara
Date: Wed Oct 08 2025 - 08:54:09 EST
On Thu 25-09-25 17:26:08, Zhang Yi wrote:
> From: Zhang Yi <yi.zhang@xxxxxxxxxx>
>
> Pass the moving extent length into mext_folio_double_lock() so that it
> can acquire a higher-order folio if the length exceeds PAGE_SIZE. This
> can speed up extent moving when the extent is larger than one page.
> Additionally, remove the unnecessary comments from
> mext_folio_double_lock().
>
> Signed-off-by: Zhang Yi <yi.zhang@xxxxxxxxxx>
One nit below, otherwise feel free to add:
Reviewed-by: Jan Kara <jack@xxxxxxx>
> @@ -214,7 +206,8 @@ static int mext_move_begin(struct mext_data *mext, struct folio *folio[2],
> orig_pos = ((loff_t)mext->orig_map.m_lblk) << blkbits;
> donor_pos = ((loff_t)mext->donor_lblk) << blkbits;
> ret = mext_folio_double_lock(orig_inode, donor_inode,
> - orig_pos >> PAGE_SHIFT, donor_pos >> PAGE_SHIFT, folio);
> + orig_pos >> PAGE_SHIFT, donor_pos >> PAGE_SHIFT,
> + mext->orig_map.m_len << blkbits, folio);
^^^ This is just cosmetical but we should cast to
size_t before the shift...
Honza
--
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR