From owner-svn-src-all@FreeBSD.ORG Thu Jun 11 10:06:56 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 779FE106564A; Thu, 11 Jun 2009 10:06:56 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello087206192061.chello.pl [87.206.192.61]) by mx1.freebsd.org (Postfix) with ESMTP id A4D9F8FC0A; Thu, 11 Jun 2009 10:06:50 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 35F0545E11; Thu, 11 Jun 2009 12:06:49 +0200 (CEST) Received: from localhost (chello087206192061.chello.pl [87.206.192.61]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 0F1024569A; Thu, 11 Jun 2009 12:06:43 +0200 (CEST) Date: Thu, 11 Jun 2009 12:06:47 +0200 From: Pawel Jakub Dawidek To: Luigi Rizzo Message-ID: <20090611100647.GB2642@garage.freebsd.pl> References: <200906110955.n5B9tR6T042284@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="H1spWtNR+x+ondvy" Content-Disposition: inline In-Reply-To: <200906110955.n5B9tR6T042284@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 8.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.6 required=4.5 tests=BAYES_00,RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 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 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2009 10:06:56 -0000 --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--