[dm-devel] [PATCH v8 3/8] dm: Use bioset's front_pad for dm_rq_clone_bio_info

Kent Overstreet koverstreet at google.com
Thu Sep 6 22:28:49 UTC 2012


On Thu, Sep 06, 2012 at 12:21:15PM +0900, Jun'ichi Nomura wrote:
> On 09/06/12 05:27, Kent Overstreet wrote:
> > @@ -2718,7 +2705,8 @@ struct dm_md_mempools *dm_alloc_md_mempools(unsigned type, unsigned integrity)
> >  	if (!pools->tio_pool)
> >  		goto free_io_pool_and_out;
> >  
> > -	pools->bs = bioset_create(pool_size, 0);
> > +	pools->bs = bioset_create(pool_size,
> > +				  offsetof(struct dm_rq_clone_bio_info, clone));
> >  	if (!pools->bs)
> >  		goto free_tio_pool_and_out;
> 
> frontpad is not necessary if type is DM_TYPE_BIO_BASED.
> 
> Other pool creation in that function do something like:
> 	pools->bs = (type == DM_TYPE_BIO_BASED) ?
> 		    bioset_create(pool_size, 0) :
> 		    bioset_create(pool_size, offsetof(struct dm_rq_clone_bio_info, clone));
> 

Eh, it doesn't really matter considering it's two pointers of padding
and struct bio + the inline vecs are something like 200 bytes, but I can
do it if it makes you happy. Can I get someone's acked-by?




More information about the dm-devel mailing list