]> git.baikalelectronics.ru Git - kernel.git/commit
raid5: need to set STRIPE_HANDLE for batch head
authorGuoqing Jiang <guoqing.jiang@cloud.ionos.com>
Wed, 27 Nov 2019 16:57:50 +0000 (17:57 +0100)
committerSong Liu <songliubraving@fb.com>
Wed, 11 Dec 2019 18:12:09 +0000 (10:12 -0800)
commitb7c246b50ee2dcc3160b1fb066a02bd398814337
tree5fd180e26dab234c310e4f7841f92f2a0d07226d
parent9eda4c6fc269933250240d8fcc346d8fea93639c
raid5: need to set STRIPE_HANDLE for batch head

With commit 73772ed148edf966316d01447f02c821f84e386d ("raid5: don't set
STRIPE_HANDLE to stripe which is in batch list"), we don't want to set
STRIPE_HANDLE flag for sh which is already in batch list.

However, the stripe which is the head of batch list should set this flag,
otherwise panic could happen inside init_stripe at BUG_ON(sh->batch_head),
it is reproducible with raid5 on top of nvdimm devices per Xiao oberserved.

Thanks for Xiao's effort to verify the change.

Fixes: 73772ed148edf ("raid5: don't set STRIPE_HANDLE to stripe which is in batch list")
Reported-by: Xiao Ni <xni@redhat.com>
Tested-by: Xiao Ni <xni@redhat.com>
Signed-off-by: Guoqing Jiang <guoqing.jiang@cloud.ionos.com>
Signed-off-by: Song Liu <songliubraving@fb.com>
drivers/md/raid5.c