linux-stable/fs/gfs2
Jeff Layton 541d4c798a fs: drop the timespec64 arg from generic_update_time
In future patches we're going to change how the ctime is updated
to keep track of when it has been queried. The way that the update_time
operation works (and a lot of its callers) make this difficult, since
they grab a timestamp early and then pass it down to eventually be
copied into the inode.

All of the existing update_time callers pass in the result of
current_time() in some fashion. Drop the "time" parameter from
generic_update_time, and rework it to fetch its own timestamp.

This change means that an update_time could fetch a different timestamp
than was seen in inode_needs_update_time. update_time is only ever
called with one of two flag combinations: Either S_ATIME is set, or
S_MTIME|S_CTIME|S_VERSION are set.

With this change we now treat the flags argument as an indicator that
some value needed to be updated when last checked, rather than an
indication to update specific timestamps.

Rework the logic for updating the timestamps and put it in a new
inode_update_timestamps helper that other update_time routines can use.
S_ATIME is as treated as we always have, but if any of the other three
are set, then we attempt to update all three.

Also, some callers of generic_update_time need to know what timestamps
were actually updated. Change it to return an S_* flag mask to indicate
that and rework the callers to expect it.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Jan Kara <jack@suse.cz>
Message-Id: <20230807-mgctime-v7-3-d1dec143a704@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
2023-08-09 08:56:37 +02: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
file.c gfs2: convert to ctime accessor functions 2023-07-24 10:29:59 +02: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
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 arg from generic_update_time 2023-08-09 08:56:37 +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
lops.c gfs2: Use memcpy_{from,to}_page where appropriate 2023-07-03 22:30:48 +02:00
lops.h
main.c
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
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
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
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
trans.c gfs2: Replace sd_freeze_state with SDF_FROZEN flag 2023-07-03 22:30:23 +02:00
trans.h
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