Changeset View
Changeset View
Standalone View
Standalone View
sys/geom/eli/g_eli.c
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | |||||
#include <sys/eventhandler.h> | #include <sys/eventhandler.h> | ||||
#include <sys/kthread.h> | #include <sys/kthread.h> | ||||
#include <sys/proc.h> | #include <sys/proc.h> | ||||
#include <sys/sched.h> | #include <sys/sched.h> | ||||
#include <sys/smp.h> | #include <sys/smp.h> | ||||
#include <sys/uio.h> | #include <sys/uio.h> | ||||
#include <sys/vnode.h> | #include <sys/vnode.h> | ||||
#include <machine/vmparam.h> | |||||
#include <vm/uma.h> | #include <vm/uma.h> | ||||
#include <geom/geom.h> | #include <geom/geom.h> | ||||
#include <geom/geom_dbg.h> | #include <geom/geom_dbg.h> | ||||
#include <geom/eli/g_eli.h> | #include <geom/eli/g_eli.h> | ||||
#include <geom/eli/pkcs5v2.h> | #include <geom/eli/pkcs5v2.h> | ||||
#include <crypto/intake.h> | #include <crypto/intake.h> | ||||
▲ Show 20 Lines • Show All 907 Lines • ▼ Show 20 Lines | for (i = 0; i < threads; i++) { | ||||
LIST_INSERT_HEAD(&sc->sc_workers, wr, w_next); | LIST_INSERT_HEAD(&sc->sc_workers, wr, w_next); | ||||
} | } | ||||
/* | /* | ||||
* Create decrypted provider. | * Create decrypted provider. | ||||
*/ | */ | ||||
pp = g_new_providerf(gp, "%s%s", bpp->name, G_ELI_SUFFIX); | pp = g_new_providerf(gp, "%s%s", bpp->name, G_ELI_SUFFIX); | ||||
pp->flags |= G_PF_DIRECT_SEND | G_PF_DIRECT_RECEIVE; | pp->flags |= G_PF_DIRECT_SEND | G_PF_DIRECT_RECEIVE; | ||||
if (CRYPTO_HAS_VMPAGE) { | |||||
/* | |||||
* On DMAP architectures we can use unmapped I/O. But don't | |||||
* use it with data integrity verification. That code hasn't | |||||
* been written yet. | |||||
*/ | |||||
markj: Style nit: it's more consistent with the rest of the code to have an explicit comparison with 0… | |||||
if ((sc->sc_flags & G_ELI_FLAG_AUTH) == 0) | |||||
pp->flags |= G_PF_ACCEPT_UNMAPPED; | |||||
} | |||||
pp->mediasize = sc->sc_mediasize; | pp->mediasize = sc->sc_mediasize; | ||||
pp->sectorsize = sc->sc_sectorsize; | pp->sectorsize = sc->sc_sectorsize; | ||||
LIST_FOREACH(gap, &bpp->aliases, ga_next) | LIST_FOREACH(gap, &bpp->aliases, ga_next) | ||||
g_provider_add_alias(pp, "%s%s", gap->ga_alias, G_ELI_SUFFIX); | g_provider_add_alias(pp, "%s%s", gap->ga_alias, G_ELI_SUFFIX); | ||||
g_error_provider(pp, 0); | g_error_provider(pp, 0); | ||||
G_ELI_DEBUG(0, "Device %s created.", pp->name); | G_ELI_DEBUG(0, "Device %s created.", pp->name); | ||||
▲ Show 20 Lines • Show All 473 Lines • Show Last 20 Lines |
Style nit: it's more consistent with the rest of the code to have an explicit comparison with 0, like you do elsewhere in the diff.