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

From: Alan Somers <asomers_at_freebsd.org>
Date: Mon, 17 Oct 2022 01:01:26 UTC
On Sun, Oct 16, 2022 at 6:19 PM Rick Macklem <rmacklem@uoguelph.ca> wrote:
>
> 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?

No, because ZFS was written for Solaris first.  And Solaris's extended
attributes are more similar to FreeBSD's than Linux's are.

>
> 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?

ZFS, I think.

>
> 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?

I think you should open an issue at https://github.com/openzfs/zfs to
discuss it.

-Alan