All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 00/27] 9pfs: disentangling virtio and generic code
@ 2016-01-07 19:55 Wei Liu
  2016-01-07 19:55 ` [Qemu-devel] [PATCH v2 01/27] 9pfs: rename virtio-9p-coth.{c, h} to coth.{c, h} Wei Liu
                   ` (27 more replies)
  0 siblings, 28 replies; 38+ messages in thread
From: Wei Liu @ 2016-01-07 19:55 UTC (permalink / raw)
  To: qemu-devel
  Cc: Michael S. Tsirkin, Wei Liu, Aneesh Kumar K.V,
	Stefano Stabellini, Greg Kurz

Hi all

Version 2 of this series is even longer. :-)

Back in 2015 summer one of our OPW interns Linda Jacobson explored the
possibility of making 9pfs work on Xen. It turned out lots of code in QEMU can
be reused.

This patch series can be found at:

  git://xenbits.xen.org/people/liuw/qemu.git wip.9pfs-refactor-v2

This series refactors 9pfs related code:

1. Rename a bunch of files and functions to make clear they are generic.
2. Only export two functions (marshal and unmarshal) from transport to generic
   code.
3. disentangle virtio transport code and generic 9pfs code.
4. Some function name clean-up.

To make sure this series doesn't break compilation a rune is use to compile
every commit.

$ git rebase -i origin/master --exec "make -j16 clean; ./configure --target-list=x86_64-softmmu --enable-virtfs --enable-kvm; make -j16 && echo ok."

Three use cases are tested:

1. Local file system driver with passthrough security policy
./qemu-system-x86_64 -L .  -hda /dev/DATA/jessie   -vnc 0.0.0.0:0,to=99  -fsdev local,path=/root/qemu,security_model=passthrough,id=fs1  -device virtio-9p-pci,fsdev=fs1,mount_tag=qemu  &

2. Local file system driver with mapped security policy
./qemu-system-x86_64 -L . -hda /dev/DATA/jessie -vnc 0.0.0.0:0,to=99 -fsdev local,path=/root/qemu,security_model=mapped,id=fs1 -device virtio-9p-pci,fsdev=fs1,mount_tag=qemu &

3. Proxy file system driver
./virtfs-proxy-helper -p /root/qemu -n -s virtfs-helper-sock -u 0 -g 0 &
./qemu-system-x86_64 -L .  -hda /dev/DATA/jessie   -vnc 0.0.0.0:0,to=99  -fsdev proxy,socket=virtfs-helper-sock,id=fs1  -device virtio-9p-pci,fsdev=fs1,mount_tag=qemu &

During each of the tests, mounting, unmounting, read and write operations are
performed. In "mapped" test, getfattr in host was used to inspect the
attributes.

I also ran Tuxera POSIX test suite (20080816) as Aneesh suggsted. The test
suite was run with passthrough and mapped mode.  All tests passed.

Let me know if you would like to see more tests.

Xen transport is still under development. I figure it would be better to post
this series as soon as possible because rebasing such huge series from time to
time is prone to error.

I tried to break down the changes to bit-size patches as much as possible to
make review easier. If you want me to squash patches together please let me
know.

Comments are welcome. Thanks!

Wei.
---
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: Greg Kurz <gkurz@linux.vnet.ibm.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
---

Wei Liu (27):
  9pfs: rename virtio-9p-coth.{c,h} to coth.{c,h}
  9pfs: rename virtio-9p-handle.c to 9p-handle.c
  9pfs: rename virtio-9p-local.c to 9p-local.c
  9pfs: rename virtio-9p-posix-acl.c to 9p-posix-acl.c
  9pfs: rename virtio-9p-proxy.{c,h} to 9p-proxy.{c,h}
  9pfs: rename virtio-9p-synth.{c,h} to 9p-synth.{c,h}
  9pfs: rename virtio-9p-xattr{,-user}.{c,h} to 9p-xattr{,-user}.{c,h}
  9pfs: merge hw/virtio/virtio-9p.h into hw/9pfs/virtio-9p.h
  9pfs: remove dead code
  fsdev: break out 9p-marshal.{c,h} from virtio-9p-marshal.{c,h}
  fsdev: 9p-marshal: introduce V9fsBlob
  9pfs: use V9fsBlob to transmit xattr
  fsdev: rename virtio-9p-marshal.{c,h} to 9p-iov-marshal.{c,h}
  9pfs: PDU processing functions don't need to take V9fsState as
    argument
  9pfs: PDU processing functions should start pdu_ prefix
  9pfs: make pdu_{,un}marshal proper functions
  9pfs: factor out virtio_pdu_{,un}marshal
  9pfs: factor out pdu_push_and_notify
  9pfs: break out virtio_init_iov_from_pdu
  9pfs: break out 9p.h from virtio-9p.h
  9pfs: factor out virtio_9p_push_and_notify
  9pfs: export pdu_{submit,alloc,free}
  9pfs: move handle_9p_output and make it static function
  9pfs: rename virtio_9p_set_fd_limit to use v9fs_ prefix
  9pfs: rename virtio-9p.c to 9p.c
  9pfs: factor out v9fs_device_{,un}realize_common
  9pfs: disentangle V9fsState

 Makefile                                           |   2 +-
 fsdev/{virtio-9p-marshal.c => 9p-iov-marshal.c}    | 205 ++++++-----
 fsdev/9p-iov-marshal.h                             |  15 +
 fsdev/9p-marshal.c                                 |  63 ++++
 fsdev/{virtio-9p-marshal.h => 9p-marshal.h}        |  26 +-
 fsdev/Makefile.objs                                |   2 +-
 fsdev/virtfs-proxy-helper.c                        |   6 +-
 hw/9pfs/{virtio-9p-handle.c => 9p-handle.c}        |   7 +-
 hw/9pfs/{virtio-9p-local.c => 9p-local.c}          |   7 +-
 hw/9pfs/{virtio-9p-posix-acl.c => 9p-posix-acl.c}  |   7 +-
 hw/9pfs/{virtio-9p-proxy.c => 9p-proxy.c}          |   7 +-
 hw/9pfs/{virtio-9p-proxy.h => 9p-proxy.h}          |  10 +-
 hw/9pfs/{virtio-9p-synth.c => 9p-synth.c}          |   6 +-
 hw/9pfs/{virtio-9p-synth.h => 9p-synth.h}          |   6 +-
 .../{virtio-9p-xattr-user.c => 9p-xattr-user.c}    |   7 +-
 hw/9pfs/{virtio-9p-xattr.c => 9p-xattr.c}          |   7 +-
 hw/9pfs/{virtio-9p-xattr.h => 9p-xattr.h}          |   6 +-
 hw/9pfs/{virtio-9p.c => 9p.c}                      | 297 +++++++++++-----
 hw/9pfs/9p.h                                       | 335 ++++++++++++++++++
 hw/9pfs/Makefile.objs                              |  14 +-
 hw/9pfs/codir.c                                    |   2 +-
 hw/9pfs/cofile.c                                   |   2 +-
 hw/9pfs/cofs.c                                     |   2 +-
 hw/9pfs/{virtio-9p-coth.c => coth.c}               |   4 +-
 hw/9pfs/{virtio-9p-coth.h => coth.h}               |   6 +-
 hw/9pfs/coxattr.c                                  |   2 +-
 hw/9pfs/virtio-9p-device.c                         | 201 ++++++-----
 hw/9pfs/virtio-9p.h                                | 391 +--------------------
 hw/s390x/virtio-ccw.h                              |   2 +-
 hw/virtio/virtio-pci.h                             |   3 +-
 include/hw/virtio/virtio-9p.h                      |  24 --
 31 files changed, 921 insertions(+), 753 deletions(-)
 rename fsdev/{virtio-9p-marshal.c => 9p-iov-marshal.c} (53%)
 create mode 100644 fsdev/9p-iov-marshal.h
 create mode 100644 fsdev/9p-marshal.c
 rename fsdev/{virtio-9p-marshal.h => 9p-marshal.h} (78%)
 rename hw/9pfs/{virtio-9p-handle.c => 9p-handle.c} (99%)
 rename hw/9pfs/{virtio-9p-local.c => 9p-local.c} (99%)
 rename hw/9pfs/{virtio-9p-posix-acl.c => 9p-posix-acl.c} (97%)
 rename hw/9pfs/{virtio-9p-proxy.c => 9p-proxy.c} (99%)
 rename hw/9pfs/{virtio-9p-proxy.h => 9p-proxy.h} (89%)
 rename hw/9pfs/{virtio-9p-synth.c => 9p-synth.c} (99%)
 rename hw/9pfs/{virtio-9p-synth.h => 9p-synth.h} (94%)
 rename hw/9pfs/{virtio-9p-xattr-user.c => 9p-xattr-user.c} (96%)
 rename hw/9pfs/{virtio-9p-xattr.c => 9p-xattr.c} (97%)
 rename hw/9pfs/{virtio-9p-xattr.h => 9p-xattr.h} (97%)
 rename hw/9pfs/{virtio-9p.c => 9p.c} (93%)
 create mode 100644 hw/9pfs/9p.h
 rename hw/9pfs/{virtio-9p-coth.c => coth.c} (95%)
 rename hw/9pfs/{virtio-9p-coth.h => coth.h} (98%)
 delete mode 100644 include/hw/virtio/virtio-9p.h

-- 
2.1.4

^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2016-01-08 18:55 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-07 19:55 [Qemu-devel] [PATCH v2 00/27] 9pfs: disentangling virtio and generic code Wei Liu
2016-01-07 19:55 ` [Qemu-devel] [PATCH v2 01/27] 9pfs: rename virtio-9p-coth.{c, h} to coth.{c, h} Wei Liu
2016-01-07 19:55 ` [Qemu-devel] [PATCH v2 02/27] 9pfs: rename virtio-9p-handle.c to 9p-handle.c Wei Liu
2016-01-07 19:56 ` [Qemu-devel] [PATCH v2 03/27] 9pfs: rename virtio-9p-local.c to 9p-local.c Wei Liu
2016-01-07 19:56 ` [Qemu-devel] [PATCH v2 04/27] 9pfs: rename virtio-9p-posix-acl.c to 9p-posix-acl.c Wei Liu
2016-01-07 19:56 ` [Qemu-devel] [PATCH v2 05/27] 9pfs: rename virtio-9p-proxy.{c, h} to 9p-proxy.{c, h} Wei Liu
2016-01-07 19:56 ` [Qemu-devel] [PATCH v2 06/27] 9pfs: rename virtio-9p-synth.{c, h} to 9p-synth.{c, h} Wei Liu
2016-01-07 19:56 ` [Qemu-devel] [PATCH v2 07/27] 9pfs: rename virtio-9p-xattr{, -user}.{c, h} to 9p-xattr{, -user}.{c, h} Wei Liu
2016-01-07 19:56 ` [Qemu-devel] [PATCH v2 08/27] 9pfs: merge hw/virtio/virtio-9p.h into hw/9pfs/virtio-9p.h Wei Liu
2016-01-07 19:56 ` [Qemu-devel] [PATCH v2 09/27] 9pfs: remove dead code Wei Liu
2016-01-07 19:56 ` [Qemu-devel] [PATCH v2 10/27] fsdev: break out 9p-marshal.{c, h} from virtio-9p-marshal.{c, h} Wei Liu
2016-01-07 19:56 ` [Qemu-devel] [PATCH v2 11/27] fsdev: 9p-marshal: introduce V9fsBlob Wei Liu
2016-01-07 19:56 ` [Qemu-devel] [PATCH v2 12/27] 9pfs: use V9fsBlob to transmit xattr Wei Liu
2016-01-08  8:30   ` Aneesh Kumar K.V
2016-01-08 17:56     ` Wei Liu
2016-01-08 18:48       ` Aneesh Kumar K.V
2016-01-08 18:54         ` Wei Liu
2016-01-07 19:56 ` [Qemu-devel] [PATCH v2 13/27] fsdev: rename virtio-9p-marshal.{c, h} to 9p-iov-marshal.{c, h} Wei Liu
2016-01-07 19:56 ` [Qemu-devel] [PATCH v2 14/27] 9pfs: PDU processing functions don't need to take V9fsState as argument Wei Liu
2016-01-07 19:56 ` [Qemu-devel] [PATCH v2 15/27] 9pfs: PDU processing functions should start pdu_ prefix Wei Liu
2016-01-07 19:56 ` [Qemu-devel] [PATCH v2 16/27] 9pfs: make pdu_{, un}marshal proper functions Wei Liu
2016-01-07 19:56 ` [Qemu-devel] [PATCH v2 17/27] 9pfs: factor out virtio_pdu_{, un}marshal Wei Liu
2016-01-07 19:56 ` [Qemu-devel] [PATCH v2 18/27] 9pfs: factor out pdu_push_and_notify Wei Liu
2016-01-07 19:56 ` [Qemu-devel] [PATCH v2 19/27] 9pfs: break out virtio_init_iov_from_pdu Wei Liu
2016-01-07 19:56 ` [Qemu-devel] [PATCH v2 20/27] 9pfs: break out 9p.h from virtio-9p.h Wei Liu
2016-01-07 19:56 ` [Qemu-devel] [PATCH v2 21/27] 9pfs: factor out virtio_9p_push_and_notify Wei Liu
2016-01-08  9:57   ` Aneesh Kumar K.V
2016-01-08 17:57     ` Wei Liu
2016-01-07 19:56 ` [Qemu-devel] [PATCH v2 22/27] 9pfs: export pdu_{submit, alloc, free} Wei Liu
2016-01-07 19:56 ` [Qemu-devel] [PATCH v2 23/27] 9pfs: move handle_9p_output and make it static function Wei Liu
2016-01-07 19:56 ` [Qemu-devel] [PATCH v2 24/27] 9pfs: rename virtio_9p_set_fd_limit to use v9fs_ prefix Wei Liu
2016-01-07 19:56 ` [Qemu-devel] [PATCH v2 25/27] 9pfs: rename virtio-9p.c to 9p.c Wei Liu
2016-01-07 19:56 ` [Qemu-devel] [PATCH v2 26/27] 9pfs: factor out v9fs_device_{, un}realize_common Wei Liu
2016-01-07 19:56 ` [Qemu-devel] [PATCH v2 27/27] 9pfs: disentangle V9fsState Wei Liu
2016-01-08  6:09   ` Aneesh Kumar K.V
2016-01-08 18:54     ` Wei Liu
2016-01-08 10:49 ` [Qemu-devel] [PATCH v2 00/27] 9pfs: disentangling virtio and generic code Aneesh Kumar K.V
2016-01-08 18:54   ` Wei Liu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.