all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Guillaume Le Vaillant <glv@posteo.net>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 38462@debbugs.gnu.org
Subject: [bug#38462] [PATCH v2] linux-boot: Don't ignore flags when mounting root file system.
Date: Tue, 10 Dec 2019 23:37:25 +0100	[thread overview]
Message-ID: <871rtb6c4a.fsf@yamatai> (raw)
In-Reply-To: <87fthsklk4.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 351 bytes --]


Ludovic Courtès skribis:

> Ludovic Courtès <ludo@gnu.org> skribis:
>
> Actually no: “make check-system TESTS=basic” fails after that.
> Could you take a look?
>
> Thanks in advance,
> Ludo’.

The attached patch should fix the issue. There was a mix up between the
representations of flags as a list of symbols or as a bit mask.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-linux-boot-Don-t-ignore-flags-when-mounting-root-fil.patch --]
[-- Type: text/x-patch, Size: 2768 bytes --]

From f26de9d63a84842029d2393f28f6c96aa2bc766e Mon Sep 17 00:00:00 2001
From: Guillaume Le Vaillant <glv@posteo.net>
Date: Mon, 2 Dec 2019 21:15:50 +0100
Subject: [PATCH v2] linux-boot: Don't ignore flags when mounting root file
 system.

* gnu/build/linux-boot.scm (mount-root-file-system): Add the 'flags' keyword
  argument and use it when mounting the root file system.
  (boot-system): Pass the root file system flags to 'mount-root-file-system'.
---
 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..3d40a7d05d 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")))))
 
 (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 tmpfs
-using the kernel built-in overlayfs.  OPTIONS indicates the options to use
+                                 #:key volatile-root? (flags 0) 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 tmpfs using
+the kernel built-in overlayfs. FLAGS and OPTIONS indicates the options to use
 to mount ROOT."
 
   (if volatile-root?
@@ -384,7 +384,7 @@ to mount ROOT."
                "lowerdir=/real-root,upperdir=/rw-root/upper,workdir=/rw-root/work"))
       (begin
         (check-file-system root type)
-        (mount root "/root" type 0 options)))
+        (mount root "/root" type flags options)))
 
   ;; Make sure /root/etc/mtab is a symlink to /proc/self/mounts.
   (false-if-exception
@@ -474,6 +474,13 @@ upon error."
              mounts)
         "ext4"))
 
+  (define root-fs-flags
+    (mount-flags->bit-mask (or (any (lambda (fs)
+                                      (and (root-mount-point? fs)
+                                           (file-system-flags fs)))
+                                    mounts)
+                               '())))
+
   (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"))
 
-- 
2.24.0


  reply	other threads:[~2019-12-10 22:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-02 20:57 [bug#38462] [PATCH] linux-boot: Don't ignore flags when mounting root file system Guillaume Le Vaillant
2019-12-09 14:53 ` bug#38462: " Ludovic Courtès
2019-12-09 15:22   ` [bug#38462] " Guillaume Le Vaillant
2019-12-10 19:10     ` Ludovic Courtès
2019-12-10 19:49       ` Ludovic Courtès
2019-12-10 22:37         ` Guillaume Le Vaillant [this message]
2019-12-12 16:55           ` [bug#38462] [PATCH v2] " Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871rtb6c4a.fsf@yamatai \
    --to=glv@posteo.net \
    --cc=38462@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.