summaryrefslogtreecommitdiffstats
path: root/sys/geom/raid3
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2006-09-13 15:46:49 +0000
committerpjd <pjd@FreeBSD.org>2006-09-13 15:46:49 +0000
commit610c4b7a06839408e191a0502cbd5e9a3357a8af (patch)
tree716fe2f1c1a0cb0ccbef2320982f12bf2a940677 /sys/geom/raid3
parent2264a48ff4da64139e4fd6ce900614f9c2e863a1 (diff)
downloadFreeBSD-src-610c4b7a06839408e191a0502cbd5e9a3357a8af.zip
FreeBSD-src-610c4b7a06839408e191a0502cbd5e9a3357a8af.tar.gz
Fix synchronization in gmirror and graid3 which I broken. Synchronization
request can still have bio_to set to sc_provider (this is READ part of a synchronization request) and in this case g_{mirror,raid3}_sync() wasn't called as it should be. MFC after: 1 week
Diffstat (limited to 'sys/geom/raid3')
-rw-r--r--sys/geom/raid3/g_raid3.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/geom/raid3/g_raid3.c b/sys/geom/raid3/g_raid3.c
index 23e2f1b..1f0b697 100644
--- a/sys/geom/raid3/g_raid3.c
+++ b/sys/geom/raid3/g_raid3.c
@@ -2061,11 +2061,14 @@ process:
bioq_remove(&sc->sc_queue, bp);
mtx_unlock(&sc->sc_queue_mtx);
- if (bp->bio_to != sc->sc_provider) {
+ if (bp->bio_from->geom == sc->sc_sync.ds_geom &&
+ (bp->bio_cflags & G_RAID3_BIO_CFLAG_SYNC) != 0) {
+ g_raid3_sync_request(bp); /* READ */
+ } else if (bp->bio_to != sc->sc_provider) {
if ((bp->bio_cflags & G_RAID3_BIO_CFLAG_REGULAR) != 0)
g_raid3_regular_request(bp);
else if ((bp->bio_cflags & G_RAID3_BIO_CFLAG_SYNC) != 0)
- g_raid3_sync_request(bp);
+ g_raid3_sync_request(bp); /* WRITE */
else {
KASSERT(0,
("Invalid request cflags=0x%hhx to=%s.",
OpenPOWER on IntegriCloud