Commit 0121e498 authored by Yu Kuai's avatar Yu Kuai Committed by Zheng Zengkai
Browse files

blk-core: use pr_warn_ratelimited() in bio_check_ro()

stable inclusion
from stable-v6.6.2
commit 6e188e71bc9a2822923d2b461c7aedb948e3d088
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8IW7G

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=6e188e71bc9a2822923d2b461c7aedb948e3d088



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

[ Upstream commit 1b0a151c10a6d823f033023b9fdd9af72a89591b ]

If one of the underlying disks of raid or dm is set to read-only, then
each io will generate new log, which will cause message storm. This
environment is indeed problematic, however we can't make sure our
naive custormer won't do this, hence use pr_warn_ratelimited() to
prevent message storm in this case.

Signed-off-by: default avatarYu Kuai <yukuai3@huawei.com>
Fixes: 57e95e46 ("block: fix and cleanup bio_check_ro")
Signed-off-by: default avatarYe Bin <yebin10@huawei.com>
Link: https://lore.kernel.org/r/20231107111247.2157820-1-yukuai1@huaweicloud.com


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 67889def
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment