diff options
author | pjd <pjd@FreeBSD.org> | 2006-08-09 09:41:53 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2006-08-09 09:41:53 +0000 |
commit | b539048d28637b71f82e1b7ed24d755124c5b517 (patch) | |
tree | 5e1964f5bce70d934ccc5f5bf54c48594329943e /sys/geom/raid3 | |
parent | 2c46c25111df187d4bde90dc5e08843df8d53980 (diff) | |
download | FreeBSD-src-b539048d28637b71f82e1b7ed24d755124c5b517.zip FreeBSD-src-b539048d28637b71f82e1b7ed24d755124c5b517.tar.gz |
Not only a request from us can be passed to g_{mirror,raid3}_worker()
function, but also a request to us, in which case checking bio_cflags
is wrong, because the class above us is controling it, not we.
MFC after: 1 week
Diffstat (limited to 'sys/geom/raid3')
-rw-r--r-- | sys/geom/raid3/g_raid3.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/sys/geom/raid3/g_raid3.c b/sys/geom/raid3/g_raid3.c index 89f5686..177148b 100644 --- a/sys/geom/raid3/g_raid3.c +++ b/sys/geom/raid3/g_raid3.c @@ -2061,11 +2061,17 @@ process: bioq_remove(&sc->sc_queue, bp); mtx_unlock(&sc->sc_queue_mtx); - 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); - else if (g_raid3_register_request(bp) != 0) { + 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); + else { + KASSERT(0, + ("Invalid request cflags=0x%hhx to=%s.", + bp->bio_cflags, bp->bio_to->name)); + } + } else if (g_raid3_register_request(bp) != 0) { mtx_lock(&sc->sc_queue_mtx); bioq_insert_head(&sc->sc_queue, bp); /* |