From owner-freebsd-fs@freebsd.org Fri Sep 15 11:59:01 2017 Return-Path: Delivered-To: freebsd-fs@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 5BA8CE11125; Fri, 15 Sep 2017 11:59:01 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citapm.icyb.net.ua (citapm.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 725D3643EC; Fri, 15 Sep 2017 11:59:00 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citapm.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id OAA20960; Fri, 15 Sep 2017 14:58:58 +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 1dspGs-000189-PW; Fri, 15 Sep 2017 14:58:58 +0300 Subject: Re: mount / unmount and mountcheckdirs() To: Kirk McKusick Cc: Konstantin Belousov , freebsd-arch@FreeBSD.org, freebsd-fs References: <201709150314.v8F3Ea6B085072@chez.mckusick.com> From: Andriy Gapon Message-ID: <8a8e6eb6-2a80-de22-4944-38820c327a76@FreeBSD.org> Date: Fri, 15 Sep 2017 14:58:23 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <201709150314.v8F3Ea6B085072@chez.mckusick.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Sep 2017 11:59:01 -0000 On 15/09/2017 06:14, Kirk McKusick wrote: > I had to dig back through some *really* old emails to find out what > triggered the addition of mountcheckdirs(). The problem that it was > specifically solving was that as part of the startup script a minimal > root directory was replaced by the real root directory. The shell > running the startup script needed to be moved to the new mounted-on > root so that the rest of the script would not fail. > > That disaster of a hack has been replaced with the much more functional > code that deals with setting up the root and the devfs filesystem on > /dev. So the need for which it was designed no longer exists. But I > still believe that it is the correct thing to do. For example, if you > are using automount code and chdir into your home directory triggering > an auto-mount, you should just be in your home directory after the > mount rather than having to do cd ../$USER to get there. Kirk, thank you very much both for the historical reference and for the auto-mount example. -- Andriy Gapon