RFC: ZFS does not update ctime/va_filerev upon Setextattr/rmextattr

From: Rick Macklem <rmacklem_at_uoguelph.ca>
Date: Mon, 17 Oct 2022 00:19:14 UTC
Hi,

At a recent IETF NFSv4 testing event, it was noted that
neither ctime nor va_filerev (called TimeMetadata in NFSv4)
were being updated when a Setextattr or Removeextattr
was being done on a file on ZFS. (Looking at the ZFS code,
this is pretty obviously the case, since ZFS really uses subfiles
and not extended attributes on the file.)

A Linux wizard says that ctime should be updated, although
there is no POSIX standard. I suspect that FreeBSD's extended
attributes are meant to mimic the Linux ones?

So, is this a bug that should be fixed in ZFS or something where
the NFS server does a workaround to make the Setxattr/Rmxattr
NFSv4.2 operations work per the RFC?

rick
ps: It looks like a zfs_tstamp_update_setup() needs to be added
      to the ZFS setextattr/removeextattr VOP calls for a ZFS fix,
      but I have no idea what the rest of the patch would need to
      look like?