Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148300717
D6908.id17774.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1019 B
Referenced Files
None
Subscribers
None
D6908.id17774.diff
View Options
Index: head/sys/geom/mirror/g_mirror.c
===================================================================
--- head/sys/geom/mirror/g_mirror.c
+++ head/sys/geom/mirror/g_mirror.c
@@ -2121,8 +2121,21 @@
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) {
+ /*
+ * Abort any pending I/O that wasn't generated by us.
+ * Synchronization requests and requests destined for individual
+ * mirror components can be destroyed immediately.
+ */
+ 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
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 18, 1:34 AM (3 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29867055
Default Alt Text
D6908.id17774.diff (1019 B)
Attached To
Mode
D6908: Don't deliver gmirror BIOs during provider teardown
Attached
Detach File
Event Timeline
Log In to Comment