Re: [PATCH 01/23] block: factor out a bvec_set_page helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 30, 2023 at 11:36 AM Christoph Hellwig <hch@xxxxxx> wrote:
>
> On Mon, Jan 30, 2023 at 10:33:36AM +0000, David Howells wrote:
> > Christoph Hellwig <hch@xxxxxx> wrote:
> >
> > > +static inline void bvec_set_page(struct bio_vec *bv, struct page *page,
> > > +           unsigned int len, unsigned int offset)
> >
> > Could you swap len and offset around?  It reads better offset first.  You move
> > offset into the page and then do something with len bytes.
>
> This matches bio_add_page and the order inside bio_vec itself.  willy
> wanted to switch it around for bio_add_folio but Jens didn't like it,
> so I'll stick to the current convention in this area as well.

This also matches sg_set_page() so sticking to the current convention
is definitely a good idea!

Thanks,

                Ilya




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux