Skip to content
Snippets Groups Projects
Commit e62a93fc authored by Paul Clements's avatar Paul Clements Committed by Yang Yingliang
Browse files

md/raid1: properly indicate failure when ending a failed write request


stable inclusion
from linux-4.19.191
commit a6e17cab00fc5bf85472434c52ac751426257c6f

--------------------------------

commit 2417b9869b81882ab90fd5ed1081a1cb2d4db1dd upstream.

This patch addresses a data corruption bug in raid1 arrays using bitmaps.
Without this fix, the bitmap bits for the failed I/O end up being cleared.

Since we are in the failure leg of raid1_end_write_request, the request
either needs to be retried (R1BIO_WriteError) or failed (R1BIO_Degraded).

Fixes: eeba6809 ("md/raid1: end bio when the device faulty")
Cc: stable@vger.kernel.org # v5.2+
Signed-off-by: default avatarPaul Clements <paul.clements@us.sios.com>
Signed-off-by: default avatarSong Liu <song@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 88d42bc7
No related branches found
No related tags found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment