diff options
Diffstat (limited to 'sys/geom')
-rw-r--r-- | sys/geom/sched/g_sched.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/sys/geom/sched/g_sched.c b/sys/geom/sched/g_sched.c index b438bf76f07f..39c866bc1c59 100644 --- a/sys/geom/sched/g_sched.c +++ b/sys/geom/sched/g_sched.c @@ -136,6 +136,8 @@ static void g_sched_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp, struct g_consumer *cp, struct g_provider *pp); static void g_sched_init(struct g_class *mp); static void g_sched_fini(struct g_class *mp); +static int g_sched_ioctl(struct g_provider *pp, u_long cmd, void *data, + int fflag, struct thread *td); struct g_class g_sched_class = { .name = G_SCHED_CLASS_NAME, @@ -144,6 +146,7 @@ struct g_class g_sched_class = { .taste = g_sched_taste, .destroy_geom = g_sched_destroy_geom, .init = g_sched_init, + .ioctl = g_sched_ioctl, .fini = g_sched_fini }; @@ -1601,6 +1604,22 @@ g_sched_fini(struct g_class *mp) mtx_destroy(&me.gs_mtx); } +static int +g_sched_ioctl(struct g_provider *pp, u_long cmd, void *data, int fflag, + struct thread *td) +{ + struct g_consumer *cp; + struct g_geom *gp; + + cp = LIST_FIRST(&pp->geom->consumer); + if (cp == NULL) + return (ENOIOCTL); + gp = cp->provider->geom; + if (gp->ioctl == NULL) + return (ENOIOCTL); + return (gp->ioctl(cp->provider, cmd, data, fflag, td)); +} + /* * Read the i-th argument for a request, skipping the /dev/ * prefix if present. |