Re: [PATCH v1 5/6] bio: add a helper calculating nr segments to alloc

2020-12-22 Thread Christoph Hellwig
The new helper needs a comment explaining the use case. Otherwise looks good: Reviewed-by: Christoph Hellwig

Re: [PATCH v1 5/6] bio: add a helper calculating nr segments to alloc

2020-12-14 Thread Dave Chinner
On Tue, Dec 15, 2020 at 12:00:23PM +1100, Dave Chinner wrote: > On Tue, Dec 15, 2020 at 12:20:24AM +, Pavel Begunkov wrote: > > A preparation patch. It adds a simple helper which abstracts out number > > of segments we're allocating for a bio from iov_iter_npages(). > > Preparation for what? b

Re: [PATCH v1 5/6] bio: add a helper calculating nr segments to alloc

2020-12-14 Thread Pavel Begunkov
On 15/12/2020 01:00, Dave Chinner wrote: > On Tue, Dec 15, 2020 at 12:20:24AM +, Pavel Begunkov wrote: >> A preparation patch. It adds a simple helper which abstracts out number >> of segments we're allocating for a bio from iov_iter_npages(). > > Preparation for what? bio_iov_vecs_to_alloc()

Re: [PATCH v1 5/6] bio: add a helper calculating nr segments to alloc

2020-12-14 Thread Dave Chinner
On Tue, Dec 15, 2020 at 12:20:24AM +, Pavel Begunkov wrote: > A preparation patch. It adds a simple helper which abstracts out number > of segments we're allocating for a bio from iov_iter_npages(). Preparation for what? bio_iov_vecs_to_alloc() doesn't seem to be used outside this specific pat

[PATCH v1 5/6] bio: add a helper calculating nr segments to alloc

2020-12-14 Thread Pavel Begunkov
A preparation patch. It adds a simple helper which abstracts out number of segments we're allocating for a bio from iov_iter_npages(). Signed-off-by: Pavel Begunkov --- fs/block_dev.c | 7 --- fs/iomap/direct-io.c | 9 - include/linux/bio.h | 6 ++ 3 files changed, 14 inse