Commit 62b8e077 authored by Howard McLauchlan's avatar Howard McLauchlan Committed by David Sterba

btrfs: Add nossd_spread mount option

Btrfs has two mount options for SSD optimizations: ssd and ssd_spread.
Presently there is an option to disable all SSD optimizations, but there
isn't an option to disable just ssd_spread.

This patch adds a mount option nossd_spread that disables ssd_spread
only.
Reviewed-by: default avatarJosef Bacik <jbacik@fb.com>
Signed-off-by: default avatarHoward McLauchlan <hmclauchlan@fb.com>
Reviewed-by: default avatarOmar Sandoval <osandov@fb.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 92e2f7e3
...@@ -310,10 +310,10 @@ static void btrfs_put_super(struct super_block *sb) ...@@ -310,10 +310,10 @@ static void btrfs_put_super(struct super_block *sb)
enum { enum {
Opt_degraded, Opt_subvol, Opt_subvolid, Opt_device, Opt_nodatasum, Opt_degraded, Opt_subvol, Opt_subvolid, Opt_device, Opt_nodatasum,
Opt_nodatacow, Opt_max_inline, Opt_alloc_start, Opt_nobarrier, Opt_ssd, Opt_nodatacow, Opt_max_inline, Opt_alloc_start, Opt_nobarrier, Opt_ssd,
Opt_nossd, Opt_ssd_spread, Opt_thread_pool, Opt_noacl, Opt_compress, Opt_nossd, Opt_ssd_spread, Opt_nossd_spread, Opt_thread_pool, Opt_noacl,
Opt_compress_type, Opt_compress_force, Opt_compress_force_type, Opt_compress, Opt_compress_type, Opt_compress_force,
Opt_notreelog, Opt_ratio, Opt_flushoncommit, Opt_discard, Opt_compress_force_type, Opt_notreelog, Opt_ratio, Opt_flushoncommit,
Opt_space_cache, Opt_space_cache_version, Opt_clear_cache, Opt_discard, Opt_space_cache, Opt_space_cache_version, Opt_clear_cache,
Opt_user_subvol_rm_allowed, Opt_enospc_debug, Opt_subvolrootid, Opt_user_subvol_rm_allowed, Opt_enospc_debug, Opt_subvolrootid,
Opt_defrag, Opt_inode_cache, Opt_no_space_cache, Opt_recovery, Opt_defrag, Opt_inode_cache, Opt_no_space_cache, Opt_recovery,
Opt_skip_balance, Opt_check_integrity, Opt_skip_balance, Opt_check_integrity,
...@@ -353,6 +353,7 @@ static const match_table_t tokens = { ...@@ -353,6 +353,7 @@ static const 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_nossd_spread, "nossd_spread"},
{Opt_acl, "acl"}, {Opt_acl, "acl"},
{Opt_noacl, "noacl"}, {Opt_noacl, "noacl"},
{Opt_notreelog, "notreelog"}, {Opt_notreelog, "notreelog"},
...@@ -579,6 +580,8 @@ int btrfs_parse_options(struct btrfs_fs_info *info, char *options, ...@@ -579,6 +580,8 @@ int btrfs_parse_options(struct btrfs_fs_info *info, char *options,
btrfs_set_opt(info->mount_opt, NOSSD); btrfs_set_opt(info->mount_opt, NOSSD);
btrfs_clear_and_info(info, SSD, btrfs_clear_and_info(info, SSD,
"not using ssd optimizations"); "not using ssd optimizations");
/* Fallthrough */
case Opt_nossd_spread:
btrfs_clear_and_info(info, SSD_SPREAD, btrfs_clear_and_info(info, SSD_SPREAD,
"not using spread ssd allocation scheme"); "not using spread ssd allocation scheme");
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