On Thu, Aug 21, 2025 at 01:24:04PM +0200, Christian Schoenebeck wrote:
> On Wednesday, August 6, 2025 7:53:08 PM CEST Mark Johnston wrote:
> > This is largely derived from existing Darwin support.  FreeBSD
> > apparently has better support for *at() system calls so doesn't require
> > workarounds for a missing mknodat().  The implementation has a couple of
> > warts however:
> > - The extattr(2) system calls don't support anything akin to
> >   XATTR_CREATE or XATTR_REPLACE, so a racy workaround is implemented.
> > - Attribute names cannot begin with "user." on ZFS, so the prefix is
> >   trimmed off.  FreeBSD's extattr system calls sport an extra
> >   "namespace" identifier, and attributes created by the 9pfs backend
> >   live in the universal user namespace, so this seems innocent enough.
> > 
> > The 9pfs tests were verified to pass on the UFS, ZFS and tmpfs
> > filesystems.
> > 
> > Signed-off-by: Mark Johnston <ma...@freebsd.org>
> > ---
> > Changes since v1:
> > - Handle extended attributes in the system.* namespace as well.
> > - Fix a typo in a comment.
> > - Clarify a comment.
> 
> Not forgotten. I just hoped there were other reviewers or testers in the 
> meantime, but be it.
> 
> Like I said, I don't have FreeBSD system here to test this, so I am taking 
> your word for now that you tested this and plan to bring this into QEMU when 
> master re-opens for new features soon.

Thank you very much!

In case I missed somewhat, what testing would you typically do
otherwise?  So far I had run the QEMU test suite (which indeed found
some bugs in the initial version) and tried mounting a 9pfs share from
Linux and FreeBSD guests and doing a bit of manual testing.

> If you have some time to adjust the commit log message above, that would be 
> great, otherwise I can also handle this on my end later on. Looks like that 
> comment is not adjusted for v2 yet (i.e. "user." and not mentioning 
> "system.").

Here's an amended commit log message.  Please let me know if this is
better submitted as a v3.

commit b79bf1b7d42025e3e14da86a7c08d269038cd3ed
Author: Mark Johnston <ma...@freebsd.org>
Date:   Wed Jul 16 20:32:05 2025 +0000

    9pfs: Add FreeBSD support
    
    This is largely derived from existing Darwin support.  FreeBSD
    apparently has better support for *at() system calls so doesn't require
    workarounds for a missing mknodat().  The implementation has a couple of
    warts however:
    - The extattr(2) system calls don't support anything akin to
      XATTR_CREATE or XATTR_REPLACE, so a racy workaround is implemented.
    - Attribute names cannot begin with "user." or "system." on ZFS, so
      these prefixes are trimmed off.  FreeBSD's extattr system calls sport
      an extra "namespace" identifier, and attributes created by the 9pfs
      backend live in the universal user and system namespaces, so this
      seems innocent enough.
    
    The 9pfs tests were verified to pass on the UFS, ZFS and tmpfs
    filesystems.
    
    Signed-off-by: Mark Johnston <ma...@freebsd.org>

Reply via email to