Re: [dm-devel] [PATCH v10 8/8] block: Add bio_clone_bioset(), bio_clone_kmalloc()

2012-09-18 Thread Alasdair G Kergon
On Mon, Sep 17, 2012 at 01:42:27PM -0700, Kent Overstreet wrote: > Previously, it was open coding __bio_clone(), that's what the setting > bi_idx to 0 was from. With the change to bio_clone_bioset() that's no > longer necessary (and dangerous, since bi_idx needs to be consistent > with

Re: [dm-devel] [PATCH v10 8/8] block: Add bio_clone_bioset(), bio_clone_kmalloc()

2012-09-18 Thread Alasdair G Kergon
On Mon, Sep 17, 2012 at 01:42:27PM -0700, Kent Overstreet wrote: Previously, it was open coding __bio_clone(), that's what the setting bi_idx to 0 was from. With the change to bio_clone_bioset() that's no longer necessary (and dangerous, since bi_idx needs to be consistent with

Re: [dm-devel] [PATCH v10 8/8] block: Add bio_clone_bioset(), bio_clone_kmalloc()

2012-09-17 Thread Kent Overstreet
On Fri, Sep 14, 2012 at 10:50:59PM +0100, Alasdair G Kergon wrote: > On Thu, Sep 06, 2012 at 03:35:02PM -0700, Kent Overstreet wrote: > > Previously, there was bio_clone() but it only allocated from the fs bio > > set; as a result various users were open coding it and using > > __bio_clone(). > >

Re: [dm-devel] [PATCH v10 8/8] block: Add bio_clone_bioset(), bio_clone_kmalloc()

2012-09-17 Thread Kent Overstreet
On Fri, Sep 14, 2012 at 10:50:59PM +0100, Alasdair G Kergon wrote: On Thu, Sep 06, 2012 at 03:35:02PM -0700, Kent Overstreet wrote: Previously, there was bio_clone() but it only allocated from the fs bio set; as a result various users were open coding it and using __bio_clone(). Explain

Re: [dm-devel] [PATCH v10 8/8] block: Add bio_clone_bioset(), bio_clone_kmalloc()

2012-09-14 Thread Alasdair G Kergon
On Thu, Sep 06, 2012 at 03:35:02PM -0700, Kent Overstreet wrote: > Previously, there was bio_clone() but it only allocated from the fs bio > set; as a result various users were open coding it and using > __bio_clone(). Explain in the header the reasoning behind the change to dm-crypt so that it

Re: [dm-devel] [PATCH v10 8/8] block: Add bio_clone_bioset(), bio_clone_kmalloc()

2012-09-14 Thread Alasdair G Kergon
On Thu, Sep 06, 2012 at 03:35:02PM -0700, Kent Overstreet wrote: Previously, there was bio_clone() but it only allocated from the fs bio set; as a result various users were open coding it and using __bio_clone(). Explain in the header the reasoning behind the change to dm-crypt so that it no

Re: [PATCH v10 8/8] block: Add bio_clone_bioset(), bio_clone_kmalloc()

2012-09-06 Thread Tejun Heo
On Thu, Sep 06, 2012 at 03:35:02PM -0700, Kent Overstreet wrote: > Previously, there was bio_clone() but it only allocated from the fs bio > set; as a result various users were open coding it and using > __bio_clone(). > > This changes bio_clone() to become bio_clone_bioset(), and then we add >

[PATCH v10 8/8] block: Add bio_clone_bioset(), bio_clone_kmalloc()

2012-09-06 Thread Kent Overstreet
Previously, there was bio_clone() but it only allocated from the fs bio set; as a result various users were open coding it and using __bio_clone(). This changes bio_clone() to become bio_clone_bioset(), and then we add bio_clone() and bio_clone_kmalloc() as wrappers around it, making use of the

[PATCH v10 8/8] block: Add bio_clone_bioset(), bio_clone_kmalloc()

2012-09-06 Thread Kent Overstreet
Previously, there was bio_clone() but it only allocated from the fs bio set; as a result various users were open coding it and using __bio_clone(). This changes bio_clone() to become bio_clone_bioset(), and then we add bio_clone() and bio_clone_kmalloc() as wrappers around it, making use of the

Re: [PATCH v10 8/8] block: Add bio_clone_bioset(), bio_clone_kmalloc()

2012-09-06 Thread Tejun Heo
On Thu, Sep 06, 2012 at 03:35:02PM -0700, Kent Overstreet wrote: Previously, there was bio_clone() but it only allocated from the fs bio set; as a result various users were open coding it and using __bio_clone(). This changes bio_clone() to become bio_clone_bioset(), and then we add