Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Aug 2017 15:37:57 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        Warner Losh <imp@freebsd.org>, src-committers <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>,  "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r322196 - head/sys/geom
Message-ID:  <CANCZdfqECJmuTaPTgqitNBDqd_33NWxDEgbaY0PgOT-UC3e_bw@mail.gmail.com>
In-Reply-To: <20170807212937.GJ1700@kib.kiev.ua>
References:  <201708072112.v77LCSxL001381@repo.freebsd.org> <20170807212937.GJ1700@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Aug 7, 2017 at 3:29 PM, Konstantin Belousov <kostikbel@gmail.com>
wrote:

> On Mon, Aug 07, 2017 at 09:12:28PM +0000, Warner Losh wrote:
> > +     LIST_FOREACH(gap, &pp->geom->aliases, ga_next) {
> > +             error = make_dev_alias_p(MAKEDEV_CHECKNAME |
> MAKEDEV_WAITOK, &adev, dev,
> > +                 "%s", gap->ga_alias);
> > +             if (error) {
> > +                     printf("%s: make_dev_alias_p() failed (name=%s,
> error=%d)\n",
> > +                         __func__, gap->ga_alias, error);
> > +                     continue;
> > +             }
> > +             adev->si_flags |= SI_UNMAPPED;
> Why do you set the flag unconditionally ?


Because it's set for "dev" unconditionally and the old compat code did it
too...

> +             adev->si_iosize_max = dev->si_iosize_max;
> > +             adev->si_drv2 = dev->si_drv2;
> And what are you trying to do by these initializations, including the
> si_flags adjustment ?
>

The old (ad->ada) compat code set them. Though to be honest, I didn't drill
down into the devfs code to see if that as still relevant. It sounds like
maybe not relevant...


> Aliases cause creation of symlinks in the devfs populate loop, which
> makes it impossible to access the alias cdevs.
>

True enough. If so, do you think these adjustments to adev can just be
removed entirely? A quick look in devfs code suggests that it doesn't
matter since, as you point out, it's a symlink not a new, different node.

Thanks for the feedback.

Warner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfqECJmuTaPTgqitNBDqd_33NWxDEgbaY0PgOT-UC3e_bw>