[GIT PULL] i_version handling changes for v6.3

From: Jeff Layton
Date: Thu Feb 16 2023 - 06:19:31 EST


The following changes since commit 948ef7bb70c4acaf74d87420ea3a1190862d4548:

Merge tag 'modules-6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux (2023-01-24 18:19:44 -0800)

are available in the Git repository at:

https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git tags/iversion-v6.3

for you to fetch changes up to 58a033c9a3e003e048a0431a296e58c6b363b02b:

nfsd: remove fetch_iversion export operation (2023-01-26 07:00:06 -0500)

----------------------------------------------------------------
I meant to send this for v6.2, but dropped the ball, so this has been in
linux-next for quite some time now.

This overhauls how we handle i_version queries from nfsd. Instead of
having special routines and grabbing the i_version field directly out of
the inode in some cases, we've moved most of the handling into the
various filesystems' getattr operations. As a bonus, this makes ceph's
change attribute usable by knfsd as well.

This should pave the way for future work to make this value queryable by
userland, and to make it more resilient against rolling back on a crash.

Note that Stephen Rothwell reported a minor merge conflict with this
series and vfs-idmapping tree:

https://lore.kernel.org/linux-next/20230119101423.547b48b7@xxxxxxxxxxxxxxxx/T/#u
----------------------------------------------------------------
Jeff Layton (8):
fs: uninline inode_query_iversion
fs: clarify when the i_version counter must be updated
vfs: plumb i_version handling into struct kstat
nfs: report the inode version in getattr if requested
ceph: report the inode version in getattr if requested
nfsd: move nfsd4_change_attribute to nfsfh.c
nfsd: use the getattr operation to fetch i_version
nfsd: remove fetch_iversion export operation

fs/ceph/inode.c | 16 +++++++++++-----
fs/libfs.c | 36 ++++++++++++++++++++++++++++++++++++
fs/nfs/export.c | 7 -------
fs/nfs/inode.c | 16 ++++++++++++----
fs/nfsd/nfs4xdr.c | 4 +++-
fs/nfsd/nfsfh.c | 42 ++++++++++++++++++++++++++++++++++++++++++
fs/nfsd/nfsfh.h | 29 +----------------------------
fs/nfsd/vfs.h | 7 ++++++-
fs/stat.c | 17 +++++++++++++++--
include/linux/exportfs.h | 1 -
include/linux/iversion.h | 60 ++++++++++++++++++++++--------------------------------------
include/linux/stat.h | 9 +++++++++
12 files changed, 157 insertions(+), 87 deletions(-)

--
Jeff Layton <jlayton@xxxxxxxxxx>