All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Matthew Wilcox <willy@infradead.org>, linux-block@vger.kernel.org
Cc: Christoph Hellwig <hch@lst.de>
Subject: Re: bio_add_folio argument order
Date: Wed, 28 Apr 2021 10:58:44 -0600	[thread overview]
Message-ID: <7be8f00a-1444-d614-267f-1477289e4f62@kernel.dk> (raw)
In-Reply-To: <20210428165044.GB1847222@casper.infradead.org>

On 4/28/21 10:50 AM, Matthew Wilcox wrote:
> bio_add_page() has its arguments in the wrong order:
> 
> extern int bio_add_page(struct bio *, struct page *, unsigned int,unsigned int);
> 
> Oh, right, and the prototype commits the cardinal sin of just giving you
> a pair of unsigned ints and doesn't bother to tell you what they mean.
> I'll send a patch for that ... anyway:
> 
> int bio_add_page(struct bio *bio, struct page *page,
>                  unsigned int len, unsigned int offset)
> 
> This fails to follow #4: https://ozlabs.org/~rusty/index.cgi/tech/2008-03-30.html
> 
> Here's what I want to do for the folio equivalent:
> 
> size_t bio_add_folio(struct bio *bio, struct folio *folio, size_t off,
>                 size_t len)
> 
> This will make the transition more painful, but it does remove an irritant
> for the future.  Any objections?

What's the point in shuffling len and offset around?

-- 
Jens Axboe


  reply	other threads:[~2021-04-28 16:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-28 16:50 bio_add_folio argument order Matthew Wilcox
2021-04-28 16:58 ` Jens Axboe [this message]
2021-04-28 20:00   ` Matthew Wilcox
2021-04-28 20:08     ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7be8f00a-1444-d614-267f-1477289e4f62@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.