]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
blk-core: use pr_warn_ratelimited() in bio_check_ro()
authorYu Kuai <yukuai3@huawei.com>
Tue, 7 Nov 2023 11:12:47 +0000 (19:12 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Nov 2023 10:08:29 +0000 (11:08 +0100)
commitfd01115b033c8f1090c250c154449ea3e6f8c9f5
tree56a48cc9f20fc9f17fc19be0d4456a08f5fb336d
parentb80148710983d05edb2d9a6066e19f480a2971ab
blk-core: use pr_warn_ratelimited() in bio_check_ro()

[ 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: Yu Kuai <yukuai3@huawei.com>
Fixes: 57e95e4670d1 ("block: fix and cleanup bio_check_ro")
Signed-off-by: Ye Bin <yebin10@huawei.com>
Link: https://lore.kernel.org/r/20231107111247.2157820-1-yukuai1@huaweicloud.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
block/blk-core.c