summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/geom/mirror/g_mirror.c27
1 files changed, 9 insertions, 18 deletions
diff --git a/sys/geom/mirror/g_mirror.c b/sys/geom/mirror/g_mirror.c
index 2f17964..76f93e0 100644
--- a/sys/geom/mirror/g_mirror.c
+++ b/sys/geom/mirror/g_mirror.c
@@ -1238,29 +1238,20 @@ g_mirror_register_request(struct bio *bp)
return;
}
bioq_insert_tail(&queue, cbp);
- }
- LIST_FOREACH(disk, &sc->sc_disks, d_next) {
- switch (disk->d_state) {
- case G_MIRROR_DISK_STATE_ACTIVE:
- break;
- case G_MIRROR_DISK_STATE_SYNCHRONIZING:
- if (bp->bio_offset >= disk->d_sync.ds_offset)
- continue;
- break;
- default:
- continue;
- }
- cbp = bioq_first(&queue);
- KASSERT(cbp != NULL, ("NULL cbp! (device %s).",
- sc->sc_name));
- bioq_remove(&queue, cbp);
- cp = disk->d_consumer;
cbp->bio_done = g_mirror_done;
+ cp = disk->d_consumer;
+ cbp->bio_caller1 = cp;
cbp->bio_to = cp->provider;
- G_MIRROR_LOGREQ(3, cbp, "Sending request.");
KASSERT(cp->acw > 0 && cp->ace > 0,
("Consumer %s not opened (r%dw%de%d).",
cp->provider->name, cp->acr, cp->acw, cp->ace));
+ }
+ for (cbp = bioq_first(&queue); cbp != NULL;
+ cbp = bioq_first(&queue)) {
+ bioq_remove(&queue, cbp);
+ G_MIRROR_LOGREQ(3, cbp, "Sending request.");
+ cp = cbp->bio_caller1;
+ cbp->bio_caller1 = NULL;
g_io_request(cbp, cp);
}
/*
OpenPOWER on IntegriCloud