linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Viacheslav Dubeyko <slava@dubeyko.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
	Andrew Morton <akpm@linux-foundation.org>,
	y2038 Mailman List <y2038@lists.linaro.org>,
	Jeff Layton <jlayton@redhat.com>, Jan Kara <jack@suse.cz>,
	Deepa Dinamani <deepa.kernel@gmail.com>,
	Linux FS-devel Mailing List <linux-fsdevel@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] hfs: stop using timespec based interfaces
Date: Fri, 22 Jun 2018 16:19:35 +0200	[thread overview]
Message-ID: <CAK8P3a2u11+Ccoxk2hJpYTeyOVSOwZHyT6PZAE6_RSTMStN_pA@mail.gmail.com> (raw)
In-Reply-To: <CAK8P3a2X134US86LAecGqx4cd1AbhQgyp5NqFgymKs0v9Hx7dQ@mail.gmail.com>

On Wed, Jun 20, 2018 at 9:55 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Wed, Jun 20, 2018 at 6:55 PM, Viacheslav Dubeyko <slava@dubeyko.com> wrote:
>> On Tue, 2018-06-19 at 21:42 +0200, Arnd Bergmann wrote:
>>> On Tue, Jun 19, 2018 at 7:03 PM, Viacheslav Dubeyko <slava@dubeyko.com> wrote:

>>>  /* time macros: convert between 1904-2040 and 1970-2106 range,
>>>   * pre-1970 timestamps are interpreted as post-2038 times after
>>> wrap-around */
>>> -#define __hfsp_mt2ut(t)                (be32_to_cpu(t) -
>>> 2082844800U)
>>> +#define __hfsp_mt2ut(t)                ((time64_t)be32_to_cpu(t) -
>>> 2082844800U)
>>>  #define __hfsp_ut2mt(t)                (cpu_to_be32(t +
>>> 2082844800U))
>>>
>>>  /* compatibility */
>>>
>>> I can submit that separately so that it can get backported into
>>> stable kernels if you like, with the type changes as a follow-up
>>> on top.
>>>
>>
>> Sounds good.
>
> Ok, I'll send an updated version with that patch first then.

I've now sent that patch with additional information that I got from reading the
XNU sources. Interestingly, that also uses the 1970-2106 time range that
I had in my original series, not the 1904-2040 time range that is documented.

      Arnd

  reply	other threads:[~2018-06-22 14:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-19 16:02 [PATCH 1/3] hfs: stop using timespec based interfaces Arnd Bergmann
2018-06-19 16:02 ` [PATCH 2/3] hfsplus: " Arnd Bergmann
2018-06-24  3:11   ` Ernesto A. Fernández
2018-06-19 16:02 ` [PATCH 3/3] hfsplus: return inode birthtime for statx Arnd Bergmann
2018-06-20 22:45   ` Ernesto A. Fernández
2018-06-22 14:32     ` Arnd Bergmann
2018-06-19 17:03 ` [PATCH 1/3] hfs: stop using timespec based interfaces Viacheslav Dubeyko
2018-06-19 19:42   ` Arnd Bergmann
2018-06-20 16:55     ` Viacheslav Dubeyko
2018-06-20 19:55       ` Arnd Bergmann
2018-06-22 14:19         ` Arnd Bergmann [this message]
2018-07-31 23:37 ` Ernesto A. Fernández

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=CAK8P3a2u11+Ccoxk2hJpYTeyOVSOwZHyT6PZAE6_RSTMStN_pA@mail.gmail.com \
    --to=arnd@arndb.de \
    --cc=akpm@linux-foundation.org \
    --cc=deepa.kernel@gmail.com \
    --cc=jack@suse.cz \
    --cc=jlayton@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=slava@dubeyko.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=y2038@lists.linaro.org \
    /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).