All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: fsdevel <linux-fsdevel@vger.kernel.org>,
	Namjae Jeon <namjae.jeon@samsung.com>
Subject: [PATCH 1/2] exfat: properly set s_time_gran
Date: Wed, 15 Apr 2020 20:09:11 -0500	[thread overview]
Message-ID: <5535c58b-aac1-274e-a0bb-6333b33365d1@sandeen.net> (raw)
In-Reply-To: <ef3cdac4-9967-a225-fb04-4dbb4c7037a9@sandeen.net>

The s_time_gran superblock field indicates the on-disk nanosecond
granularity of timestamps, and for exfat that seems to be 10ms, so
set s_time_gran to 10000000ns. Without this, in-memory timestamps
change when they get re-read from disk.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
---

diff --git a/fs/exfat/super.c b/fs/exfat/super.c
index 16ed202ef527..4f21bf8b550d 100644
--- a/fs/exfat/super.c
+++ b/fs/exfat/super.c
@@ -541,7 +542,7 @@ static int exfat_fill_super(struct super_block *sb, struct fs_context *fc)
 	sb->s_magic = EXFAT_SUPER_MAGIC;
 	sb->s_op = &exfat_sops;
 
-	sb->s_time_gran = 1;
+	sb->s_time_gran = 10000000;
 	sb->s_time_min = EXFAT_MIN_TIMESTAMP_SECS;
 	sb->s_time_max = EXFAT_MAX_TIMESTAMP_SECS;
 


  reply	other threads:[~2020-04-16  1:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20200416010734epcas1p38e25193dcaf42638ee8fd183afe2a112@epcas1p3.samsung.com>
2020-04-16  1:07 ` [PATCH 0/2] exfat: timestamp fixes Eric Sandeen
2020-04-16  1:09   ` Eric Sandeen [this message]
2020-04-19  3:15     ` [PATCH 1/2] exfat: properly set s_time_gran Matthew Wilcox
2020-04-20 23:28       ` Namjae Jeon
2020-04-16  1:12   ` [PATCH 2/2] exfat: zero out atime subsecond timestamp Eric Sandeen
2020-04-16  4:11     ` [PATCH 2/2 V2] exfat: truncate atimes to 2s granularity Eric Sandeen
2020-04-18 13:03       ` Namjae Jeon
2020-04-18 13:37         ` Namjae Jeon
2020-04-18 16:04         ` Eric Sandeen
2020-04-18 16:40           ` Eric Sandeen
2020-04-18 17:06             ` Eric Sandeen
2020-04-18 22:55               ` Namjae Jeon
2020-04-18 22:52             ` Namjae Jeon
2020-04-18 22:50           ` Namjae Jeon
2020-04-17  6:07   ` [PATCH 0/2] exfat: timestamp fixes Namjae Jeon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5535c58b-aac1-274e-a0bb-6333b33365d1@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=namjae.jeon@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.