summaryrefslogtreecommitdiffstats
path: root/sys/geom/stripe
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2004-08-06 09:55:40 +0000
committerpjd <pjd@FreeBSD.org>2004-08-06 09:55:40 +0000
commit636f0ba5847226c6d49e8a64eff4c6f88496a91e (patch)
tree20c263fdb6dfb635aee7955992126bc9a6ec35d9 /sys/geom/stripe
parente8cd4126007b2c8b25d70b20bb84145d16bc3ebb (diff)
downloadFreeBSD-src-636f0ba5847226c6d49e8a64eff4c6f88496a91e.zip
FreeBSD-src-636f0ba5847226c6d49e8a64eff4c6f88496a91e.tar.gz
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 <boris@brooknet.com.au>, simon
Diffstat (limited to 'sys/geom/stripe')
-rw-r--r--sys/geom/stripe/g_stripe.c2
1 files changed, 2 insertions, 0 deletions
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);
OpenPOWER on IntegriCloud