From owner-freebsd-geom@FreeBSD.ORG Wed Apr 14 10:50:11 2010 Return-Path: Delivered-To: freebsd-geom@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D98A106564A for ; Wed, 14 Apr 2010 10:50:11 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello089077043238.chello.pl [89.77.43.238]) by mx1.freebsd.org (Postfix) with ESMTP id E42CE8FC1F for ; Wed, 14 Apr 2010 10:50:10 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id B575245E13; Wed, 14 Apr 2010 12:50:08 +0200 (CEST) Received: from localhost (pdawidek.wheel.pl [10.0.1.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id A27C845CD8; Wed, 14 Apr 2010 12:50:03 +0200 (CEST) Date: Wed, 14 Apr 2010 12:50:07 +0200 From: Pawel Jakub Dawidek To: Luigi Rizzo Message-ID: <20100414105007.GC1657@garage.freebsd.pl> References: <201004121637.o3CGbjSK080066@svn.freebsd.org> <20100412204926.GB1743@garage.freebsd.pl> <20100412210512.GB94885@onelab2.iet.unipi.it> <20100414074616.GA1657@garage.freebsd.pl> <20100414075838.GB1657@garage.freebsd.pl> <20100414084750.GC74130@onelab2.iet.unipi.it> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="p2kqVDKq5asng8Dg" Content-Disposition: inline In-Reply-To: <20100414084750.GC74130@onelab2.iet.unipi.it> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 9.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=-5.9 required=4.5 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 Cc: fabio@gandalf.sssup.it, freebsd-geom@FreeBSD.org Subject: Re: svn commit: r206497 - in head: sbin/geom/class sbin/geom/class/sched sys/geom/sched sys/modules/geom sys/modules/geom/geom_sched sys/modules/geom/geom_sched/gs_sched sys/modules/geom/geom_sched/gsc... X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2010 10:50:11 -0000 --p2kqVDKq5asng8Dg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 14, 2010 at 10:47:50AM +0200, Luigi Rizzo wrote: > again i am not sure i remember all the details, but i think the > old name need to remain where it is or you'd need to relink > the nodes ? >=20 > > geom disk list ad4 > Geom name: ad4 > Providers: > 1. Name: ad4.sched. > Mediasize: 250059350016 (233G) > Sectorsize: 512 > Mode: r5w5e6 > fwsectors: 63 > fwheads: 16 Here we operate on geom names, not provider names, so it works correctly. I believe gnop won't work, though, as this code suggests (name contains provider name given for 'gnop configure' command): if (strncmp(name, "/dev/", strlen("/dev/")) =3D=3D 0) name +=3D strlen("/dev/"); pp =3D g_provider_by_name(name); if (pp =3D=3D NULL || pp->geom->class !=3D mp) { G_NOP_DEBUG(1, "Provider %s is invalid.", name); gctl_error(req, "Provider %s is invalid.", name); return;=20 } You can try the following: # gnop create ad4 (/dev/ad4.nop is created) # gsched insert ad4.nop # gnop configure -w 1 ad4.nop This should trigger the error above, but this should work: # gnop configure -w 1 ad4.nop.sched > > Another thing that comes to my mind is possibility to create providers > > that are not represented in /dev/. Name collision wouldn't be a problem > > then. Also, it seems nicer to not polute /dev/ with such > > proxy-providers. >=20 > it's already like this -- the names do not appear in /dev Right, I saw you cancel events on creation, so taste is not send to DEV class. Hmm, but taste can still be send on last write close, which I believe is not handled currently. If I'm right, something like this will make .sched provider to appear in /dev/: # mdconfig -a -t malloc -s 1m -u 0 # gsched insert md0 # true >/dev/md0 # ls /dev/md0* --=20 Pawel Jakub Dawidek http://www.wheelsystems.com pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --p2kqVDKq5asng8Dg Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkvFnd4ACgkQForvXbEpPzTDuACfSW88GNQs5l5Gpahi8ml07Neo W24AoMQHfMJGgh6alS1DSoKiQuLcwvPN =XSio -----END PGP SIGNATURE----- --p2kqVDKq5asng8Dg--