diff options
| author | Anand Jain <anand.jain@oracle.com> | 2025-01-02 02:06:38 +0800 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2025-01-13 14:53:21 +0100 |
| commit | e426286cfa6f85e51006f6151b309a395ada6540 (patch) | |
| tree | 2d87da97c8dc58a11a8608e6bcce6e37469b44d3 /fs/btrfs/sysfs.h | |
| parent | btrfs: print status of experimental mode when loading module (diff) | |
| download | linux-e426286cfa6f85e51006f6151b309a395ada6540.tar.gz linux-e426286cfa6f85e51006f6151b309a395ada6540.zip | |
btrfs: configure read policy via module parameter
For testing purposes allow to configure the read policy via module
parameter from the beginning. Available only with CONFIG_BTRFS_EXPERIMENTAL
Examples:
- Set the RAID1 balancing method to round-robin with a custom
min_contig_read of 4k:
$ modprobe btrfs read_policy=round-robin:4096
- Set the round-robin balancing method with the default
min_contiguous_read:
$ modprobe btrfs read_policy=round-robin
- Set the "devid" balancing method, defaulting to the latest device:
$ modprobe btrfs read_policy=devid
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/sysfs.h')
| -rw-r--r-- | fs/btrfs/sysfs.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/btrfs/sysfs.h b/fs/btrfs/sysfs.h index e6a284c59809..3fc5c6f90dc4 100644 --- a/fs/btrfs/sysfs.h +++ b/fs/btrfs/sysfs.h @@ -47,5 +47,11 @@ void btrfs_sysfs_del_qgroups(struct btrfs_fs_info *fs_info); int btrfs_sysfs_add_qgroups(struct btrfs_fs_info *fs_info); void btrfs_sysfs_del_one_qgroup(struct btrfs_fs_info *fs_info, struct btrfs_qgroup *qgroup); +int btrfs_read_policy_to_enum(const char *str, s64 *value); + +#ifdef CONFIG_BTRFS_EXPERIMENTAL +int __init btrfs_read_policy_init(void); +char *btrfs_get_mod_read_policy(void); +#endif #endif |
