diff options
author | glebius <glebius@FreeBSD.org> | 2012-07-01 15:30:43 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2012-07-01 15:30:43 +0000 |
commit | 2c999b9f213cb3d7bd6cab0686c20ec839d2619f (patch) | |
tree | d5afcc173428add2477e8bf2d3a09b9f709c6b9d /sys | |
parent | 367b27495d340c51074f893f546f47eb7f32d51a (diff) | |
download | FreeBSD-src-2c999b9f213cb3d7bd6cab0686c20ec839d2619f.zip FreeBSD-src-2c999b9f213cb3d7bd6cab0686c20ec839d2619f.tar.gz |
In g_mirror_regular_request() upon successful delivery treat
BIO_DELETE requests same way as BIO_WRITE removing them from
queue. This fixes panic with BIO_DELETE operations on geom_mirror.
Reviewed by: pjd
Diffstat (limited to 'sys')
-rw-r--r-- | sys/geom/mirror/g_mirror.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/geom/mirror/g_mirror.c b/sys/geom/mirror/g_mirror.c index fc33db2..21efd81 100644 --- a/sys/geom/mirror/g_mirror.c +++ b/sys/geom/mirror/g_mirror.c @@ -891,7 +891,8 @@ g_mirror_regular_request(struct bio *bp) if (pbp->bio_children == pbp->bio_inbed) { G_MIRROR_LOGREQ(3, pbp, "Request delivered."); pbp->bio_completed = pbp->bio_length; - if (pbp->bio_cmd == BIO_WRITE) { + if (pbp->bio_cmd == BIO_WRITE || + pbp->bio_cmd == BIO_DELETE) { bioq_remove(&sc->sc_inflight, pbp); /* Release delayed sync requests if possible. */ g_mirror_sync_release(sc); |