All of lore.kernel.org
 help / color / mirror / Atom feed
* bio_add_folio argument order
@ 2021-04-28 16:50 Matthew Wilcox
  2021-04-28 16:58 ` Jens Axboe
  0 siblings, 1 reply; 4+ messages in thread
From: Matthew Wilcox @ 2021-04-28 16:50 UTC (permalink / raw)
  To: linux-block; +Cc: Christoph Hellwig, Jens Axboe

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?

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-04-28 20:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-28 16:50 bio_add_folio argument order Matthew Wilcox
2021-04-28 16:58 ` Jens Axboe
2021-04-28 20:00   ` Matthew Wilcox
2021-04-28 20:08     ` Jens Axboe

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.