Changeset View
Changeset View
Standalone View
Standalone View
sys/geom/stripe/g_stripe.c
Show First 20 Lines • Show All 529 Lines • ▼ Show 20 Lines | while ((cbp = TAILQ_FIRST(&queue)) != NULL) { | ||||
TAILQ_REMOVE(&queue, cbp, bio_queue); | TAILQ_REMOVE(&queue, cbp, bio_queue); | ||||
bp->bio_children--; | bp->bio_children--; | ||||
g_destroy_bio(cbp); | g_destroy_bio(cbp); | ||||
} | } | ||||
return (error); | return (error); | ||||
} | } | ||||
static void | static void | ||||
g_stripe_flush(struct g_stripe_softc *sc, struct bio *bp) | g_stripe_pushdown(struct g_stripe_softc *sc, struct bio *bp) | ||||
{ | { | ||||
struct bio_queue_head queue; | struct bio_queue_head queue; | ||||
struct g_consumer *cp; | struct g_consumer *cp; | ||||
struct bio *cbp; | struct bio *cbp; | ||||
u_int no; | u_int no; | ||||
bioq_init(&queue); | bioq_init(&queue); | ||||
for (no = 0; no < sc->sc_ndisks; no++) { | for (no = 0; no < sc->sc_ndisks; no++) { | ||||
▲ Show 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | g_stripe_start(struct bio *bp) | ||||
G_STRIPE_LOGREQ(bp, "Request received."); | G_STRIPE_LOGREQ(bp, "Request received."); | ||||
switch (bp->bio_cmd) { | switch (bp->bio_cmd) { | ||||
case BIO_READ: | case BIO_READ: | ||||
case BIO_WRITE: | case BIO_WRITE: | ||||
case BIO_DELETE: | case BIO_DELETE: | ||||
break; | break; | ||||
case BIO_SPEEDUP: | |||||
case BIO_FLUSH: | case BIO_FLUSH: | ||||
g_stripe_flush(sc, bp); | g_stripe_pushdown(sc, bp); | ||||
return; | return; | ||||
case BIO_GETATTR: | case BIO_GETATTR: | ||||
/* To which provider it should be delivered? */ | /* To which provider it should be delivered? */ | ||||
default: | default: | ||||
g_io_deliver(bp, EOPNOTSUPP); | g_io_deliver(bp, EOPNOTSUPP); | ||||
return; | return; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 669 Lines • Show Last 20 Lines |