nfsd: Add support for the NFSv4.2 change_attr_type attribute
Richard Kojedzinszky reported an intermittent problem where
the Linux NFSv4.2 client would sometimes not see changes done
to a directory by another client, although the change attribute
for the directory had changed.
A test patch that added the change_attr_type attribute to the
server and always returned NFS4_CHANGE_TYPE_VERSION_COUNTER_NOPNFS
seems to have resolved the issue. Somewhat oddly, the Linux
knfsd server does not support this attribute but does not
seem to exhibit the stale caching problem.
This patch uses the VFCF_FILEREVINC flag on a file system (UFS, ZFS)
to return NFS4_CHANGE_TYPE_VERSION_COUNTER_NOPNFS. It also
returns NFS4_CHANGE_TYPE_TIME_METADATA if VFCF_FILEREVCT is set,
which may be useful for exported fuse file systems.
PR: 284186
Reported by: Richard Kojedzinszky <richard@kojedz.in>
Tested by: Richard Kojedzinszky <richard@kojedz.in>
MFC after: 2 weeks