summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_ondisk.h
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2020-02-19 17:02:25 -0800
committerDarrick J. Wong <darrick.wong@oracle.com>2020-03-03 18:47:47 -0800
commitc31e6d95c0988b9d26b4b603786088ef2e79a6d2 (patch)
treeea4b928e006d3ddc6f7ae7a00bd0c0904859c038 /fs/xfs/xfs_ondisk.h
parenta572805ed72cb716c8f0032720033fa5cc0bd801 (diff)
xfs: widen ondisk timestamps to deal with y2038 problem
Redesign the ondisk 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>
Diffstat (limited to 'fs/xfs/xfs_ondisk.h')
-rw-r--r--fs/xfs/xfs_ondisk.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/xfs/xfs_ondisk.h b/fs/xfs/xfs_ondisk.h
index 7158a8de719f..80129b2dc392 100644
--- a/fs/xfs/xfs_ondisk.h
+++ b/fs/xfs/xfs_ondisk.h
@@ -25,6 +25,9 @@ xfs_check_limits(void)
/* make sure timestamp limits are correct */
XFS_CHECK_VALUE(XFS_INO_TIME_MIN, -2147483648LL);
XFS_CHECK_VALUE(XFS_INO_TIME_MAX, 2147483647LL);
+ XFS_CHECK_VALUE(XFS_INO_BIGTIME_EPOCH, 2147483648LL);
+ XFS_CHECK_VALUE(XFS_INO_BIGTIME_MIN, -2147483648LL);
+ XFS_CHECK_VALUE(XFS_INO_BIGTIME_MAX, 16299260425LL);
XFS_CHECK_VALUE(XFS_DQ_TIMEOUT_MIN, 1LL);
XFS_CHECK_VALUE(XFS_DQ_TIMEOUT_MAX, 4294967295LL);
XFS_CHECK_VALUE(XFS_DQ_GRACE_MIN, 0LL);