From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id MMjvAwDS3GCAVwEAgWs5BA (envelope-from ) for ; Wed, 30 Jun 2021 22:20:16 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id OMYqO//R3GBlWQAAbx9fmQ (envelope-from ) for ; Wed, 30 Jun 2021 20:20:15 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B4AFC1BDF8 for ; Wed, 30 Jun 2021 22:20:15 +0200 (CEST) Received: from localhost ([::1]:45444 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyggw-0002Oc-LP for larch@yhetil.org; Wed, 30 Jun 2021 16:20:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41272) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyggl-0002O8-QS for guix-patches@gnu.org; Wed, 30 Jun 2021 16:20:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47348) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyggl-0007wq-IB for guix-patches@gnu.org; Wed, 30 Jun 2021 16:20:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lyggl-0004HF-E0 for guix-patches@gnu.org; Wed, 30 Jun 2021 16:20:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49301] [PATCH 3/3] gnu: Don't abuse check-btrfs-file-system to scan. Resent-From: Tobias Geerinckx-Rice Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 30 Jun 2021 20:20:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49301 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49301@debbugs.gnu.org Received: via spool by 49301-submit@debbugs.gnu.org id=B49301.162508439616405 (code B ref 49301); Wed, 30 Jun 2021 20:20:03 +0000 Received: (at 49301) by debbugs.gnu.org; 30 Jun 2021 20:19:56 +0000 Received: from localhost ([127.0.0.1]:58892 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lygge-0004GX-Ew for submit@debbugs.gnu.org; Wed, 30 Jun 2021 16:19:56 -0400 Received: from tobias.gr ([80.241.217.52]:49468) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyggW-0004Fr-DA for 49301@debbugs.gnu.org; Wed, 30 Jun 2021 16:19:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=2018; bh=aVYLh5R2i7r2n h3aaH8KgGUMxUCytSGQR1wtkH6tD4g=; h=references:in-reply-to:date: subject:to:from; d=tobias.gr; b=op6tUSgpGmKuAUubSelJRvAS7Tjkd0R0ch2L9J R22xTnfs2Yh8aesIDZ2rECDzk7MESGElvwEg9Pd8LVpSTSpEve+3J8Z+nZGu0+WbLR08f7 fXKHv/OI1XG89rhzsrLWJFh3FFbUtRbRgoTxhdjWUu9rhllGDWU/NzpgcALJFeGzo+hWL9 weMifsGh7537KR84Tnc0uSb6k/yX854GC9oN1nCujH69wo8rsEIGpJJYLB9KxeldGlYu0v RESq8gYAVH/pIq9S+B2ZsajeOKj2XEi/ZD6mW/9h9wys6L/pJp/XHa0QCXEtJh8BeX8V7U TY1Yp3mTPBXXKjcu/Ov4LZ3g== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id 455c21b6 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO) for <49301@debbugs.gnu.org>; Wed, 30 Jun 2021 20:19:43 +0000 (UTC) Date: Wed, 30 Jun 2021 22:20:18 +0200 Message-Id: <20210630202018.19124-3-me@tobias.gr> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210630202018.19124-1-me@tobias.gr> References: <20210630202018.19124-1-me@tobias.gr> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: Tobias Geerinckx-Rice X-ACL-Warn: , Tobias Geerinckx-Rice via Guix-patches From: Tobias Geerinckx-Rice via Guix-patches via X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1625084415; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=aVYLh5R2i7r2nh3aaH8KgGUMxUCytSGQR1wtkH6tD4g=; b=XfRl8IYA49mAee7Y8q3sI87eQCjbgvdRn4Z3q6vViczo479VnXPfn72DbJ3+kx1fVRtN72 c2kYCjuNjm++J3ANTFLfMmj5rVhCsv8lz/AuXS7ExHSu2nAJtXhftYAuE1PZYw6Qbdg7It /KPTCrpqMAk7LeQPnkQXqqiOmsWlMehnClqn66PC4U12vm/tqzCK+ySkCp18H4m24zKCwk xeMLNSVnVoe4MkHiDFKFA54Jw9XFeLB1eGdnwHWvAliF4Lv37sVbL0FnSVX5jJzysYt67O qsHvEI0zDRl/SstQQwpRTRef0BQHOja9AHp6jrk1zaOrQzZ+2i95YI+xc1KOYw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1625084415; a=rsa-sha256; cv=none; b=gW0jgyZKiZYU12DSF5NAlA4/KGeGWI/kE84oQlI6t37jl8W/2wKUj/juz9d5BE7qQK3X2M WKM0LvFOJRgCZkT6NU1pSoweW7PpcRgrcxfHgXrGfHdF3S5UnaLVYAfmz2Hp4Dgav9oReZ ju3dMbVGVqpmraD5V0Rjcw13UNODm1uJwi75zMLoeRXuKmbNaUzDg5Z2wQgqljN2x+jYUJ 2bgulB2bRn9z8nYz3J35gaeMyRdi+gRMNFIlBZWtN9SCaiKtoUOP75qfRnDzEpZp3NdhL3 8Pm7wwkAGguTkMTk8GjVyEqAoWwKqrBNk9LMkqdomMDrN84kN/kkRA7HxBcuUA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tobias.gr header.s=2018 header.b=op6tUSgp; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -2.92 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tobias.gr header.s=2018 header.b=op6tUSgp; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: B4AFC1BDF8 X-Spam-Score: -2.92 X-Migadu-Scanner: scn0.migadu.com X-TUID: 4RC1SHwoBYM8 It was never guaranteed to be run for non-root file systems. It was for root file systems only due to a bug now fixed. * gnu/build/file-systems.scm (check-btrfs-file-system): Don't invoke ‘btrfs device scan’ here. * gnu/system/linux-initrd.scm (raw-initrd): Do so here if any btrfs file systems are present. --- gnu/build/file-systems.scm | 2 -- gnu/system/linux-initrd.scm | 13 ++++++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/gnu/build/file-systems.scm b/gnu/build/file-systems.scm index 8f76d8d564..607d9f418f 100644 --- a/gnu/build/file-systems.scm +++ b/gnu/build/file-systems.scm @@ -327,8 +327,6 @@ the file system even if it's marked as clean. This is not recommended! See @uref{https://bugzilla.redhat.com/show_bug.cgi?id=625967#c8}. If REPAIR is false, do not write to DEVICE. If it's #t, fix any errors found. Otherwise, fix only those considered safe to repair automatically." - ;; XXX Why make this conditional on (check? #t) at all? - (system* "btrfs" "device" "scan") ; ignore errors (if force? (match (status:exit-val (apply system* `("btrfs" "check" "--progress" diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm index c6ba9bb560..46fe24b24e 100644 --- a/gnu/system/linux-initrd.scm +++ b/gnu/system/linux-initrd.scm @@ -210,6 +210,16 @@ upon error." (open source targets))) mapped-devices)) + (define file-system-scan-commands + ;; File systems like btrfs need help to assemble multi-device file systems + ;; but do not use manually-specified . + (let ((file-system-types (map file-system-type file-systems))) + (if (member "btrfs" file-system-types) + ;; Ignore errors: if the system manages to boot anyway, the better. + #~((system* (string-append #$btrfs-progs/static "/bin/btrfs") + "device" "scan")) + #~()))) + (define kodir (flat-linux-module-directory linux linux-modules)) @@ -245,7 +255,8 @@ upon error." (map spec->file-system '#$(map file-system->spec file-systems)) #:pre-mount (lambda () - (and #$@device-mapping-commands)) + (and #$@device-mapping-commands + #$@file-system-scan-commands)) #:linux-modules '#$linux-modules #:linux-module-directory '#$kodir #:keymap-file #+(and=> keyboard-layout -- 2.32.0