Re: [PATCH 01/33] block: add a lower-level bio_add_page interface

2018-05-16 Thread Ritesh Harjani
On 5/16/2018 11:35 PM, Christoph Hellwig wrote: On Wed, May 16, 2018 at 10:36:14AM +0530, Ritesh Harjani wrote: 1. if bio_full is true that means no space in bio->bio_io_vec[] no? Than how come we are still proceeding ahead with only warning? While originally in bio_add_page we used to return

Re: [PATCH 01/33] block: add a lower-level bio_add_page interface

2018-05-16 Thread Christoph Hellwig
On Wed, May 16, 2018 at 10:36:14AM +0530, Ritesh Harjani wrote: > 1. if bio_full is true that means no space in bio->bio_io_vec[] no? > Than how come we are still proceeding ahead with only warning? > While originally in bio_add_page we used to return after checking > bio_full. Callers can still

Re: [PATCH 01/33] block: add a lower-level bio_add_page interface

2018-05-15 Thread Ritesh Harjani
On 5/9/2018 1:17 PM, Christoph Hellwig wrote: For the upcoming removal of buffer heads in XFS we need to keep track of the number of outstanding writeback requests per page. For this we need to know if bio_add_page merged a region with the previous bvec or not. Instead of adding additional

Re: [PATCH 01/33] block: add a lower-level bio_add_page interface

2018-05-15 Thread Jens Axboe
On 5/11/18 12:29 AM, Christoph Hellwig wrote: > On Thu, May 10, 2018 at 03:49:53PM -0600, Andreas Dilger wrote: >> Would it make sense to change the bio_add_page() and bio_add_pc_page() >> to use the more common convention instead of continuing the spread of >> this non-standard calling

Re: [PATCH 01/33] block: add a lower-level bio_add_page interface

2018-05-11 Thread Christoph Hellwig
On Thu, May 10, 2018 at 03:49:53PM -0600, Andreas Dilger wrote: > Would it make sense to change the bio_add_page() and bio_add_pc_page() > to use the more common convention instead of continuing the spread of > this non-standard calling convention? This is doubly problematic since > "off" and

Re: [PATCH 01/33] block: add a lower-level bio_add_page interface

2018-05-11 Thread Christoph Hellwig
On Thu, May 10, 2018 at 04:52:00PM +0800, Ming Lei wrote: > On Wed, May 9, 2018 at 3:47 PM, Christoph Hellwig wrote: > > For the upcoming removal of buffer heads in XFS we need to keep track of > > the number of outstanding writeback requests per page. For this we need > > to know

Re: [PATCH 01/33] block: add a lower-level bio_add_page interface

2018-05-10 Thread Andreas Dilger
On May 10, 2018, at 12:40 AM, Christoph Hellwig wrote: > > On Wed, May 09, 2018 at 08:12:43AM -0700, Matthew Wilcox wrote: >> (page, len, off) is a bit weird to me. Usually we do (page, off, len). > > That's what I'd usually do, too. But this odd convention is what > bio_add_page

Re: [PATCH 01/33] block: add a lower-level bio_add_page interface

2018-05-10 Thread Ming Lei
On Wed, May 9, 2018 at 3:47 PM, Christoph Hellwig wrote: > For the upcoming removal of buffer heads in XFS we need to keep track of > the number of outstanding writeback requests per page. For this we need > to know if bio_add_page merged a region with the previous bvec or not. >

Re: [PATCH 01/33] block: add a lower-level bio_add_page interface

2018-05-10 Thread Christoph Hellwig
On Wed, May 09, 2018 at 08:12:43AM -0700, Matthew Wilcox wrote: > (page, len, off) is a bit weird to me. Usually we do (page, off, len). That's what I'd usually do, too. But this odd convention is what bio_add_page uses, so I decided to stick to that instead of having two different conventions

Re: [PATCH 01/33] block: add a lower-level bio_add_page interface

2018-05-09 Thread Matthew Wilcox
On Wed, May 09, 2018 at 09:47:58AM +0200, Christoph Hellwig wrote: > +/** > + * __bio_try_merge_page - try adding data to an existing bvec > + * @bio: destination bio > + * @page: page to add > + * @len: length of the range to add > + * @off: offset into @page > + * > + * Try adding the data

[PATCH 01/33] block: add a lower-level bio_add_page interface

2018-05-09 Thread Christoph Hellwig
For the upcoming removal of buffer heads in XFS we need to keep track of the number of outstanding writeback requests per page. For this we need to know if bio_add_page merged a region with the previous bvec or not. Instead of adding additional arguments this refactors bio_add_page to be