Skip to content

RFC xfs: y2038 conversion

Arnd Bergmann linux-fsdevel linux-xfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest5 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5xfs: [variant A] avoid time_t in user apifs/xfs/libxfs/xfs_fs.h+1 -15 replies
2/5xfs: [variant B] add time64 version of xfs_bstatfs/xfs/libxfs/xfs_fs.h fs/xfs/xfs_ioctl.c fs/xfs/xfs_ioctl.h +2 more+278 -560 replies
3/5xfs: [variant C] avoid i386-misaligned xfs_bstatfs/xfs/libxfs/xfs_fs.h fs/xfs/xfs_ioctl32.c+18 -1220 replies
4/5xfs: extend inode format for 40-bit timestampsfs/xfs/libxfs/xfs_format.h fs/xfs/libxfs/xfs_inode_buf.c fs/xfs/libxfs/xfs_inode_buf.h +7 more+46 -184 replies
5/5xfs: use 40-bit quota time limitsfs/xfs/libxfs/xfs_dquot_buf.c fs/xfs/libxfs/xfs_format.h fs/xfs/xfs_dquot.c +5 more+67 -360 replies

Reviews trailers per patch

1 of 5 patches has a Reviewed-by or Acked-by.

PatchChristoph HellwigDarrick J. Wong
1/5R-b R-b
2/5
3/5
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFC 0/5] xfs: y2038 conversion

This is part of a longer set of changes to clean up the last remaining bits for the y2038 conversion. In XFS, three distinct problems need to be addressed:

1. The use of time_t in kernel sources -- I'm in the process of removing all of them so we can remove the definition itself, making it harder to write new y2038-unsafe code. This part is trivially done as a side-effect of the other two.

2. The use of time_t in a user API header for ioctls. When building against a new 32-bit libc with 64-bit time_t, the structures no longer match and we get incorrect data from ioctls. Unfortunately, there is no good way to fix XFS_IOC_FSBULKSTAT, I considered different approaches and in the end came up with three variants that are all part of this series. The idea is to pick just one of course.

3. On-disk timestamps hitting the y2038 limit. This applies to both inode timestamps and quota data. Both are extended to 40 bits, with the minimum timestamp still being year 1902, and the maximum getting extended from 2038 to 36744.

Please review and let me know which of ioctl API changes makes the most sense. I have not done any actual runtime testing on the patches, so this is clearly too late for the next merge window, but I hope to get it all merged for v5.6.

Arnd

Arnd Bergmann (5):
xfs: [variant A] avoid time_t in user api
xfs: [variant B] add time64 version of xfs_bstat
xfs: [variant C] avoid i386-misaligned xfs_bstat
xfs: extend inode format for 40-bit timestamps
xfs: use 40-bit quota time limits

 fs/xfs/libxfs/xfs_dquot_buf.c   |   6 +-
 fs/xfs/libxfs/xfs_format.h      |  11 +-
 fs/xfs/libxfs/xfs_fs.h          |  37 +++++-
 fs/xfs/libxfs/xfs_inode_buf.c   |  28 +++--
 fs/xfs/libxfs/xfs_inode_buf.h   |   1 +
 fs/xfs/libxfs/xfs_log_format.h  |   6 +-
 fs/xfs/libxfs/xfs_trans_inode.c |   3 +-
 fs/xfs/xfs_dquot.c              |  29 +++--
 fs/xfs/xfs_inode.c              |   3 +-
 fs/xfs/xfs_inode_item.c         |  10 +-
 fs/xfs/xfs_ioctl.c              | 195 +++++++++++++++++++++++++++++++-
 fs/xfs/xfs_ioctl.h              |  12 ++
 fs/xfs/xfs_ioctl32.c            | 160 +++++---------------------
 fs/xfs/xfs_ioctl32.h            |  26 ++---
 fs/xfs/xfs_iops.c               |   3 +-
 fs/xfs/xfs_itable.c             |   2 +-
 fs/xfs/xfs_qm.c                 |  18 ++-
 fs/xfs/xfs_qm.h                 |   6 +-
 fs/xfs/xfs_qm_syscalls.c        |  16 ++-
 fs/xfs/xfs_quotaops.c           |   6 +-
 fs/xfs/xfs_super.c              |   2 +-
 fs/xfs/xfs_trans_dquot.c        |  17 ++-
 22 files changed, 387 insertions(+), 210 deletions(-)
Signature · 1 line
2.20.0