summaryrefslogtreecommitdiffstats
path: root/fs/nfs/inode.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2016-12-04 15:29:46 +0100
committerJeff Layton <jlayton@kernel.org>2023-01-26 13:00:06 +0100
commita1175d6b1bdaf4f74eda47ab18eb44194f9cb796 (patch)
tree119118d44cd9bb0ad0b9ac5407b91dac9ec3d3da /fs/nfs/inode.c
parentfs: clarify when the i_version counter must be updated (diff)
downloadlinux-a1175d6b1bdaf4f74eda47ab18eb44194f9cb796.tar.xz
linux-a1175d6b1bdaf4f74eda47ab18eb44194f9cb796.zip
vfs: plumb i_version handling into struct kstat
The NFS server has a lot of special handling for different types of change attribute access, depending on the underlying filesystem. In most cases, it's doing a getattr anyway and then fetching that value after the fact. Rather that do that, add a new STATX_CHANGE_COOKIE flag that is a kernel-only symbol (for now). If requested and getattr can implement it, it can fill out this field. For IS_I_VERSION inodes, add a generic implementation in vfs_getattr_nosec. Take care to mask STATX_CHANGE_COOKIE off in requests from userland and in the result mask. Since not all filesystems can give the same guarantees of monotonicity, claim a STATX_ATTR_CHANGE_MONOTONIC flag that filesystems can set to indicate that they offer an i_version value that can never go backward. Eventually if we decide to make the i_version available to userland, we can just designate a field for it in struct statx, and move the STATX_CHANGE_COOKIE definition to the uapi header. Reviewed-by: NeilBrown <neilb@suse.de> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Jeff Layton <jlayton@kernel.org>
Diffstat (limited to 'fs/nfs/inode.c')
0 files changed, 0 insertions, 0 deletions