Commit 951e7966 authored by Adam Borowski's avatar Adam Borowski Committed by David Sterba

btrfs: drop the nossd flag when remounting with -o ssd

The opposite case was already handled right in the very next switch entry.
And also when turning on nossd, drop ssd_spread.
Reported-by: default avatarHans van Kranenburg <hans.van.kranenburg@mendix.com>
Signed-off-by: default avatarAdam Borowski <kilobyte@angband.pl>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 41a75a6e
...@@ -549,16 +549,19 @@ int btrfs_parse_options(struct btrfs_fs_info *info, char *options, ...@@ -549,16 +549,19 @@ int btrfs_parse_options(struct btrfs_fs_info *info, char *options,
case Opt_ssd: case Opt_ssd:
btrfs_set_and_info(info, SSD, btrfs_set_and_info(info, SSD,
"use ssd allocation scheme"); "use ssd allocation scheme");
btrfs_clear_opt(info->mount_opt, NOSSD);
break; break;
case Opt_ssd_spread: case Opt_ssd_spread:
btrfs_set_and_info(info, SSD_SPREAD, btrfs_set_and_info(info, SSD_SPREAD,
"use spread ssd allocation scheme"); "use spread ssd allocation scheme");
btrfs_set_opt(info->mount_opt, SSD); btrfs_set_opt(info->mount_opt, SSD);
btrfs_clear_opt(info->mount_opt, NOSSD);
break; break;
case Opt_nossd: case Opt_nossd:
btrfs_set_and_info(info, NOSSD, btrfs_set_and_info(info, NOSSD,
"not using ssd allocation scheme"); "not using ssd allocation scheme");
btrfs_clear_opt(info->mount_opt, SSD); btrfs_clear_opt(info->mount_opt, SSD);
btrfs_clear_opt(info->mount_opt, SSD_SPREAD);
break; break;
case Opt_barrier: case Opt_barrier:
btrfs_clear_and_info(info, NOBARRIER, btrfs_clear_and_info(info, NOBARRIER,
......
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