From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4985CCA6C for ; Wed, 8 Nov 2023 07:17:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=none Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C31441711; Tue, 7 Nov 2023 23:17:00 -0800 (PST) Received: by verein.lst.de (Postfix, from userid 2407) id 7588167373; Wed, 8 Nov 2023 08:16:56 +0100 (CET) Date: Wed, 8 Nov 2023 08:16:55 +0100 From: Christoph Hellwig To: Yu Kuai Cc: hch@lst.de, axboe@kernel.dk, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, yukuai3@huawei.com, yi.zhang@huawei.com, yangerkun@huawei.com Subject: Re: [PATCH] blk-core: use pr_warn_ratelimited() in bio_check_ro() Message-ID: <20231108071655.GA4875@lst.de> References: <20231107111247.2157820-1-yukuai1@huaweicloud.com> Precedence: bulk X-Mailing-List: linux-block@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231107111247.2157820-1-yukuai1@huaweicloud.com> User-Agent: Mutt/1.5.17 (2007-11-01) On Tue, Nov 07, 2023 at 07:12:47PM +0800, Yu Kuai wrote: > From: Yu Kuai > > 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.