From patchwork Tue Dec 10 22:37:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Guillaume Le Vaillant X-Patchwork-Id: 16483 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id DB1111783A; Tue, 10 Dec 2019 22:39:14 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 93096177CC for ; Tue, 10 Dec 2019 22:39:14 +0000 (GMT) Received: from localhost ([::1]:36758 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ieo9y-0003w7-0U for patchwork@mira.cbaines.net; Tue, 10 Dec 2019 17:39:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40156) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ieo9n-0003vq-1a for guix-patches@gnu.org; Tue, 10 Dec 2019 17:39:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ieo9l-0008Rh-Sv for guix-patches@gnu.org; Tue, 10 Dec 2019 17:39:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:50750) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ieo9l-0008RZ-PM for guix-patches@gnu.org; Tue, 10 Dec 2019 17:39:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ieo9l-0002bX-Ml for guix-patches@gnu.org; Tue, 10 Dec 2019 17:39:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#38462] [PATCH v2] linux-boot: Don't ignore flags when mounting root file system. Resent-From: Guillaume Le Vaillant Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 10 Dec 2019 22:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38462 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?utf-8?q?Court=C3=A8s?= Cc: 38462@debbugs.gnu.org Received: via spool by 38462-submit@debbugs.gnu.org id=B38462.15760174839936 (code B ref 38462); Tue, 10 Dec 2019 22:39:01 +0000 Received: (at 38462) by debbugs.gnu.org; 10 Dec 2019 22:38:03 +0000 Received: from localhost ([127.0.0.1]:56723 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ieo8o-0002aB-Mp for submit@debbugs.gnu.org; Tue, 10 Dec 2019 17:38:02 -0500 Received: from mout02.posteo.de ([185.67.36.66]:58481) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ieo8m-0002Zh-N0 for 38462@debbugs.gnu.org; Tue, 10 Dec 2019 17:38:01 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id A5874240100 for <38462@debbugs.gnu.org>; Tue, 10 Dec 2019 23:37:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1576017474; bh=P519FdqmNFx+8nX9vSi5g5kvnXGH7rsh/sVHYvMOekQ=; h=From:To:Cc:Subject:Date:From; b=dCjLN0cjuBQW3BpN2h7kSi4B7rZS7RDi+pkiXIoOplVptjqL54AO4XR9wozlFE40Q EM3l//68dz/SdLEibXftNRAzm5lv07t0HRfwfXB9vvTj9IDt/7bzzOfkMolmKNUQDe A1uM3WOn7p6kSNBVVZ7vRGS9PN1vqOdFi8nlTghVoxqLMETdhMeObuNnMDV6VjCfnI LU3LoN+AfrSsOz/Uy7JQ6uWcCX6LQ94YZaLH9fW4qDzgsVOiPjBeZJ5s+kVngzswsH kzwgJRAt9RDdYRXYZXsQ7oAlPwZpdSp2cLlxa4HhyfAqEPv9Y0mBLlagJEyWE0fwlO O9QDgt4etpxag== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 47XZgq5K7rz9rxT; Tue, 10 Dec 2019 23:37:27 +0100 (CET) References: <20191202205734.7018-1-glv@posteo.net> <87v9qpeeih.fsf@gnu.org> <87wob5v7zv.fsf@yamatai> <87k174kncu.fsf@gnu.org> <87fthsklk4.fsf@gnu.org> User-agent: mu4e 1.2.0; emacs 26.3 From: Guillaume Le Vaillant In-reply-to: <87fthsklk4.fsf@gnu.org> Date: Tue, 10 Dec 2019 23:37:25 +0100 Message-ID: <871rtb6c4a.fsf@yamatai> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Ludovic Courtès skribis: > Ludovic Courtès 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. From f26de9d63a84842029d2393f28f6c96aa2bc766e Mon Sep 17 00:00:00 2001 From: Guillaume Le Vaillant 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