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

From: Jens Axboe
Date: Wed Jan 14 2009 - 09:53:35 EST


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().

--
Jens Axboe

--
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/