From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:56819) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ibsol-0007JB-Cr for guix-patches@gnu.org; Mon, 02 Dec 2019 16:01:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ibsof-0001fS-2S for guix-patches@gnu.org; Mon, 02 Dec 2019 16:01:13 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:33062) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ibsoX-0001dy-Tn for guix-patches@gnu.org; Mon, 02 Dec 2019 16:01:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ibsoX-0000FK-Rd for guix-patches@gnu.org; Mon, 02 Dec 2019 16:01:01 -0500 Subject: [bug#38462] [PATCH] linux-boot: Don't ignore flags when mounting root file system. Resent-Message-ID: Received: from eggs.gnu.org ([2001:470:142:3::10]:56159) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ibsns-00072M-6a for guix-patches@gnu.org; Mon, 02 Dec 2019 16:00:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ibsno-000154-6G for guix-patches@gnu.org; Mon, 02 Dec 2019 16:00:17 -0500 Received: from mout01.posteo.de ([185.67.36.65]:55751) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ibsnl-0000zx-U7 for guix-patches@gnu.org; Mon, 02 Dec 2019 16:00:14 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id D1B2616008F for ; Mon, 2 Dec 2019 21:59:59 +0100 (CET) From: Guillaume Le Vaillant Date: Mon, 2 Dec 2019 21:57:34 +0100 Message-Id: <20191202205734.7018-1-glv@posteo.net> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 38462@debbugs.gnu.org Cc: Guillaume Le Vaillant * gnu/build/linux-boot.scm (mount-root-file-system): Add the 'flags' keyw= ord argument and use it when mounting the root file system. (boot-system): Pass the root file system flags to 'mount-root-file-syst= em'. --- gnu/build/linux-boot.scm | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm index 950a3507f2..fcec751f45 100644 --- a/gnu/build/linux-boot.scm +++ b/gnu/build/linux-boot.scm @@ -358,10 +358,10 @@ the last argument of `mknod'." (filter-map string->number (scandir "/proc"))))) =20 (define* (mount-root-file-system root type - #:key volatile-root? options) - "Mount the root file system of type TYPE at device ROOT. If VOLATILE-= ROOT? -is true, mount ROOT read-only and make it an overlay with a writable tmp= fs -using the kernel built-in overlayfs. OPTIONS indicates the options to u= se + #:key volatile-root? (flags 0) options) + "Mount the root file system of type TYPE at device ROOT. If VOLATILE-R= OOT? is +true, mount ROOT read-only and make it an overlay with a writable tmpfs = using +the kernel built-in overlayfs. FLAGS and OPTIONS indicates the options t= o use to mount ROOT." =20 (if volatile-root? @@ -384,7 +384,7 @@ to mount ROOT." "lowerdir=3D/real-root,upperdir=3D/rw-root/upper,workdir=3D= /rw-root/work")) (begin (check-file-system root type) - (mount root "/root" type 0 options))) + (mount root "/root" type flags options))) =20 ;; Make sure /root/etc/mtab is a symlink to /proc/self/mounts. (false-if-exception @@ -474,6 +474,13 @@ upon error." mounts) "ext4")) =20 + (define root-fs-flags + (mount-flags->bit-mask (or (any (lambda (fs) + (and (root-mount-point? fs) + (file-system-flags fs))) + mounts) + 0))) + (define root-fs-options (any (lambda (fs) (and (root-mount-point? fs) @@ -533,6 +540,7 @@ upon error." (mount-root-file-system (canonicalize-device-spec root) root-fs-type #:volatile-root? volatile-root? + #:flags root-fs-flags #:options root-fs-options)) (mount "none" "/root" "tmpfs")) =20 --=20 2.24.0