GNU bug report logs -
#51346
[PATCH 0/1 core-updates-frozen] Rework swap device to add dependencies and flags
Previous Next
Reported by: Josselin Poiret <dev <at> jpoiret.xyz>
Date: Sat, 23 Oct 2021 09:47:02 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Josselin Poiret <dev <at> 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’.
This bug report was last modified 3 years and 185 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.