You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
md_end_clone_io() may overwrite error status in orig_bio->bi_status with
BLK_STS_OK. This could happen when orig_bio has BIO_CHAIN (split by
md_submit_bio => bio_split_to_limits, for example). As a result, upper
layer may miss error reported from md (or the device) and consider the
failed IO was successful.
Fix this by only update orig_bio->bi_status when current bio reports
error and orig_bio is BLK_STS_OK. This is the same behavior as
__bio_chain_endio().
Fixes: 1076481 ("md: add io accounting for raid0 and raid5")
Cc: [email protected] # v5.14+
Reported-by: Bhanu Victor DiCara <[email protected]>
Closes: https://lore.kernel.org/regressions/5727380.DvuYhMxLoT@bvd0/
Signed-off-by: Song Liu <[email protected]>
Tested-by: Xiao Ni <[email protected]>
Reviewed-by: Yu Kuai <[email protected]>
Acked-by: Guoqing Jiang <[email protected]>
0 commit comments