From patchwork Fri Sep 22 12:54:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 54151 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 9FE7F27BBEA; Fri, 22 Sep 2023 13:55:04 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id E238B27BBE2 for ; Fri, 22 Sep 2023 13:55:03 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qjfgL-00012W-HN; Fri, 22 Sep 2023 08:54:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qjfgJ-00011e-SX for guix-patches@gnu.org; Fri, 22 Sep 2023 08:54:51 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qjfgJ-0007pV-KT for guix-patches@gnu.org; Fri, 22 Sep 2023 08:54:51 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qjfgU-0005gK-0r for guix-patches@gnu.org; Fri, 22 Sep 2023 08:55:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66156] [PATCH 01/12] system: vm: Remove unused variable. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 22 Sep 2023 12:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66156 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 66156@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 66156-submit@debbugs.gnu.org id=B66156.169538728921722 (code B ref 66156); Fri, 22 Sep 2023 12:55:01 +0000 Received: (at 66156) by debbugs.gnu.org; 22 Sep 2023 12:54:49 +0000 Received: from localhost ([127.0.0.1]:35552 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qjfgG-0005eG-Rw for submit@debbugs.gnu.org; Fri, 22 Sep 2023 08:54:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41038) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qjfgF-0005dw-Sk for 66156@debbugs.gnu.org; Fri, 22 Sep 2023 08:54:48 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qjffz-0007hz-WB; Fri, 22 Sep 2023 08:54:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=ZGlerw3K7OKiAcIhhspU1FeTNN6FdhrrNcr8HkJE9Fs=; b=HpVJRnTWGvttyIdsfWQs 0WXnFIWkj/fMubKKofh5JroNQGuAsdGfot9X5z0G+YbLYaV+uG7+iSNzkJoOLMDdQNYjw9itO76dH 3CpdESoVtUVXCoDpWLciFUYUDyJ9s2D0RGz4jgHcMF262BU4rujss1gy1hFMUVgnZohhv77JgmHu1 8yAYs60flbGtfTv+vByLGwMGzeMfAPP78sUbl6oAI75ye53oj+Tscqq4keOqWkjyzEmWGI8pVJb94 HGHrCNxs+IFyqL0ZAnIJPpmeOtAHYnyBMe3FnizdZd9Qu5pbBQnM9iJoZMUJRa/brXDRZW7sRvPSp Eoca42KyDLblcQ==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Fri, 22 Sep 2023 14:54:02 +0200 Message-ID: <02183e2b969d684ab500453bc9bc05834fa366dd.1695386493.git.ludo@gnu.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches This is a followup to 05a9d1f378e2e13e8f759be926ea368358afc27c, which removed its sole user. * gnu/system/vm.scm (%linux-vm-file-systems): Remove. (mapping->file-system): Add comment about “cache=loose”. --- gnu/system/vm.scm | 41 ++++++----------------------------------- 1 file changed, 6 insertions(+), 35 deletions(-) diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index b7bccd72a4..70f7b00116 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -87,41 +87,6 @@ (define-module (gnu system vm) ;; conservative default. (define %default-msize-value (* 100 (expt 2 20))) ;100 MiB -(define %linux-vm-file-systems - ;; File systems mounted for 'derivation-in-linux-vm'. These are shared with - ;; the host over 9p. - ;; - ;; The 9p documentation says that cache=loose is "intended for exclusive, - ;; read-only mounts", without additional details. It's much faster than the - ;; default cache=none, especially when copying and registering store items. - ;; Thus, use cache=loose, except for /xchg where we want to ensure - ;; consistency. - (list (file-system - (mount-point (%store-prefix)) - (device "store") - (type "9p") - (needed-for-boot? #t) - (flags '(read-only)) - (options (format #f "trans=virtio,cache=loose,msize=~a" - %default-msize-value)) - (check? #f)) - (file-system - (mount-point "/xchg") - (device "xchg") - (type "9p") - (needed-for-boot? #t) - (options (format #f "trans=virtio,msize=~a" %default-msize-value)) - (check? #f)) - (file-system - (mount-point "/tmp") - (device "tmp") - (type "9p") - (needed-for-boot? #t) - (options (format #f "trans=virtio,cache=loose,msize=~a" - %default-msize-value)) - (check? #f)))) - - ;;; ;;; VMs that share file systems with the host. ;;; @@ -145,6 +110,12 @@ (define (mapping->file-system mapping) (device (file-system->mount-tag source)) (type "9p") (flags (if writable? '() '(read-only))) + + ;; The 9p documentation says that cache=loose is "intended for + ;; exclusive, read-only mounts", without additional details. It's + ;; faster than the default cache=none, especially when copying and + ;; registering store items. Thus, use cache=loose, except for writable + ;; mounts, to ensure consistency. (options (string-append "trans=virtio" (if writable? "" ",cache=loose") ",msize=" (number->string %default-msize-value)))