Re: [PATCH v4 2/2] mm/page_io: rename swap_iocb->pages to swap_iocb->bvecs
From: David CARLIER
Date: Thu Apr 02 2026 - 03:26:12 EST
I went for it initially but I thought I saw bvecs in a message :) but
I do not mind it is just naming after all, let s go for it.
On Thu, 2 Apr 2026 at 08:15, David Hildenbrand (Arm) <david@xxxxxxxxxx> wrote:
>
> 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@xxxxxxxxxxxxx>
> > Signed-off-by: David Carlier <devnexen@xxxxxxxxx>
> > ---
> > 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