Skip to content
Commit b0962c53 authored by Ewan D. Milne's avatar Ewan D. Milne Committed by Martin K. Petersen
Browse files

scsi: core: avoid repetitive logging of device offline messages

Large queues of I/O to offline devices that are eventually submitted when
devices are unblocked result in a many repeated "rejecting I/O to offline
device" messages.  These messages can fill up the dmesg buffer in crash
dumps so no useful prior messages remain.  In addition, if a serial console
is used, the flood of messages can cause a hard lockup in the console code.

Introduce a flag indicating the message has already been logged for the
device, and reset the flag when scsi_device_set_state() changes the device
state.

Link: https://lore.kernel.org/r/20200311143930.20674-1-emilne@redhat.com


Reviewed-by: default avatarBart van Assche <bvanassche@acm.org>
Signed-off-by: default avatarEwan D. Milne <emilne@redhat.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent dade67f4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment