提交 a2417db3 编写于 作者: L Li Zhijian 提交者: Martin K. Petersen

scsi: core: Shorten long warning messages

sdev_printk() will only accept messages up to 128 bytes.

Shorten strings exceeding 128 bytes avoid printing an incomplete sentence
like:

  [  475.156955] sd 9:0:0:0: Warning! Received an indication that the LUN assignments on this target have changed. The Linux SCSI layer does not automatical

Link: https://lore.kernel.org/r/20220630024516.1571209-1-lizhijian@fujitsu.comSuggested-by: NFinn Thain <fthain@linux-m68k.org>
Reviewed-by: NBart Van Assche <bvanassche@acm.org>
Signed-off-by: NLi Zhijian <lizhijian@fujitsu.com>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 34bd1dca
...@@ -463,14 +463,12 @@ static void scsi_report_sense(struct scsi_device *sdev, ...@@ -463,14 +463,12 @@ static void scsi_report_sense(struct scsi_device *sdev,
evt_type = SDEV_EVT_LUN_CHANGE_REPORTED; evt_type = SDEV_EVT_LUN_CHANGE_REPORTED;
scsi_report_lun_change(sdev); scsi_report_lun_change(sdev);
sdev_printk(KERN_WARNING, sdev, sdev_printk(KERN_WARNING, sdev,
"Warning! Received an indication that the "
"LUN assignments on this target have " "LUN assignments on this target have "
"changed. The Linux SCSI layer does not " "changed. The Linux SCSI layer does not "
"automatically remap LUN assignments.\n"); "automatically remap LUN assignments.\n");
} else if (sshdr->asc == 0x3f) } else if (sshdr->asc == 0x3f)
sdev_printk(KERN_WARNING, sdev, sdev_printk(KERN_WARNING, sdev,
"Warning! Received an indication that the " "Operating parameters on this target have "
"operating parameters on this target have "
"changed. The Linux SCSI layer does not " "changed. The Linux SCSI layer does not "
"automatically adjust these parameters.\n"); "automatically adjust these parameters.\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册