all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#35475: Add filesystem flag NOATIME
@ 2019-04-28 15:55 rendaw
  2019-04-28 16:02 ` bug#35475: [bug #35475] [PATCH] " rendaw
  0 siblings, 1 reply; 7+ messages in thread
From: rendaw @ 2019-04-28 15:55 UTC (permalink / raw)
  To: 35475

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.

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

* bug#35475: [bug #35475] [PATCH] Add filesystem flag NOATIME
  2019-04-28 15:55 bug#35475: Add filesystem flag NOATIME rendaw
@ 2019-04-28 16:02 ` rendaw
  2019-04-29 10:14   ` Ludovic Courtès
  0 siblings, 1 reply; 7+ messages in thread
From: rendaw @ 2019-04-28 16:02 UTC (permalink / raw)
  To: guix-patches

[-- Attachment #1: Type: text/plain, Size: 338 bytes --]

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



[-- Attachment #2: 0001-bug-35475-PATCH-Add-filesystem-flag-NOATIME.patch --]
[-- Type: text/x-patch, Size: 2799 bytes --]

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(-)

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


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

* bug#35475: [bug #35475] [PATCH] Add filesystem flag NOATIME
  2019-04-28 16:02 ` bug#35475: [bug #35475] [PATCH] " rendaw
@ 2019-04-29 10:14   ` Ludovic Courtès
  2019-04-29 10:54     ` Danny Milosavljevic
  2019-04-30  3:39     ` rendaw
  0 siblings, 2 replies; 7+ messages in thread
From: Ludovic Courtès @ 2019-04-29 10:14 UTC (permalink / raw)
  To: rendaw; +Cc: 35475-done

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

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

* bug#35475: [bug #35475] [PATCH] Add filesystem flag NOATIME
  2019-04-29 10:14   ` Ludovic Courtès
@ 2019-04-29 10:54     ` Danny Milosavljevic
  2019-04-29 11:42       ` Ludovic Courtès
  2019-04-30  3:39     ` rendaw
  1 sibling, 1 reply; 7+ messages in thread
From: Danny Milosavljevic @ 2019-04-29 10:54 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 35475-done, rendaw

[-- Attachment #1: Type: text/plain, Size: 132 bytes --]

Let's also add MS_RELATIME which is halfway between noatime and atime.

https://blog.confirm.ch/mount-options-atime-vs-relatime/

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* bug#35475: [bug #35475] [PATCH] Add filesystem flag NOATIME
  2019-04-29 10:54     ` Danny Milosavljevic
@ 2019-04-29 11:42       ` Ludovic Courtès
  0 siblings, 0 replies; 7+ messages in thread
From: Ludovic Courtès @ 2019-04-29 11:42 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: 35475-done, rendaw

Danny Milosavljevic <dannym@scratchpost.org> skribis:

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

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

* bug#35475: [bug #35475] [PATCH] Add filesystem flag NOATIME
  2019-04-29 10:14   ` Ludovic Courtès
  2019-04-29 10:54     ` Danny Milosavljevic
@ 2019-04-30  3:39     ` rendaw
  2019-04-30 12:47       ` Ludovic Courtès
  1 sibling, 1 reply; 7+ messages in thread
From: rendaw @ 2019-04-30  3:39 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 35475-done

On 4/29/19 7:14 PM, Ludovic Courtès wrote:
> 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.

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

* bug#35475: [bug #35475] [PATCH] Add filesystem flag NOATIME
  2019-04-30  3:39     ` rendaw
@ 2019-04-30 12:47       ` Ludovic Courtès
  0 siblings, 0 replies; 7+ messages in thread
From: Ludovic Courtès @ 2019-04-30 12:47 UTC (permalink / raw)
  To: rendaw; +Cc: 35475-done

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

> On 4/29/19 7:14 PM, Ludovic Courtès wrote:

[...]

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

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

end of thread, other threads:[~2019-04-30 12:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-28 15:55 bug#35475: Add filesystem flag NOATIME rendaw
2019-04-28 16:02 ` bug#35475: [bug #35475] [PATCH] " rendaw
2019-04-29 10:14   ` Ludovic Courtès
2019-04-29 10:54     ` Danny Milosavljevic
2019-04-29 11:42       ` Ludovic Courtès
2019-04-30  3:39     ` rendaw
2019-04-30 12:47       ` Ludovic Courtès

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.