Changeset View
Changeset View
Standalone View
Standalone View
sys/geom/eli/g_eli.c
Show First 20 Lines • Show All 423 Lines • ▼ Show 20 Lines | g_eli_start(struct bio *bp) | ||||
G_ELI_LOGREQ(2, bp, "Request received."); | G_ELI_LOGREQ(2, 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_GETATTR: | case BIO_GETATTR: | ||||
case BIO_FLUSH: | case BIO_FLUSH: | ||||
case BIO_ZONE: | case BIO_ZONE: | ||||
case BIO_SPEEDUP: | |||||
break; | break; | ||||
case BIO_DELETE: | case BIO_DELETE: | ||||
/* | /* | ||||
* If the user hasn't set the NODELETE flag, we just pass | * If the user hasn't set the NODELETE flag, we just pass | ||||
* it down the stack and let the layers beneath us do (or | * it down the stack and let the layers beneath us do (or | ||||
* not) whatever they do with it. If they have, we | * not) whatever they do with it. If they have, we | ||||
* reject it. A possible extension would be an | * reject it. A possible extension would be an | ||||
* additional flag to take it as a hint to shred the data | * additional flag to take it as a hint to shred the data | ||||
Show All 23 Lines | case BIO_WRITE: | ||||
mtx_lock(&sc->sc_queue_mtx); | mtx_lock(&sc->sc_queue_mtx); | ||||
bioq_insert_tail(&sc->sc_queue, bp); | bioq_insert_tail(&sc->sc_queue, bp); | ||||
mtx_unlock(&sc->sc_queue_mtx); | mtx_unlock(&sc->sc_queue_mtx); | ||||
wakeup(sc); | wakeup(sc); | ||||
break; | break; | ||||
case BIO_GETATTR: | case BIO_GETATTR: | ||||
case BIO_FLUSH: | case BIO_FLUSH: | ||||
case BIO_DELETE: | case BIO_DELETE: | ||||
case BIO_SPEEDUP: | |||||
case BIO_ZONE: | case BIO_ZONE: | ||||
if (bp->bio_cmd == BIO_GETATTR) | if (bp->bio_cmd == BIO_GETATTR) | ||||
cbp->bio_done = g_eli_getattr_done; | cbp->bio_done = g_eli_getattr_done; | ||||
else | else | ||||
cbp->bio_done = g_std_done; | cbp->bio_done = g_std_done; | ||||
cp = LIST_FIRST(&sc->sc_geom->consumer); | cp = LIST_FIRST(&sc->sc_geom->consumer); | ||||
cbp->bio_to = cp->provider; | cbp->bio_to = cp->provider; | ||||
G_ELI_LOGREQ(2, cbp, "Sending request."); | G_ELI_LOGREQ(2, cbp, "Sending request."); | ||||
▲ Show 20 Lines • Show All 961 Lines • Show Last 20 Lines |