unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#38468] [PATCH] file-systems: Add support for 'strict-atime' and 'lazy-time' flags.
@ 2019-12-03  9:31 Guillaume Le Vaillant
  2019-12-07  0:01 ` bug#38468: " Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Guillaume Le Vaillant @ 2019-12-03  9:31 UTC (permalink / raw)
  To: 38468; +Cc: Guillaume Le Vaillant

* 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.
---
 doc/guix.texi              | 9 ++++++---
 gnu/build/file-systems.scm | 5 +++++
 guix/build/syscalls.scm    | 3 +++
 3 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 2da1ecd64c..9b0677d775 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -11244,9 +11244,12 @@ corresponding device mapping established.
 This is a list of symbols denoting mount flags.  Recognized flags
 include @code{read-only}, @code{bind-mount}, @code{no-dev} (disallow
 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}
-(disallow program execution).  @xref{Mount-Unmount-Remount,,, libc, The GNU C
-Library Reference Manual}, for more information on these flags.
+bits), @code{no-atime} (do not update file access times),
+@code{strict-atime} (update file access time), @code{lazy-time} (only
+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})
 This is either @code{#f}, or a string denoting mount options passed to the
diff --git a/gnu/build/file-systems.scm b/gnu/build/file-systems.scm
index cb90fa0907..13c44aa728 100644
--- a/gnu/build/file-systems.scm
+++ b/gnu/build/file-systems.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2016, 2017 David Craven <david@craven.ch>
 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -577,6 +578,10 @@ corresponds to the symbols listed in FLAGS."
        (logior MS_NOEXEC (loop rest)))
       (('no-atime rest ...)
        (logior MS_NOATIME (loop rest)))
+      (('strict-atime rest ...)
+       (logior MS_STRICTATIME (loop rest)))
+      (('lazy-time rest ...)
+       (logior MS_LAZYTIME (loop rest)))
       (()
        0))))
 
diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm
index ce7999b433..248d6761fc 100644
--- a/guix/build/syscalls.scm
+++ b/guix/build/syscalls.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2015 David Thompson <davet@gnu.org>
 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -43,6 +44,7 @@
             MS_BIND
             MS_MOVE
             MS_STRICTATIME
+            MS_LAZYTIME
             MNT_FORCE
             MNT_DETACH
             MNT_EXPIRE
@@ -451,6 +453,7 @@ the returned procedure is called."
 (define MS_BIND            4096)
 (define MS_MOVE            8192)
 (define MS_STRICTATIME 16777216)
+(define MS_LAZYTIME    33554432)
 
 (define MNT_FORCE       1)
 (define MNT_DETACH      2)
-- 
2.24.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#38468: [PATCH] file-systems: Add support for 'strict-atime' and 'lazy-time' flags.
  2019-12-03  9:31 [bug#38468] [PATCH] file-systems: Add support for 'strict-atime' and 'lazy-time' flags Guillaume Le Vaillant
@ 2019-12-07  0:01 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2019-12-07  0:01 UTC (permalink / raw)
  To: Guillaume Le Vaillant; +Cc: 38468-done

Hi Guillaume,

Guillaume Le Vaillant <glv@posteo.net> skribis:

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

Applied, thanks!

Ludo’.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-12-07  0:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-03  9:31 [bug#38468] [PATCH] file-systems: Add support for 'strict-atime' and 'lazy-time' flags Guillaume Le Vaillant
2019-12-07  0:01 ` bug#38468: " Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).