]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
block: rate-limit capacity change info log
authorLi Chen <chenl311@chinatelecom.cn>
Mon, 17 Nov 2025 05:34:07 +0000 (13:34 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Jan 2026 11:57:08 +0000 (12:57 +0100)
commit8dd553771afe454ca2c4a3ad66d7d51b50f436df
treeb2141674bc50920d64649b9f7a011d7e4b0f194d
parent3715bb43ccd3ce2a04fa50e8007c1c81e29360ed
block: rate-limit capacity change info log

commit 3179a5f7f86bcc3acd5d6fb2a29f891ef5615852 upstream.

loop devices under heavy stress-ng loop streessor can trigger many
capacity change events in a short time. Each event prints an info
message from set_capacity_and_notify(), flooding the console and
contributing to soft lockups on slow consoles.

Switch the printk in set_capacity_and_notify() to
pr_info_ratelimited() so frequent capacity changes do not spam
the log while still reporting occasional changes.

Cc: stable@vger.kernel.org
Signed-off-by: Li Chen <chenl311@chinatelecom.cn>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
block/genhd.c