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...
Pawel Jakub Dawidek
pjd at FreeBSD.org
Wed Apr 14 10:50:11 UTC 2010
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 at FreeBSD.org http://www.FreeBSD.org
FreeBSD committer Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-geom/attachments/20100414/cf407306/attachment.pgp
More information about the freebsd-geom
mailing list