summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorYu Kuai <yukuai3@huawei.com>2023-11-28 15:30:27 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-01-20 13:51:38 +0300
commitda29e4012f4133a68dca8012b38970ea9212e9f0 (patch)
tree3d69c384e1df287d077dcfe9c17d8eb9ced41999 /include/linux
parent0c7df8c241ff066b19782100f6bfc288144d7a38 (diff)
downloadlinux-da29e4012f4133a68dca8012b38970ea9212e9f0.tar.xz
block: warn once for each partition in bio_check_ro()
[ Upstream commit 67d995e069535c32829f5d368d919063492cec6e ] Commit 1b0a151c10a6 ("blk-core: use pr_warn_ratelimited() in bio_check_ro()") fix message storm by limit the rate, however, there will still be lots of message in the long term. Fix it better by warn once for each partition. Signed-off-by: Yu Kuai <yukuai3@huawei.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20231128123027.971610-3-yukuai1@huaweicloud.com Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/blk_types.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
index d5c5e59ddbd2..92c8997b1938 100644
--- a/include/linux/blk_types.h
+++ b/include/linux/blk_types.h
@@ -69,6 +69,7 @@ struct block_device {
#ifdef CONFIG_FAIL_MAKE_REQUEST
bool bd_make_it_fail;
#endif
+ bool bd_ro_warned;
/*
* keep this out-of-line as it's both big and not needed in the fast
* path