Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1420060

Re: [PATCH 01/21] fs: Replace CURRENT_TIME_SEC with current_fs_time()

From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject Re: [PATCH 01/21] fs: Replace CURRENT_TIME_SEC with current_fs_time()
Date 2016-06-11 23:10 +0200
Message-ID <rIYkh-87V-1@gated-at.bofh.it> (permalink)
References <rI0o9-1PH-9@gated-at.bofh.it> <rID6a-2Ul-11@gated-at.bofh.it> <rIJlf-7fN-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Friday, June 10, 2016 10:03:14 PM CEST Deepa Dinamani wrote:
> On Fri, Jun 10, 2016 at 3:21 PM, Arnd Bergmann <arnd@arndb.de> wrote:

> >
> > In an earlier version, you had a small optimization to
> > use ktime_get_real_seconds() instead of current_kernel_time()
> > when the granularity is seconds.
> >
> > Do you still plan to send that one, or did you decide we don't
> > need it?
> 
> I was actually planning to use get_seconds() instead of current_kernel_time().
> And, transition both along with vfs to y2038 safe apis.
> Difference between ktime_get_real_seconds() and current_kernel_time64()
> is not much because they both require sequence counter.
> 
> It didn't make sense to me to optimize current_fs_time() for seconds
> only, and not optimize for 1ns granularity also.

Ah, you are right: adding another check for second granularity would
probably cost more than it would save, since we already don't calculate
the exact nanoseconds but just use the timestamp of the last timer
tick.

> I plan to make changes to the function depending on how we end up
> using timespec_trunc() after the addition of range checking.

Makes sense. I guess we can skip the range checking for
current_fs_time() if we end up not allowing writable mounts on
file systems that cannot represent the current time, but we
do want the range checking for the other users of
timespec_trunc().

	Arnd

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 00/21] Delete CURRENT_TIME and CURRENT_TIME_SEC macros Deepa Dinamani <deepa.kernel@gmail.com> - 2016-06-09 07:20 +0200
  [PATCH 18/21] fs: nfs: Make nfs boot time y2038 safe Deepa Dinamani <deepa.kernel@gmail.com> - 2016-06-09 07:20 +0200
    Re: [PATCH 18/21] fs: nfs: Make nfs boot time y2038 safe Trond Myklebust <trondmy@primarydata.com> - 2016-06-09 21:30 +0200
      Re: [PATCH 18/21] fs: nfs: Make nfs boot time y2038 safe Deepa Dinamani <deepa.kernel@gmail.com> - 2016-06-09 23:20 +0200
        Re: [PATCH 18/21] fs: nfs: Make nfs boot time y2038 safe Anna Schumaker <Anna.Schumaker@netapp.com> - 2016-06-10 15:20 +0200
          Re: [PATCH 18/21] fs: nfs: Make nfs boot time y2038 safe Trond Myklebust <trondmy@primarydata.com> - 2016-06-10 16:10 +0200
  [PATCH 02/21] fs: ext4: Use current_fs_time() for inode timestamps Deepa Dinamani <deepa.kernel@gmail.com> - 2016-06-09 07:20 +0200
    Re: [PATCH 02/21] fs: ext4: Use current_fs_time() for inode timestamps Linus Torvalds <torvalds@linux-foundation.org> - 2016-06-09 20:50 +0200
      Re: [PATCH 02/21] fs: ext4: Use current_fs_time() for inode timestamps Linus Torvalds <torvalds@linux-foundation.org> - 2016-06-09 21:00 +0200
      Re: [Y2038] [PATCH 02/21] fs: ext4: Use current_fs_time() for inode timestamps Arnd Bergmann <arnd@arndb.de> - 2016-06-11 00:20 +0200
        Re: [Y2038] [PATCH 02/21] fs: ext4: Use current_fs_time() for inode timestamps Deepa Dinamani <deepa.kernel@gmail.com> - 2016-06-14 20:00 +0200
          Re: [Y2038] [PATCH 02/21] fs: ext4: Use current_fs_time() for inode timestamps Arnd Bergmann <arnd@arndb.de> - 2016-06-14 23:00 +0200
  [PATCH 07/21] fs: cifs: Replace CURRENT_TIME by current_fs_time() Deepa Dinamani <deepa.kernel@gmail.com> - 2016-06-09 07:20 +0200
  Re: [PATCH 01/21] fs: Replace CURRENT_TIME_SEC with current_fs_time() Jan Kara <jack@suse.cz> - 2016-06-09 09:40 +0200
    Re: [PATCH 01/21] fs: Replace CURRENT_TIME_SEC with current_fs_time() Linus Torvalds <torvalds@linux-foundation.org> - 2016-06-09 21:20 +0200
      Re: [PATCH 01/21] fs: Replace CURRENT_TIME_SEC with current_fs_time() Deepa Dinamani <deepa.kernel@gmail.com> - 2016-06-09 22:50 +0200
  Re: [PATCH 00/21] Delete CURRENT_TIME and CURRENT_TIME_SEC macros Felipe Balbi <balbi@kernel.org> - 2016-06-09 10:00 +0200
  Re: [PATCH 01/21] fs: Replace CURRENT_TIME_SEC with current_fs_time() Bob Copeland <me@bobcopeland.com> - 2016-06-09 14:40 +0200
  Re: [PATCH 01/21] fs: Replace CURRENT_TIME_SEC with current_fs_time() Arnd Bergmann <arnd@arndb.de> - 2016-06-11 00:30 +0200
    Re: [PATCH 01/21] fs: Replace CURRENT_TIME_SEC with current_fs_time() Deepa Dinamani <deepa.kernel@gmail.com> - 2016-06-11 07:10 +0200
      Re: [PATCH 01/21] fs: Replace CURRENT_TIME_SEC with current_fs_time() Arnd Bergmann <arnd@arndb.de> - 2016-06-11 23:10 +0200

csiph-web