9p: document missing enum values in kernel-doc comments
Subsystems (2)
PATCH v2 1/1 9p: document missing enum values in kernel-doc comments
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
--- include/net/9p/9p.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+)
include/net/9p/9p.h +32 -0
@@ -24,6 +24,8 @@* @P9_DEBUG_PKT: packet marshalling/unmarshalling * @P9_DEBUG_FSC: FS-cache tracing * @P9_DEBUG_VPKT: Verbose packet debugging (full packet dump) +* @P9_DEBUG_CACHE: cache operations tracing +* @P9_DEBUG_MMAP: memory-mapped I/O tracing * * These flags are passed at mount time to turn on various levels of * verbosity and tracing which will be output to the system logs.
@@ -68,10 +70,36 @@ void _p9_debug(enum p9_debug_flags level, const char *func,* @P9_RSYMLINK: make symlink response * @P9_TMKNOD: create a special file object request * @P9_RMKNOD: create a special file object response +* @P9_TLOPEN: open a file for I/O (9P2000.L) +* @P9_RLOPEN: response with file access information (9P2000.L) * @P9_TLCREATE: prepare a handle for I/O on an new file for 9P2000.L * @P9_RLCREATE: response with file access information for 9P2000.L * @P9_TRENAME: rename request * @P9_RRENAME: rename response +* @P9_TREADLINK: read symbolic link request +* @P9_RREADLINK: read symbolic link response +* @P9_TGETATTR: get file attributes request (9P2000.L) +* @P9_RGETATTR: get file attributes response (9P2000.L) +* @P9_TSETATTR: set file attributes request (9P2000.L) +* @P9_RSETATTR: set file attributes response (9P2000.L) +* @P9_TXATTRWALK: walk to an extended attribute +* @P9_RXATTRWALK: response with extended attribute handle +* @P9_TXATTRCREATE: create an extended attribute +* @P9_RXATTRCREATE: response for extended attribute creation +* @P9_TREADDIR: read directory entries request +* @P9_RREADDIR: read directory entries response +* @P9_TFSYNC: flush file data to storage request +* @P9_RFSYNC: flush file data to storage response +* @P9_TLOCK: acquire or test a POSIX lock +* @P9_RLOCK: lock acquisition response +* @P9_TGETLOCK: get lock information +* @P9_RGETLOCK: lock information response +* @P9_TLINK: create a hard link +* @P9_RLINK: hard link response +* @P9_TRENAMEAT: rename using directory fids +* @P9_RRENAMEAT: rename response +* @P9_TUNLINKAT: unlink using directory fid +* @P9_RUNLINKAT: unlink response * @P9_TMKDIR: create a directory request * @P9_RMKDIR: create a directory response * @P9_TVERSION: version handshake request
@@ -194,6 +222,10 @@ enum p9_msg_t {* @P9_ORCLOSE: remove the file when the file is closed * @P9_OAPPEND: open the file and seek to the end * @P9_OEXCL: only create a file, do not open it +* @P9L_MODE_MASK: mask for protocol mode bits (client-side only) +* @P9L_DIRECT: disable client-side caching for this file +* @P9L_NOWRITECACHE: disable write caching for this file +* @P9L_LOOSE: enable loose cache consistency * * 9P open modes differ slightly from Posix standard modes. * In particular, there are extra modes which specify different
Signature · 1 line
2.53.0
Christian Schoenebeck
reviewerQuoted 8 lines · On Sunday, 15 March 2026 18:07:02 CET Kit Dallege wrote:
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_LOOSEAssisted-by Claude:claude-opus-4-6
Of course. :)
Quoted 19 lines
Signed-off-by Kit Dallege <[email protected]>--- include/net/9p/9p.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+)include/net/9p/9p.h +2
-0@@ -24,6 +24,8 @@* @P9_DEBUG_PKT: packet marshalling/unmarshalling * @P9_DEBUG_FSC: FS-cache tracing * @P9_DEBUG_VPKT: Verbose packet debugging (full packet dump) +* @P9_DEBUG_CACHE: cache operations tracing +* @P9_DEBUG_MMAP: memory-mapped I/O tracing * * These flags are passed at mount time to turn on various levels of * verbosity and tracing which will be output to the system logs.
include/net/9p/9p.h void _p9_debug(enum p9_debug_flags level, const char · line 74
Quoted 5 lines
include/net/9p/9p.h +2
-0@@ -68,10 +70,36 @@ void _p9_debug(enum p9_debug_flags level, const char *func, * @P9_RSYMLINK: make symlink response * @P9_TMKNOD: create a special file object request * @P9_RMKNOD: create a special file object response + * @P9_TLOPEN: open a file for I/O (9P2000.L) + * @P9_RLOPEN: response with file access information (9P2000.L)
not really, it returns the QID and the iounit, that's it
include/net/9p/9p.h void _p9_debug(enum p9_debug_flags level, const char *func, · line 80
Quoted 6 lines
include/net/9p/9p.h +2
-0* @P9_TLCREATE: prepare a handle for I/O on an new file for 9P2000.L * @P9_RLCREATE: response with file access information for 9P2000.L * @P9_TRENAME: rename request * @P9_RRENAME: rename response +* @P9_TREADLINK: read symbolic link request +* @P9_RREADLINK: read symbolic link response
9P2000.L
link *target* ?
include/net/9p/9p.h void _p9_debug(enum p9_debug_flags level, const char *func, · line 86
Quoted 6 lines
include/net/9p/9p.h +6
-0+* @P9_TGETATTR: get file attributes request (9P2000.L) +* @P9_RGETATTR: get file attributes response (9P2000.L) +* @P9_TSETATTR: set file attributes request (9P2000.L) +* @P9_RSETATTR: set file attributes response (9P2000.L) +* @P9_TXATTRWALK: walk to an extended attribute +* @P9_RXATTRWALK: response with extended attribute handle
9P2000.L
prepare to read/list extended attributes
include/net/9p/9p.h void _p9_debug(enum p9_debug_flags level, const char *func, · line 88
Quoted 2 lines
include/net/9p/9p.h +2
-0+* @P9_TXATTRCREATE: create an extended attribute +* @P9_RXATTRCREATE: response for extended attribute creation
*prepare* to set extended attribute.
9P2000.L
include/net/9p/9p.h void _p9_debug(enum p9_debug_flags level, const char *func, · line 90
Quoted 2 lines
include/net/9p/9p.h +2
-0+* @P9_TREADDIR: read directory entries request +* @P9_RREADDIR: read directory entries response
9P2000.L
include/net/9p/9p.h void _p9_debug(enum p9_debug_flags level, const char *func, · line 92
Quoted 2 lines
include/net/9p/9p.h +2
-0+* @P9_TFSYNC: flush file data to storage request +* @P9_RFSYNC: flush file data to storage response
flush *cached* file data ...
9P2000.L
include/net/9p/9p.h void _p9_debug(enum p9_debug_flags level, const char *func, · line 94
Quoted 2 lines
include/net/9p/9p.h +2
-0+* @P9_TLOCK: acquire or test a POSIX lock +* @P9_RLOCK: lock acquisition response
acquire or *release* ...
9P2000.L
include/net/9p/9p.h void _p9_debug(enum p9_debug_flags level, const char *func, · line 96
Quoted 2 lines
include/net/9p/9p.h +2
-0+* @P9_TGETLOCK: get lock information +* @P9_RGETLOCK: lock information response
test for existence of POSIX record lock
9P2000.L
include/net/9p/9p.h void _p9_debug(enum p9_debug_flags level, const char *func, · line 98
Quoted 2 lines
include/net/9p/9p.h +2
-0+* @P9_TLINK: create a hard link +* @P9_RLINK: hard link response
9P2000.L
include/net/9p/9p.h void _p9_debug(enum p9_debug_flags level, const char *func, · line 100
Quoted 2 lines
include/net/9p/9p.h +2
-0+* @P9_TRENAMEAT: rename using directory fids +* @P9_RRENAMEAT: rename response
9P2000.L
legacy TRENAME does also use fids. This is a safer variant of TRENAME.
include/net/9p/9p.h void _p9_debug(enum p9_debug_flags level, const char *func, · line 102
Quoted 2 lines
include/net/9p/9p.h +2
-0+* @P9_TUNLINKAT: unlink using directory fid +* @P9_RUNLINKAT: unlink response
9P2000.L
unlink a file or directory
include/net/9p/9p.h void _p9_debug(enum p9_debug_flags level, const char *func, · line 104
Quoted 2 lines
include/net/9p/9p.h +0
-0* @P9_TMKDIR: create a directory request * @P9_RMKDIR: create a directory response
9P2000.L
include/net/9p/9p.h void _p9_debug(enum p9_debug_flags level, const char *func, · line 105
Quoted 1 line
include/net/9p/9p.h +0
-0* @P9_TVERSION: version handshake request
negotiate 9p protocol version
9p2000.L: https://github.com/chaos/diod/blob/master/protocol.md
9p2000.u: http://ericvh.github.io/9p-rfc/rfc9p2000.u.html
9p2000: http://ericvh.github.io/9p-rfc/rfc9p2000.html
Claude, RTFM!
Quoted 11 lines
include/net/9p/9p.h +4
-0@@ -194,6 +222,10 @@ enum p9_msg_t {* @P9_ORCLOSE: remove the file when the file is closed * @P9_OAPPEND: open the file and seek to the end * @P9_OEXCL: only create a file, do not open it +* @P9L_MODE_MASK: mask for protocol mode bits (client-side only) +* @P9L_DIRECT: disable client-side caching for this file +* @P9L_NOWRITECACHE: disable write caching for this file +* @P9L_LOOSE: enable loose cache consistency * * 9P open modes differ slightly from Posix standard modes. * In particular, there are extra modes which specify different
PATCH v3 1/1 9p: document missing enum values in kernel-doc comments
In reply to Kit DallegeAdd 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
---
V2 -> V3: Address review from Christian Schoenebeck:
- Fix descriptions to match 9P2000.L protocol spec
- RLOPEN: returns qid and iounit, not generic "file access information"
- TREADLINK/RREADLINK: read/return symbolic link target
- TXATTRWALK: prepare to read/list, not "walk to"
- TXATTRCREATE: prepare to set, not "create"
- TFSYNC: flush *cached* file data
- TLOCK: acquire or *release*, not "test"
- TGETLOCK: test for existence of POSIX record lock
- TRENAMEAT: safer variant of TRENAME, not "using directory fids"
- TUNLINKAT: unlink a file or directory
- TVERSION: negotiate protocol version and message size
- Add missing (9P2000.L) tags to all 9P2000.L-specific entries
- Add (9P2000.L) to pre-existing TMKDIR/RMKDIR entries
include/net/9p/9p.h | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-)
include/net/9p/9p.h +35 -3
@@ -24,6 +24,8 @@* @P9_DEBUG_PKT: packet marshalling/unmarshalling * @P9_DEBUG_FSC: FS-cache tracing * @P9_DEBUG_VPKT: Verbose packet debugging (full packet dump) +* @P9_DEBUG_CACHE: cache operations tracing +* @P9_DEBUG_MMAP: memory-mapped I/O tracing * * These flags are passed at mount time to turn on various levels of * verbosity and tracing which will be output to the system logs.
@@ -68,13 +70,39 @@ void _p9_debug(enum p9_debug_flags level, const char *func,* @P9_RSYMLINK: make symlink response * @P9_TMKNOD: create a special file object request * @P9_RMKNOD: create a special file object response +* @P9_TLOPEN: open a file for I/O (9P2000.L) +* @P9_RLOPEN: response with qid and iounit (9P2000.L) * @P9_TLCREATE: prepare a handle for I/O on an new file for 9P2000.L * @P9_RLCREATE: response with file access information for 9P2000.L * @P9_TRENAME: rename request * @P9_RRENAME: rename response -* @P9_TMKDIR: create a directory request -* @P9_RMKDIR: create a directory response -* @P9_TVERSION: version handshake request +* @P9_TREADLINK: read symbolic link target (9P2000.L) +* @P9_RREADLINK: response with symbolic link target (9P2000.L) +* @P9_TGETATTR: get file attributes request (9P2000.L) +* @P9_RGETATTR: get file attributes response (9P2000.L) +* @P9_TSETATTR: set file attributes request (9P2000.L) +* @P9_RSETATTR: set file attributes response (9P2000.L) +* @P9_TXATTRWALK: prepare to read/list extended attributes (9P2000.L) +* @P9_RXATTRWALK: response with extended attribute size (9P2000.L) +* @P9_TXATTRCREATE: prepare to set extended attribute (9P2000.L) +* @P9_RXATTRCREATE: set extended attribute response (9P2000.L) +* @P9_TREADDIR: read directory entries request (9P2000.L) +* @P9_RREADDIR: read directory entries response (9P2000.L) +* @P9_TFSYNC: flush cached file data to storage request (9P2000.L) +* @P9_RFSYNC: flush cached file data to storage response (9P2000.L) +* @P9_TLOCK: acquire or release a POSIX record lock (9P2000.L) +* @P9_RLOCK: POSIX record lock response (9P2000.L) +* @P9_TGETLOCK: test for existence of POSIX record lock (9P2000.L) +* @P9_RGETLOCK: POSIX record lock test response (9P2000.L) +* @P9_TLINK: create a hard link (9P2000.L) +* @P9_RLINK: hard link response (9P2000.L) +* @P9_TRENAMEAT: safely rename across directories (9P2000.L) +* @P9_RRENAMEAT: rename response (9P2000.L) +* @P9_TUNLINKAT: unlink a file or directory (9P2000.L) +* @P9_RUNLINKAT: unlink response (9P2000.L) +* @P9_TMKDIR: create a directory request (9P2000.L) +* @P9_RMKDIR: create a directory response (9P2000.L) +* @P9_TVERSION: negotiate protocol version and message size * @P9_RVERSION: version handshake response * @P9_TAUTH: request to establish authentication channel * @P9_RAUTH: response with authentication information
@@ -194,6 +222,10 @@ enum p9_msg_t {* @P9_ORCLOSE: remove the file when the file is closed * @P9_OAPPEND: open the file and seek to the end * @P9_OEXCL: only create a file, do not open it +* @P9L_MODE_MASK: mask for protocol mode bits (client-side only) +* @P9L_DIRECT: disable client-side caching for this file +* @P9L_NOWRITECACHE: disable write caching for this file +* @P9L_LOOSE: enable loose cache consistency * * 9P open modes differ slightly from Posix standard modes. * In particular, there are extra modes which specify different
Signature · 1 line
2.53.0
Quoted 10 lines · On Sunday, 15 March 2026 20:06:33 CET Kit Dallege wrote:
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_LOOSEAssisted-by Claude:claude-opus-4-6Signed-off-by Kit Dallege <[email protected]>---