Re: [dm-devel] [PATCH v10 1/8] block: Generalized bio pool freeing

2012-09-18 Thread Alasdair G Kergon
On Mon, Sep 17, 2012 at 01:51:39PM -0700, Kent Overstreet wrote: > That isn't a very good patch - it says it's clearing bi_end_io as a > precaution, but as a precaution to what? As a precaution against the endio function being called an extra time by mistake if a stray reference remains after

Re: [dm-devel] [PATCH v10 1/8] block: Generalized bio pool freeing

2012-09-18 Thread Alasdair G Kergon
On Mon, Sep 17, 2012 at 01:51:39PM -0700, Kent Overstreet wrote: That isn't a very good patch - it says it's clearing bi_end_io as a precaution, but as a precaution to what? As a precaution against the endio function being called an extra time by mistake if a stray reference remains after the

Re: [dm-devel] [PATCH v10 1/8] block: Generalized bio pool freeing

2012-09-17 Thread Kent Overstreet
On Fri, Sep 14, 2012 at 07:28:28PM +0100, Alasdair G Kergon wrote: > On Thu, Sep 06, 2012 at 03:34:55PM -0700, Kent Overstreet wrote: > > With the old code, when you allocate a bio from a bio pool you have to > > implement your own destructor that knows how to find the bio pool the > > bio was

Re: [dm-devel] [PATCH v10 1/8] block: Generalized bio pool freeing

2012-09-17 Thread Kent Overstreet
On Fri, Sep 14, 2012 at 07:28:28PM +0100, Alasdair G Kergon wrote: On Thu, Sep 06, 2012 at 03:34:55PM -0700, Kent Overstreet wrote: With the old code, when you allocate a bio from a bio pool you have to implement your own destructor that knows how to find the bio pool the bio was originally

Re: [dm-devel] [PATCH v10 1/8] block: Generalized bio pool freeing

2012-09-14 Thread Alasdair G Kergon
On Thu, Sep 06, 2012 at 03:34:55PM -0700, Kent Overstreet wrote: > With the old code, when you allocate a bio from a bio pool you have to > implement your own destructor that knows how to find the bio pool the > bio was originally allocated from. > This adds a new field to struct bio (bi_pool) and

Re: [dm-devel] [PATCH v10 1/8] block: Generalized bio pool freeing

2012-09-14 Thread Alasdair G Kergon
On Thu, Sep 06, 2012 at 03:34:55PM -0700, Kent Overstreet wrote: > With the old code, when you allocate a bio from a bio pool you have to > implement your own destructor that knows how to find the bio pool the > bio was originally allocated from. > > This adds a new field to struct bio (bi_pool)

Re: [dm-devel] [PATCH v10 1/8] block: Generalized bio pool freeing

2012-09-14 Thread Alasdair G Kergon
On Thu, Sep 06, 2012 at 03:34:55PM -0700, Kent Overstreet wrote: With the old code, when you allocate a bio from a bio pool you have to implement your own destructor that knows how to find the bio pool the bio was originally allocated from. This adds a new field to struct bio (bi_pool) and

Re: [dm-devel] [PATCH v10 1/8] block: Generalized bio pool freeing

2012-09-14 Thread Alasdair G Kergon
On Thu, Sep 06, 2012 at 03:34:55PM -0700, Kent Overstreet wrote: With the old code, when you allocate a bio from a bio pool you have to implement your own destructor that knows how to find the bio pool the bio was originally allocated from. This adds a new field to struct bio (bi_pool) and

[PATCH v10 1/8] block: Generalized bio pool freeing

2012-09-06 Thread Kent Overstreet
With the old code, when you allocate a bio from a bio pool you have to implement your own destructor that knows how to find the bio pool the bio was originally allocated from. This adds a new field to struct bio (bi_pool) and changes bio_alloc_bioset() to use it. This makes various bio

[PATCH v10 1/8] block: Generalized bio pool freeing

2012-09-06 Thread Kent Overstreet
With the old code, when you allocate a bio from a bio pool you have to implement your own destructor that knows how to find the bio pool the bio was originally allocated from. This adds a new field to struct bio (bi_pool) and changes bio_alloc_bioset() to use it. This makes various bio