Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Jul 2010 13:00:09 GMT
From:      "Andrey V. Elsukov" <bu7cher@yandex.ru>
To:        freebsd-geom@FreeBSD.org
Subject:   Re: kern/148540: [geom] geom_sched breaks ata devices
Message-ID:  <201007141300.o6ED09uM005980@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: "Andrey V. Elsukov" <bu7cher@yandex.ru>
To: bug-followup@FreeBSD.org, 
 Marcin Wisnicki <mwisnicki+freebsd@gmail.com>,
 "Anton A. Barsukov" <iscsi@zesdid.com>
Cc: Luigi Rizzo <luigi@FreeBSD.org>
Subject: Re: kern/148540: [geom] geom_sched breaks ata devices
Date: Wed, 14 Jul 2010 16:50:57 +0400

 This is a multi-part message in MIME format.
 --------------020306060809080006020605
 Content-Type: text/plain; charset=KOI8-R
 Content-Transfer-Encoding: 7bit
 
 Hi,
 
 can you test attached patch?
 
 -- 
 WBR, Andrey V. Elsukov
 
 --------------020306060809080006020605
 Content-Type: text/plain;
  name="gsched.diff"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename="gsched.diff"
 
 Index: g_sched.c
 ===================================================================
 --- g_sched.c	(revision 209715)
 +++ g_sched.c	(working copy)
 @@ -136,6 +136,8 @@ static void g_sched_dumpconf(struct sbuf *sb, cons
      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,25 @@ 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;
 +	int error;
 +
 +	cp = LIST_FIRST(&pp->geom->consumer);
 +	if (cp == NULL)
 +		return (ENOIOCTL);
 +
 +	gp = cp->provider->geom;
 +	if (gp->ioctl == NULL)
 +		return (ENOIOCTL);
 +	error = gp->ioctl(cp->provider, cmd, data, fflag, td);
 +	return(error);
 +}
 +
  /*
   * Read the i-th argument for a request, skipping the /dev/
   * prefix if present.
 
 --------------020306060809080006020605--



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