mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-03 19:55:31 +00:00
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>
This commit is contained in:
parent
740b8bf873
commit
8142db4f27
@ -137,6 +137,8 @@ Options
|
|||||||
This can be used to share devices/named pipes/sockets between
|
This can be used to share devices/named pipes/sockets between
|
||||||
hosts. This functionality will be expanded in later versions.
|
hosts. This functionality will be expanded in later versions.
|
||||||
|
|
||||||
|
noxattr do not offer xattr functions on this mount.
|
||||||
|
|
||||||
access there are four access modes.
|
access there are four access modes.
|
||||||
user
|
user
|
||||||
if a user tries to access a file on v9fs
|
if a user tries to access a file on v9fs
|
||||||
|
@ -38,7 +38,7 @@ enum {
|
|||||||
/* String options */
|
/* String options */
|
||||||
Opt_uname, Opt_remotename, Opt_cache, Opt_cachetag,
|
Opt_uname, Opt_remotename, Opt_cache, Opt_cachetag,
|
||||||
/* Options that take no arguments */
|
/* Options that take no arguments */
|
||||||
Opt_nodevmap,
|
Opt_nodevmap, Opt_noxattr,
|
||||||
/* Access options */
|
/* Access options */
|
||||||
Opt_access, Opt_posixacl,
|
Opt_access, Opt_posixacl,
|
||||||
/* Lock timeout option */
|
/* Lock timeout option */
|
||||||
@ -55,6 +55,7 @@ static const match_table_t tokens = {
|
|||||||
{Opt_uname, "uname=%s"},
|
{Opt_uname, "uname=%s"},
|
||||||
{Opt_remotename, "aname=%s"},
|
{Opt_remotename, "aname=%s"},
|
||||||
{Opt_nodevmap, "nodevmap"},
|
{Opt_nodevmap, "nodevmap"},
|
||||||
|
{Opt_noxattr, "noxattr"},
|
||||||
{Opt_cache, "cache=%s"},
|
{Opt_cache, "cache=%s"},
|
||||||
{Opt_cachetag, "cachetag=%s"},
|
{Opt_cachetag, "cachetag=%s"},
|
||||||
{Opt_access, "access=%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)
|
if (v9ses->flags & V9FS_POSIX_ACL)
|
||||||
seq_puts(m, ",posixacl");
|
seq_puts(m, ",posixacl");
|
||||||
|
|
||||||
|
if (v9ses->flags & V9FS_NO_XATTR)
|
||||||
|
seq_puts(m, ",noxattr");
|
||||||
|
|
||||||
return p9_show_client_options(m, v9ses->clnt);
|
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:
|
case Opt_nodevmap:
|
||||||
v9ses->nodev = 1;
|
v9ses->nodev = 1;
|
||||||
break;
|
break;
|
||||||
|
case Opt_noxattr:
|
||||||
|
v9ses->flags |= V9FS_NO_XATTR;
|
||||||
|
break;
|
||||||
case Opt_cachetag:
|
case Opt_cachetag:
|
||||||
#ifdef CONFIG_9P_FSCACHE
|
#ifdef CONFIG_9P_FSCACHE
|
||||||
kfree(v9ses->cachetag);
|
kfree(v9ses->cachetag);
|
||||||
|
@ -36,7 +36,8 @@ enum p9_session_flags {
|
|||||||
V9FS_ACCESS_SINGLE = 0x04,
|
V9FS_ACCESS_SINGLE = 0x04,
|
||||||
V9FS_ACCESS_USER = 0x08,
|
V9FS_ACCESS_USER = 0x08,
|
||||||
V9FS_ACCESS_CLIENT = 0x10,
|
V9FS_ACCESS_CLIENT = 0x10,
|
||||||
V9FS_POSIX_ACL = 0x20
|
V9FS_POSIX_ACL = 0x20,
|
||||||
|
V9FS_NO_XATTR = 0x40
|
||||||
};
|
};
|
||||||
|
|
||||||
/* possible values of ->cache */
|
/* possible values of ->cache */
|
||||||
|
@ -64,7 +64,8 @@ v9fs_fill_super(struct super_block *sb, struct v9fs_session_info *v9ses,
|
|||||||
sb->s_magic = V9FS_MAGIC;
|
sb->s_magic = V9FS_MAGIC;
|
||||||
if (v9fs_proto_dotl(v9ses)) {
|
if (v9fs_proto_dotl(v9ses)) {
|
||||||
sb->s_op = &v9fs_super_ops_dotl;
|
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 {
|
} else {
|
||||||
sb->s_op = &v9fs_super_ops;
|
sb->s_op = &v9fs_super_ops;
|
||||||
sb->s_time_max = U32_MAX;
|
sb->s_time_max = U32_MAX;
|
||||||
|
Loading…
Reference in New Issue
Block a user