From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Gao Xiang <hsiangkao@redhat.com>
Cc: david@fromorbit.com, hch@infradead.org,
linux-xfs@vger.kernel.org, amir73il@gmail.com,
sandeen@sandeen.net
Subject: Re: [PATCH 08/11] xfs: widen ondisk inode timestamps to deal with y2038+
Date: Tue, 1 Sep 2020 10:53:23 -0700 [thread overview]
Message-ID: <20200901175323.GJ6096@magnolia> (raw)
In-Reply-To: <20200901114412.GE32609@xiangao.remote.csb>
On Tue, Sep 01, 2020 at 07:44:12PM +0800, Gao Xiang wrote:
> On Sun, Aug 30, 2020 at 11:07:39PM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <darrick.wong@oracle.com>
> >
> > Redesign the ondisk inode timestamps to be a simple unsigned 64-bit
> > counter of nanoseconds since 14 Dec 1901 (i.e. the minimum time in the
> > 32-bit unix time epoch). This enables us to handle dates up to 2486,
> > which solves the y2038 problem.
> >
> > Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
>
> Look good to me overall (although I'm little curious if
> folding in xfs_inode_{encode,decode}_bigtime() would be
> better (since it may have rare users in the future?)...
> and may be
They were open-coded in previous iterations, but one of the reviewers
asked for the bigtime de/encoding code to be split into separate
functions.
> > +static inline uint64_t xfs_inode_encode_bigtime(struct timespec64 tv)
> > +{
> > + return (xfs_unix_to_bigtime(tv.tv_sec) * NSEC_PER_SEC) + tv.tv_nsec;
>
> parentheses isn't needed here since it's basic arithmetic
> but all things above are quite minor...
Yes, that was fixed...
--D
> Reviewed-by: Gao Xiang <hsiangkao@redhat.com>
>
> Thanks,
> Gao Xiang
>
next prev parent reply other threads:[~2020-09-01 17:53 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-31 6:06 [PATCH v5 00/11] xfs: widen timestamps to deal with y2038 Darrick J. Wong
2020-08-31 6:06 ` [PATCH 01/11] xfs: explicitly define inode timestamp range Darrick J. Wong
2020-09-01 8:18 ` Gao Xiang
2020-08-31 6:06 ` [PATCH 02/11] xfs: refactor quota expiration timer modification Darrick J. Wong
2020-08-31 6:07 ` [PATCH 03/11] xfs: refactor default quota grace period setting code Darrick J. Wong
2020-08-31 6:07 ` [PATCH 04/11] xfs: refactor quota timestamp coding Darrick J. Wong
2020-08-31 6:07 ` [PATCH 05/11] xfs: move xfs_log_dinode_to_disk to the log recovery code Darrick J. Wong
2020-09-01 8:19 ` Gao Xiang
2020-08-31 6:07 ` [PATCH 06/11] xfs: redefine xfs_timestamp_t Darrick J. Wong
2020-08-31 16:03 ` Christoph Hellwig
2020-09-01 8:40 ` Gao Xiang
2020-08-31 6:07 ` [PATCH 07/11] xfs: redefine xfs_ictimestamp_t Darrick J. Wong
2020-08-31 16:04 ` Christoph Hellwig
2020-09-01 9:04 ` Gao Xiang
2020-08-31 6:07 ` [PATCH 08/11] xfs: widen ondisk inode timestamps to deal with y2038+ Darrick J. Wong
2020-08-31 16:08 ` Christoph Hellwig
2020-08-31 19:44 ` Darrick J. Wong
2020-09-01 11:44 ` Gao Xiang
2020-09-01 17:53 ` Darrick J. Wong [this message]
2020-08-31 6:07 ` [PATCH 09/11] xfs: widen ondisk quota expiration timestamps to handle y2038+ Darrick J. Wong
2020-08-31 6:07 ` [PATCH 10/11] xfs: trace timestamp limits Darrick J. Wong
2020-09-01 11:46 ` Gao Xiang
2020-08-31 6:07 ` [PATCH 11/11] xfs: enable big timestamps Darrick J. Wong
2020-08-31 16:10 ` Christoph Hellwig
2020-09-01 11:47 ` Gao Xiang
2020-08-31 8:07 ` [PATCH v5 00/11] xfs: widen timestamps to deal with y2038 Amir Goldstein
2020-08-31 15:58 ` Darrick J. Wong
-- strict thread matches above, loose matches on Subject: below --
2020-09-02 2:56 [PATCH v6 " Darrick J. Wong
2020-09-02 2:57 ` [PATCH 08/11] xfs: widen ondisk inode timestamps to deal with y2038+ Darrick J. Wong
2020-08-26 22:04 [PATCH v4 00/11] xfs: widen timestamps to deal with y2038 Darrick J. Wong
2020-08-26 22:05 ` [PATCH 08/11] xfs: widen ondisk inode timestamps to deal with y2038+ Darrick J. Wong
2020-08-27 6:58 ` Christoph Hellwig
2020-08-27 15:38 ` Darrick J. Wong
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=20200901175323.GJ6096@magnolia \
--to=darrick.wong@oracle.com \
--cc=amir73il@gmail.com \
--cc=david@fromorbit.com \
--cc=hch@infradead.org \
--cc=hsiangkao@redhat.com \
--cc=linux-xfs@vger.kernel.org \
--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).