From owner-freebsd-current@freebsd.org Wed Sep 23 16:59:23 2015 Return-Path: Delivered-To: freebsd-current@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 2861AA0726D; Wed, 23 Sep 2015 16:59:23 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 089CA1EBD; Wed, 23 Sep 2015 16:59:21 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id TAA25908; Wed, 23 Sep 2015 19:59:20 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1ZenO3-000Btj-Rl; Wed, 23 Sep 2015 19:59:19 +0300 Subject: Re: dumpdev in loader.conf vs rc.d/dumpon To: cem@FreeBSD.org References: <5602B922.20703@FreeBSD.org> <5602CDBC.7080906@FreeBSD.org> Cc: FreeBSD Current , freebsd-rc@FreeBSD.org From: Andriy Gapon X-Enigmail-Draft-Status: N1110 Message-ID: <5602DA17.7060501@FreeBSD.org> Date: Wed, 23 Sep 2015 19:57:59 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Sep 2015 16:59:23 -0000 On 23/09/2015 19:44, Conrad Meyer wrote: > On Wed, Sep 23, 2015 at 9:05 AM, Andriy Gapon wrote: >> On 23/09/2015 18:59, Conrad Meyer wrote: >>> On Wed, Sep 23, 2015 at 7:37 AM, Andriy Gapon wrote: >> Because that's how I read the code in sys/geom/geom_dev.c. Especially >> init_dumpdev() - I believe that devtoname() returns a device name without '/dev/'. > > I don't think that's the primary use of the variable. See below. >>> I don't see etc/rc.d/dumpon prepending /dev to anything. >> >> Right, that's why I posted my message (bug report). > > I think the use of the variable "dumpdev" in GEOM probably > could/should be dropped. The way I found this variable was that I needed to set up a dump device before init. GEOM can do that, if dumpdev is set in kenv, as soon as a configured device is available. If a system survives until rc.d/dumpon can run, then why bother with setting dumpdev in kenv - dumpdev in rc.conf would work. > Alternatively (perhaps it is a mechanism for collecting crash dumps > before init / /etc/rc start?) Exactly. > the GEOM dumpdev code could skip over a > "/dev/" prefix when comparing against devname(), so that the GEOM use > of the variable matches the etc/rc.d/dumpon use of the variable. Yes, that's another option. But, IMO, dumpdev in kenv is only really useful if rc.d/dumpon doesn't have a chance to run. So, when rc.d/dumpon is able to run it can make a tiny concession to the way GEOM works. I do not have a strong opinion. Either option, rc.d/dumpon change or geom_dev change, is fine with me. -- Andriy Gapon