Date: Thu, 11 Jun 2009 12:06:47 +0200 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: Luigi Rizzo <luigi@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r193981 - in head/sys: geom sys Message-ID: <20090611100647.GB2642@garage.freebsd.pl> In-Reply-To: <200906110955.n5B9tR6T042284@svn.freebsd.org> References: <200906110955.n5B9tR6T042284@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--H1spWtNR+x+ondvy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jun 11, 2009 at 09:55:27AM +0000, Luigi Rizzo wrote: > Author: luigi > Date: Thu Jun 11 09:55:26 2009 > New Revision: 193981 > URL: http://svn.freebsd.org/changeset/base/193981 >=20 > Log: > As discussed in the devsummit, introduce two fields in the > struct bio to store classification information, and a hook > for classifier functions that can be called by g_io_request(). > =20 > This code is from Fabio Checconi as part of his GSOC work. [...] > +int > +g_register_classifier(struct g_classifier_hook *hook) > +{ > + > + g_bioq_lock(&g_bio_run_down); > + TAILQ_INSERT_TAIL(&g_classifier_tailq, hook, link); > + g_bioq_unlock(&g_bio_run_down); > + > + return (0); > +} Why not to make it void, just like g_unregister_classifier()? > +void > +g_unregister_classifier(struct g_classifier_hook *hook) > +{ > + struct g_classifier_hook *entry; > + > + g_bioq_lock(&g_bio_run_down); > + TAILQ_FOREACH(entry, &g_classifier_tailq, link) { > + if (entry =3D=3D hook) { > + TAILQ_REMOVE(&g_classifier_tailq, hook, link); > + break; > + } > + } > + g_bioq_unlock(&g_bio_run_down); > +} --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --H1spWtNR+x+ondvy Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFKMNc3ForvXbEpPzQRAvSdAKDeg3eA/zHupSlKjUy7hvVcqqa/0QCeKpBp PBy2YMJMfIkZx9x+eObHhH0= =adym -----END PGP SIGNATURE----- --H1spWtNR+x+ondvy--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090611100647.GB2642>