From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:50828) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ic4XO-0005va-Hi for guix-patches@gnu.org; Tue, 03 Dec 2019 04:32:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ic4XL-0007QF-Ty for guix-patches@gnu.org; Tue, 03 Dec 2019 04:32:06 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:33308) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ic4XL-0007Lf-MU for guix-patches@gnu.org; Tue, 03 Dec 2019 04:32:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ic4XK-0004Mx-Ir for guix-patches@gnu.org; Tue, 03 Dec 2019 04:32:02 -0500 Subject: [bug#38468] [PATCH] file-systems: Add support for 'strict-atime' and 'lazy-time' flags. Resent-Message-ID: Received: from eggs.gnu.org ([2001:470:142:3::10]:47128) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ic4X3-0005fN-KH for guix-patches@gnu.org; Tue, 03 Dec 2019 04:31:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ic4X1-0006GV-SU for guix-patches@gnu.org; Tue, 03 Dec 2019 04:31:45 -0500 Received: from mout02.posteo.de ([185.67.36.66]:58043) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ic4X1-0006Cg-4W for guix-patches@gnu.org; Tue, 03 Dec 2019 04:31:43 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id EDE322400E6 for ; Tue, 3 Dec 2019 10:31:40 +0100 (CET) From: Guillaume Le Vaillant Date: Tue, 3 Dec 2019 10:31:08 +0100 Message-Id: <20191203093108.10422-1-glv@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 38468@debbugs.gnu.org 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-e= xec} -(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. =20 @item @code{options} (default: @code{#f}) This is either @code{#f}, or a string denoting mount options passed to t= he 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 =C2=A9 2014, 2015, 2016, 2017, 2018 Ludovic Court=C3=A8s <= ludo@gnu.org> ;;; Copyright =C2=A9 2016, 2017 David Craven ;;; Copyright =C2=A9 2017 Mathieu Othacehe +;;; Copyright =C2=A9 2019 Guillaume Le Vaillant ;;; ;;; 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)))) =20 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 =C2=A9 2015 David Thompson ;;; Copyright =C2=A9 2015 Mark H Weaver ;;; Copyright =C2=A9 2017 Mathieu Othacehe +;;; Copyright =C2=A9 2019 Guillaume Le Vaillant ;;; ;;; 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) =20 (define MNT_FORCE 1) (define MNT_DETACH 2) --=20 2.24.0