[PATCH v7 00/11] 9p: Add support for darwin

Will Cohen posted 11 patches 2 years, 2 months ago
Test checkpatch failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20220215190426.56130-1-wwcohen@gmail.com
Maintainers: Christian Schoenebeck <qemu_oss@crudebyte.com>, Paolo Bonzini <pbonzini@redhat.com>, Laurent Vivier <lvivier@redhat.com>, Greg Kurz <groug@kaod.org>, Thomas Huth <thuth@redhat.com>
There is a newer version of this series
fsdev/file-op-9p.h                     |  9 +++-
fsdev/meson.build                      |  1 +
hw/9pfs/9p-local.c                     | 27 ++++++++---
hw/9pfs/9p-proxy.c                     | 38 +++++++++++++--
hw/9pfs/9p-synth.c                     |  6 +++
hw/9pfs/9p-util-darwin.c               | 64 ++++++++++++++++++++++++++
hw/9pfs/{9p-util.c => 9p-util-linux.c} |  2 +-
hw/9pfs/9p-util.h                      | 35 ++++++++++++++
hw/9pfs/9p.c                           | 42 ++++++++++++++---
hw/9pfs/9p.h                           | 18 ++++++++
hw/9pfs/codir.c                        |  4 +-
hw/9pfs/meson.build                    |  3 +-
include/qemu/osdep.h                   | 12 +++++
include/qemu/xattr.h                   |  4 +-
meson.build                            | 15 ++++--
os-posix.c                             | 35 ++++++++++++++
tests/qtest/virtio-9p-test.c           |  2 +-
17 files changed, 292 insertions(+), 25 deletions(-)
create mode 100644 hw/9pfs/9p-util-darwin.c
rename hw/9pfs/{9p-util.c => 9p-util-linux.c} (97%)
[PATCH v7 00/11] 9p: Add support for darwin
Posted by Will Cohen 2 years, 2 months ago
This is a followup to https://lists.gnu.org/archive/html/qemu-devel/2022-02/msg02313.html,
adding 9p server support for Darwin.

Since v6, the following changes have been made to the following patches:

Patch 9/11: 9p: darwin: Implement compatibility for mknodat
- Add CONFIG_PTHREAD_FCHDIR_NP to meson and check for
  presence in osdep.h and os-posix.c

Keno Fischer (10):
  9p: linux: Fix a couple Linux assumptions
  9p: Rename 9p-util -> 9p-util-linux
  9p: darwin: Handle struct stat(fs) differences
  9p: darwin: Handle struct dirent differences
  9p: darwin: Ignore O_{NOATIME, DIRECT}
  9p: darwin: Move XATTR_SIZE_MAX->P9_XATTR_SIZE_MAX
  9p: darwin: *xattr_nofollow implementations
  9p: darwin: Compatibility for f/l*xattr
  9p: darwin: Implement compatibility for mknodat
  9p: darwin: meson: Allow VirtFS on Darwin

Will Cohen (1):
  9p: darwin: Adjust assumption on virtio-9p-test

 fsdev/file-op-9p.h                     |  9 +++-
 fsdev/meson.build                      |  1 +
 hw/9pfs/9p-local.c                     | 27 ++++++++---
 hw/9pfs/9p-proxy.c                     | 38 +++++++++++++--
 hw/9pfs/9p-synth.c                     |  6 +++
 hw/9pfs/9p-util-darwin.c               | 64 ++++++++++++++++++++++++++
 hw/9pfs/{9p-util.c => 9p-util-linux.c} |  2 +-
 hw/9pfs/9p-util.h                      | 35 ++++++++++++++
 hw/9pfs/9p.c                           | 42 ++++++++++++++---
 hw/9pfs/9p.h                           | 18 ++++++++
 hw/9pfs/codir.c                        |  4 +-
 hw/9pfs/meson.build                    |  3 +-
 include/qemu/osdep.h                   | 12 +++++
 include/qemu/xattr.h                   |  4 +-
 meson.build                            | 15 ++++--
 os-posix.c                             | 35 ++++++++++++++
 tests/qtest/virtio-9p-test.c           |  2 +-
 17 files changed, 292 insertions(+), 25 deletions(-)
 create mode 100644 hw/9pfs/9p-util-darwin.c
 rename hw/9pfs/{9p-util.c => 9p-util-linux.c} (97%)

-- 
2.34.1


Re: [PATCH v7 00/11] 9p: Add support for darwin
Posted by Will Cohen 2 years, 2 months ago
On Tue, Feb 15, 2022 at 2:04 PM Will Cohen <wwcohen@gmail.com> wrote:

> This is a followup to
> https://lists.gnu.org/archive/html/qemu-devel/2022-02/msg02313.html,
> adding 9p server support for Darwin.
>
> Since v6, the following changes have been made to the following patches:
>
> Patch 9/11: 9p: darwin: Implement compatibility for mknodat
> - Add CONFIG_PTHREAD_FCHDIR_NP to meson and check for
>   presence in osdep.h and os-posix.c
>
> Keno Fischer (10):
>   9p: linux: Fix a couple Linux assumptions
>   9p: Rename 9p-util -> 9p-util-linux
>   9p: darwin: Handle struct stat(fs) differences
>   9p: darwin: Handle struct dirent differences
>   9p: darwin: Ignore O_{NOATIME, DIRECT}
>   9p: darwin: Move XATTR_SIZE_MAX->P9_XATTR_SIZE_MAX
>   9p: darwin: *xattr_nofollow implementations
>   9p: darwin: Compatibility for f/l*xattr
>   9p: darwin: Implement compatibility for mknodat
>   9p: darwin: meson: Allow VirtFS on Darwin
>
> Will Cohen (1):
>   9p: darwin: Adjust assumption on virtio-9p-test
>
>  fsdev/file-op-9p.h                     |  9 +++-
>  fsdev/meson.build                      |  1 +
>  hw/9pfs/9p-local.c                     | 27 ++++++++---
>  hw/9pfs/9p-proxy.c                     | 38 +++++++++++++--
>  hw/9pfs/9p-synth.c                     |  6 +++
>  hw/9pfs/9p-util-darwin.c               | 64 ++++++++++++++++++++++++++
>  hw/9pfs/{9p-util.c => 9p-util-linux.c} |  2 +-
>  hw/9pfs/9p-util.h                      | 35 ++++++++++++++
>  hw/9pfs/9p.c                           | 42 ++++++++++++++---
>  hw/9pfs/9p.h                           | 18 ++++++++
>  hw/9pfs/codir.c                        |  4 +-
>  hw/9pfs/meson.build                    |  3 +-
>  include/qemu/osdep.h                   | 12 +++++
>  include/qemu/xattr.h                   |  4 +-
>  meson.build                            | 15 ++++--
>  os-posix.c                             | 35 ++++++++++++++
>  tests/qtest/virtio-9p-test.c           |  2 +-
>  17 files changed, 292 insertions(+), 25 deletions(-)
>  create mode 100644 hw/9pfs/9p-util-darwin.c
>  rename hw/9pfs/{9p-util.c => 9p-util-linux.c} (97%)
>
> --
> 2.34.1
>
>
As a brief additional note, this patch set has gotten a moderate amount of
performance testing downstream by various end users of podman, with
favorable results:
https://github.com/containers/podman/issues/8016#issuecomment-1044843948
Re: [PATCH v7 00/11] 9p: Add support for darwin
Posted by Christian Schoenebeck 2 years, 2 months ago
On Freitag, 18. Februar 2022 18:04:24 CET Will Cohen wrote:
> On Tue, Feb 15, 2022 at 2:04 PM Will Cohen <wwcohen@gmail.com> wrote:
> > This is a followup to
> > https://lists.gnu.org/archive/html/qemu-devel/2022-02/msg02313.html,
> > adding 9p server support for Darwin.
> > 
> > Since v6, the following changes have been made to the following patches:
> > 
> > Patch 9/11: 9p: darwin: Implement compatibility for mknodat
> > - Add CONFIG_PTHREAD_FCHDIR_NP to meson and check for
> > 
> >   presence in osdep.h and os-posix.c
> > 
> > Keno Fischer (10):
> >   9p: linux: Fix a couple Linux assumptions
> >   9p: Rename 9p-util -> 9p-util-linux
> >   9p: darwin: Handle struct stat(fs) differences
> >   9p: darwin: Handle struct dirent differences
> >   9p: darwin: Ignore O_{NOATIME, DIRECT}
> >   9p: darwin: Move XATTR_SIZE_MAX->P9_XATTR_SIZE_MAX
> >   9p: darwin: *xattr_nofollow implementations
> >   9p: darwin: Compatibility for f/l*xattr
> >   9p: darwin: Implement compatibility for mknodat
> >   9p: darwin: meson: Allow VirtFS on Darwin
> > 
> > Will Cohen (1):
> >   9p: darwin: Adjust assumption on virtio-9p-test
> >  
> >  fsdev/file-op-9p.h                     |  9 +++-
> >  fsdev/meson.build                      |  1 +
> >  hw/9pfs/9p-local.c                     | 27 ++++++++---
> >  hw/9pfs/9p-proxy.c                     | 38 +++++++++++++--
> >  hw/9pfs/9p-synth.c                     |  6 +++
> >  hw/9pfs/9p-util-darwin.c               | 64 ++++++++++++++++++++++++++
> >  hw/9pfs/{9p-util.c => 9p-util-linux.c} |  2 +-
> >  hw/9pfs/9p-util.h                      | 35 ++++++++++++++
> >  hw/9pfs/9p.c                           | 42 ++++++++++++++---
> >  hw/9pfs/9p.h                           | 18 ++++++++
> >  hw/9pfs/codir.c                        |  4 +-
> >  hw/9pfs/meson.build                    |  3 +-
> >  include/qemu/osdep.h                   | 12 +++++
> >  include/qemu/xattr.h                   |  4 +-
> >  meson.build                            | 15 ++++--
> >  os-posix.c                             | 35 ++++++++++++++
> >  tests/qtest/virtio-9p-test.c           |  2 +-
> >  17 files changed, 292 insertions(+), 25 deletions(-)
> >  create mode 100644 hw/9pfs/9p-util-darwin.c
> >  rename hw/9pfs/{9p-util.c => 9p-util-linux.c} (97%)
> > 
> > --
> > 2.34.1
> 
> As a brief additional note, this patch set has gotten a moderate amount of
> performance testing downstream by various end users of podman, with
> favorable results:
> https://github.com/containers/podman/issues/8016#issuecomment-1044843948

Thanks for sharing!

Additionally you might be interested to know what's pending in the pipeline on
Linux kernel side which brings a huge performance improvement with 9p:
https://lore.kernel.org/netdev/cover.1640870037.git.linux_oss@crudebyte.com/

As for the status on this macOS series here: I will get back on it next week.
From my PoV it looks fine now. So for the other gentlemen here: please raise
your hand if you still find something.

Will, one more thing though: I just sent a PR with one particular patch that I
would ask you to test in conjunction with this series:

https://github.com/cschoenebeck/qemu/commit/e64e27d5cb103b7764f1a05b6eda7e7fedd517c5

You might simply wait for the PR being merged (maybe monday?) and then rebase
this series to master and test if this patch is not breaking anything for
macOS. Theoretically the new qemu_dirent_dup() function should fallback on
macOS to its portable branch, but it should be tested before merging this
series, just to be sure.

Best regards,
Christian Schoenebeck



Re: [PATCH v7 00/11] 9p: Add support for darwin
Posted by Will Cohen 2 years, 2 months ago
Excellent, thanks so much for the update. I'll wait till the other 9p pull
gets integrated, then rebase and test!

On Fri, Feb 18, 2022 at 12:45 PM Christian Schoenebeck <
qemu_oss@crudebyte.com> wrote:

> On Freitag, 18. Februar 2022 18:04:24 CET Will Cohen wrote:
> > On Tue, Feb 15, 2022 at 2:04 PM Will Cohen <wwcohen@gmail.com> wrote:
> > > This is a followup to
> > > https://lists.gnu.org/archive/html/qemu-devel/2022-02/msg02313.html,
> > > adding 9p server support for Darwin.
> > >
> > > Since v6, the following changes have been made to the following
> patches:
> > >
> > > Patch 9/11: 9p: darwin: Implement compatibility for mknodat
> > > - Add CONFIG_PTHREAD_FCHDIR_NP to meson and check for
> > >
> > >   presence in osdep.h and os-posix.c
> > >
> > > Keno Fischer (10):
> > >   9p: linux: Fix a couple Linux assumptions
> > >   9p: Rename 9p-util -> 9p-util-linux
> > >   9p: darwin: Handle struct stat(fs) differences
> > >   9p: darwin: Handle struct dirent differences
> > >   9p: darwin: Ignore O_{NOATIME, DIRECT}
> > >   9p: darwin: Move XATTR_SIZE_MAX->P9_XATTR_SIZE_MAX
> > >   9p: darwin: *xattr_nofollow implementations
> > >   9p: darwin: Compatibility for f/l*xattr
> > >   9p: darwin: Implement compatibility for mknodat
> > >   9p: darwin: meson: Allow VirtFS on Darwin
> > >
> > > Will Cohen (1):
> > >   9p: darwin: Adjust assumption on virtio-9p-test
> > >
> > >  fsdev/file-op-9p.h                     |  9 +++-
> > >  fsdev/meson.build                      |  1 +
> > >  hw/9pfs/9p-local.c                     | 27 ++++++++---
> > >  hw/9pfs/9p-proxy.c                     | 38 +++++++++++++--
> > >  hw/9pfs/9p-synth.c                     |  6 +++
> > >  hw/9pfs/9p-util-darwin.c               | 64 ++++++++++++++++++++++++++
> > >  hw/9pfs/{9p-util.c => 9p-util-linux.c} |  2 +-
> > >  hw/9pfs/9p-util.h                      | 35 ++++++++++++++
> > >  hw/9pfs/9p.c                           | 42 ++++++++++++++---
> > >  hw/9pfs/9p.h                           | 18 ++++++++
> > >  hw/9pfs/codir.c                        |  4 +-
> > >  hw/9pfs/meson.build                    |  3 +-
> > >  include/qemu/osdep.h                   | 12 +++++
> > >  include/qemu/xattr.h                   |  4 +-
> > >  meson.build                            | 15 ++++--
> > >  os-posix.c                             | 35 ++++++++++++++
> > >  tests/qtest/virtio-9p-test.c           |  2 +-
> > >  17 files changed, 292 insertions(+), 25 deletions(-)
> > >  create mode 100644 hw/9pfs/9p-util-darwin.c
> > >  rename hw/9pfs/{9p-util.c => 9p-util-linux.c} (97%)
> > >
> > > --
> > > 2.34.1
> >
> > As a brief additional note, this patch set has gotten a moderate amount
> of
> > performance testing downstream by various end users of podman, with
> > favorable results:
> > https://github.com/containers/podman/issues/8016#issuecomment-1044843948
>
> Thanks for sharing!
>
> Additionally you might be interested to know what's pending in the
> pipeline on
> Linux kernel side which brings a huge performance improvement with 9p:
>
> https://lore.kernel.org/netdev/cover.1640870037.git.linux_oss@crudebyte.com/
>
> As for the status on this macOS series here: I will get back on it next
> week.
> From my PoV it looks fine now. So for the other gentlemen here: please
> raise
> your hand if you still find something.
>
> Will, one more thing though: I just sent a PR with one particular patch
> that I
> would ask you to test in conjunction with this series:
>
>
> https://github.com/cschoenebeck/qemu/commit/e64e27d5cb103b7764f1a05b6eda7e7fedd517c5
>
> You might simply wait for the PR being merged (maybe monday?) and then
> rebase
> this series to master and test if this patch is not breaking anything for
> macOS. Theoretically the new qemu_dirent_dup() function should fallback on
> macOS to its portable branch, but it should be tested before merging this
> series, just to be sure.
>
> Best regards,
> Christian Schoenebeck
>
>
>