]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: sysfs: add per-fs attribute for read policy
authorAnand Jain <anand.jain@oracle.com>
Wed, 28 Oct 2020 13:14:47 +0000 (21:14 +0800)
committerDavid Sterba <dsterba@suse.com>
Tue, 8 Dec 2020 14:53:45 +0000 (15:53 +0100)
commitf695f84b136fcea5c642921223fd528a80853f02
tree4000a04a66987e62d8f4961a046c7b522639cee9
parent833ed54c4e358a20a8cb1a16d987e72f5f78ecb7
btrfs: sysfs: add per-fs attribute for read policy

Add

 /sys/fs/btrfs/UUID/read_policy

attribute so that the read policy for the raid1, raid1c34 and raid10 can
be tuned.

When this attribute is read, it will show all available policies, with
active policy in [ ]. The read_policy attribute can be written using one
of the items listed in there.

For example:
  $ cat /sys/fs/btrfs/UUID/read_policy
  [pid]
  $ echo pid > /sys/fs/btrfs/UUID/read_policy

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/sysfs.c