Re: [PATCH] blk-core: use pr_warn_ratelimited() in bio_check_ro()
From: Christoph Hellwig
Date: Wed Nov 08 2023 - 02:17:04 EST
On Tue, Nov 07, 2023 at 07:12:47PM +0800, Yu Kuai wrote:
> From: Yu Kuai <yukuai3@xxxxxxxxxx>
>
> 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.
Reducing the log spam sounds good, and I guess the single warning
would be even better.
That being said, why/how is the underlying device set to read-only?
If there is a good reason we should probably add a holder op to tell
the user about it so that it stop sending writes.