Forward ioctl requests to original geom.
PR: 148540 Silence from: luigi Reviewed by: pjd Approved by: mav (mentor) MFC after: 2 weeks
This commit is contained in:
parent
b6d4028166
commit
a80f05bb73
@ -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);
|
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_init(struct g_class *mp);
|
||||||
static void g_sched_fini(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 = {
|
struct g_class g_sched_class = {
|
||||||
.name = G_SCHED_CLASS_NAME,
|
.name = G_SCHED_CLASS_NAME,
|
||||||
@ -144,6 +146,7 @@ struct g_class g_sched_class = {
|
|||||||
.taste = g_sched_taste,
|
.taste = g_sched_taste,
|
||||||
.destroy_geom = g_sched_destroy_geom,
|
.destroy_geom = g_sched_destroy_geom,
|
||||||
.init = g_sched_init,
|
.init = g_sched_init,
|
||||||
|
.ioctl = g_sched_ioctl,
|
||||||
.fini = g_sched_fini
|
.fini = g_sched_fini
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1601,6 +1604,22 @@ g_sched_fini(struct g_class *mp)
|
|||||||
mtx_destroy(&me.gs_mtx);
|
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/
|
* Read the i-th argument for a request, skipping the /dev/
|
||||||
* prefix if present.
|
* prefix if present.
|
||||||
|
Loading…
Reference in New Issue
Block a user