From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f67.google.com ([209.85.215.67]:33847 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933196AbeFVOTi (ORCPT ); Fri, 22 Jun 2018 10:19:38 -0400 MIME-Version: 1.0 In-Reply-To: References: <20180619160223.4108556-1-arnd@arndb.de> <1529427809.2624.16.camel@dubeyko.com> <1529513708.5833.29.camel@dubeyko.com> From: Arnd Bergmann Date: Fri, 22 Jun 2018 16:19:35 +0200 Message-ID: Subject: Re: [PATCH 1/3] hfs: stop using timespec based interfaces To: Viacheslav Dubeyko Cc: Al Viro , Andrew Morton , y2038 Mailman List , Jeff Layton , Jan Kara , Deepa Dinamani , Linux FS-devel Mailing List , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, Jun 20, 2018 at 9:55 PM, Arnd Bergmann wrote: > On Wed, Jun 20, 2018 at 6:55 PM, Viacheslav Dubeyko wrote: >> On Tue, 2018-06-19 at 21:42 +0200, Arnd Bergmann wrote: >>> On Tue, Jun 19, 2018 at 7:03 PM, Viacheslav Dubeyko 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