On Mon, Jan 18, 2021 at 07:13:38PM +0100, Christoph Hellwig wrote:
On Thu, Jan 14, 2021 at 07:47:06PM +0000, Matthew Wilcox (Oracle) wrote:
quoted
It's often inconvenient to use BIO_MAX_PAGES due to min() requiring the
sign to be the same. Introduce bio_limit() and change BIO_MAX_PAGES to
be unsigned to make it easier for the users.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
I like the helper, but I'm not too happy with the naming. Why not
something like bio_guess_nr_segs() or similar?
This feels like it's a comment on an entirely different patch, like this one:
https://git.infradead.org/users/willy/pagecache.git/commitdiff/fe9841debe24e15100359acadd0b561bbb2dceb1
bio_limit() doesn't guess anything, it just clamps the argument to
BIO_MAX_PAGES (which is itself misnamed; it's BIO_MAX_SEGS now)