Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Oct 2022 15:33:07 -0700
From:      Bakul Shah <bakul@iitbombay.org>
To:        Daniel O'Connor <darius@dons.net.au>
Cc:        Felix Palmen <felix@palmen-it.de>, freebsd-hackers@freebsd.org
Subject:   Re: VFS mount rollback for virtio 9pfs
Message-ID:  <0C98D486-6A8F-4DF6-8AFF-F3B84E631A84@iitbombay.org>
In-Reply-To: <3E450927-1932-412E-A568-A2F84582BD26@dons.net.au>
References:  <75ACE8B8-A41F-4742-95DA-3CFB3B97746A@dons.net.au> <20220714101214.sju2rpsngqjyuvsb@nexus.home.palmen-it.de> <BC734F39-4ECC-4B0D-A771-83763F3283BC@dons.net.au> <20220715131656.f2epy732npgbgrf5@nexus.home.palmen-it.de> <20220715151509.d2v6kqkjsnrxtprj@nexus.home.palmen-it.de> <45451C7B-7A12-420F-B6B0-19F2FA98D056@dons.net.au> <20220718065304.cx2o24tshzgpxmqw@nexus.home.palmen-it.de> <3E450927-1932-412E-A568-A2F84582BD26@dons.net.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Oct 13, 2022, at 6:01 PM, Daniel O'Connor <darius@dons.net.au> wrote:
>=20
> It's come to my attention that someone else also ported this:
> https://github.com/swills/virtfs-9p-kmod
>=20
> I was wondering if you would be interesting in trying and seeing how =
it fairs. Unfortunately I am not in a position to do a test poudriere =
with it as yet.

FWIW I played with swills port a few months ago. It worked on -12 but
failed on -13 and -current (panics on kldload). I didn't investigate
it further. Tested in bhyve.

Note that bhyve on 13.1-stable does work with a linux guest:
ubuntu# mount -t 9p -o trans=3Dvirtio,version=3D9p2000.L,rw,cache=3Dmmap =
sharename /opt
ubuntu# dd < largefile >/dev/null bs=3D1M count=3D1000
1000+0 records in
1000+0 records out
1048576000 bytes (1.0 GB, 1000 MiB) copied, 3.65227 s, 287 MB/s

I took your port & copied relevant files to a -current tree
(8cee2ebac54a). I had to hack a few things to compile[1]. kldload
doesn't crash as with swills port but mount fails:

# mount -t virtio -o trans=3Dvirtio sharename /mnt
mount: sharename: Operation not supported by device

Note that the same line works fine on -12, with swill's changes.

Relevant bhyve line:
        -s 8,virtio-9p,sharename=3Dmydir \

Given that mount on ubuntu works seems the problem must be elsewhere
and not 9p2000.L vs 9p2000.u (as you surmised in the original msg in
this thread). I even changed code in the driver to unconditionally
pass 9p2000.L but that didn't help.

[1] Fixed up module Makefiles and had to add=20
#define SAVENAME        0x00000400 /* save pathname buffer */
to 9pfs/virtiofs_vnops.c

As only this define from namei.h seemed to be somehow lost.








Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0C98D486-6A8F-4DF6-8AFF-F3B84E631A84>