freebsd-src/share
Doug Rabson e97ad33a89 Add an implementation of the 9P filesystem
This is derived from swills@ fork of the Juniper virtfs with many
changes by me including bug fixes, style improvements, clearer layering
and more consistent logging. The filesystem is renamed to p9fs to better
reflect its function and to prevent possible future confusion with
virtio-fs.

Several updates and fixes from Juniper have been integrated into this
version by Val Packett and these contributions along with the original
Juniper authors are credited below.

To use this with bhyve, add 'virtio_p9fs_load=YES' to loader.conf. The
bhyve virtio-9p device allows access from the guest to files on the host
by mapping a 'sharename' to a host path. It is possible to use p9fs as a
root filesystem by adding this to /boot/loader.conf:

	vfs.root.mountfrom="p9fs:sharename"

for non-root filesystems add something like this to /etc/fstab:

	sharename /mnt p9fs rw 0 0

In both examples, substitute the share name used on the bhyve command
line.

The 9P filesystem protocol relies on stateful file opens which map
protocol-level FIDs to host file descriptors. The FreeBSD vnode
interface doesn't really support this and we use heuristics to guess the
right FID to use for file operations.  This can be confused by privilege
lowering and does not guarantee that the FID created for a given file
open is always used for file operations, even if the calling process is
using the file descriptor from the original open call. Improving this
would involve changes to the vnode interface which is out-of-scope for
this import.

Differential Revision: https://reviews.freebsd.org/D41844
Reviewed by: kib, emaste, dch
MFC after: 3 months
Co-authored-by: Val Packett <val@packett.cool>
Co-authored-by: Ka Ho Ng <kahon@juniper.net>
Co-authored-by: joyu <joyul@juniper.net>
Co-authored-by: Kumara Babu Narayanaswamy <bkumara@juniper.net>
2024-06-19 13:12:04 +01:00
..
colldef
colldef_unicode
ctypedef
dict
doc Grammar fix in share/doc/IPv6/IMPLEMENTATION 2024-02-13 15:16:01 +08:00
dtrace
examples targ: fix compiling the example 2024-06-18 18:17:31 -06:00
i18n
keys
man Add an implementation of the 9P filesystem 2024-06-19 13:12:04 +01:00
misc usb_vendors: update to 2024.03.18 2024-05-14 14:18:52 +02:00
mk Revert "src.sys.obj.mk: Export OBJTOP" 2024-06-03 00:33:52 +01:00
monetdef
monetdef_unicode
msgdef
msgdef_unicode
numericdef
numericdef_unicode
security
sendmail
skel dot.profile: handle symlinked $HOME 2024-02-13 13:24:22 -05:00
snmp
syscons
tabset
termcap
tests
timedef
vt
zoneinfo
Makefile
Makefile.inc