Skip to content

scsi: avoid linebreaks in syslog output

Hannes Reinecke linux-scsi 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest10 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10sg: Use dev_printkdrivers/scsi/sg.c+109 -781 reply
2/10sr: Use dev_printk()drivers/scsi/sr.c drivers/scsi/sr.h+30 -210 replies
3/10scsi: Avoid linebreaks in syslog outputdrivers/scsi/scsi.c+22 -160 replies
4/10scsi: Use sdev_printk() for loggingdrivers/scsi/scsi.c drivers/scsi/scsi_error.c drivers/scsi/scsi_lib.c +1 more+139 -1050 replies
5/10scsi: use buffer for print_opcode_name()drivers/scsi/constants.c+59 -390 replies
6/10scsi: use single printk call in scsi_print_command()drivers/scsi/constants.c+61 -100 replies
7/10scsi: use buffer for scsi_show_result()drivers/scsi/constants.c drivers/scsi/sd.c include/scsi/scsi_dbg.h+18 -130 replies
8/10scsi: open-code scsi_decode_sense_buffer()drivers/scsi/constants.c+17 -260 replies
9/10scsi: decode descriptor sensedrivers/scsi/constants.c drivers/scsi/scsi_error.c include/scsi/scsi_eh.h+73 -570 replies
10/10scsi: use local buffer for decoding sense datadrivers/scsi/constants.c drivers/scsi/sd.c include/scsi/scsi_dbg.h+65 -510 replies

Reviews trailers per patch

1 of 10 patches has a Reviewed-by or Acked-by.

PatchDouglas Gilbert
1/10A-b
2/10
3/10
4/10
5/10
6/10
7/10
8/10
9/10
10/10

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/10] scsi: avoid linebreaks in syslog output

This patchset updates the SCSI midlayer to use dev_printk() instead of the simple printk(). The main objective here is to avoid line-breaks in syslog output; with the current state it's nearly impossible to match the output to the occurring device; under high load even the CDB will be split off into individual bytes, spread randomly across the lines. Which makes debugging via scsi_logging_level _really_ hard. In addition we'll be getting the syslog messages nicely prefixed with the device, which will make userspace logging daemons happy.

Before:

[  297.300605] sd 2:0:3:2: Send: 
[  297.300607] 0xffff8802348b0980 
[  297.300610] sd 2:0:3:2: CDB: 
[  297.300615] Test Unit Ready: 00 00 00 00 00 00
[  297.300747] sd 2:0:3:2: Done: 
[  297.300750] 0xffff8802348b0980 SUCCESS
[  297.300753] sd 2:0:3:2:  
[  297.300755] Result: hostbyte=DID_OK driverbyte=DRIVER_OK
[  297.300758] sd 2:0:3:2: CDB: 
[  297.300764] Test Unit Ready: 00 00 00 00 00 00
[  297.300766] sd 2:0:3:2:  
[  297.300769] Sense Key : Unit Attention [current] 
[  297.300771] Info fld=0x0
[  297.300772] sd 2:0:3:2:  
[  297.300776] Add. Sense: Capacity data has changed

After:

[  636.683556] sd 2:0:3:2: Send: 0xffff88043145eec0
[  636.727856] sd 2:0:3:2: CDB: Test Unit Ready: 00 00 00 00 00 00
[  636.785330] sd 2:0:3:2: Done: 0xffff88043145eec0 SUCCESS
[  636.838228] sd 2:0:3:2: Result: hostbyte=DID_OK driverbyte=DRIVER_OK
[  636.899099] sd 2:0:3:2: CDB: Test Unit Ready: 00 00 00 00 00 00
[  636.955905] sd 2:0:3:2: Sense Key : Unit Attention [current] 
[  637.069179] sd 2:0:3:2: Add. Sense: Capacity data has changed

Hannes Reinecke (10):
sg: Use dev_printk
sr: Use dev_printk()
scsi: Avoid linebreaks in syslog output
scsi: Use sdev_printk() for logging
scsi: use buffer for print_opcode_name()
scsi: use single printk call in scsi_print_command()
scsi: use buffer for scsi_show_result()
scsi: open-code scsi_decode_sense_buffer()
scsi: decode descriptor sense
scsi: use local buffer for decoding sense data

 drivers/scsi/constants.c  |  406 +++++++++++++++++++++++++--------------------
 drivers/scsi/scsi.c       |   54 ++++---
 drivers/scsi/scsi_error.c |  190 ++++++++++++++-------
 drivers/scsi/scsi_lib.c   |   13 +-
 drivers/scsi/scsi_scan.c  |   68 ++++----
 drivers/scsi/sd.c         |   16 +-
 drivers/scsi/sg.c         |  187 ++++++++++++---------
 drivers/scsi/sr.c         |   47 +++---
 drivers/scsi/sr.h         |    4 +
 include/scsi/scsi_dbg.h   |    6 +-
 include/scsi/scsi_eh.h    |    8 +-
 11 files changed, 588 insertions(+), 411 deletions(-)
Signature · 1 line
1.7.4.2