Skip to content

Commit

Permalink
btrfs: Add acl mount option.
Browse files Browse the repository at this point in the history
Add acl mount option to enable acl with remount option.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Reviewed-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Chris Mason <clm@fb.com>
  • Loading branch information
Qu Wenruo authored and Chris Mason committed Jan 28, 2014
1 parent 2c9ee85 commit bd0330a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Documentation/filesystems/btrfs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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>
data chunks. Off by default.

acl(*)
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.

barrier(*)
Expand Down
6 changes: 5 additions & 1 deletion fs/btrfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ enum {
Opt_check_integrity, Opt_check_integrity_including_extent_data,
Opt_check_integrity_print_mask, Opt_fatal_errors, Opt_rescan_uuid_tree,
Opt_commit_interval, Opt_barrier, Opt_nodefrag, Opt_nodiscard,
Opt_noenospc_debug, Opt_noflushoncommit,
Opt_noenospc_debug, Opt_noflushoncommit, Opt_acl,
Opt_err,
};

Expand All @@ -347,6 +347,7 @@ static match_table_t tokens = {
{Opt_ssd, "ssd"},
{Opt_ssd_spread, "ssd_spread"},
{Opt_nossd, "nossd"},
{Opt_acl, "acl"},
{Opt_noacl, "noacl"},
{Opt_notreelog, "notreelog"},
{Opt_flushoncommit, "flushoncommit"},
Expand Down Expand Up @@ -552,6 +553,9 @@ int btrfs_parse_options(struct btrfs_root *root, char *options)
goto out;
}
break;
case Opt_acl:
root->fs_info->sb->s_flags |= MS_POSIXACL;
break;
case Opt_noacl:
root->fs_info->sb->s_flags &= ~MS_POSIXACL;
break;
Expand Down

0 comments on commit bd0330a

Please sign in to comment.