Re: [PATCH v5 05/12] block: Kill bi_destructor

2012-08-15 Thread Kent Overstreet
On Wed, Aug 08, 2012 at 11:34:09PM -0700, Tejun Heo wrote: > Hello, > > On Wed, Aug 8, 2012 at 11:12 PM, Kent Overstreet > wrote: > > But if it's a pointer to heap allocated memory, but the bio was embedded > > in another struct? I've seen a fair number of instances of that (md, off > > the top

Re: [PATCH v5 05/12] block: Kill bi_destructor

2012-08-08 Thread Tejun Heo
Hello, On Wed, Aug 8, 2012 at 11:12 PM, Kent Overstreet wrote: > But if it's a pointer to heap allocated memory, but the bio was embedded > in another struct? I've seen a fair number of instances of that (md, off > the top of my head). > > If you're sure that in a normal config the slab allocator

Re: [PATCH v5 05/12] block: Kill bi_destructor

2012-08-08 Thread Kent Overstreet
On Wed, Aug 08, 2012 at 11:05:17PM -0700, Tejun Heo wrote: > Hello, > > On Wed, Aug 08, 2012 at 05:21:54PM -0700, Kent Overstreet wrote: > > > What's wrong with good ol' NULL? > > > > If it's NULL, we can't distinguish between bios where that field wasn't > > set (i.e. bios that were statically a

Re: [PATCH v5 05/12] block: Kill bi_destructor

2012-08-08 Thread Tejun Heo
Hello, On Wed, Aug 08, 2012 at 05:21:54PM -0700, Kent Overstreet wrote: > > What's wrong with good ol' NULL? > > If it's NULL, we can't distinguish between bios where that field wasn't > set (i.e. bios that were statically allocated somewhere) from bios that > were allocated by bio_kmalloc(). >

Re: [PATCH v5 05/12] block: Kill bi_destructor

2012-08-08 Thread Kent Overstreet
On Wed, Aug 08, 2012 at 03:22:23PM -0700, Tejun Heo wrote: > Hello, > > On Mon, Aug 06, 2012 at 03:08:34PM -0700, Kent Overstreet wrote: > > Now that we've got generic code for freeing bios allocated from bio > > pools, this isn't needed anymore. > > > > This also changes the semantics of bio_fre

Re: [PATCH v5 05/12] block: Kill bi_destructor

2012-08-08 Thread Kent Overstreet
On Mon, Aug 06, 2012 at 11:19:21PM -0400, Mike Snitzer wrote: > On Mon, Aug 06 2012 at 6:08pm -0400, > Kent Overstreet wrote: > > > Now that we've got generic code for freeing bios allocated from bio > > pools, this isn't needed anymore. > > > > This also changes the semantics of bio_free() a b

Re: [PATCH v5 05/12] block: Kill bi_destructor

2012-08-08 Thread Tejun Heo
Hello, On Mon, Aug 06, 2012 at 03:08:34PM -0700, Kent Overstreet wrote: > Now that we've got generic code for freeing bios allocated from bio > pools, this isn't needed anymore. > > This also changes the semantics of bio_free() a bit - it now also frees > bios allocated by bio_kmalloc(). It's als

Re: [PATCH v5 05/12] block: Kill bi_destructor

2012-08-06 Thread Mike Snitzer
On Mon, Aug 06 2012 at 6:08pm -0400, Kent Overstreet wrote: > Now that we've got generic code for freeing bios allocated from bio > pools, this isn't needed anymore. > > This also changes the semantics of bio_free() a bit - it now also frees > bios allocated by bio_kmalloc(). It's also no longe

[PATCH v5 05/12] block: Kill bi_destructor

2012-08-06 Thread Kent Overstreet
Now that we've got generic code for freeing bios allocated from bio pools, this isn't needed anymore. This also changes the semantics of bio_free() a bit - it now also frees bios allocated by bio_kmalloc(). It's also no longer exported, as without bi_destructor there should be no need for it to be