linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Namjae Jeon <linkinjeon@kernel.org>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: fsdevel <linux-fsdevel@vger.kernel.org>,
	Namjae Jeon <namjae.jeon@samsung.com>
Subject: Re: [PATCH 2/2 V2] exfat: truncate atimes to 2s granularity
Date: Sun, 19 Apr 2020 07:52:01 +0900	[thread overview]
Message-ID: <CAKYAXd-9Bah6p9GhMmTxnUDZoQ9aPbL65HYPemnZk6zQBf0w9Q@mail.gmail.com> (raw)
In-Reply-To: <380a03f3-b7da-8b54-6350-c0a81bf7a58f@sandeen.net>

2020-04-19 1:40 GMT+09:00, Eric Sandeen <sandeen@sandeen.net>:
> On 4/18/20 11:04 AM, Eric Sandeen wrote:
>> since access_time has no corresponding 10msIncrement field, my
>> understanding was that it could only have a 2s granularity.
>
> Maybe your concern is whether the other _time fields should also be
> truncated to 2s even though they have the _ms field?  I don't think so; the
> s_time_gran already limits in-core timestamp resolution to 10ms, which will
> be properly translated when the inode is written to disk.
>
> atime has a different granularity though, so s_time_gran doens't help and
> we
> must manually change it to 2s whenever we call something like
> current_time(), which
> only enforces the 10ms granularity.
>
> So for cases like this:
>
>  	generic_fillattr(inode, stat);
> +	exfat_truncate_atime(&stat->atime);
>
> or this:
>
>  	inode->i_mtime = inode->i_atime = inode->i_ctime =
>  		EXFAT_I(inode)->i_crtime = current_time(inode);
> +	exfat_truncate_atime(&inode->i_atime);
>
> I think it's clearly the right thing to do; anything finer than 2s will be
> thrown
> away when the vfs inode atime is translated to the disk format, so we should
> never
> hold finer granularity in the in-memory vfs inode.
>
> However, in exfat_get_entry_time() maybe all we need to do is set
> ts->tv_nsec to 0;
> that might be clearer.
Right.
Thanks!
>
> -Eric
>

  parent reply	other threads:[~2020-04-18 22:52 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   ` [PATCH 1/2] exfat: properly set s_time_gran Eric Sandeen
2020-04-19  3:15     ` 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 [this message]
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=CAKYAXd-9Bah6p9GhMmTxnUDZoQ9aPbL65HYPemnZk6zQBf0w9Q@mail.gmail.com \
    --to=linkinjeon@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=namjae.jeon@samsung.com \
    --cc=sandeen@sandeen.net \
    /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 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 NNTP newsgroup(s).