All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Van Hensbergen <ericvh@kernel.org>
To: v9fs-developer@lists.sourceforge.net, asmadeus@codewreck.org,
	rminnich@gmail.com, lucho@ionkov.net
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux_oss@crudebyte.com, Eric Van Hensbergen <ericvh@kernel.org>
Subject: [PATCH v3 05/11] allow disable of xattr support on mount
Date: Tue, 24 Jan 2023 02:38:28 +0000	[thread overview]
Message-ID: <20230124023834.106339-6-ericvh@kernel.org> (raw)
In-Reply-To: <20230124023834.106339-1-ericvh@kernel.org>

xattr creates a lot of additional messages for 9p in
the current implementation.  This allows users to
conditionalize xattr support on 9p mount if they
are on a connection with bad latency.  Using this
flag is also useful when debugging other aspects
of 9p as it reduces the noise in the trace files.

Signed-off-by: Eric Van Hensbergen <ericvh@kernel.org>
---
 Documentation/filesystems/9p.rst | 2 ++
 fs/9p/v9fs.c                     | 9 ++++++++-
 fs/9p/v9fs.h                     | 3 ++-
 fs/9p/vfs_super.c                | 3 ++-
 4 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/Documentation/filesystems/9p.rst b/Documentation/filesystems/9p.rst
index 7b5964bc8865..0e800b8f73cc 100644
--- a/Documentation/filesystems/9p.rst
+++ b/Documentation/filesystems/9p.rst
@@ -137,6 +137,8 @@ Options
   		This can be used to share devices/named pipes/sockets between
 		hosts.  This functionality will be expanded in later versions.
 
+  noxattr	do not offer xattr functions on this mount.
+
   access	there are four access modes.
 			user
 				if a user tries to access a file on v9fs
diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c
index a46bf9121f11..f8e952c013f9 100644
--- a/fs/9p/v9fs.c
+++ b/fs/9p/v9fs.c
@@ -38,7 +38,7 @@ enum {
 	/* String options */
 	Opt_uname, Opt_remotename, Opt_cache, Opt_cachetag,
 	/* Options that take no arguments */
-	Opt_nodevmap,
+	Opt_nodevmap, Opt_noxattr,
 	/* Access options */
 	Opt_access, Opt_posixacl,
 	/* Lock timeout option */
@@ -55,6 +55,7 @@ static const match_table_t tokens = {
 	{Opt_uname, "uname=%s"},
 	{Opt_remotename, "aname=%s"},
 	{Opt_nodevmap, "nodevmap"},
+	{Opt_noxattr, "noxattr"},
 	{Opt_cache, "cache=%s"},
 	{Opt_cachetag, "cachetag=%s"},
 	{Opt_access, "access=%s"},
@@ -149,6 +150,9 @@ int v9fs_show_options(struct seq_file *m, struct dentry *root)
 	if (v9ses->flags & V9FS_POSIX_ACL)
 		seq_puts(m, ",posixacl");
 
+	if (v9ses->flags & V9FS_NO_XATTR)
+		seq_puts(m, ",noxattr");
+
 	return p9_show_client_options(m, v9ses->clnt);
 }
 
@@ -269,6 +273,9 @@ static int v9fs_parse_options(struct v9fs_session_info *v9ses, char *opts)
 		case Opt_nodevmap:
 			v9ses->nodev = 1;
 			break;
+		case Opt_noxattr:
+			v9ses->flags |= V9FS_NO_XATTR;
+			break;
 		case Opt_cachetag:
 #ifdef CONFIG_9P_FSCACHE
 			kfree(v9ses->cachetag);
diff --git a/fs/9p/v9fs.h b/fs/9p/v9fs.h
index 5813967ecdf0..a08cf6618c86 100644
--- a/fs/9p/v9fs.h
+++ b/fs/9p/v9fs.h
@@ -36,7 +36,8 @@ enum p9_session_flags {
 	V9FS_ACCESS_SINGLE	= 0x04,
 	V9FS_ACCESS_USER	= 0x08,
 	V9FS_ACCESS_CLIENT	= 0x10,
-	V9FS_POSIX_ACL		= 0x20
+	V9FS_POSIX_ACL		= 0x20,
+	V9FS_NO_XATTR		= 0x40
 };
 
 /* possible values of ->cache */
diff --git a/fs/9p/vfs_super.c b/fs/9p/vfs_super.c
index 65d96fa94ba2..5fc6a945bfff 100644
--- a/fs/9p/vfs_super.c
+++ b/fs/9p/vfs_super.c
@@ -64,7 +64,8 @@ v9fs_fill_super(struct super_block *sb, struct v9fs_session_info *v9ses,
 	sb->s_magic = V9FS_MAGIC;
 	if (v9fs_proto_dotl(v9ses)) {
 		sb->s_op = &v9fs_super_ops_dotl;
-		sb->s_xattr = v9fs_xattr_handlers;
+		if (!(v9ses->flags & V9FS_NO_XATTR))
+			sb->s_xattr = v9fs_xattr_handlers;
 	} else {
 		sb->s_op = &v9fs_super_ops;
 		sb->s_time_max = U32_MAX;
-- 
2.37.2


  parent reply	other threads:[~2023-01-24  2:39 UTC|newest]

Thread overview: 84+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20221217183142.1425132-1-evanhensbergen@icloud.com>
2022-12-18 23:22 ` [PATCH v2 00/10] Performance fixes for 9p filesystem Eric Van Hensbergen
2022-12-18 23:22   ` [PATCH v2 01/10] Adjust maximum MSIZE to account for p9 header Eric Van Hensbergen
2022-12-18 23:22   ` [PATCH v2 02/10] Expand setup of writeback cache to all levels Eric Van Hensbergen
2022-12-18 23:22   ` [PATCH v2 03/10] Consolidate file operations and add readahead and writeback Eric Van Hensbergen
2023-01-24  2:43     ` asmadeus
2023-01-24  3:03       ` Eric Van Hensbergen
2022-12-18 23:22   ` [PATCH v2 04/10] Remove unnecessary superblock flags Eric Van Hensbergen
2022-12-18 23:22   ` [PATCH v2 05/10] allow disable of xattr support on mount Eric Van Hensbergen
2022-12-18 23:22   ` [PATCH v2 06/10] fix bug in client create for .L Eric Van Hensbergen
2022-12-18 23:22   ` [PATCH v2 07/10] Add additional debug flags and open modes Eric Van Hensbergen
2022-12-18 23:22   ` [PATCH v2 08/10] Add new mount modes Eric Van Hensbergen
2023-01-24  3:35     ` Amir Goldstein
2022-12-18 23:22   ` [PATCH v2 09/10] fix error reporting in v9fs_dir_release Eric Van Hensbergen
2022-12-18 23:22   ` [PATCH v2 10/10] writeback mode fixes Eric Van Hensbergen
2023-01-23 16:31   ` [PATCH v2 00/10] Performance fixes for 9p filesystem Christian Schoenebeck
2023-01-24  2:33     ` evanhensbergen
2023-01-24  2:49       ` asmadeus
2023-01-24  2:38   ` [PATCH v3 00/11] " Eric Van Hensbergen
2023-01-24  2:38     ` [PATCH v3 01/11] Adjust maximum MSIZE to account for p9 header Eric Van Hensbergen
2023-01-24  2:38     ` [PATCH v3 02/11] Expand setup of writeback cache to all levels Eric Van Hensbergen
2023-01-24  2:38     ` [PATCH v3 03/11] Consolidate file operations and add readahead and writeback Eric Van Hensbergen
2023-01-24  2:38     ` [PATCH v3 04/11] Remove unnecessary superblock flags Eric Van Hensbergen
2023-01-24  2:38     ` Eric Van Hensbergen [this message]
2023-01-24  2:38     ` [PATCH v3 06/11] fix bug in client create for .L Eric Van Hensbergen
2023-01-24  2:38     ` [PATCH v3 07/11] Add additional debug flags and open modes Eric Van Hensbergen
2023-01-24  2:38     ` [PATCH v3 08/11] Add new mount modes Eric Van Hensbergen
2023-01-24  2:38     ` [PATCH v3 09/11] fix error reporting in v9fs_dir_release Eric Van Hensbergen
2023-01-24  2:38     ` [PATCH v3 10/11] writeback mode fixes Eric Van Hensbergen
2023-01-24  2:38     ` [PATCH v3 11/11] Fix revalidate Eric Van Hensbergen
2023-02-02 11:27     ` [PATCH v3 00/11] Performance fixes for 9p filesystem Christian Schoenebeck
2023-02-03 19:12       ` Eric Van Hensbergen
2023-02-04 13:40         ` Christian Schoenebeck
2023-02-04 21:38           ` Eric Van Hensbergen
2023-02-05 16:37       ` Eric Van Hensbergen
2023-02-06 13:20         ` Christian Schoenebeck
2023-02-06 13:37           ` Eric Van Hensbergen
2023-02-18  0:33     ` [PATCH v4 " Eric Van Hensbergen
2023-02-18  0:33       ` [PATCH v4 01/11] net/9p: Adjust maximum MSIZE to account for p9 header Eric Van Hensbergen
2023-02-18  7:50         ` asmadeus
2023-02-18  0:33       ` [PATCH v4 02/11] fs/9p: Expand setup of writeback cache to all levels Eric Van Hensbergen
2023-02-18  8:57         ` asmadeus
2023-02-18  0:33       ` [PATCH v4 03/11] fs/9p: Consolidate file operations and add readahead and writeback Eric Van Hensbergen
2023-02-18  9:24         ` asmadeus
2023-02-18 16:17           ` Eric Van Hensbergen
2023-02-18 16:19             ` Eric Van Hensbergen
2023-02-18 20:35               ` asmadeus
2023-02-27  2:50                 ` [PATCH v5 3/11] " Eric Van Hensbergen
2023-02-18  0:33       ` [PATCH v4 04/11] fs/9p: Remove unnecessary superblock flags Eric Van Hensbergen
2023-02-18  9:33         ` asmadeus
2023-02-18 16:24           ` Eric Van Hensbergen
2023-02-18 20:30             ` asmadeus
2023-02-18  0:33       ` [PATCH v4 05/11] fs/9p: allow disable of xattr support on mount Eric Van Hensbergen
2023-02-18  7:52         ` asmadeus
2023-02-18  0:33       ` [PATCH v4 06/11] net/9p: fix bug in client create for .L Eric Van Hensbergen
2023-02-18  8:01         ` asmadeus
2023-02-18  0:33       ` [PATCH v4 07/11] 9p: Add additional debug flags and open modes Eric Van Hensbergen
2023-02-18  8:05         ` asmadeus
2023-02-27  2:53           ` [PATCH v5 7/11] " Eric Van Hensbergen
2023-02-18  0:33       ` [PATCH v4 08/11] fs/9p: Add new mount modes Eric Van Hensbergen
2023-02-18  8:46         ` asmadeus
2023-02-27  2:55           ` [PATCH v5 8/11] " Eric Van Hensbergen
2023-02-18  0:33       ` [PATCH v4 09/11] fs/9p: fix error reporting in v9fs_dir_release Eric Van Hensbergen
2023-02-18  8:49         ` asmadeus
2023-02-18  0:33       ` [PATCH v4 10/11] fs/9p: writeback mode fixes Eric Van Hensbergen
2023-02-18  8:38         ` asmadeus
2023-02-18 10:01         ` asmadeus
2023-02-18 12:15           ` asmadeus
2023-02-18 16:40             ` Eric Van Hensbergen
2023-02-18 20:29               ` asmadeus
2023-03-21  1:12             ` Eric Van Hensbergen
2023-02-18 19:58           ` Christian Schoenebeck
2023-02-18 22:24             ` Eric Van Hensbergen
2023-02-18 23:40               ` asmadeus
2023-02-18 23:52                 ` Eric Van Hensbergen
2023-03-27  2:59         ` [PATCH v5] fs/9p: remove writeback fid and fix per-file modes Eric Van Hensbergen
2023-04-25  7:11           ` Christophe JAILLET
2023-04-25 11:13             ` asmadeus
2023-04-26  0:01             ` Eric Van Hensbergen
2023-04-26 16:45               ` Eric Van Hensbergen
2023-02-18  0:33       ` [PATCH v4 11/11] fs/9p: Fix revalidate Eric Van Hensbergen
2023-02-18  8:55         ` asmadeus
2023-02-18  7:48       ` [PATCH v4 00/11] Performance fixes for 9p filesystem asmadeus
2023-02-19 21:36       ` Christian Schoenebeck
2023-02-20  1:13         ` Eric Van Hensbergen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230124023834.106339-6-ericvh@kernel.org \
    --to=ericvh@kernel.org \
    --cc=asmadeus@codewreck.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux_oss@crudebyte.com \
    --cc=lucho@ionkov.net \
    --cc=rminnich@gmail.com \
    --cc=v9fs-developer@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.