Skip to content

RFC vfs 64 bit time transition proposal

Deepa Dinamani linux-fsdevel lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest8 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8vfs: Add vfs_time abstractionsinclude/linux/fs.h+21 -00 replies
2/8fs: cifs: Change auxdata to struct timespec64 data typefs/cifs/cache.c+10 -60 replies
3/8fs: cifs: Change cifs_fattr timestamps data type to timespec64fs/cifs/cifsencrypt.c fs/cifs/cifsglob.h fs/cifs/cifsproto.h +3 more+37 -310 replies
4/8fs: cifs: Make cnvrtDosUnixTm() y2038 safefs/cifs/netmisc.c+3 -20 replies
5/8fs: btrfs: Change btrfs_inode.i_otime to vfs_time data typefs/btrfs/btrfs_inode.h fs/btrfs/inode.c+3 -30 replies
6/8fs: btrfs: Use vfs timestamp abstraction helperfs/btrfs/file.c fs/btrfs/inode.c fs/btrfs/ioctl.c +2 more+9 -80 replies
7/8fs: ceph: Use vfs timestamp abstraction helpersfs/ceph/addr.c fs/ceph/cache.c fs/ceph/caps.c +11 more+110 -800 replies
8/8fs: xfs: change inode times to use vfs_time data typefs/xfs/xfs_inode.c fs/xfs/xfs_iops.c fs/xfs/xfs_trans_inode.c+6 -50 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC v2c 0/8] vfs 64 bit time transition proposal

Introduction

The series is one of the proposals on how to transition VFS timestamps to use 64 bit time. The credit for the idea goes to Arnd Bergmann and it’s a mix of approaches 2a and 2b.

Solution

1.Define vfs_time as alias to timespec.
2.Define accessor functions for inode timestamps. 3.Change individual filesystems to use timespec64 timestamps.
Make sure each filesystem will be safe when converted to use timespec64.
4.Change individual filesystems to use only vfs_time data type
for inode timestamps. Make sure each filesystem will be safe when converted to use timespec64.
5.Change vfs_time to timespec64.
6.Delete all accessors from individual filesystem and access inode
timestamps directly.

Note that the series only includes patches for steps 1-4.

Variant

We could make the solution similar to 2a and use timespec in the individual filesystems instead of timespec64.

Concerns

1. It is not clear when vfs_time or accessors should be used. Even though it is advisable to make the conversions at vfs boundary, it is not easy to catch the exceptions.
2. Maintenance of the code base before vfs layer is changed is going to be a little hard as developers might be confused because of 1.
3. Has the same problem as changing all filesystems to 64 bit:
the switch over to timespec64 has to be done globally in a single, huge patch for some filesystems.

Deepa Dinamani (8):
vfs: Add vfs_time abstractions
fs: cifs: Change auxdata to struct timespec64 data type
fs: cifs: Change cifs_fattr timestamps data type to timespec64
fs: cifs: Make cnvrtDosUnixTm() y2038 safe
fs: btrfs: Change btrfs_inode.i_otime to vfs_time data type
fs: btrfs: Use vfs timestamp abstraction helper
fs: ceph: Use vfs timestamp abstraction helpers
fs: xfs: change inode times to use vfs_time data type

 fs/btrfs/btrfs_inode.h          |  2 +-
 fs/btrfs/file.c                 |  7 ++--
 fs/btrfs/inode.c                |  6 +--
 fs/btrfs/ioctl.c                |  4 +-
 fs/btrfs/root-tree.c            |  2 +-
 fs/btrfs/transaction.c          |  2 +-
 fs/ceph/addr.c                  | 20 ++++++---
 fs/ceph/cache.c                 |  6 +--
 fs/ceph/caps.c                  | 10 ++---
 fs/ceph/dir.c                   |  4 +-
 fs/ceph/file.c                  | 14 +++++--
 fs/ceph/inode.c                 | 91 +++++++++++++++++++++++------------------
 fs/ceph/mds_client.c            |  9 ++--
 fs/ceph/mds_client.h            |  2 +-
 fs/ceph/snap.c                  |  6 +--
 fs/ceph/super.h                 |  9 ++--
 fs/ceph/xattr.c                 |  2 +-
 fs/cifs/cache.c                 | 16 +++++---
 fs/cifs/cifsencrypt.c           |  4 +-
 fs/cifs/cifsglob.h              |  6 +--
 fs/cifs/cifsproto.h             |  6 +--
 fs/cifs/cifssmb.c               |  6 +--
 fs/cifs/inode.c                 | 35 +++++++++-------
 fs/cifs/netmisc.c               | 16 ++++----
 fs/xfs/xfs_inode.c              |  2 +-
 fs/xfs/xfs_iops.c               |  2 +-
 fs/xfs/xfs_trans_inode.c        |  7 ++--
 include/linux/ceph/decode.h     |  9 ++--
 include/linux/ceph/osd_client.h |  4 +-
 include/linux/fs.h              | 21 ++++++++++
 net/ceph/osd_client.c           |  4 +-
 31 files changed, 199 insertions(+), 135 deletions(-)
Signature · 1 line
1.9.1