mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
file-systems: Add support for 'strict-atime' and 'lazy-time' flags.
* guix/build/syscalls.scm (MS_LAZYTIME): New variable. * gnu/build/file-systems.scm (mount-flags->bit-mask): Add match rules for 'strict-atime' and 'lazy-time'. * doc/guix.texi (File Systems): Add 'strict-atime' and 'lazy-time' to the list of supported flags. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
158032bd7d
commit
0dc5c85638
3 changed files with 14 additions and 3 deletions
|
@ -11244,9 +11244,12 @@ corresponding device mapping established.
|
||||||
This is a list of symbols denoting mount flags. Recognized flags
|
This is a list of symbols denoting mount flags. Recognized flags
|
||||||
include @code{read-only}, @code{bind-mount}, @code{no-dev} (disallow
|
include @code{read-only}, @code{bind-mount}, @code{no-dev} (disallow
|
||||||
access to special files), @code{no-suid} (ignore setuid and setgid
|
access to special files), @code{no-suid} (ignore setuid and setgid
|
||||||
bits), @code{no-atime} (do not update file access times), and @code{no-exec}
|
bits), @code{no-atime} (do not update file access times),
|
||||||
(disallow program execution). @xref{Mount-Unmount-Remount,,, libc, The GNU C
|
@code{strict-atime} (update file access time), @code{lazy-time} (only
|
||||||
Library Reference Manual}, for more information on these flags.
|
update time on the in-memory version of the file inode), and
|
||||||
|
@code{no-exec} (disallow program execution).
|
||||||
|
@xref{Mount-Unmount-Remount,,, libc, The GNU C Library Reference
|
||||||
|
Manual}, for more information on these flags.
|
||||||
|
|
||||||
@item @code{options} (default: @code{#f})
|
@item @code{options} (default: @code{#f})
|
||||||
This is either @code{#f}, or a string denoting mount options passed to the
|
This is either @code{#f}, or a string denoting mount options passed to the
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
;;; Copyright © 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright © 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
|
||||||
;;; Copyright © 2016, 2017 David Craven <david@craven.ch>
|
;;; Copyright © 2016, 2017 David Craven <david@craven.ch>
|
||||||
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
|
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
|
||||||
|
;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -577,6 +578,10 @@ (define (mount-flags->bit-mask flags)
|
||||||
(logior MS_NOEXEC (loop rest)))
|
(logior MS_NOEXEC (loop rest)))
|
||||||
(('no-atime rest ...)
|
(('no-atime rest ...)
|
||||||
(logior MS_NOATIME (loop rest)))
|
(logior MS_NOATIME (loop rest)))
|
||||||
|
(('strict-atime rest ...)
|
||||||
|
(logior MS_STRICTATIME (loop rest)))
|
||||||
|
(('lazy-time rest ...)
|
||||||
|
(logior MS_LAZYTIME (loop rest)))
|
||||||
(()
|
(()
|
||||||
0))))
|
0))))
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
;;; Copyright © 2015 David Thompson <davet@gnu.org>
|
;;; Copyright © 2015 David Thompson <davet@gnu.org>
|
||||||
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
|
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
|
||||||
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
|
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
|
||||||
|
;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -43,6 +44,7 @@ (define-module (guix build syscalls)
|
||||||
MS_BIND
|
MS_BIND
|
||||||
MS_MOVE
|
MS_MOVE
|
||||||
MS_STRICTATIME
|
MS_STRICTATIME
|
||||||
|
MS_LAZYTIME
|
||||||
MNT_FORCE
|
MNT_FORCE
|
||||||
MNT_DETACH
|
MNT_DETACH
|
||||||
MNT_EXPIRE
|
MNT_EXPIRE
|
||||||
|
@ -451,6 +453,7 @@ (define MS_NOATIME 1024)
|
||||||
(define MS_BIND 4096)
|
(define MS_BIND 4096)
|
||||||
(define MS_MOVE 8192)
|
(define MS_MOVE 8192)
|
||||||
(define MS_STRICTATIME 16777216)
|
(define MS_STRICTATIME 16777216)
|
||||||
|
(define MS_LAZYTIME 33554432)
|
||||||
|
|
||||||
(define MNT_FORCE 1)
|
(define MNT_FORCE 1)
|
||||||
(define MNT_DETACH 2)
|
(define MNT_DETACH 2)
|
||||||
|
|
Loading…
Reference in a new issue