guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#51346] [PATCH 0/1 core-updates-frozen] Rework swap device to add de


From: Ludovic Courtès
Subject: [bug#51346] [PATCH 0/1 core-updates-frozen] Rework swap device to add dependencies and flags
Date: Mon, 15 Nov 2021 11:59:35 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

Josselin Poiret <dev@jpoiret.xyz> 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 ‘sanitize’ field in <swap-space> that
checks the flags, similar to commit 5eb5c0789f34e87ee417a53ddfcfa3b6521bb337.

> -            swap-space-dependencies))
> +            swap-space-dependencies
> +         swap-space-priority
> +         swap-space-discard?))

Please don’t use tabs at all in Scheme code.

LGTM!

Ludo’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]