Skip to content

Commit 951e796

Browse files
kilobytekdave
authored andcommitted
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: Hans van Kranenburg <[email protected]> Signed-off-by: Adam Borowski <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent 41a75a6 commit 951e796

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fs/btrfs/super.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,16 +549,19 @@ int btrfs_parse_options(struct btrfs_fs_info *info, char *options,
549549
case Opt_ssd:
550550
btrfs_set_and_info(info, SSD,
551551
"use ssd allocation scheme");
552+
btrfs_clear_opt(info->mount_opt, NOSSD);
552553
break;
553554
case Opt_ssd_spread:
554555
btrfs_set_and_info(info, SSD_SPREAD,
555556
"use spread ssd allocation scheme");
556557
btrfs_set_opt(info->mount_opt, SSD);
558+
btrfs_clear_opt(info->mount_opt, NOSSD);
557559
break;
558560
case Opt_nossd:
559561
btrfs_set_and_info(info, NOSSD,
560562
"not using ssd allocation scheme");
561563
btrfs_clear_opt(info->mount_opt, SSD);
564+
btrfs_clear_opt(info->mount_opt, SSD_SPREAD);
562565
break;
563566
case Opt_barrier:
564567
btrfs_clear_and_info(info, NOBARRIER,

0 commit comments

Comments
 (0)