nfs: report the inode version in getattr if requested
authorJeff Layton <jlayton@kernel.org>
Fri, 5 Aug 2022 17:47:00 +0000 (13:47 -0400)
committerJeff Layton <jlayton@kernel.org>
Thu, 26 Jan 2023 12:00:06 +0000 (07:00 -0500)
commit61a968b4f05e3c8880cfb127f122d7a3af882afa
tree6f03198f2b807bec3ed8f01249729f477223dc14
parenta1175d6b1bdaf4f74eda47ab18eb44194f9cb796
nfs: report the inode version in getattr if requested

Allow NFS to report the i_version in getattr requests. Since the cost to
fetch it is relatively cheap, do it unconditionally and just set the
flag if it looks like it's valid. Also, conditionally enable the
MONOTONIC flag when the server reports its change attr type as such.

Reviewed-by: NeilBrown <neilb@suse.de>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
fs/nfs/inode.c