aboutsummaryrefslogtreecommitdiff
path: root/sys/geom
diff options
context:
space:
mode:
Diffstat (limited to 'sys/geom')
-rw-r--r--sys/geom/eli/g_eli.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/geom/eli/g_eli.c b/sys/geom/eli/g_eli.c
index 94ef2d02f183..8b6ed5c0d46c 100644
--- a/sys/geom/eli/g_eli.c
+++ b/sys/geom/eli/g_eli.c
@@ -212,6 +212,16 @@ g_eli_crypto_rerun(struct cryptop *crp)
return (error);
}
+static void
+g_eli_getattr_done(struct bio *bp)
+{
+ if (bp->bio_error == 0 &&
+ !strcmp(bp->bio_attribute, "GEOM::physpath")) {
+ strlcat(bp->bio_data, "/eli", bp->bio_length);
+ }
+ g_std_done(bp);
+}
+
/*
* The function is called afer reading encrypted data from the provider.
*
@@ -380,7 +390,10 @@ g_eli_start(struct bio *bp)
case BIO_FLUSH:
case BIO_DELETE:
case BIO_ZONE:
- cbp->bio_done = g_std_done;
+ if (bp->bio_cmd == BIO_GETATTR)
+ cbp->bio_done = g_eli_getattr_done;
+ else
+ cbp->bio_done = g_std_done;
cp = LIST_FIRST(&sc->sc_geom->consumer);
cbp->bio_to = cp->provider;
G_ELI_LOGREQ(2, cbp, "Sending request.");