<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-linux/include/net/9p, branch stable</title>
<subtitle>WireGuard for the Linux kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-linux/atom/include/net/9p?h=stable</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-linux/atom/include/net/9p?h=stable'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/'/>
<updated>2026-10-29T06:05:56Z</updated>
<entry>
<title>9p: optimize p9_fcall struct</title>
<updated>2026-10-29T06:05:56Z</updated>
<author>
<name>Dominique Martinet</name>
<email>asmadeus@codewreck.org</email>
</author>
<published>2026-10-29T06:00:12Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=35ecd40c0d7e4f772d00dfec9f7077315ba5ca82'/>
<id>urn:sha1:35ecd40c0d7e4f772d00dfec9f7077315ba5ca82</id>
<content type='text'>
p9_fcall has a 1 byte hole followed by more data and then a single byte
element:

struct p9_fcall {
	u32                        size;                 /*     0     4 */
	u8                         id;                   /*     4     1 */

	/* XXX 1 byte hole, try to pack */

	u16                        tag;                  /*     6     2 */
	size_t                     offset;               /*     8     8 */
	size_t                     capacity;             /*    16     8 */
	struct kmem_cache *        cache;                /*    24     8 */
	u8 *                       sdata;                /*    32     8 */
	bool                       zc;                   /*    40     1 */

	/* size: 48, cachelines: 1, members: 8 */
	/* sum members: 40, holes: 1, sum holes: 1 */
	/* padding: 7 */
	/* last cacheline: 48 bytes */
};

move `zc` up to optimize it:

struct p9_fcall {
	u32                        size;                 /*     0     4 */
	u8                         id;                   /*     4     1 */
	bool                       zc;                   /*     5     1 */
	u16                        tag;                  /*     6     2 */
	size_t                     offset;               /*     8     8 */
	size_t                     capacity;             /*    16     8 */
	struct kmem_cache *        cache;                /*    24     8 */
	u8 *                       sdata;                /*    32     8 */

	/* size: 40, cachelines: 1, members: 8 */
	/* last cacheline: 40 bytes */
};

This in turn also makes p9_req_t 16 bytes smaller (152 -&gt; 136) as it
contains two of these.

Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
Message-ID: &lt;20261029060014.3-1-asmadeus@codewreck.org&gt;
</content>
</entry>
<entry>
<title>9p: skip intermediate directory entry name copy in p9dirent_read()</title>
<updated>2026-09-22T08:10:39Z</updated>
<author>
<name>Haobin Wu</name>
<email>853555@gmail.com</email>
</author>
<published>2026-09-18T02:48:49Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=8bb0279930cc90975f03bad4d83282613e5f57fa'/>
<id>urn:sha1:8bb0279930cc90975f03bad4d83282613e5f57fa</id>
<content type='text'>
v9fs_dir_readdir_dotl() decodes each entry of a Rreaddir reply with
p9dirent_read(), which parses it through p9pdu_readf("Qqbs"). The 's'
conversion in p9pdu_vreadf() already allocates a NUL-terminated copy
of the name from the wire buffer; p9dirent_read() then strscpy()s that
copy into the fixed 256-byte p9_dirent::d_name and frees the original.

The wire format carries the name length in 16 bits, so a name longer
than 255 bytes is valid on the wire and may well be valid on the
server's filesystem, but it makes strscpy() return -E2BIG.
v9fs_dir_readdir_dotl() turns that into -EIO and aborts getdents64(),
so every entry after the long one disappears from the listing.

Drop the second copy: keep the string allocated by p9pdu_vreadf() in
p9_dirent and let v9fs_dir_readdir_dotl(), its only user, free it once
dir_emit() has consumed it. p9_dirent is a short-lived stack object, so
the string's lifetime does not change.

Note that the VFS only rejects names of PATH_MAX bytes or more in
verify_dirent_name(), so after this change a name between NAME_MAX and
PATH_MAX is returned by getdents64() even though any later lookup on it
fails with -ENAMETOOLONG. The next patch skips such entries.

Fixes: 7751bdb3a095 ("9p: readdir implementation for 9p2000.L")
Closes: https://github.com/microsoft/WSL/issues/41192
Signed-off-by: Haobin Wu &lt;853555@gmail.com&gt;
Reviewed-by: Christian Schoenebeck &lt;linux_oss@crudebyte.com&gt;
Message-ID: &lt;20260918024851.51229-2-853555@gmail.com&gt;
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
</content>
</entry>
<entry>
<title>net/9p: add vsock transport</title>
<updated>2026-09-22T08:07:34Z</updated>
<author>
<name>Matus Skvarla</name>
<email>skvarlamatus@gmail.com</email>
</author>
<published>2026-07-09T16:17:41Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=33625427a38288bc54c5821203e198a661e6b8c2'/>
<id>urn:sha1:33625427a38288bc54c5821203e198a661e6b8c2</id>
<content type='text'>
Add vsock as a transport option for 9P client connections. This
allows mounting 9P filesystems over VM sockets without requiring TCP/IP
networking or additional userspace tools, which can be useful with
hypervisors other than Qemu/KVM, for example Hyper-V/WSL which is used
by podman machine on Windows[1][2].

The implementation extends trans_fd.c with vsock support, reusing the
existing socket infrastructure. A new p9_fd_create_vsock() function
handles vsock connection setup by parsing the CID from the mount source,
creating an AF_VSOCK socket, and connecting to the specified endpoint.
All other transport operations (close, request, cancel) use the shared
fd transport implementation.

The privport mount option is not currently implemented for vsock and
returns -EOPNOTSUPP if specified.

Add CONFIG_NET_9P_VSOCK option that conditionally compiles vsock support
into 9pnet_fd.ko. This follows the pattern where socket-based transports
(TCP, Unix, vsock) share trans_fd.c, while specialized hardware transports
(virtio, xen, rdma) have dedicated files.

Usage:
  mount -t 9p -o trans=vsock[,port=&lt;port&gt;] &lt;CID&gt; /mnt/point

Link: https://github.com/podman-container-tools/podman/blob/main/cmd/podman/machine/server9p.go [1]
Link: https://github.com/podman-container-tools/podman/blob/main/cmd/podman/machine/client9p.go [2]
Signed-off-by: Matus Skvarla &lt;skvarlamatus@gmail.com&gt;
Reviewed-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
Acked-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Message-ID: &lt;20260709161741.15138-1-skvarlamatus@gmail.com&gt;
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
</content>
</entry>
<entry>
<title>net/9p: fix typos in comments</title>
<updated>2026-09-13T08:13:24Z</updated>
<author>
<name>Hemanth Selam</name>
<email>hemanth.selam@gmail.com</email>
</author>
<published>2026-09-04T11:20:59Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=5852cdf0006ff0f1d9a56f06197673d4e4270220'/>
<id>urn:sha1:5852cdf0006ff0f1d9a56f06197673d4e4270220</id>
<content type='text'>
Fix typos in comments, reported by scripts/checkpatch.pl using the
misspelling list in scripts/spelling.txt.
Only touches comments, no code changes.

Assisted-by: Cursor:claude-opus-5
Signed-off-by: Hemanth Selam &lt;hemanth.selam@gmail.com&gt;
Reviewed-by: Christian Schoenebeck &lt;linux_oss@crudebyte.com&gt;
Message-ID: &lt;20260904112100.34541-1-hemanth.selam@gmail.com&gt;
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
</content>
</entry>
<entry>
<title>9p: Cache negative dentries for lookup performance</title>
<updated>2026-06-21T05:22:56Z</updated>
<author>
<name>Remi Pommarel</name>
<email>repk@triplefau.lt</email>
</author>
<published>2026-05-21T09:40:29Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=f00e6c1d282578b077b87b88f42e701bc40f2fff'/>
<id>urn:sha1:f00e6c1d282578b077b87b88f42e701bc40f2fff</id>
<content type='text'>
Not caching negative dentries can result in poor performance for
workloads that repeatedly look up non-existent paths. Each such
lookup triggers a full 9P transaction with the server, adding
unnecessary overhead.

A typical example is source compilation, where multiple cc1 processes
are spawned and repeatedly search for the same missing header files
over and over again.

This change enables caching of negative dentries, so that lookups for
known non-existent paths do not require a full 9P transaction. The
cached negative dentries are retained for a configurable duration
(expressed in milliseconds), as specified by the ndentry_timeout
field in struct v9fs_session_info. If set to -1, negative dentries
are cached indefinitely.

This optimization reduces lookup overhead and improves performance for
workloads involving frequent access to non-existent paths.

Signed-off-by: Remi Pommarel &lt;repk@triplefau.lt&gt;
Message-ID: &lt;e542317dd03bbadb5249abd3ea6aecfdca692c19.1779355927.git.repk@triplefau.lt&gt;
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
</content>
</entry>
<entry>
<title>9p: document missing enum values in kernel-doc comments</title>
<updated>2026-04-16T02:57:01Z</updated>
<author>
<name>Kit Dallege</name>
<email>xaum.io@gmail.com</email>
</author>
<published>2026-03-15T19:06:33Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=890d56964c62dfbe228b30b157811088cf64f9f1'/>
<id>urn:sha1:890d56964c62dfbe228b30b157811088cf64f9f1</id>
<content type='text'>
Add kernel-doc entries for all undocumented enum values:
- p9_debug_flags: P9_DEBUG_CACHE, P9_DEBUG_MMAP
- p9_msg_t: all 9P2000.L message types (TLOPEN/RLOPEN through
  TUNLINKAT/RUNLINKAT)
- p9_open_mode_t: P9L_MODE_MASK, P9L_DIRECT, P9L_NOWRITECACHE,
  P9L_LOOSE

Assisted-by: Claude:claude-opus-4-6
Signed-off-by: Kit Dallege &lt;xaum.io@gmail.com&gt;
Reviewed-by: Christian Schoenebeck &lt;linux_oss@crudebyte.com&gt;
Message-ID: &lt;20260315190633.73536-1-xaum.io@gmail.com&gt;
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
</content>
</entry>
<entry>
<title>9p: convert to the new mount API</title>
<updated>2025-11-03T07:49:53Z</updated>
<author>
<name>Eric Sandeen</name>
<email>sandeen@redhat.com</email>
</author>
<published>2025-10-10T21:36:19Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=1f3e4142c0eb178089ea0cbc97506a061470ad27'/>
<id>urn:sha1:1f3e4142c0eb178089ea0cbc97506a061470ad27</id>
<content type='text'>
Convert 9p to the new mount API. This patch consolidates all parsing
into fs/9p/v9fs.c, which stores all results into a filesystem context
which can be passed to the various transports as needed.

Some of the parsing helper functions such as get_cache_mode() have been
eliminated in favor of using the new mount API's enum param type,
for simplicity.

Signed-off-by: Eric Sandeen &lt;sandeen@redhat.com&gt;
Message-ID: &lt;20251010214222.1347785-5-sandeen@redhat.com&gt;
[ Dominique: handled source explicitly as per follow-up discussion ]
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
</content>
</entry>
<entry>
<title>9p: create a v9fs_context structure to hold parsed options</title>
<updated>2025-11-03T07:49:53Z</updated>
<author>
<name>Eric Sandeen</name>
<email>sandeen@redhat.com</email>
</author>
<published>2025-10-10T21:36:18Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=075e8bd4127f007910fc302ad5c3c471d0be4799'/>
<id>urn:sha1:075e8bd4127f007910fc302ad5c3c471d0be4799</id>
<content type='text'>
This patch creates a new v9fs_context structure which includes
new p9_session_opts and p9_client_opts structures, as well as
re-using the existing p9_fd_opts and p9_rdma_opts to store options
during parsing. The new structure will be used in the next
commit to pass all parsed options to the appropriate transports.

Signed-off-by: Eric Sandeen &lt;sandeen@redhat.com&gt;
Message-ID: &lt;20251010214222.1347785-4-sandeen@redhat.com&gt;
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
</content>
</entry>
<entry>
<title>net/9p: move structures and macros to header files</title>
<updated>2025-11-03T07:49:53Z</updated>
<author>
<name>Eric Sandeen</name>
<email>sandeen@redhat.com</email>
</author>
<published>2025-10-10T21:36:17Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=c44393d84149d6fc91d94fa39321c9657e91b388'/>
<id>urn:sha1:c44393d84149d6fc91d94fa39321c9657e91b388</id>
<content type='text'>
With the new mount API all option parsing will need to happen
in fs/v9fs.c, so move some existing data structures and macros
to header files to facilitate this. Rename some to reflect
the transport they are used for (rdma, fd, etc), for clarity.

Signed-off-by: Eric Sandeen &lt;sandeen@redhat.com&gt;
Message-ID: &lt;20251010214222.1347785-3-sandeen@redhat.com&gt;
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
</content>
</entry>
<entry>
<title>net/9p: cleanup: change p9_trans_module-&gt;def to bool</title>
<updated>2025-11-03T07:49:29Z</updated>
<author>
<name>Dominique Martinet</name>
<email>asmadeus@codewreck.org</email>
</author>
<published>2025-10-31T07:40:07Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=eeaf38a798aff6384983e5a0ac464d146de7ff55'/>
<id>urn:sha1:eeaf38a798aff6384983e5a0ac464d146de7ff55</id>
<content type='text'>
'-&gt;def' is only ever used as a true/false flag

Reported-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Message-ID: &lt;20251103-v9fs_trans_def_bool-v1-1-f33dc7ed9e81@codewreck.org&gt;
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
</content>
</entry>
</feed>
