Changes since v1: - Now targeting the development branch of virtio-fs QEMU [1]. This is closer to upstream QEMU 5.0, e.g. in the FUSE version it supports. Also, the DAX-related FUSE protocol operations are different in this branch and, according to the virtio-fs devs should be more future-proof. This is mainly reflected in the FUSE header (fs/virtiofs/fuse_kernel.h). - Compatible with latest upstream QEMU 5.0. - The DAX window alignment requirements are communicated from the device during FUSE_INIT instead of being hard-coded. - When allocating the read buffer for FUSE_READ, contiguous physical memory is ensured.
Note that for all operations except FUSE_READ, the arguments passed to the virtqueues are much smaller than a page. That's why I have kept the regular new() for memory allocations there (that's what other drivers also do AFAICS). If someone was to shed more light into this, possibly indicating all these allocations had better be made with alloc_phys_contiguous_aligned(), I am willing to change to that. To test it out: 1. Apply these patches. 2. Due to a bug in virtiofsd in [1], apply the patch in [2] to it (or use the patched version from [3]). Hopefully this patch will be merged soon. 3. Follow the virtio-fs QEMU how-to in [4]. Don't forget to add "cache-size=" to the arguments passed to the respective QEMU device flag. References: [1] virtio-fs QEMU development branch: https://gitlab.com/virtio-fs/qemu/-/tree/virtio-fs-dev [2] virtio-fs QEMU patch: https://www.redhat.com/archives/virtio-fs/2020-May/msg00053.html [3] Patched virtio-fs QEMU: https://github.com/foxeng/qemu/tree/fix-dax-fd [4] Official virtio-fs QEMU how-to: https://virtio-fs.gitlab.io/howto-qemu.html Fotis Xenakis (4): virtio-fs: update fuse protocol header virtio-fs: implement FUSE_INIT map_alignment field virtio-fs: add basic read using the DAX window virtio-fs: refactor driver / fs drivers/virtio-fs.cc | 44 +++----- drivers/virtio-fs.hh | 34 ++++-- fs/virtiofs/fuse_kernel.h | 88 ++++++++++++++-- fs/virtiofs/virtiofs_i.hh | 24 +---- fs/virtiofs/virtiofs_vfsops.cc | 23 +++-- fs/virtiofs/virtiofs_vnops.cc | 184 +++++++++++++++++++++++++++------ 6 files changed, 294 insertions(+), 103 deletions(-) -- 2.26.2 -- You received this message because you are subscribed to the Google Groups "OSv Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/osv-dev/VI1PR03MB4383D74BD30734420930531BA6BB0%40VI1PR03MB4383.eurprd03.prod.outlook.com.
