Changeset View
Changeset View
Standalone View
Standalone View
sys/geom/eli/g_eli.c
Show First 20 Lines • Show All 966 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; | ||||
/* | |||||
* Don't use unmapped IO with data integrity verification. That module | |||||
* needs much more intimate access to the bio's data in order to | |||||
* add/remove HMAC fields, and split bios that exceed MAXPHYS. | |||||
*/ | |||||
if (!(sc->sc_flags & G_ELI_FLAG_AUTH)) | |||||
markj: Style nit: it's more consistent with the rest of the code to have an explicit comparison with 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.