From 636f0ba5847226c6d49e8a64eff4c6f88496a91e Mon Sep 17 00:00:00 2001 From: pjd Date: Fri, 6 Aug 2004 09:55:40 +0000 Subject: Fix I/O leakage. We're cloning bios in g_stripe_start_fast(), but when something goes wrong while running in "fast" mode, we free all bios and falling back to "economic" mode. Freeing bios, doesn't mean decrease bio_children, so bio_inbed couldn't be equal to bio_children and request was never finished. Decrease bio_children manually when destroying bios. Reported by: Sam Lawrance , simon --- sys/geom/stripe/g_stripe.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys/geom/stripe') diff --git a/sys/geom/stripe/g_stripe.c b/sys/geom/stripe/g_stripe.c index 705a860..2c9a509 100644 --- a/sys/geom/stripe/g_stripe.c +++ b/sys/geom/stripe/g_stripe.c @@ -424,6 +424,7 @@ failure: cbp->bio_data = cbp->bio_driver1; cbp->bio_driver1 = NULL; } + bp->bio_children--; g_destroy_bio(cbp); } return (error); @@ -506,6 +507,7 @@ g_stripe_start_economic(struct bio *bp, u_int no, off_t offset, off_t length) failure: while ((cbp = TAILQ_FIRST(&queue)) != NULL) { TAILQ_REMOVE(&queue, cbp, bio_queue); + bp->bio_children--; g_destroy_bio(cbp); } return (error); -- cgit v1.1