Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Aug 2010 10:40:02 GMT
From:      dfilter@FreeBSD.ORG (dfilter service)
To:        freebsd-geom@FreeBSD.org
Subject:   Re: kern/148540: commit references a PR
Message-ID:  <201008021040.o72Ae2vR006771@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/148540; it has been noted by GNATS.

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/148540: commit references a PR
Date: Mon,  2 Aug 2010 10:31:02 +0000 (UTC)

 Author: ae
 Date: Mon Aug  2 10:30:49 2010
 New Revision: 210747
 URL: http://svn.freebsd.org/changeset/base/210747
 
 Log:
   Forward ioctl requests to original geom.
   
   PR:		148540
   Silence from:	luigi
   Reviewed by:	pjd
   Approved by:	mav (mentor)
   MFC after:	2 weeks
 
 Modified:
   head/sys/geom/sched/g_sched.c
 
 Modified: head/sys/geom/sched/g_sched.c
 ==============================================================================
 --- head/sys/geom/sched/g_sched.c	Mon Aug  2 10:26:15 2010	(r210746)
 +++ head/sys/geom/sched/g_sched.c	Mon Aug  2 10:30:49 2010	(r210747)
 @@ -136,6 +136,8 @@ static void g_sched_dumpconf(struct sbuf
      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.
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201008021040.o72Ae2vR006771>