Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Jul 2022 22:46:33 +0930
From:      "Daniel O'Connor" <darius@dons.net.au>
To:        freebsd-hackers <freebsd-hackers@freebsd.org>
Subject:   VFS mount rollback for virtio 9pfs
Message-ID:  <75ACE8B8-A41F-4742-95DA-3CFB3B97746A@dons.net.au>

next in thread | raw e-mail | index | archive | help
Hi,
I am attempting to get the Juniper virtfs code =
(http://github.com/Juniper/virtfs) working and I have managed to get it =
to a point where it mounts and things seem to work =
(https://github.com/DanielO/freebsd-src/tree/9pfs) although I have only =
tested on bhyve so far (but feel free to test elsewhere :)

During the process I found the Juniper code would ask for 9p2000.u but =
is written for 9p2000.L (I think bhyve is more rigid about what it =
allows than Xen etc).

This was easily fixed but I want to make the handling of a similar error =
in future correct. The virtfs_unmount code as it stands will fail when =
the kernel tries to rollback the mount. The end result is the ref count =
for the file system is not decremented so the KLD can't be unloaded.

I attempted to fix this by squashing the return value to 0 in the event =
of a forced unmount but that results in the mount rollback hanging in =
'mntref' while it waits for the mount ref count to go to 0.

I assume I am missing something obvious but I can't work out what it is =
so any clue much appreciated.

Thanks.

--
Daniel O'Connor
"The nice thing about standards is that there
are so many of them to choose from."
-- Andrew Tanenbaum




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?75ACE8B8-A41F-4742-95DA-3CFB3B97746A>