linux-stable/fs/gfs2
Linus Torvalds 615e95831e v6.6-vfs.ctime
-----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQRAhzRXHqcMeLMyaSiRxhvAZXjcogUCZOXTKAAKCRCRxhvAZXjc
 oifJAQCzi/p+AdQu8LA/0XvR7fTwaq64ZDCibU4BISuLGT2kEgEAuGbuoFZa0rs2
 XYD/s4+gi64p9Z01MmXm2XO1pu3GPg0=
 =eJz5
 -----END PGP SIGNATURE-----

Merge tag 'v6.6-vfs.ctime' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs

Pull vfs timestamp updates from Christian Brauner:
 "This adds VFS support for multi-grain timestamps and converts tmpfs,
  xfs, ext4, and btrfs to use them. This carries acks from all relevant
  filesystems.

  The VFS always uses coarse-grained timestamps when updating the ctime
  and mtime after a change. This has the benefit of allowing filesystems
  to optimize away a lot of metadata updates, down to around 1 per
  jiffy, even when a file is under heavy writes.

  Unfortunately, this has always been an issue when we're exporting via
  NFSv3, which relies on timestamps to validate caches. A lot of changes
  can happen in a jiffy, so timestamps aren't sufficient to help the
  client decide to invalidate the cache.

  Even with NFSv4, a lot of exported filesystems don't properly support
  a change attribute and are subject to the same problems with timestamp
  granularity. Other applications have similar issues with timestamps
  (e.g., backup applications).

  If we were to always use fine-grained timestamps, that would improve
  the situation, but that becomes rather expensive, as the underlying
  filesystem would have to log a lot more metadata updates.

  This introduces fine-grained timestamps that are used when they are
  actively queried.

  This uses the 31st bit of the ctime tv_nsec field to indicate that
  something has queried the inode for the mtime or ctime. When this flag
  is set, on the next mtime or ctime update, the kernel will fetch a
  fine-grained timestamp instead of the usual coarse-grained one.

  As POSIX generally mandates that when the mtime changes, the ctime
  must also change the kernel always stores normalized ctime values, so
  only the first 30 bits of the tv_nsec field are ever used.

  Filesytems can opt into this behavior by setting the FS_MGTIME flag in
  the fstype. Filesystems that don't set this flag will continue to use
  coarse-grained timestamps.

  Various preparatory changes, fixes and cleanups are included:

   - Fixup all relevant places where POSIX requires updating ctime
     together with mtime. This is a wide-range of places and all
     maintainers provided necessary Acks.

   - Add new accessors for inode->i_ctime directly and change all
     callers to rely on them. Plain accesses to inode->i_ctime are now
     gone and it is accordingly rename to inode->__i_ctime and commented
     as requiring accessors.

   - Extend generic_fillattr() to pass in a request mask mirroring in a
     sense the statx() uapi. This allows callers to pass in a request
     mask to only get a subset of attributes filled in.

   - Rework timestamp updates so it's possible to drop the @now
     parameter the update_time() inode operation and associated helpers.

   - Add inode_update_timestamps() and convert all filesystems to it
     removing a bunch of open-coding"

* tag 'v6.6-vfs.ctime' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: (107 commits)
  btrfs: convert to multigrain timestamps
  ext4: switch to multigrain timestamps
  xfs: switch to multigrain timestamps
  tmpfs: add support for multigrain timestamps
  fs: add infrastructure for multigrain timestamps
  fs: drop the timespec64 argument from update_time
  xfs: have xfs_vn_update_time gets its own timestamp
  fat: make fat_update_time get its own timestamp
  fat: remove i_version handling from fat_update_time
  ubifs: have ubifs_update_time use inode_update_timestamps
  btrfs: have it use inode_update_timestamps
  fs: drop the timespec64 arg from generic_update_time
  fs: pass the request_mask to generic_fillattr
  fs: remove silly warning from current_time
  gfs2: fix timestamp handling on quota inodes
  fs: rename i_ctime field to __i_ctime
  selinux: convert to ctime accessor functions
  security: convert to ctime accessor functions
  apparmor: convert to ctime accessor functions
  sunrpc: convert to ctime accessor functions
  ...
2023-08-28 09:31:32 -07:00
..
acl.c gfs2: convert to ctime accessor functions 2023-07-24 10:29:59 +02:00
acl.h fs: port ->set_acl() to pass mnt_idmap 2023-01-19 09:24:27 +01:00
aops.c gfs2 fixes 2023-07-04 11:45:16 -07:00
aops.h gfs2: support ludicrously large folios in gfs2_trans_add_databufs() 2023-06-19 16:19:30 -07:00
bmap.c gfs2: convert to ctime accessor functions 2023-07-24 10:29:59 +02:00
bmap.h gfs2: Eliminate gfs2_trim_blocks 2023-04-18 14:40:12 +02:00
dentry.c Reinstate "GFS2: free disk inode which is deleted by remote node -V2" 2023-03-23 19:37:56 +01:00
dir.c gfs2: convert to ctime accessor functions 2023-07-24 10:29:59 +02:00
dir.h
export.c Change calling conventions for filldir_t 2022-08-17 17:25:04 -04:00
file.c v6.6-vfs.ctime 2023-08-28 09:31:32 -07:00
gfs2.h
glock.c gfs2: Rename remaining "transaction" glock references 2023-06-15 09:57:38 +02:00
glock.h gfs2: Split the two kinds of glock "delete" work 2023-01-31 22:40:24 +01:00
glops.c gfs2: convert to ctime accessor functions 2023-07-24 10:29:59 +02:00
glops.h gfs2: Split up gfs2_meta_sync into inode and rgrp versions 2020-10-29 22:16:46 +01:00
incore.h gfs: Get rid of unnucessary locking in inode_go_dump 2023-07-03 22:30:47 +02:00
inode.c fs: drop the timespec64 argument from update_time 2023-08-11 09:04:57 +02:00
inode.h fs: port ->permission() to pass mnt_idmap 2023-01-19 09:24:28 +01:00
Kconfig
lock_dlm.c gfs2: simplify gdlm_put_lock with out_free label 2023-06-06 18:35:06 +02:00
log.c gfs2: Replace sd_freeze_state with SDF_FROZEN flag 2023-07-03 22:30:23 +02:00
log.h fs/gfs2: Use the enum req_op and blk_opf_t types 2022-07-14 12:14:32 -06:00
lops.c gfs2: Use memcpy_{from,to}_page where appropriate 2023-07-03 22:30:48 +02:00
lops.h fs/gfs2: Use the enum req_op and blk_opf_t types 2022-07-14 12:14:32 -06:00
main.c gfs2: Register fs after creating workqueues 2022-09-20 17:53:54 +02:00
Makefile
meta_io.c gfs2: replace obvious uses of b_page with b_folio 2023-01-18 17:12:40 -08:00
meta_io.h gfs2: Use container_of() for gfs2_glock(aspace) 2022-05-24 21:29:14 +02:00
ops_fstype.c gfs2 fixes 2023-07-04 11:45:16 -07:00
quota.c gfs2: fix timestamp handling on quota inodes 2023-07-24 10:30:08 +02:00
quota.h gfs2: move privileged user check to gfs2_quota_lock_check 2020-05-08 18:47:58 +02:00
recovery.c gfs2: Replace sd_freeze_state with SDF_FROZEN flag 2023-07-03 22:30:23 +02:00
recovery.h
rgrp.c gfs2: Update rl_unlinked before releasing rgrp lock 2023-06-06 18:35:06 +02:00
rgrp.h Merge part of branch 'for-next.instantiate' into for-next 2022-08-05 18:37:03 +02:00
super.c gfs2: convert to ctime accessor functions 2023-07-24 10:29:59 +02:00
super.h gfs2: Rework freeze / thaw logic 2023-07-03 22:25:02 +02:00
sys.c gfs2: Replace sd_freeze_state with SDF_FROZEN flag 2023-07-03 22:30:23 +02:00
sys.h
trace_gfs2.h gfs2: Remove 'first' trace_gfs2_promote argument 2021-10-25 08:42:19 +02:00
trans.c gfs2: Fix freeze consistency check in gfs2_trans_add_meta 2023-08-07 18:40:51 +02:00
trans.h Merge branches 'rgrp-glock-sharing' and 'gfs2-revoke' from https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git 2021-02-23 18:54:22 +01:00
util.c gfs2: Add quota_change type 2023-07-03 22:30:48 +02:00
util.h gfs2: gfs2_freeze_lock_shared cleanup 2023-07-03 22:30:26 +02:00
xattr.c gfs2: convert to ctime accessor functions 2023-07-24 10:29:59 +02:00
xattr.h