summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrendaw <7e9wc56emjakcm@s.rendaw.me>2019-04-29 12:08:51 +0200
committerLudovic Courtès <ludo@gnu.org>2019-04-29 12:19:03 +0200
commit9d3053819dfd834a1c29a03427c41d8524b8a7d5 (patch)
tree079b362a7ffa3d2c8b6947d27740de16e49c3c12
parent2f8198dfed1de935dfc60510a5514e5c289c3fc7 (diff)
file-systems: Support the 'no-atime' flag.
* guix/build/syscalls.scm (MS_NOATIME): New variable. * gnu/build/file-systems.scm (mount-flags->bit-mask): Support it. * doc/guix.texi (File Systems): Document it and add cross-references to the relevant documentation. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
-rw-r--r--doc/guix.texi9
-rw-r--r--gnu/build/file-systems.scm2
-rw-r--r--guix/build/syscalls.scm2
3 files changed, 11 insertions, 2 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 8f6e5bc20c8..39d2ee476a6 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -10753,10 +10753,15 @@ corresponding device mapping established.
10753This is a list of symbols denoting mount flags. Recognized flags 10753This is a list of symbols denoting mount flags. Recognized flags
10754include @code{read-only}, @code{bind-mount}, @code{no-dev} (disallow 10754include @code{read-only}, @code{bind-mount}, @code{no-dev} (disallow
10755access to special files), @code{no-suid} (ignore setuid and setgid 10755access to special files), @code{no-suid} (ignore setuid and setgid
10756bits), and @code{no-exec} (disallow program execution.) 10756bits), @code{no-atime} (do not update file access times), and @code{no-exec}
10757(disallow program execution). @xref{Mount-Unmount-Remount,,, libc, The GNU C
10758Library Reference Manual}, for more information on these flags.
10757 10759
10758@item @code{options} (default: @code{#f}) 10760@item @code{options} (default: @code{#f})
10759This is either @code{#f}, or a string denoting mount options. 10761This is either @code{#f}, or a string denoting mount options passed to the
10762file system driver. @xref{Mount-Unmount-Remount,,, libc, The GNU C Library
10763Reference Manual}, for details and run @command{man 8 mount} for options for
10764various file systems.
10760 10765
10761@item @code{mount?} (default: @code{#t}) 10766@item @code{mount?} (default: @code{#t})
10762This value indicates whether to automatically mount the file system when 10767This value indicates whether to automatically mount the file system when
diff --git a/gnu/build/file-systems.scm b/gnu/build/file-systems.scm
index c4681441709..8bb10d574d3 100644
--- a/gnu/build/file-systems.scm
+++ b/gnu/build/file-systems.scm
@@ -575,6 +575,8 @@ corresponds to the symbols listed in FLAGS."
575 (logior MS_NODEV (loop rest))) 575 (logior MS_NODEV (loop rest)))
576 (('no-exec rest ...) 576 (('no-exec rest ...)
577 (logior MS_NOEXEC (loop rest))) 577 (logior MS_NOEXEC (loop rest)))
578 (('no-atime rest ...)
579 (logior MS_NOATIME (loop rest)))
578 (() 580 (()
579 0)))) 581 0))))
580 582
diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm
index 66d63a29314..3316dc8dc59 100644
--- a/guix/build/syscalls.scm
+++ b/guix/build/syscalls.scm
@@ -39,6 +39,7 @@
39 MS_NODEV 39 MS_NODEV
40 MS_NOEXEC 40 MS_NOEXEC
41 MS_REMOUNT 41 MS_REMOUNT
42 MS_NOATIME
42 MS_BIND 43 MS_BIND
43 MS_MOVE 44 MS_MOVE
44 MS_STRICTATIME 45 MS_STRICTATIME
@@ -451,6 +452,7 @@ the returned procedure is called."
451(define MS_NODEV 4) 452(define MS_NODEV 4)
452(define MS_NOEXEC 8) 453(define MS_NOEXEC 8)
453(define MS_REMOUNT 32) 454(define MS_REMOUNT 32)
455(define MS_NOATIME 1024)
454(define MS_BIND 4096) 456(define MS_BIND 4096)
455(define MS_MOVE 8192) 457(define MS_MOVE 8192)
456(define MS_STRICTATIME 16777216) 458(define MS_STRICTATIME 16777216)