btrfs: make max async discard size tunable

Expose max_discard_size as a tunable via sysfs and switch the current
fixed maximum to the default value.

Signed-off-by: Dennis Zhou <dennis@kernel.org>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Dennis Zhou
2020-01-02 16:26:38 -05:00
committed by David Sterba
parent 4aa9ad5203
commit 19b2a2c719
5 changed files with 47 additions and 8 deletions

View File

@@ -10,7 +10,7 @@ struct btrfs_discard_ctl;
struct btrfs_block_group;
/* Discard size limits */
#define BTRFS_ASYNC_DISCARD_MAX_SIZE (SZ_64M)
#define BTRFS_ASYNC_DISCARD_DEFAULT_MAX_SIZE (SZ_64M)
/* Work operations */
void btrfs_discard_cancel_work(struct btrfs_discard_ctl *discard_ctl,