From owner-svn-src-all@freebsd.org Mon Aug 7 22:00:19 2017 Return-Path: Delivered-To: svn-src-all@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 360DBDCBB42 for ; Mon, 7 Aug 2017 22:00:19 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x22a.google.com (mail-io0-x22a.google.com [IPv6:2607:f8b0:4001:c06::22a]) (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 ED9B3C30 for ; Mon, 7 Aug 2017 22:00:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x22a.google.com with SMTP id g71so7332443ioe.5 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=ng1xLDLAkyRzfUQb3n5DqCKPsUPiu0WhEC2wEyS+6cqhofetT2BSr78bRcmkGSsMOh xX9s6XKQHvuOL1Tx1OYZlxJohCvrQDwH63Jm+L+uZuxsXJ2b2J2FC24u2N1w0TOZ/BQ9 trsH0q2d1sQeBQnk4mGoH+Bp1sx84zSlCiUrwpY20iCkMU2gRWsHUvH4B5nysehryJq4 FOvfuAjQs502ga/ASXCXyv4sqdn1bsFxxpB2CYmnLT3zQkEvgDKRNTErk7CZMwkiZWYW as+xqsKX/0LtLczFrdVIfJVWvcTs1DfjCJhH2afqqa0ynWNvg70zJEAjB0llUc8nGOsu 4F1w== X-Gm-Message-State: AIVw112sPGup5nYshRHkXX7efmiBiuPBvhtG8WRgRx6Yh815DCZcHP/S vdsbGEA1I4H/qHhPC9Urqe9l1973vqXQ 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-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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