Re: [PATCH 00/10] scsi: avoid linebreaks in syslog output
Hi Hannes, James, I'm wondering what happened to this patch-set? I think it could make parsing of the output for userspace programs much easier. Are there some problems still to solve or is this just forgotten? Thanks, Tomas On 10/12/2012 10:33 AM, Hannes Reinecke wrote: 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] 0x8802348b0980 [ 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] 0x8802348b0980 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: 0x88043145eec0 [ 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: 0x88043145eec0 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(-) -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 00/10] scsi: avoid linebreaks in syslog output
On 12/20/2013 02:25 PM, Tomas Henzl wrote: Hi Hannes, James, I'm wondering what happened to this patch-set? I think it could make parsing of the output for userspace programs much easier. Are there some problems still to solve or is this just forgotten? Oh, no. Quite the contrary. As James has now merged my previous patchsets I'm in the process of updating this one, too. It'll be part of a larger patchset having a per-device scsi_logging_level; something I was wanting to have for a _LONG_ time now. Currently I'm fiddling with sense code printing, so I won't be able to send anything this year. But early next year I should have something presentable. Cheers, Hannes -- Dr. Hannes Reinecke zSeries Storage h...@suse.de +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg) -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 00/10] scsi: avoid linebreaks in syslog output
On 12/20/2013 02:31 PM, Hannes Reinecke wrote: On 12/20/2013 02:25 PM, Tomas Henzl wrote: Hi Hannes, James, I'm wondering what happened to this patch-set? I think it could make parsing of the output for userspace programs much easier. Are there some problems still to solve or is this just forgotten? Oh, no. Quite the contrary. As James has now merged my previous patchsets I'm in the process of updating this one, too. It'll be part of a larger patchset having a per-device scsi_logging_level; something I was wanting to have for a _LONG_ time now. Currently I'm fiddling with sense code printing, so I won't be able to send anything this year. But early next year I should have something presentable. Great news! thanks. Cheers, Hannes -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 00/10] scsi: avoid linebreaks in syslog output
On 10/15/2012 02:19 AM, Mike Snitzer wrote: On Fri, Oct 12, 2012 at 4:33 AM, Hannes Reinecke h...@suse.de wrote: 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] 0x8802348b0980 [ 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] 0x8802348b0980 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: 0x88043145eec0 [ 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: 0x88043145eec0 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 I know there are a lot of changes here but shouldn't all this get fixed in stable 3.5+? If you ask me, yes, of course. I can easily post a v2 of the patchset (meanwhile I've got another patch for st :-), Cc'ing stable with it. Cheers, Hannes -- Dr. Hannes Reinecke zSeries Storage h...@suse.de +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg) -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 00/10] scsi: avoid linebreaks in syslog output
On Fri, Oct 12, 2012 at 4:33 AM, Hannes Reinecke h...@suse.de wrote: 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] 0x8802348b0980 [ 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] 0x8802348b0980 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: 0x88043145eec0 [ 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: 0x88043145eec0 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 I know there are a lot of changes here but shouldn't all this get fixed in stable 3.5+? Thanks for sorting all this out Hannes. -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[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] 0x8802348b0980 [ 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] 0x8802348b0980 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: 0x88043145eec0 [ 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: 0x88043145eec0 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(-) -- 1.7.4.2 -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html