From owner-svn-src-head@freebsd.org Mon Aug 7 22:00:19 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1ABE5DCBB40 for ; Mon, 7 Aug 2017 22:00:19 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x234.google.com (mail-io0-x234.google.com [IPv6:2607:f8b0:4001:c06::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D30B9C2D for ; Mon, 7 Aug 2017 22:00:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x234.google.com with SMTP id c74so7349617iod.4 for ; Mon, 07 Aug 2017 15:00:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=q9IEw/sgQBHuytiSK/3Slfhhg/o4WaAk8MN2W4ngBfQ=; b=fhAqw36yCnkoJB/dZQCsTETdNPM8ij0/8hTjv/KlIyLTg7MdpV8B6B1fqbl3BbYrbS eqiaH3Te/LMi4c7uXJC9Oq8ekUx2YsF2STm4BNdC3Ziv01ap5DnTq75/+XrdszKSfWPO 5mOcqYqE5upi0vn1ccju/o1lYQF7HraCkk2D2FANH4nRuDxBMt2K9UlVNWNQb48Yzut8 R25z70+0PVf9ieaKYPLccNUxrp+pJUXV/Rh91r3S4L8CRbOwHzNTO16SKwE0C6x3+ftM 6nJfTrCi8mdYWiEvEkHqG3udCXeB/DnxtpsAR5oYyMyGPI27ZZY3TIVsrm43Fkl6B/xQ 0/AA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=q9IEw/sgQBHuytiSK/3Slfhhg/o4WaAk8MN2W4ngBfQ=; b=WN0Guzlsk1tQ8dAkUDt16NfuYNcm6SW44xneC1PQimzFvIeTUPxXHtxlP3NCo8itxO HunIb7Ndl37pWdxAC+ieTlCs/pzG3oziMMwGJdzxRlI+sMSYCeSQ82QCNNL6Zfssdm9D 1Gg0ef4Wx9lOLAc+9T0I9jvB5I61XtzmMjTlq+SMI+NXI1ii9WTcM68ibmManw+rKPE8 uvDZXZ4/QHi57YAKM8Kcyl1LFzsKXd4aWB7vDoQoDvDLHgofIteZNrXZYti788AhjVNw OxyUIf5p/skpnWJji58YofAiYbEsi5ricXLUela3BdNPk1E6tDBROdUrHLH6bWUA6Y+C vpGA== X-Gm-Message-State: AIVw112zcPAKSQBXRHZxlEYlMk6YmsjnY6YHA5HVX7z71I9Wuwz5RhHB qEOuuVp/1ahLhLgglERBkKcdezctGX/b X-Received: by 10.107.147.133 with SMTP id v127mr1812624iod.128.1502143218296; Mon, 07 Aug 2017 15:00:18 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.10.71 with HTTP; Mon, 7 Aug 2017 15:00:17 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:f809:2296:13f6:2a42] In-Reply-To: <20170807215136.GK1700@kib.kiev.ua> References: <201708072112.v77LCSxL001381@repo.freebsd.org> <20170807212937.GJ1700@kib.kiev.ua> <20170807215136.GK1700@kib.kiev.ua> From: Warner Losh Date: Mon, 7 Aug 2017 16:00:17 -0600 X-Google-Sender-Auth: xeMD_KUYpArcONA3TBQ_hvNYx1s Message-ID: Subject: Re: svn commit: r322196 - head/sys/geom To: Konstantin Belousov Cc: Warner Losh , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Aug 2017 22:00:19 -0000 On Mon, Aug 7, 2017 at 3:51 PM, Konstantin Belousov wrote: > On Mon, Aug 07, 2017 at 03:37:57PM -0600, Warner Losh wrote: > > On Mon, Aug 7, 2017 at 3:29 PM, Konstantin Belousov > > > 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. > Yes, I think that the adev tweaks are not needed. I will be surprised > if it appears to be used, but then there might be some hole in the > devfs symlinks handling. > Maybe I'm just setting 'dead variables' here that don't matter. I don't know that this is required, just kept the same code that used to 'work'. > That said, since you mentioned ada/ad aliases, are they still in the tree ? > If yes, do you plan to convert them as well ? > That code was removed in 11. I thought about bringing the code that ada used to implement them back verbatim for nda (and soon mda), but thought this approach was better and more general (and less error prone). I have no plans to re-add them. Warner