All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: linux-block@vger.kernel.org
Cc: Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>
Subject: bio_add_folio argument order
Date: Wed, 28 Apr 2021 17:50:44 +0100	[thread overview]
Message-ID: <20210428165044.GB1847222@casper.infradead.org> (raw)

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?

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

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-28 16:50 Matthew Wilcox [this message]
2021-04-28 16:58 ` bio_add_folio argument order Jens Axboe
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=20210428165044.GB1847222@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.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.