Skip to contentSkip to conversation

9p: fix kernel-doc warning for enum p9_session_flags

PATCH In review Omokefe Emmanuel Onanaroghene 2 participants 2 messages Oct 2 – Oct 29 9P file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 9p: fix kernel-doc warning for enum p9_session_flags

kernel-doc cannot parse enum p9_session_flags, since its documentation comment is followed by #define lines instead of the enum declaration:

fs/9p/v9fs.h:31 : error: Cannot parse enum!

Move the three #define lines below the enum whose values they are derived from, and give V9FS_ACCESS_ANY and V9FS_ACCESS_MASK their own kernel-doc comments with the descriptions they had in the enum comment.

Also document the four enum members that had no description, using the corresponding mount option wording from Documentation/filesystems/9p.rst.

Fixes 76381a42e4a5 ("fs/9p: Add access = client option to opt in acl evaluation.")
Assisted-by LLM
---
 fs/9p/v9fs.h | 26 ++++++++++++++++++--------
 1 file changed, 18 insertions(+), 8 deletions(-)
fs/9p/v9fs.h +18 -8
index a462bcbfc7da..2f18e75f0ed0 100644
@@ -21,20 +21,16 @@
  * @V9FS_ACCESS_SINGLE: only the mounting user can access the hierarchy
  * @V9FS_ACCESS_USER: a new attach will be issued for every user (default)
  * @V9FS_ACCESS_CLIENT: Just like user, but access check is performed on client.
- * @V9FS_ACCESS_ANY: use a single attach for all users
- * @V9FS_ACCESS_MASK: bit mask of different ACCESS options
  * @V9FS_POSIX_ACL: POSIX ACLs are enforced
+ * @V9FS_NO_XATTR: do not offer xattr functions on this mount
+ * @V9FS_IGNORE_QV: ignore qid.version==0 as a marker to ignore cache
+ * @V9FS_DIRECT_IO: bypass page cache on all read/write operations
+ * @V9FS_SYNC: flush writes synchronously to the server
  * @V9FS_NDENTRY_TIMEOUT_SET: Has negative dentry timeout retention time been
  *                            overridden by negtimeout mount option
  *
  * Session flags reflect options selected by users at mount time
  */
-#define	V9FS_ACCESS_ANY (V9FS_ACCESS_SINGLE | \
-			 V9FS_ACCESS_USER |   \
-			 V9FS_ACCESS_CLIENT)
-#define V9FS_ACCESS_MASK V9FS_ACCESS_ANY
-#define V9FS_ACL_MASK V9FS_POSIX_ACL
-
 enum p9_session_flags {
 	V9FS_PROTO_2000U         = 0x01,
 	V9FS_PROTO_2000L         = 0x02,
@@ -49,6 +45,20 @@ enum p9_session_flags {
 	V9FS_NDENTRY_TIMEOUT_SET = 0x400,
 };
 
+/**
+ * V9FS_ACCESS_ANY - use a single attach for all users
+ */
+#define	V9FS_ACCESS_ANY (V9FS_ACCESS_SINGLE | \
+			 V9FS_ACCESS_USER |   \
+			 V9FS_ACCESS_CLIENT)
+
+/**
+ * V9FS_ACCESS_MASK - bit mask of different ACCESS options
+ */
+#define V9FS_ACCESS_MASK V9FS_ACCESS_ANY
+
+#define V9FS_ACL_MASK V9FS_POSIX_ACL
+
 /**
  * enum p9_cache_shortcuts - human readable cache preferences
  * @CACHE_SC_NONE: disable all caches
Signature · 1 line
2.43.0
#1 lore raw

Omokefe Emmanuel Onanaroghene wrote on Fri, Oct 02, 2026 at 04:58:37AM +0100:

Quoted 9 lines

kernel-doc cannot parse enum p9_session_flags, since its documentation comment is followed by #define lines instead of the enum declaration:

fs/9p/v9fs.h:31 : error: Cannot parse enum!

Move the three #define lines below the enum whose values they are derived from, and give V9FS_ACCESS_ANY and V9FS_ACCESS_MASK their own kernel-doc comments with the descriptions they had in the enum comment.

Quoted 7 lines

Also document the four enum members that had no description, using the corresponding mount option wording from Documentation/filesystems/9p.rst.

Fixes 76381a42e4a5 ("fs/9p: Add access = client option to opt in acl evaluation.")
Assisted-by LLM

Sure, why not; picked up.

Quoted 9 lines
---
 fs/9p/v9fs.h | 26 ++++++++++++++++++--------
 1 file changed, 18 insertions(+), 8 deletions(-)
fs/9p/v9fs.h +0 -0
index a462bcbfc7da..2f18e75f0ed0 100644

fs/9p/v9fs.h line 28

Quoted 10 lines
fs/9p/v9fs.h +4 -2
@@ -21,20 +21,16 @@
  * @V9FS_ACCESS_SINGLE: only the mounting user can access the hierarchy
  * @V9FS_ACCESS_USER: a new attach will be issued for every user (default)
  * @V9FS_ACCESS_CLIENT: Just like user, but access check is performed on client.
- * @V9FS_ACCESS_ANY: use a single attach for all users
- * @V9FS_ACCESS_MASK: bit mask of different ACCESS options
  * @V9FS_POSIX_ACL: POSIX ACLs are enforced
+ * @V9FS_NO_XATTR: do not offer xattr functions on this mount
+ * @V9FS_IGNORE_QV: ignore qid.version==0 as a marker to ignore cache
+ * @V9FS_DIRECT_IO: bypass page cache on all read/write operations
+ * @V9FS_SYNC: flush writes synchronously to the server

I reworded these a bit as 'flush writes' sounded a bit off.

+ * @V9FS_IGNORE_QV: ignore qid.version==0 as a marker to disable data cache
+ * @V9FS_DIRECT_IO: disable data read/write cache
+ * @V9FS_SYNC: disable data write cache

Signature · 1 line
Dominique Martinet | Asmadeus