]> git.baikalelectronics.ru Git - kernel.git/commit
md/raid5: support config stripe_size by sysfs entry
authorYufen Yu <yuyufen@huawei.com>
Sat, 18 Jul 2020 09:29:09 +0000 (05:29 -0400)
committerSong Liu <songliubraving@fb.com>
Wed, 22 Jul 2020 00:18:22 +0000 (17:18 -0700)
commit1e76902576fd6160c4a4dbe33bf937f69e924fcd
tree30f49a337e78de8f331802cdbfe37eca4e92faa1
parent3a8e56fdc573cc757eb1485b2d783200be3ab1d1
md/raid5: support config stripe_size by sysfs entry

Adding a new 'stripe_size' sysfs entry to set and show stripe_size.
stripe_size should not be bigger than PAGE_SIZE, and it requires to
be multiple of 4096. We can adjust stripe_size by writing value into
sysfs entry, likely, set stripe_size as 16KB:

          echo 16384 > /sys/block/md1/md/stripe_size

Show current stripe_size value:

          cat /sys/block/md1/md/stripe_size

For PAGE_SIZE is equal to 4096, 'stripe_size' can just be read.

Signed-off-by: Yufen Yu <yuyufen@huawei.com>
Signed-off-by: Song Liu <songliubraving@fb.com>
drivers/md/raid5.c