From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34178) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHAjX-0003b8-Q5 for qemu-devel@nongnu.org; Thu, 07 Jan 2016 08:36:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aHAjT-0000pi-MI for qemu-devel@nongnu.org; Thu, 07 Jan 2016 08:36:07 -0500 Received: from e06smtp12.uk.ibm.com ([195.75.94.108]:57904) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHAjT-0000pP-9F for qemu-devel@nongnu.org; Thu, 07 Jan 2016 08:36:03 -0500 Received: from localhost by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 7 Jan 2016 13:36:01 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 6C0941B08061 for ; Thu, 7 Jan 2016 13:36:41 +0000 (GMT) Received: from d06av06.portsmouth.uk.ibm.com (d06av06.portsmouth.uk.ibm.com [9.149.37.217]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u07DZxHZ3670526 for ; Thu, 7 Jan 2016 13:35:59 GMT Received: from d06av06.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av06.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u07DZxUu003655 for ; Thu, 7 Jan 2016 06:35:59 -0700 Date: Thu, 7 Jan 2016 14:35:56 +0100 From: Greg Kurz Message-ID: <20160107143556.13db4691@bahia.local> In-Reply-To: <20160107133243.509cc369@bahia.local> References: <1452020761-24457-1-git-send-email-wei.liu2@citrix.com> <20160107133243.509cc369@bahia.local> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 00/22] 9pfs: disentangling virtio and generic code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefano Stabellini Cc: qemu-devel@nongnu.org On Thu, 7 Jan 2016 13:32:43 +0100 Greg Kurz wrote: > On Thu, 7 Jan 2016 11:59:22 +0000 > Stefano Stabellini wrote: > > > On Tue, 5 Jan 2016, Wei Liu wrote: > > > Hi all > > > > > > 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 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. > > > > The series looks pretty good and it looks like a clean improvement over > > the current code base. > > Stefano, Can I add your Reviewed-by to the patches ? -- Greg > > I agree Wei did a great job. I'll fix the title in patch 3 and push it to > my tree next week. > > Thanks. > > -- > Greg > > > > > > > > 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. > > > > > > 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. > > > > > > Comments are welcome. Thanks! > > > > > > Wei. > > > --- > > > Cc: "Aneesh Kumar K.V" > > > Cc: Greg Kurz > > > Cc: "Michael S. Tsirkin" > > > Cc: Stefano Stabellini > > > --- > > > > > > Wei Liu (22): > > > 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-handle.c to 9p-handle.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 generic code from virtio-9p.{c,h} > > > 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 | 64 ++++ > > > 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} | 301 ++++++++++------ > > > 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} | 15 +- > > > hw/9pfs/coxattr.c | 2 +- > > > hw/9pfs/virtio-9p-device.c | 196 ++++++----- > > > hw/9pfs/virtio-9p.h | 391 +-------------------- > > > hw/s390x/virtio-ccw.h | 2 +- > > > hw/virtio/virtio-pci.h | 4 +- > > > include/hw/virtio/virtio-9p.h | 24 -- > > > 31 files changed, 927 insertions(+), 757 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} (96%) > > > delete mode 100644 include/hw/virtio/virtio-9p.h > > > > > > -- > > > 2.1.4 > > > > > > >