[PATCH] kill bio->bi_set

Jens:

->bi_set is totally unnecessary bloat of struct bio.  Just define a proper
destructor for the bio and it already knows what bio_set it belongs too.

Peter:

Fixed the bugs.

Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Peter Osterlund <petero2@telia.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Peter Osterlund
2005-09-06 15:16:42 -07:00
committed by Linus Torvalds
parent 6f00df24ee
commit 3676347a5e
4 changed files with 34 additions and 12 deletions

View File

@@ -399,6 +399,11 @@ struct clone_info {
unsigned short idx;
};
static void dm_bio_destructor(struct bio *bio)
{
bio_free(bio, dm_set);
}
/*
* Creates a little bio that is just does part of a bvec.
*/
@@ -410,6 +415,7 @@ static struct bio *split_bvec(struct bio *bio, sector_t sector,
struct bio_vec *bv = bio->bi_io_vec + idx;
clone = bio_alloc_bioset(GFP_NOIO, 1, dm_set);
clone->bi_destructor = dm_bio_destructor;
*clone->bi_io_vec = *bv;
clone->bi_sector = sector;