Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Jul 2012 15:30:43 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r237929 - head/sys/geom/mirror
Message-ID:  <201207011530.q61FUhXS009687@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: glebius
Date: Sun Jul  1 15:30:43 2012
New Revision: 237929
URL: http://svn.freebsd.org/changeset/base/237929

Log:
  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

Modified:
  head/sys/geom/mirror/g_mirror.c

Modified: head/sys/geom/mirror/g_mirror.c
==============================================================================
--- head/sys/geom/mirror/g_mirror.c	Sun Jul  1 14:56:51 2012	(r237928)
+++ head/sys/geom/mirror/g_mirror.c	Sun Jul  1 15:30:43 2012	(r237929)
@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201207011530.q61FUhXS009687>