Page MenuHomeFreeBSD

D6908.id17737.diff
No OneTemporary

D6908.id17737.diff

Index: sys/geom/mirror/g_mirror.c
===================================================================
--- sys/geom/mirror/g_mirror.c
+++ sys/geom/mirror/g_mirror.c
@@ -2121,8 +2121,16 @@
g_topology_lock();
g_error_provider(sc->sc_provider, ENXIO);
mtx_lock(&sc->sc_queue_mtx);
- while ((bp = bioq_takefirst(&sc->sc_queue)) != NULL)
- g_io_deliver(bp, ENXIO);
+ while ((bp = bioq_takefirst(&sc->sc_queue)) != NULL) {
+ if (bp->bio_to == sc->sc_provider &&
+ bp->bio_from->geom != sc->sc_sync.ds_geom) {
+ g_io_deliver(bp, ENXIO);
+ } else {
+ if ((bp->bio_cflags & G_MIRROR_BIO_FLAG_SYNC) != 0)
+ free(bp->bio_data, M_MIRROR);
+ g_destroy_bio(bp);
+ }
+ }
mtx_unlock(&sc->sc_queue_mtx);
G_MIRROR_DEBUG(0, "Device %s: provider %s destroyed.", sc->sc_name,
sc->sc_provider->name);

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 11, 2:15 AM (3 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25133861
Default Alt Text
D6908.id17737.diff (812 B)

Event Timeline