]> git.baikalelectronics.ru Git - kernel.git/commit
md/raid5: Allow degraded raid6 to do rmw
authorChangSyun Peng <allenpeng@synology.com>
Fri, 31 Jul 2020 09:50:31 +0000 (17:50 +0800)
committerSong Liu <songliubraving@fb.com>
Mon, 3 Aug 2020 06:54:31 +0000 (23:54 -0700)
commit9cccd4e826f54823e40b61e43c9ae77c2ab7904f
tree412d26f3b5d9f5958a3678c77b07a7efc96ca619
parentee03e29ae0ac9f0bdb3e2cd33252c84f885f3df5
md/raid5: Allow degraded raid6 to do rmw

Degraded raid6 always do reconstruct-write now. With raid6 xor supported,
we can do rmw in degraded raid6. This patch can reduce many read IOs to
improve performance.

If the failed disk is P, Q or the disk we want to write to, we may need to
do reconstruct-write in max degraded raid6. In this situation we can not
read enough data from handle_stripe_dirtying() so we have to set force_rcw
in handle_stripe_fill() to read all data.

Reviewed-by: Alex Wu <alexwu@synology.com>
Reviewed-by: BingJing Chang <bingjingc@synology.com>
Reviewed-by: Danny Shih <dannyshih@synology.com>
Signed-off-by: ChangSyun Peng <allenpeng@synology.com>
Signed-off-by: Song Liu <songliubraving@fb.com>
drivers/md/raid5.c