Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F103539058
D9463.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D9463.diff
View Options
Index: head/sys/geom/mirror/g_mirror.h
===================================================================
--- head/sys/geom/mirror/g_mirror.h
+++ head/sys/geom/mirror/g_mirror.h
@@ -169,9 +169,11 @@
#define G_MIRROR_TYPE_AUTOMATIC 1
/* Bump syncid on first write. */
-#define G_MIRROR_BUMP_SYNCID 0x1
+#define G_MIRROR_BUMP_SYNCID 0x1
/* Bump genid immediately. */
-#define G_MIRROR_BUMP_GENID 0x2
+#define G_MIRROR_BUMP_GENID 0x2
+/* Bump syncid immediately. */
+#define G_MIRROR_BUMP_SYNCID_NOW 0x4
struct g_mirror_softc {
u_int sc_type; /* Device type (manual/automatic). */
u_int sc_state; /* Device state. */
Index: head/sys/geom/mirror/g_mirror.c
===================================================================
--- head/sys/geom/mirror/g_mirror.c
+++ head/sys/geom/mirror/g_mirror.c
@@ -982,7 +982,13 @@
if (g_mirror_disconnect_on_failure &&
g_mirror_ndisks(sc, G_MIRROR_DISK_STATE_ACTIVE) > 1)
{
- sc->sc_bump_id |= G_MIRROR_BUMP_GENID;
+ if (bp->bio_error == ENXIO &&
+ bp->bio_cmd == BIO_READ)
+ sc->sc_bump_id |= G_MIRROR_BUMP_SYNCID;
+ else if (bp->bio_error == ENXIO)
+ sc->sc_bump_id |= G_MIRROR_BUMP_SYNCID_NOW;
+ else
+ sc->sc_bump_id |= G_MIRROR_BUMP_GENID;
g_mirror_event_send(disk,
G_MIRROR_DISK_STATE_DISCONNECTED,
G_MIRROR_EVENT_DONTWAIT);
@@ -2517,6 +2523,10 @@
if ((sc->sc_bump_id & G_MIRROR_BUMP_GENID) != 0) {
sc->sc_bump_id &= ~G_MIRROR_BUMP_GENID;
g_mirror_bump_genid(sc);
+ }
+ if ((sc->sc_bump_id & G_MIRROR_BUMP_SYNCID_NOW) != 0) {
+ sc->sc_bump_id &= ~G_MIRROR_BUMP_SYNCID_NOW;
+ g_mirror_bump_syncid(sc);
}
break;
default:
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 27, 6:31 AM (21 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14880296
Default Alt Text
D9463.diff (1 KB)
Attached To
Mode
D9463: gmirror: treat ENXIO as disk disconnect, not media error
Attached
Detach File
Event Timeline
Log In to Comment