system: Add swap flags.

* 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.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Josselin Poiret 2021-11-15 20:26:29 +00:00 committed by Ludovic Courtès
parent f574dbd163
commit 0831dfab75
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
4 changed files with 60 additions and 5 deletions

View file

@ -102,7 +102,9 @@
swap-space
swap-space?
swap-space-target
swap-space-dependencies))
swap-space-dependencies
swap-space-priority
swap-space-discard?))
;;; Commentary:
;;;
@ -726,6 +728,10 @@ subvolume name is unknown."))
this-swap-space
(target swap-space-target)
(dependencies swap-space-dependencies
(default '())))
(default '()))
(priority swap-space-priority
(default #f))
(discard? swap-space-discard?
(default #f)))
;;; file-systems.scm ends here