Re: [PATCH 1/9] block: Make generic_make_request handle arbitrary sized bios

2014-03-02 Thread Muthu Kumar
Never mind... The following code covers it: + if (split) { + bio_chain(split, *bio); + generic_make_request(*bio); + *bio = split; + } My other question is, can we avoid calling the queue_split from individual drivers make_request()? Can

Re: [PATCH 1/9] block: Make generic_make_request handle arbitrary sized bios

2014-03-02 Thread Muthu Kumar
Kent, The blk_queue_split(), splits a bio into at most two bios right? So, if the original bio spans larger space than two bios can cover (restriction by the lower driver in the stack), this might not work? Am I reading it incorrectly? Thanks! Regards, Muthu On Wed, Feb 26, 2014 at 3:39 PM,

Re: [PATCH 1/9] block: Make generic_make_request handle arbitrary sized bios

2014-03-02 Thread Muthu Kumar
Kent, The blk_queue_split(), splits a bio into at most two bios right? So, if the original bio spans larger space than two bios can cover (restriction by the lower driver in the stack), this might not work? Am I reading it incorrectly? Thanks! Regards, Muthu On Wed, Feb 26, 2014 at 3:39 PM,

Re: [PATCH 1/9] block: Make generic_make_request handle arbitrary sized bios

2014-03-02 Thread Muthu Kumar
Never mind... The following code covers it: + if (split) { + bio_chain(split, *bio); + generic_make_request(*bio); + *bio = split; + } My other question is, can we avoid calling the queue_split from individual drivers make_request()? Can

Re: [PATCH 1/9] block: Make generic_make_request handle arbitrary sized bios

2014-03-01 Thread Keith Busch
On Fri, 28 Feb 2014, Kent Overstreet wrote: On Thu, Feb 27, 2014 at 12:22:54PM -0500, Matthew Wilcox wrote: On Wed, Feb 26, 2014 at 03:39:49PM -0800, Kent Overstreet wrote: We do this by adding calls to blk_queue_split() to the various make_request functions that need it - a few can already

Re: [PATCH 1/9] block: Make generic_make_request handle arbitrary sized bios

2014-03-01 Thread Keith Busch
On Fri, 28 Feb 2014, Kent Overstreet wrote: On Thu, Feb 27, 2014 at 12:22:54PM -0500, Matthew Wilcox wrote: On Wed, Feb 26, 2014 at 03:39:49PM -0800, Kent Overstreet wrote: We do this by adding calls to blk_queue_split() to the various make_request functions that need it - a few can already

Re: [PATCH 1/9] block: Make generic_make_request handle arbitrary sized bios

2014-02-28 Thread Kent Overstreet
On Thu, Feb 27, 2014 at 12:22:54PM -0500, Matthew Wilcox wrote: > On Wed, Feb 26, 2014 at 03:39:49PM -0800, Kent Overstreet wrote: > > We do this by adding calls to blk_queue_split() to the various > > make_request functions that need it - a few can already handle arbitrary > > size bios. Note

Re: [PATCH 1/9] block: Make generic_make_request handle arbitrary sized bios

2014-02-28 Thread Kent Overstreet
On Thu, Feb 27, 2014 at 12:22:54PM -0500, Matthew Wilcox wrote: On Wed, Feb 26, 2014 at 03:39:49PM -0800, Kent Overstreet wrote: We do this by adding calls to blk_queue_split() to the various make_request functions that need it - a few can already handle arbitrary size bios. Note that we

Re: [PATCH 1/9] block: Make generic_make_request handle arbitrary sized bios

2014-02-27 Thread Kent Overstreet
On Thu, Feb 27, 2014 at 12:22:54PM -0500, Matthew Wilcox wrote: > On Wed, Feb 26, 2014 at 03:39:49PM -0800, Kent Overstreet wrote: > > We do this by adding calls to blk_queue_split() to the various > > make_request functions that need it - a few can already handle arbitrary > > size bios. Note

Re: [PATCH 1/9] block: Make generic_make_request handle arbitrary sized bios

2014-02-27 Thread Matthew Wilcox
On Wed, Feb 26, 2014 at 03:39:49PM -0800, Kent Overstreet wrote: > We do this by adding calls to blk_queue_split() to the various > make_request functions that need it - a few can already handle arbitrary > size bios. Note that we add the call _after_ any call to blk_queue_bounce(); > this means

Re: [PATCH 1/9] block: Make generic_make_request handle arbitrary sized bios

2014-02-27 Thread Matthew Wilcox
On Wed, Feb 26, 2014 at 03:39:49PM -0800, Kent Overstreet wrote: We do this by adding calls to blk_queue_split() to the various make_request functions that need it - a few can already handle arbitrary size bios. Note that we add the call _after_ any call to blk_queue_bounce(); this means that

Re: [PATCH 1/9] block: Make generic_make_request handle arbitrary sized bios

2014-02-27 Thread Kent Overstreet
On Thu, Feb 27, 2014 at 12:22:54PM -0500, Matthew Wilcox wrote: On Wed, Feb 26, 2014 at 03:39:49PM -0800, Kent Overstreet wrote: We do this by adding calls to blk_queue_split() to the various make_request functions that need it - a few can already handle arbitrary size bios. Note that we

[PATCH 1/9] block: Make generic_make_request handle arbitrary sized bios

2014-02-26 Thread Kent Overstreet
The way the block layer is currently written, it goes to great lengths to avoid having to split bios; upper layer code (such as bio_add_page()) checks what the underlying device can handle and tries to always create bios that don't need to be split. But this approach becomes unwieldy and

[PATCH 1/9] block: Make generic_make_request handle arbitrary sized bios

2014-02-26 Thread Kent Overstreet
The way the block layer is currently written, it goes to great lengths to avoid having to split bios; upper layer code (such as bio_add_page()) checks what the underlying device can handle and tries to always create bios that don't need to be split. But this approach becomes unwieldy and