From owner-svn-src-head@freebsd.org Thu Jan 14 16:56:39 2016 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 D6134A819E7; Thu, 14 Jan 2016 16:56:39 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wm0-x22e.google.com (mail-wm0-x22e.google.com [IPv6:2a00:1450:400c:c09::22e]) (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 7D84F18FE; Thu, 14 Jan 2016 16:56:39 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-wm0-x22e.google.com with SMTP id f206so354360537wmf.0; Thu, 14 Jan 2016 08:56:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=sTSwci6pfbbh4k9DFmJb3xx7Z3UPeTzj9el2fk1+RwQ=; b=VBtDnEiZNYggz8+fkWpEMmGkeae8RlTapA6gPBmJP6Vyzd+0pu78yCXXj8yL9M8UWL 3/1uelLcLF/U1ZxUKt1F4xTkzU7NcPxPDaPoAzdnrScixLfR9ZUX3siJ79r5yqgIEELV DSxz0HAePwaxsWN2oXxEiKu2Ms9rCDpgt2aRviY1IVUPNGpv+Zae90zJlJLDHvG03Uxf 4HoLjXeGu/2UgCyWaK9ZThkdJGO7POkwwXr+c3dmh/e7ig0qXDl6YjZ8Eu4jDy6+Cdb5 NXDMHQPTcjdjp68aLs8gC/KFgjUqH9ZpF99nO7pEdu5ElCn8PdFGPV/JbNC5lNaQ+mjQ LyDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=sTSwci6pfbbh4k9DFmJb3xx7Z3UPeTzj9el2fk1+RwQ=; b=f2ymzzYLI+DAItb0bGs9v04Zs5yV6ifXx9CrJA4MkkpB+iJXFs/mGGJLxEKDCpzJuh OjbryQI/agDbt8tfDhVIVBA6FuFgYeMRp3FlD/SW5EYuT6qB7WQikjZNUNOE8A8IagoZ uOoQaupFZI+RqK3vfFwGvWf3CSUvdphAPZlxez8iy7atkq9T6AkK0lMgkXOnr0LH6jON FfsULyVkQJqtk/W56TS6d9e18XRycu0Kt+mztPo75+SohI1YmchtCykR+65hYr/bVNwT J9JIaQnW9uCg2q8F//mn8QbVnrI/H2P0i2KDlVoAiS4jG/pCoknRZqO9r719ua9NHprs aSSQ== X-Gm-Message-State: ALoCoQn+beo2OKD61Z1vxFcyWKAswm0Q9AiLyH0gUH8PYdDPlm5VrPvvN1d7IKW7kkVtjr7X90jw0DYxfFAB0M20gZiZjPQcAw== X-Received: by 10.194.175.198 with SMTP id cc6mr5294266wjc.24.1452790597965; Thu, 14 Jan 2016 08:56:37 -0800 (PST) Received: from brick.home (aib143.neoplus.adsl.tpnet.pl. [83.25.209.143]) by smtp.gmail.com with ESMTPSA id t3sm6887989wjz.11.2016.01.14.08.56.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Jan 2016 08:56:36 -0800 (PST) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Thu, 14 Jan 2016 17:56:33 +0100 From: Edward Tomasz Napierala To: Jilles Tjoelker Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r290197 - in head: etc/defaults etc/rc.d sys/kern Message-ID: <20160114165633.GA1183@brick.home> Mail-Followup-To: Jilles Tjoelker , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201510301552.t9UFqAtv073641@repo.freebsd.org> <20151221170738.GA19579@stack.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151221170738.GA19579@stack.nl> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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: Thu, 14 Jan 2016 16:56:39 -0000 On 1221T1807, Jilles Tjoelker wrote: > On Fri, Oct 30, 2015 at 03:52:10PM +0000, Edward Tomasz Napierala wrote: > > Author: trasz > > Date: Fri Oct 30 15:52:10 2015 > > New Revision: 290197 > > URL: https://svnweb.freebsd.org/changeset/base/290197 > > > Log: > > After r290196, the kernel won't wait for stuff like gmirror nodes > > if they are not required for mounting rootfs. However, it's possible > > that some setups try to mount them in mountcritlocal (ie from fstab). > > > Export the list of current root mount holds using a new sysctl, > > vfs.root_mount_hold, and make mountcritlocal retry if "mount -a" fails > > and the list is not empty. > > > MFC after: 1 month > > Sponsored by: The FreeBSD Foundation > > Differential Revision: https://reviews.freebsd.org/D3709 > > I like the faster startup, but the rc.d script clearly will not wait as > intended. See below. > > > Modified: > > head/etc/defaults/rc.conf > > head/etc/rc.d/mountcritlocal > > head/sys/kern/vfs_mountroot.c > > > [snip] > > Modified: head/etc/rc.d/mountcritlocal > > ============================================================================== > > --- head/etc/rc.d/mountcritlocal Fri Oct 30 15:35:04 2015 (r290196) > > +++ head/etc/rc.d/mountcritlocal Fri Oct 30 15:52:10 2015 (r290197) > > @@ -15,7 +15,7 @@ stop_cmd=sync > > > > mountcritlocal_start() > > { > > - local err > > + local err holders waited > > > > # Set up the list of network filesystem types for which mounting > > # should be delayed until after network initialization. > > @@ -35,8 +35,42 @@ mountcritlocal_start() > > mount_excludes="${mount_excludes}${fstype}," > > done > > mount_excludes=${mount_excludes%,} > > + > > + # Originally, root mount hold had to be released before mounting the root > > + # filesystem. This delayed the boot, so it was changed to only wait if > > + # the root device isn't readily available. This can result in this script > > + # executing before all the devices - such as graid(8) - are available. > > + # Thus, should the mount fail, we will wait for the root mount hold release > > + # and retry. > > These lines are a bit too long. > > > mount -a -t ${mount_excludes} > > err=$? > > + if [ $? -ne 0 ]; then > > The assignment will set $? to 0, so the new code will never be executed. > "$err" should be tested instead of $?. Thanks, fixed. Previously, I've tested it by changing "-ne" to "-eq", and didn't even realize I've missed a step.