Commit bd0330ad authored by Qu Wenruo's avatar Qu Wenruo Committed by Chris Mason

btrfs: Add acl mount option.

Add acl mount option to enable acl with remount option.
Signed-off-by: default avatarQu Wenruo <quwenruo@cn.fujitsu.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.cz>
Signed-off-by: default avatarJosef Bacik <jbacik@fb.com>
Signed-off-by: default avatarChris Mason <clm@fb.com>
parent 2c9ee856
...@@ -141,8 +141,9 @@ Options with (*) are default options and will not show in the mount options. ...@@ -141,8 +141,9 @@ Options with (*) are default options and will not show in the mount options.
Specify that 1 metadata chunk should be allocated after every <value> Specify that 1 metadata chunk should be allocated after every <value>
data chunks. Off by default. data chunks. Off by default.
acl(*)
noacl noacl
Disable support for Posix Access Control Lists (ACLs). See the Enable/disable support for Posix Access Control Lists (ACLs). See the
acl(5) manual page for more information about ACLs. acl(5) manual page for more information about ACLs.
barrier(*) barrier(*)
......
...@@ -324,7 +324,7 @@ enum { ...@@ -324,7 +324,7 @@ enum {
Opt_check_integrity, Opt_check_integrity_including_extent_data, Opt_check_integrity, Opt_check_integrity_including_extent_data,
Opt_check_integrity_print_mask, Opt_fatal_errors, Opt_rescan_uuid_tree, Opt_check_integrity_print_mask, Opt_fatal_errors, Opt_rescan_uuid_tree,
Opt_commit_interval, Opt_barrier, Opt_nodefrag, Opt_nodiscard, Opt_commit_interval, Opt_barrier, Opt_nodefrag, Opt_nodiscard,
Opt_noenospc_debug, Opt_noflushoncommit, Opt_noenospc_debug, Opt_noflushoncommit, Opt_acl,
Opt_err, Opt_err,
}; };
...@@ -347,6 +347,7 @@ static match_table_t tokens = { ...@@ -347,6 +347,7 @@ static match_table_t tokens = {
{Opt_ssd, "ssd"}, {Opt_ssd, "ssd"},
{Opt_ssd_spread, "ssd_spread"}, {Opt_ssd_spread, "ssd_spread"},
{Opt_nossd, "nossd"}, {Opt_nossd, "nossd"},
{Opt_acl, "acl"},
{Opt_noacl, "noacl"}, {Opt_noacl, "noacl"},
{Opt_notreelog, "notreelog"}, {Opt_notreelog, "notreelog"},
{Opt_flushoncommit, "flushoncommit"}, {Opt_flushoncommit, "flushoncommit"},
...@@ -552,6 +553,9 @@ int btrfs_parse_options(struct btrfs_root *root, char *options) ...@@ -552,6 +553,9 @@ int btrfs_parse_options(struct btrfs_root *root, char *options)
goto out; goto out;
} }
break; break;
case Opt_acl:
root->fs_info->sb->s_flags |= MS_POSIXACL;
break;
case Opt_noacl: case Opt_noacl:
root->fs_info->sb->s_flags &= ~MS_POSIXACL; root->fs_info->sb->s_flags &= ~MS_POSIXACL;
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment