Re: [PATCH v2 01/14] block: Generalized bio pool freeing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/24/2012 08:46 PM, Vivek Goyal wrote:

> On Wed, May 23, 2012 at 05:02:38PM -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 changes
>> bio_alloc_bioset() to use it. This makes various bio destructors
>> unnecessary, so they're then deleted.
>>
> 
> [..]
>> @@ -419,7 +406,11 @@ void bio_put(struct bio *bio)
>>  	 */
>>  	if (atomic_dec_and_test(&bio->bi_cnt)) {
>>  		bio->bi_next = NULL;
>> -		bio->bi_destructor(bio);
>> +
>> +		if (bio->bi_pool)
>> +			bio_free(bio, bio->bi_pool);
>> +		else
>> +			bio->bi_destructor(bio);
> 
> If you have removed all the users of bi_destructor, then I am wondering that
> why are we retaining this field and trying to call into it when bio_pool
> is not set?
> 


At this point there are still some users they are all removed and this field
later in the patchset

Boaz

> Thanks
> Vivek
> 


--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux