Re: [PATCH 1/6] block: add a bio_reuse helper

2018-06-13 Thread Kent Overstreet
On Wed, Jun 13, 2018 at 03:59:15PM +0200, Christoph Hellwig wrote: > On Wed, Jun 13, 2018 at 04:54:41AM -0400, Kent Overstreet wrote: > > bi_size is not immutable though, it will usually be modified by drivers > > when you > > submit a bio. > > > > I see what you're trying to do, but your

[PATCH 1/6] block: add a bio_reuse helper

2018-06-13 Thread Christoph Hellwig
This abstracts out a way to reuse a bio without destroying the bio vectors containing the data. Signed-off-by: Christoph Hellwig --- block/bio.c | 19 +++ include/linux/bio.h | 1 + 2 files changed, 20 insertions(+) diff --git a/block/bio.c b/block/bio.c index

Re: [PATCH 1/6] block: add a bio_reuse helper

2018-06-13 Thread Christoph Hellwig
On Wed, Jun 13, 2018 at 04:54:41AM -0400, Kent Overstreet wrote: > bi_size is not immutable though, it will usually be modified by drivers when > you > submit a bio. > > I see what you're trying to do, but your approach is busted given the way the > block layer works today. You'd have to save

Re: [PATCH 1/6] block: add a bio_reuse helper

2018-06-13 Thread Kent Overstreet
On Wed, Jun 13, 2018 at 09:32:04AM +0200, Christoph Hellwig wrote: > On Tue, Jun 12, 2018 at 02:16:30AM -0400, Kent Overstreet wrote: > > On Mon, Jun 11, 2018 at 09:48:01PM +0200, Christoph Hellwig wrote: > > > This abstracts out a way to reuse a bio without destroying the > > > data pointers. > >

Re: [PATCH 1/6] block: add a bio_reuse helper

2018-06-13 Thread Christoph Hellwig
On Tue, Jun 12, 2018 at 02:16:30AM -0400, Kent Overstreet wrote: > On Mon, Jun 11, 2018 at 09:48:01PM +0200, Christoph Hellwig wrote: > > This abstracts out a way to reuse a bio without destroying the > > data pointers. > > What is the point of this? What "data pointers" does it not destroy? It

Re: [PATCH 1/6] block: add a bio_reuse helper

2018-06-12 Thread Kent Overstreet
On Mon, Jun 11, 2018 at 09:48:01PM +0200, Christoph Hellwig wrote: > This abstracts out a way to reuse a bio without destroying the > data pointers. What is the point of this? What "data pointers" does it not destroy? > > Signed-off-by: Christoph Hellwig > --- > block/bio.c | 20

[PATCH 1/6] block: add a bio_reuse helper

2018-06-11 Thread Christoph Hellwig
This abstracts out a way to reuse a bio without destroying the data pointers. Signed-off-by: Christoph Hellwig --- block/bio.c | 20 include/linux/bio.h | 1 + 2 files changed, 21 insertions(+) diff --git a/block/bio.c b/block/bio.c index