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
This commit is contained in:
Gleb Smirnoff 2012-07-01 15:30:43 +00:00
parent 593a9dc9b8
commit b0ae63ca25
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=237929

View File

@ -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);