Changeset View
Changeset View
Standalone View
Standalone View
sys/geom/concat/g_concat.c
Show First 20 Lines • Show All 273 Lines • ▼ Show 20 Lines | g_concat_done(struct bio *bp) | ||||
if (pbp->bio_children == pbp->bio_inbed) { | if (pbp->bio_children == pbp->bio_inbed) { | ||||
mtx_unlock(&sc->sc_lock); | mtx_unlock(&sc->sc_lock); | ||||
g_io_deliver(pbp, pbp->bio_error); | g_io_deliver(pbp, pbp->bio_error); | ||||
} else | } else | ||||
mtx_unlock(&sc->sc_lock); | mtx_unlock(&sc->sc_lock); | ||||
g_destroy_bio(bp); | g_destroy_bio(bp); | ||||
} | } | ||||
/* | |||||
* Called for both BIO_FLUSH and BIO_SPEEDUP. Just pass the call down | |||||
*/ | |||||
static void | static void | ||||
g_concat_flush(struct g_concat_softc *sc, struct bio *bp) | g_concat_passdown(struct g_concat_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 43 Lines • ▼ Show 20 Lines | g_concat_start(struct bio *bp) | ||||
G_CONCAT_LOGREQ(bp, "Request received."); | G_CONCAT_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_concat_flush(sc, bp); | g_concat_passdown(sc, bp); | ||||
return; | return; | ||||
case BIO_GETATTR: | case BIO_GETATTR: | ||||
if (strcmp("GEOM::kerneldump", bp->bio_attribute) == 0) { | if (strcmp("GEOM::kerneldump", bp->bio_attribute) == 0) { | ||||
g_concat_kernel_dump(bp); | g_concat_kernel_dump(bp); | ||||
return; | return; | ||||
} else if (strcmp("GEOM::candelete", bp->bio_attribute) == 0) { | } else if (strcmp("GEOM::candelete", bp->bio_attribute) == 0) { | ||||
g_concat_candelete(bp); | g_concat_candelete(bp); | ||||
return; | return; | ||||
▲ Show 20 Lines • Show All 678 Lines • Show Last 20 Lines |