From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id aG+DHb89kmGcUgEAgWs5BA (envelope-from ) for ; Mon, 15 Nov 2021 12:00:15 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id EAs/Gb89kmF4MAAAB5/wlQ (envelope-from ) for ; Mon, 15 Nov 2021 11:00: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 1FC6426107 for ; Mon, 15 Nov 2021 12:00:15 +0100 (CET) Received: from localhost ([::1]:37796 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mmZif-0001iA-7h for larch@yhetil.org; Mon, 15 Nov 2021 06:00:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54604) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmZiU-0001hn-8e for guix-patches@gnu.org; Mon, 15 Nov 2021 06:00:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:41209) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mmZiT-0004s6-UY for guix-patches@gnu.org; Mon, 15 Nov 2021 06:00:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mmZiT-0007qp-Rp for guix-patches@gnu.org; Mon, 15 Nov 2021 06:00:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51346] [PATCH 0/1 core-updates-frozen] Rework swap device to add dependencies and flags Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 15 Nov 2021 11:00:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51346 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Josselin Poiret Cc: Tobias Geerinckx-Rice , 51346@debbugs.gnu.org Received: via spool by 51346-submit@debbugs.gnu.org id=B51346.163697398530128 (code B ref 51346); Mon, 15 Nov 2021 11:00:01 +0000 Received: (at 51346) by debbugs.gnu.org; 15 Nov 2021 10:59:45 +0000 Received: from localhost ([127.0.0.1]:52755 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmZiD-0007ps-1M for submit@debbugs.gnu.org; Mon, 15 Nov 2021 05:59:45 -0500 Received: from eggs.gnu.org ([209.51.188.92]:53808) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmZiB-0007pg-4R for 51346@debbugs.gnu.org; Mon, 15 Nov 2021 05:59:43 -0500 Received: from [2001:470:142:3::e] (port=57818 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmZi5-0004p8-RP; Mon, 15 Nov 2021 05:59:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=iEKQKWfl2HYHi+Q7CI4Ni5euyODtEBhM3P8Wiujf5lI=; b=b//z4j4b/V6h/LvAS2XU 8jBwc/H1w6l2uHXDttkgbF9qXmiXj/BnTfyPTq28TifiBbhBz5gUFdrAvfvDXJO4Ao/4mG2pyY2sF VLM0Lym84T4UkM1wwHLshWkQNWVGSejuh3gg1xtIRxMGlI0AyJEcigHMva3odyfYl4PcHHAVdu+PT fujWdG82K3GbJTwU2nzJcAxH2e9xCnvuhIuB/aG2niT92UEle64IUsVMQEveZNBAapoGMlPv/V4Uw N0Ui42lx50x7+FBTJ7+arAPwbwb6rGOHh1yZeuia0JTwpHEqT13rnPtSl5BhBvEyjdVNhAGd7+5tM Uq1V5zvpEGgbmQ==; Received: from [193.50.110.110] (port=57552 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmZi5-0007RU-F5; Mon, 15 Nov 2021 05:59:37 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87tuh6ifwe.fsf@nckx> <20211027150913.6038-1-dev@jpoiret.xyz> <20211027150913.6038-3-dev@jpoiret.xyz> Date: Mon, 15 Nov 2021 11:59:35 +0100 In-Reply-To: <20211027150913.6038-3-dev@jpoiret.xyz> (Josselin Poiret's message of "Wed, 27 Oct 2021 15:09:11 +0000") Message-ID: <878rxp7kh4.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1636974015; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=iEKQKWfl2HYHi+Q7CI4Ni5euyODtEBhM3P8Wiujf5lI=; b=bduwy2nvFOMAnFDfLuLV49s/IlW4s0CUAXO98BlWCVy85uroWVUTWP+b5dp5DSg9nIwBSi 6qna7zIT2dNxS9q4Lqdc8uGmulxLHBenC4BerUDe/VMaWxBLWoj/Lz3nhEfwTBHl1G3fnx mkNDzeZNtEClgDxNym6NgQRkPQrg8NRU3MGD8M0SbYz+IhFfiFlve6u1wmZgo7nFPXjHA4 WAigaEjpl+1pGQcObUQtHHcGbAKN3vE/nZ58ho48Fn4vf4HmFICQloMM1oeHQ7O8vRCgn+ tMWsfnbgY+DN/BPqsYgkU/+TDb6/h22BqvzEmFydASC1jtCpqJ4DpXdINCATTg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1636974015; a=rsa-sha256; cv=none; b=WiI0eWBUQ16fCRoYhGmMn7wQl+wxwX11aZ0BIFKsVFsdyZQTR1cC2iwobkCVcBme4CfWq8 stM7J8VCJcKYl4gWkVQIjl2ws5YM9/CUWKhvrKY97PVo+6S/7J/yB9LKOejZJQpFX5X3nC dsRkNNoYyZbVm9zJqeM8HOToo10WWFIwvGHYzyXJ50ndPRrIntO12Qt6RfAl6iImLrD6Qj FTmEa+K3Pw40zdPLRPFREehjCMtXXE7gAXBUsX+0mlLqDpzSMCJwAQtQ5L6foseICxAaWz 4F5xK2G5NwzOxDoZtSe9l6zYIMjkI1HIMkNktBsLmP/QfzGRNInusnvoPjAjnA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b="b//z4j4b"; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.04 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b="b//z4j4b"; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 1FC6426107 X-Spam-Score: -2.04 X-Migadu-Scanner: scn0.migadu.com X-TUID: 4YB4yhOL3jBc Josselin Poiret skribis: > * gnu/system/file-systems.scm (swap-space)[priority, discard?]: Add > them. > * guix/build/syscalls.scm (SWAP_FLAG_PREFER, SWAP_FLAG_PRIO_MASK, > SWAP_FLAG_PRIO_SHIFT, SWAP_FLAG_DISCARD): Add them. > * gnu/build/file-systems.scm (swap-space->flags-bit-mask): Add it. > * gnu/services/base.scm (swap-service-type): Use it. [...] > (let ((device #$device-lookup)) > (and device > (begin > - (restart-on-EINTR (swapon device)) > + (restart-on-EINTR (swapon device > + #$(swap-space->flags-bit-mask > + swap))) Note for later: IWBN to have a =E2=80=98sanitize=E2=80=99 field in that checks the flags, similar to commit 5eb5c0789f34e87ee417a53ddfcfa3b6521bb33= 7. > - swap-space-dependencies)) > + swap-space-dependencies > + swap-space-priority > + swap-space-discard?)) Please don=E2=80=99t use tabs at all in Scheme code. LGTM! Ludo=E2=80=99.