Re: [PATCH v4 2/2] mm/page_io: rename swap_iocb->pages to swap_iocb->bvecs

David Hildenbrand (Arm)
2026-04-02T07:15:44Z

On 4/2/26 08:14, David Carlier wrote:
> swap_iocb->pages tracks the number of bvec entries (folios), not base
> pages. Rename it to bvecs to accurately reflect its purpose.
>
> Suggested-by: Matthew Wilcox (Oracle) <willy@infradead.org>
> Signed-off-by: David Carlier <devnexen@gmail.com>
> ---
> mm/page_io.c | 30 +++++++++++++++---------------
> 1 file changed, 15 insertions(+), 15 deletions(-)
>
> diff --git a/mm/page_io.c b/mm/page_io.c
> index 1389cd57ca88..e524cb821d04 100644
> --- a/mm/page_io.c
> +++ b/mm/page_io.c
> @@ -327,7 +327,7 @@ static void bio_associate_blkg_from_page(struct bio *bio, struct folio *folio)
> struct swap_iocb {
> struct kiocb iocb;
> struct bio_vec bvec[SWAP_CLUSTER_MAX];
> - int pages;
> + int bvecs;

bvec (an array of bvecs) vs bvecs. Hm.

Wouldn't it be cleaner to have

struct bio_vec bvecs[SWAP_CLUSTER_MAX];
int nr_bvecs;

?

--
Cheers,

David