All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: y2038@lists.linaro.org
Cc: Gregory Farnum <gfarnum@redhat.com>,
	"Theodore Ts'o" <tytso@mit.edu>, Sage Weil <sage@redhat.com>,
	Zheng Yan <ukernel@gmail.com>, Dave Chinner <david@fromorbit.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	"Yan, Zheng" <zyan@redhat.com>,
	Deepa Dinamani <deepa.kernel@gmail.com>,
	Alex Elder <elder@linaro.org>,
	linux-fsdevel@vger.kernel.org, Ilya Dryomov <idryomov@gmail.com>,
	ceph-devel <ceph-devel@vger.kernel.org>
Subject: Re: [Y2038] [PATCH 09/10] fs: ceph: Replace CURRENT_TIME by ktime_get_real_ts()
Date: Thu, 04 Feb 2016 22:02:28 +0100	[thread overview]
Message-ID: <2730461.dq5ziXmlM8@wuerfel> (raw)
In-Reply-To: <CAJ4mKGa0NDGNOPTg_MyE_B7BpPQLQ7JfiiBFuZ5t-t57VNihRQ@mail.gmail.com>

On Thursday 04 February 2016 07:26:51 Gregory Farnum wrote:
> On Thu, Feb 4, 2016 at 5:31 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> > On Thursday 04 February 2016 10:01:31 Ilya Dryomov wrote:
> >> On Thu, Feb 4, 2016 at 9:30 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> >
> > A lot of other file systems (jfs, jffs2, hpfs, minix) apparently
> > prefer the 1970..2106 interpretation of time values.
> >
> >> The plan is to eventually switch to a 64-bit tv_sec and
> >> tv_nsec, bump the version on all the structures that contain it and add
> >> a cluster-wide feature bit to deal with older clients.  We've recently had
> >> a discussion about this, so it may even happen in a not so distant future, but
> >> no promises
> >
> > Ok. We have a (rough) plan to deal with file systems that don't support
> > extended time stamps in the meantime, so depending on user preferences
> > we would either allow them to be used as before with times clamped
> > to the 2038 overflow date, or only mounted readonly for users that want
> > to ensure their systems can survive without regressions in 2038.
> 
> I dug up the email conversation, about it, although I think Adam has
> done more work than it indicates:
> http://www.spinics.net/lists/ceph-devel/msg27900.html. I can't speak
> to any kernel-specific issues but this kind of transition while
> maintaining wire compatibility with older code is something we've done
> a lot; it shouldn't be a big deal even in the kernel where we're
> slightly less prolific with such things. 

On the kernel side, the interesting part is to figure out whether
the other end can support the new format or not, and setting the limit
in the superblock accordingly. Once you have determined that both
sides support the extended timestamps, sending a timestamp beyond 2038
must not fail or cause incorrect data.

On the wire protocol, you could consider extending the timestamps in
the same way as ext4, as you already have nanosecond timestamps, and
you can use the upper two bits of the nanoseconds to extend the seconds
field to 34 bits, giving you a range of valid times between 1902
and 2446, though if you have to make an incompatible change anyway,
going to 64 bit is easier.

	Arnd

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: y2038@lists.linaro.org
Cc: Theodore Ts'o <tytso@mit.edu>, Sage Weil <sage@redhat.com>,
	Zheng Yan <ukernel@gmail.com>, Dave Chinner <david@fromorbit.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	"Yan, Zheng" <zyan@redhat.com>,
	Deepa Dinamani <deepa.kernel@gmail.com>,
	Alex Elder <elder@linaro.org>,
	linux-fsdevel@vger.kernel.org,
	ceph-devel <ceph-devel@vger.kernel.org>,
	Ilya Dryomov <idryomov@gmail.com>,
	Gregory Farnum <gfarnum@redhat.com>
Subject: Re: [PATCH 09/10] fs: ceph: Replace CURRENT_TIME by ktime_get_real_ts()
Date: Thu, 04 Feb 2016 22:02:28 +0100	[thread overview]
Message-ID: <2730461.dq5ziXmlM8@wuerfel> (raw)
In-Reply-To: <CAJ4mKGa0NDGNOPTg_MyE_B7BpPQLQ7JfiiBFuZ5t-t57VNihRQ@mail.gmail.com>

On Thursday 04 February 2016 07:26:51 Gregory Farnum wrote:
> On Thu, Feb 4, 2016 at 5:31 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> > On Thursday 04 February 2016 10:01:31 Ilya Dryomov wrote:
> >> On Thu, Feb 4, 2016 at 9:30 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> >
> > A lot of other file systems (jfs, jffs2, hpfs, minix) apparently
> > prefer the 1970..2106 interpretation of time values.
> >
> >> The plan is to eventually switch to a 64-bit tv_sec and
> >> tv_nsec, bump the version on all the structures that contain it and add
> >> a cluster-wide feature bit to deal with older clients.  We've recently had
> >> a discussion about this, so it may even happen in a not so distant future, but
> >> no promises
> >
> > Ok. We have a (rough) plan to deal with file systems that don't support
> > extended time stamps in the meantime, so depending on user preferences
> > we would either allow them to be used as before with times clamped
> > to the 2038 overflow date, or only mounted readonly for users that want
> > to ensure their systems can survive without regressions in 2038.
> 
> I dug up the email conversation, about it, although I think Adam has
> done more work than it indicates:
> http://www.spinics.net/lists/ceph-devel/msg27900.html. I can't speak
> to any kernel-specific issues but this kind of transition while
> maintaining wire compatibility with older code is something we've done
> a lot; it shouldn't be a big deal even in the kernel where we're
> slightly less prolific with such things. 

On the kernel side, the interesting part is to figure out whether
the other end can support the new format or not, and setting the limit
in the superblock accordingly. Once you have determined that both
sides support the extended timestamps, sending a timestamp beyond 2038
must not fail or cause incorrect data.

On the wire protocol, you could consider extending the timestamps in
the same way as ext4, as you already have nanosecond timestamps, and
you can use the upper two bits of the nanoseconds to extend the seconds
field to 34 bits, giving you a range of valid times between 1902
and 2446, though if you have to make an incompatible change anyway,
going to 64 bit is easier.

	Arnd
_______________________________________________
Y2038 mailing list
Y2038@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/y2038

  reply	other threads:[~2016-02-04 21:02 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-03  6:07 [PATCH 00/10] Remove CURRENT_TIME and CURRENT_TIME_SEC - PART 1 Deepa Dinamani
2016-02-03  6:07 ` [PATCH 01/10] fs: Add current_fs_time_sec() function Deepa Dinamani
2016-02-03  6:07 ` [PATCH 02/10] vfs: Replace CURRENT_TIME by current_fs_time() Deepa Dinamani
2016-02-03  6:07 ` [PATCH 03/10] fs: cifs: Replace CURRENT_TIME with current_fs_time() Deepa Dinamani
2016-02-03  6:07 ` [PATCH 04/10] fs: cifs: Replace CURRENT_TIME with ktime_get_real_ts() Deepa Dinamani
2016-02-03  6:07   ` Deepa Dinamani
2016-02-03  6:07 ` [PATCH 05/10] fs: cifs: Replace CURRENT_TIME by get_seconds Deepa Dinamani
2016-02-03  6:07 ` [PATCH 06/10] fs: ext4: Replace CURRENT_TIME_SEC with current_fs_time_sec() Deepa Dinamani
2016-02-03  6:07 ` [PATCH 07/10] fs: ext4: Replace CURRENT_TIME with ext4_current_time() Deepa Dinamani
2016-02-03  6:07 ` [PATCH 08/10] fs: ceph: replace CURRENT_TIME by current_fs_time() Deepa Dinamani
2016-02-03  6:22   ` Yan, Zheng
2016-02-03  6:22     ` Yan, Zheng
2016-02-03  6:07 ` [PATCH 09/10] fs: ceph: Replace CURRENT_TIME by ktime_get_real_ts() Deepa Dinamani
2016-02-03  6:07   ` Deepa Dinamani
2016-02-03 14:34   ` Yan, Zheng
2016-02-03 14:58     ` Ilya Dryomov
2016-02-03 16:17     ` Deepa Dinamani
2016-02-03 21:27       ` Arnd Bergmann
2016-02-04  2:00         ` Yan, Zheng
2016-02-04  2:00           ` Yan, Zheng
2016-02-04  8:30           ` Arnd Bergmann
2016-02-04  9:01             ` Ilya Dryomov
2016-02-04 13:31               ` Arnd Bergmann
2016-02-04 15:26                 ` Gregory Farnum
2016-02-04 21:02                   ` Arnd Bergmann [this message]
2016-02-04 21:02                     ` Arnd Bergmann
2016-02-03  6:07 ` [PATCH 10/10] fs: btrfs: Replace CURRENT_TIME by current_fs_time() Deepa Dinamani
2016-02-04 14:14   ` David Sterba
2016-02-05 11:39     ` Deepa Dinamani
2016-02-07  7:57       ` [PATCH v2 " Deepa Dinamani
2016-02-08 15:08         ` David Sterba
2016-02-03 21:30 ` [Y2038] [PATCH 00/10] Remove CURRENT_TIME and CURRENT_TIME_SEC - PART 1 Arnd Bergmann
2016-02-04  4:56   ` Deepa Dinamani

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=2730461.dq5ziXmlM8@wuerfel \
    --to=arnd@arndb.de \
    --cc=ceph-devel@vger.kernel.org \
    --cc=david@fromorbit.com \
    --cc=deepa.kernel@gmail.com \
    --cc=elder@linaro.org \
    --cc=gfarnum@redhat.com \
    --cc=idryomov@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sage@redhat.com \
    --cc=tytso@mit.edu \
    --cc=ukernel@gmail.com \
    --cc=y2038@lists.linaro.org \
    --cc=zyan@redhat.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.