Add filesystem flag NOATIME

  • Done
  • quality assurance status badge
Details
3 participants
  • rendaw
  • Danny Milosavljevic
  • Ludovic Courtès
Owner
unassigned
Submitted by
rendaw
Severity
wishlist

Debbugs page

rendaw wrote 6 years ago
(address . submit@debbugs.gnu.org)
55bde56a-35de-fab2-c21c-6b6eeff0c958@s.rendaw.me
Package: guix
Version: 0.16.0
Severity: wishlist

This is useful for mounting drives with limited write lifetime such as
cheap ssds, and there have been some historical reports of noatime
causing COW-linked files on btrfs to split.
rendaw wrote 6 years ago
(address . guix-patches@gnu.org)
e09918df-391e-8c47-df40-29c745dea74d@s.rendaw.me
Add a no-atime flag to the file-system flags parameter and updates the
relevant documentation.

I believe these changes in the documentation give readers a starting
point for how to understand flags vs options, as well as indicate that
the reference is complete (that there isn't a separate reference with
more flags listed somewhere).
From e7dcba4a76d624470d05172390dde8151fdb4750 Mon Sep 17 00:00:00 2001
From: rendaw <>
Date: Mon, 29 Apr 2019 01:00:17 +0900
Subject: [PATCH] [bug #35475] [PATCH] Add filesystem flag NOATIME

Add a no-atime flag to the file-system flags parameter and updates the relevant documentation.
---
doc/guix.texi | 11 +++++++----
gnu/build/file-systems.scm | 2 ++
guix/build/syscalls.scm | 2 ++
3 files changed, 11 insertions(+), 4 deletions(-)

Toggle diff (60 lines)
diff --git a/doc/guix.texi b/doc/guix.texi
index 879cb562e9..8b89bdec53 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -10726,13 +10726,16 @@ the system knows that mounting the file system depends on having the
corresponding device mapping established.
@item @code{flags} (default: @code{'()})
-This is a list of symbols denoting mount flags. Recognized flags
-include @code{read-only}, @code{bind-mount}, @code{no-dev} (disallow
+This is a list of symbols denoting general mount flags. Recognized flags
+are @code{read-only}, @code{bind-mount}, @code{no-dev} (disallow
access to special files), @code{no-suid} (ignore setuid and setgid
-bits), and @code{no-exec} (disallow program execution.)
+bits), @code{no-exec} (disallow program execution), and @code{no-atime}.
+See @code{man 2 mount} for details.
@item @code{options} (default: @code{#f})
-This is either @code{#f}, or a string denoting mount options.
+This is either @code{#f}, or a string denoting filesystem-specific mount
+options passed to the filesystem driver. See @code{man 2 mount} for details
+and @code{man 8 mount} for options for various filesystems.
@item @code{mount?} (default: @code{#t})
This 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 c468144170..8bb10d574d 100644
--- a/gnu/build/file-systems.scm
+++ b/gnu/build/file-systems.scm
@@ -575,6 +575,8 @@ corresponds to the symbols listed in FLAGS."
(logior MS_NODEV (loop rest)))
(('no-exec rest ...)
(logior MS_NOEXEC (loop rest)))
+ (('no-atime rest ...)
+ (logior MS_NOATIME (loop rest)))
(()
0))))
diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm
index 66d63a2931..3316dc8dc5 100644
--- a/guix/build/syscalls.scm
+++ b/guix/build/syscalls.scm
@@ -39,6 +39,7 @@
MS_NODEV
MS_NOEXEC
MS_REMOUNT
+ MS_NOATIME
MS_BIND
MS_MOVE
MS_STRICTATIME
@@ -451,6 +452,7 @@ the returned procedure is called."
(define MS_NODEV 4)
(define MS_NOEXEC 8)
(define MS_REMOUNT 32)
+(define MS_NOATIME 1024)
(define MS_BIND 4096)
(define MS_MOVE 8192)
(define MS_STRICTATIME 16777216)
--
2.21.0
Ludovic Courtès wrote 6 years ago
(name . rendaw)(address . 7e9wc56emjakcm@s.rendaw.me)(address . 35475-done@debbugs.gnu.org)
87o94pglud.fsf@gnu.org
Hello,

rendaw <7e9wc56emjakcm@s.rendaw.me> skribis:

Toggle quote (12 lines)
> From e7dcba4a76d624470d05172390dde8151fdb4750 Mon Sep 17 00:00:00 2001
> From: rendaw <>
> Date: Mon, 29 Apr 2019 01:00:17 +0900
> Subject: [PATCH] [bug #35475] [PATCH] Add filesystem flag NOATIME
>
> Add a no-atime flag to the file-system flags parameter and updates the relevant documentation.
> ---
> doc/guix.texi | 11 +++++++----
> gnu/build/file-systems.scm | 2 ++
> guix/build/syscalls.scm | 2 ++
> 3 files changed, 11 insertions(+), 4 deletions(-)

I tweaked the doc, added a commit log that follows our conventions¹, and
committed.

Thank you!

Ludo’.

Closed
Danny Milosavljevic wrote 6 years ago
(name . Ludovic Courtès)(address . ludo@gnu.org)
20190429125457.77839eb5@scratchpost.org
Let's also add MS_RELATIME which is halfway between noatime and atime.

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlzG2AEACgkQ5xo1VCww
uqVPJQf+L64+ondx11Kzqh0XDVAYvkmsS1S5bYgBoblpUMUF9fP9va/HPQ9PNkjt
D+kruk0rBnYm/jUUzsgbndcO2FSFZebAfJnYD1onJTlxxSqz3mO1DYD3H/fbQ08A
dS0djdZOA0+G7bnbA7NCQPJKU5HZmsFPl4DTIvSDdJF5o4ss648bBF+Jgck63/3d
WDKXnAo7tEAUZQYsP3htbWsFsqUyWcpM/lvsXeRkadV+xjFr8aQ9iz1+OU+sYYl8
hH6HVUFDy6Gwc/UXlLEImZRyDlfv3tKEDOQ0S/wloSpKGEcTH9pTS0m9uMiOYMgE
uWVfQ1G6meEn1iKbcwvxl8XpMSt0MQ==
=eJ0C
-----END PGP SIGNATURE-----


Closed
Ludovic Courtès wrote 6 years ago
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)
878svtghrm.fsf@gnu.org
Danny Milosavljevic <dannym@scratchpost.org> skribis:

Toggle quote (4 lines)
> Let's also add MS_RELATIME which is halfway between noatime and atime.
>
> https://blog.confirm.ch/mount-options-atime-vs-relatime/

Good idea, could you send a patch?

Thanks,
Ludo’.
Closed
rendaw wrote 6 years ago
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 35475-done@debbugs.gnu.org)
6bf39708-2994-e211-0e21-5cbd6207a63e@s.rendaw.me
On 4/29/19 7:14 PM, Ludovic Courtès wrote:
Toggle quote (24 lines)
> Hello,
>
> rendaw <7e9wc56emjakcm@s.rendaw.me> skribis:
>
>> From e7dcba4a76d624470d05172390dde8151fdb4750 Mon Sep 17 00:00:00 2001
>> From: rendaw <>
>> Date: Mon, 29 Apr 2019 01:00:17 +0900
>> Subject: [PATCH] [bug #35475] [PATCH] Add filesystem flag NOATIME
>>
>> Add a no-atime flag to the file-system flags parameter and updates the relevant documentation.
>> ---
>> doc/guix.texi | 11 +++++++----
>> gnu/build/file-systems.scm | 2 ++
>> guix/build/syscalls.scm | 2 ++
>> 3 files changed, 11 insertions(+), 4 deletions(-)
> I tweaked the doc, added a commit log that follows our conventions¹, and
> committed.
>
> Thank you!
>
> Ludo’.
>
> ¹ https://www.gnu.org/software/guix/manual/en/html_node/Submitting-Patches.html

Thank you!  And sorry, I'll read more carefully next time.
Closed
Ludovic Courtès wrote 6 years ago
(name . rendaw)(address . 7e9wc56emjakcm@s.rendaw.me)(address . 35475-done@debbugs.gnu.org)
8736lzmzhh.fsf@gnu.org
rendaw <7e9wc56emjakcm@s.rendaw.me> skribis:

Toggle quote (2 lines)
> On 4/29/19 7:14 PM, Ludovic Courtès wrote:

[...]

Toggle quote (11 lines)
>> I tweaked the doc, added a commit log that follows our conventions¹, and
>> committed.
>>
>> Thank you!
>>
>> Ludo’.
>>
>> ¹ https://www.gnu.org/software/guix/manual/en/html_node/Submitting-Patches.html
>
> Thank you!  And sorry, I'll read more carefully next time.

Don’t be sorry, it’s perfectly understandable!

Ludo’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 35475@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 35475
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help