Documentation/filesystems/9p.rst

Source file repositories/reference/linux-study-clean/Documentation/filesystems/9p.rst

File Facts

System
Linux kernel
Corpus path
Documentation/filesystems/9p.rst
Extension
.rst
Size
10532 bytes
Lines
280
Domain
Support Tooling And Documentation
Bucket
Documentation
Inferred role
Support Tooling And Documentation: documentation
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

.. SPDX-License-Identifier: GPL-2.0

=======================================
v9fs: Plan 9 Resource Sharing for Linux
=======================================

About
=====

v9fs is a Unix implementation of the Plan 9 9p remote filesystem protocol.

This software was originally developed by Ron Minnich <rminnich@sandia.gov>
and Maya Gokhale.  Additional development by Greg Watson
<gwatson@lanl.gov> and most recently Eric Van Hensbergen
<ericvh@gmail.com>, Latchesar Ionkov <lucho@ionkov.net> and Russ Cox
<rsc@swtch.com>.

The best detailed explanation of the Linux implementation and applications of
the 9p client is available in the form of a USENIX paper:

   https://www.usenix.org/events/usenix05/tech/freenix/hensbergen.html

Other applications are described in the following papers:

	* XCPU & Clustering
	* KVMFS: control file system for KVM
	* CellFS: A New Programming Model for the Cell BE
	* PROSE I/O: Using 9p to enable Application Partitions
	  http://web.archive.org/web/20110101152020/http://plan9.escet.urjc.es/iwp9/cready/PROSE_iwp9_2006.pdf
	* VirtFS: A Virtualization Aware File System pass-through
	  https://kernel.org/doc/ols/2010/ols2010-pages-109-120.pdf

Usage
=====

For remote file server::

	mount -t 9p 10.10.1.2 /mnt/9

For Plan 9 From User Space applications (https://9fans.github.io/plan9port/)::

	mount -t 9p `namespace`/acme /mnt/9 -o trans=unix,uname=$USER

For server running on QEMU host with virtio transport::

	mount -t 9p -o trans=virtio <mount_tag> /mnt/9

where mount_tag is the tag generated by the server to each of the exported
mount points. Each 9P export is seen by the client as a virtio device with an
associated "mount_tag" property. Available mount tags can be
seen by reading /sys/bus/virtio/drivers/9pnet_virtio/virtio<n>/mount_tag files.

USBG Usage
==========

To mount a 9p FS on a USB Host accessible via the gadget at runtime::

	mount -t 9p -o trans=usbg,aname=/path/to/fs <device> /mnt/9

To mount a 9p FS on a USB Host accessible via the gadget as root filesystem::

	root=<device> rootfstype=9p rootflags=trans=usbg,cache=loose,uname=root,access=0,dfltuid=0,dfltgid=0,aname=/path/to/rootfs

where <device> is the tag associated by the usb gadget transport.
It is defined by the configfs instance name.

USBG Example
============

The USB host exports a filesystem, while the gadget on the USB device

Annotation

Implementation Notes