Date: Wed, 14 Apr 2010 12:50:07 +0200 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: Luigi Rizzo <rizzo@iet.unipi.it> 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... Message-ID: <20100414105007.GC1657@garage.freebsd.pl> In-Reply-To: <20100414084750.GC74130@onelab2.iet.unipi.it> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
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 ?
>
> > 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/")) == 0)
name += strlen("/dev/");
pp = g_provider_by_name(name);
if (pp == NULL || pp->geom->class != mp) {
G_NOP_DEBUG(1, "Provider %s is invalid.", name);
gctl_error(req, "Provider %s is invalid.", name);
return;
}
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.
>
> 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*
--
Pawel Jakub Dawidek http://www.wheelsystems.com
pjd@FreeBSD.org http://www.FreeBSD.org
FreeBSD committer Am I Evil? Yes, I Am!
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (FreeBSD)
iEYEARECAAYFAkvFnd4ACgkQForvXbEpPzTDuACfSW88GNQs5l5Gpahi8ml07Neo
W24AoMQHfMJGgh6alS1DSoKiQuLcwvPN
=XSio
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100414105007.GC1657>
