Re: [3/7] dst: export node.

From: Evgeniy Polyakov
Date: Wed Jan 14 2009 - 10:11:46 EST


On Wed, Jan 14, 2009 at 03:52:05PM +0100, Jens Axboe (jens.axboe@xxxxxxxxxx) wrote:
> On Wed, Jan 14 2009, Evgeniy Polyakov wrote:
> > + bio = bio_alloc_bioset(GFP_KERNEL,
> > + PAGE_ALIGN(cmd->size) >> PAGE_SHIFT,
> > + dst_bio_set);
> > + if (!bio)
> > + goto err_out_exit;
> > + bio->bi_private = NULL;
> > +
> > + priv = mempool_alloc(st->node->trans_pool, GFP_KERNEL);
> > + if (!priv)
> > + goto err_out_free;
>
> Did you know that you can now set the appropriate extra size for your
> private bio set, thus getting rid of this extra 'priv' allocation and
> free for each bio?
>
> See bioset_create().

Yes, that's a good idea, I will update the patch with that changes in
mind. Thanks Jens.

--
Evgeniy Polyakov
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/