diff options
author | Eric Van Hensbergen <ericvh@kernel.org> | 2022-12-17 17:19:34 +0000 |
---|---|---|
committer | Eric Van Hensbergen <ericvh@kernel.org> | 2023-03-27 02:33:48 +0000 |
commit | 8142db4f2792717837b97e219e5f5203dde17abb (patch) | |
tree | 2add352a8ebd213de823c5384a83b6e81af952ae /fs/9p/v9fs.c | |
parent | 740b8bf87322701b4607b77346477cbc764f5c56 (diff) | |
download | linux-8142db4f2792717837b97e219e5f5203dde17abb.tar.gz linux-8142db4f2792717837b97e219e5f5203dde17abb.tar.bz2 linux-8142db4f2792717837b97e219e5f5203dde17abb.zip |
fs/9p: allow disable of xattr support on mount
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>
Reviewed-by: Dominique Martinet <asmadeus@codewreck.org>
Diffstat (limited to 'fs/9p/v9fs.c')
-rw-r--r-- | fs/9p/v9fs.c | 9 |
1 files changed, 8 insertions, 1 deletions
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); |