RE: 3.12.0: sda2: WRITE SAME failed. Manually zeroing. with 3w-xxxx driver
-Original Message- From: Martin K. Petersen [mailto:martin.peter...@oracle.com] Sent: Thursday, November 28, 2013 8:13 AM Martin http://marc.info/?l=linux-scsim=138252394614920w=2 Justin Awesome, thank you! This patch is over a month old, do you know Justin if is currently in mainline? Nope. - James? Could it possibly get added to 3.12.x -stable as well? I've patched against 3.12.0 for now -- I'll let you know if there are any issues-- so far so good, thanks again. Justin. Update: System uptime with the patch is 7+ days under extensive load at times and I've had no issues to date. I just checked the current linux git repo (3.13-rc2) and found this patch has not been included. Please advise if any further testing or validation needs to be completed to help get this into -stable/-mainline. Justin. -- 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: 3.12.0: sda2: WRITE SAME failed. Manually zeroing. with 3w-xxxx driver
On Thu, Dec 05, 2013 at 06:43:39PM -0500, Justin Piszcz wrote: -Original Message- From: Martin K. Petersen [mailto:martin.peter...@oracle.com] Sent: Thursday, November 28, 2013 8:13 AM Martin http://marc.info/?l=linux-scsim=138252394614920w=2 Justin Awesome, thank you! This patch is over a month old, do you know Justin if is currently in mainline? Nope. - James? Could it possibly get added to 3.12.x -stable as well? I've patched against 3.12.0 for now -- I'll let you know if there are any issues-- so far so good, thanks again. Justin. Update: System uptime with the patch is 7+ days under extensive load at times and I've had no issues to date. I just checked the current linux git repo (3.13-rc2) and found this patch has not been included. Please advise if any further testing or validation needs to be completed to help get this into -stable/-mainline. It needs to get into Linus's tree first, after that, let sta...@vger.kernel.org know the git commit id and I'll be glad to queue it up for a stable kernel release. thanks, greg k-h -- 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: 3.12.0: sda2: WRITE SAME failed. Manually zeroing. with 3w-xxxx driver
Justin == Justin Piszcz jpis...@lucidpixels.com writes: Justin Update: System uptime with the patch is 7+ days under extensive Justin load at times and I've had no issues to date. I just checked Justin the current linux git repo (3.13-rc2) and found this patch has Justin not been included. James has it queued in scsi/fixes. It'll make it to Linus on the next pull and it has been tagged for inclusion in stable. -- Martin K. Petersen Oracle Linux Engineering -- 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: 3.12.0: sda2: WRITE SAME failed. Manually zeroing. with 3w-xxxx driver
Justin == Justin Piszcz jpis...@lucidpixels.com writes: Justin Relevant logs: [178339.353519] 3w-sas: scsi0: ERROR: Justin (0x03:0x0101): Invalid command opcode:opcode=0x41. Justin [178339.353565] sda2: WRITE SAME failed. Manually zeroing. Justin Is this something I should be worried about? No, it just means that your 3ware controller does not handle the WRITE SAME command and we fall back to manually writing out zeroes. I posted a patch a while back that prevents WRITE SAME being issued for controllers that do not pass the commands through to disk directly: http://marc.info/?l=linux-scsim=138252394614920w=2 -- Martin K. Petersen Oracle Linux Engineering -- 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: 3.12.0: sda2: WRITE SAME failed. Manually zeroing. with 3w-xxxx driver
-Original Message- From: Martin K. Petersen [mailto:martin.peter...@oracle.com] Sent: Thursday, November 28, 2013 8:00 AM To: Justin Piszcz Cc: open list; linux-e...@vger.kernel.org; linux-scsi@vger.kernel.org Subject: Re: 3.12.0: sda2: WRITE SAME failed. Manually zeroing. with 3w- driver Justin == Justin Piszcz jpis...@lucidpixels.com writes: Justin Relevant logs: [178339.353519] 3w-sas: scsi0: ERROR: Justin (0x03:0x0101): Invalid command opcode:opcode=0x41. Justin [178339.353565] sda2: WRITE SAME failed. Manually zeroing. Justin Is this something I should be worried about? No, it just means that your 3ware controller does not handle the WRITE SAME command and we fall back to manually writing out zeroes. I posted a patch a while back that prevents WRITE SAME being issued for controllers that do not pass the commands through to disk directly: http://marc.info/?l=linux-scsim=138252394614920w=2 [ .. ] Awesome, thank you! This patch is over a month old, do you know if is currently in mainline? I'll also update my case with 3ware/LSI. Justin. -- 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: 3.12.0: sda2: WRITE SAME failed. Manually zeroing. with 3w-xxxx driver
Justin == Justin Piszcz jpis...@lucidpixels.com writes: Martin I posted a patch a while back that prevents WRITE SAME being Martin issued for controllers that do not pass the commands through to Martin disk directly: Martin http://marc.info/?l=linux-scsim=138252394614920w=2 Justin Awesome, thank you! This patch is over a month old, do you know Justin if is currently in mainline? Nope. - James? -- Martin K. Petersen Oracle Linux Engineering -- 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: 3.12.0: sda2: WRITE SAME failed. Manually zeroing. with 3w-xxxx driver
-Original Message- From: Martin K. Petersen [mailto:martin.peter...@oracle.com] Sent: Thursday, November 28, 2013 8:13 AM [ .. ] Martin http://marc.info/?l=linux-scsim=138252394614920w=2 Justin Awesome, thank you! This patch is over a month old, do you know Justin if is currently in mainline? Nope. - James? [ .. ] Could it possibly get added to 3.12.x -stable as well? I've patched against 3.12.0 for now -- I'll let you know if there are any issues-- so far so good, thanks again. Justin. -- 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: WRITE SAME failed. Manually zeroing with 3w-xxxx driver
On Mon, Apr 29, 2013 at 9:13 AM, Martin K. Petersen martin.peter...@oracle.com wrote: Florian == Florian Westphal f...@strlen.de writes: Florian After update to 3.8 dmesg is spammed with: kernel: [ Florian 280.272094] 3w-: scsi8: Unknown scsi opcode: 0x41 kernel: [ Florian 280.272107] sd 8:0:0:0: [sda] Unhandled error code kernel: Interesting. It looks like the 3ware handles this at the driver level instead of passing the command through to the disk and letting it fail. That in turn means that the logic we have in place to disable WS when the disk does not support it does not get triggered. The driver should really fill out the sense buffer in that case. Could you please test the patch below? Florian This goes on and on. The second question is what it is that's issuing these zeroouts at boot? Which filesystem are you using? What's your DM/MD config? -- Martin K. Petersen Oracle Linux Engineering 3w-: Create sense buffer for unsupported commands Make the driver return appropriate sense data when an unsupported operation is queued. This will cause the SCSI layer to stop issuing the offending command. Reported-by: Florian Westphal f...@strlen.de CC: adam radford aradf...@gmail.com Signed-off-by: Martin K. Petersen martin.peter...@oracle.com diff --git a/drivers/scsi/3w-.c b/drivers/scsi/3w-.c index 56662ae..b9276d1 100644 --- a/drivers/scsi/3w-.c +++ b/drivers/scsi/3w-.c @@ -216,6 +216,7 @@ #include scsi/scsi_host.h #include scsi/scsi_tcq.h #include scsi/scsi_cmnd.h +#include scsi/scsi_eh.h #include 3w-.h /* Globals */ @@ -2009,7 +2010,8 @@ static int tw_scsi_queue_lck(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_c printk(KERN_NOTICE 3w-: scsi%d: Unknown scsi opcode: 0x%x\n, tw_dev-host-host_no, *command); tw_dev-state[request_id] = TW_S_COMPLETED; tw_state_request_finish(tw_dev, request_id); - SCpnt-result = (DID_BAD_TARGET 16); + SCpnt-result = (DRIVER_SENSE 24) | SAM_STAT_CHECK_CONDITION; + scsi_build_sense_buffer(1, SCpnt-sense_buffer, ILLEGAL_REQUEST, 0x20, 0); done(SCpnt); retval = 0; } Thanks Martin. This patch looks good. Acked-by: Adam Radford aradf...@gmail.com -- 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: WRITE SAME failed. Manually zeroing with 3w-xxxx driver
Martin K. Petersen martin.peter...@oracle.com wrote: Florian == Florian Westphal f...@strlen.de writes: Florian After update to 3.8 dmesg is spammed with: kernel: [ Florian 280.272094] 3w-: scsi8: Unknown scsi opcode: 0x41 kernel: [ Florian 280.272107] sd 8:0:0:0: [sda] Unhandled error code kernel: Could you please test the patch below? Works. Only one WRITE_SAME error at boot, max_write_same_blocks in sysfs is 0, which wasn't the case before. The second question is what it is that's issuing these zeroouts at boot? Which filesystem are you using? What's your DM/MD config? ext4, no DM/MD is used. I guess the zeroouts are from postgres, but i'm not sure. 3w-: Create sense buffer for unsupported commands Make the driver return appropriate sense data when an unsupported operation is queued. This will cause the SCSI layer to stop issuing the offending command. Reported-by: Florian Westphal f...@strlen.de CC: adam radford aradf...@gmail.com Signed-off-by: Martin K. Petersen martin.peter...@oracle.com Tested-by: Florian Westphal f...@strlen.de Thanks again. -- 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
WRITE SAME failed. Manually zeroing with 3w-xxxx driver
After update to 3.8 dmesg is spammed with: kernel: [ 280.272094] 3w-: scsi8: Unknown scsi opcode: 0x41 kernel: [ 280.272107] sd 8:0:0:0: [sda] Unhandled error code kernel: [ 280.272110] sd 8:0:0:0: [sda] kernel: [ 280.272112] Result: hostbyte=0x04 driverbyte=0x00 kernel: [ 280.272114] sd 8:0:0:0: [sda] CDB: kernel: [ 280.272116] cdb[0]=0x41: 41 00 10 09 aa 22 00 00 08 00 kernel: [ 280.272123] end_request: I/O error, dev sda, sector 269068834 kernel: [ 280.272130] sda6: WRITE SAME failed. Manually zeroing. [..] This goes on and on. I am not familiar with block layer or scsi drivers, so I don't know if this is an issue with the 3w- driver or the block layer. I've hacked around this by reverting block: Make blkdev_issue_zeroout use WRITE SAME (579e8f3c7b2ecf7db91398d942d76457a3ddba21), as this hw doesn't support write_same anyway. -- 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: WRITE SAME failed. Manually zeroing with 3w-xxxx driver
Florian == Florian Westphal f...@strlen.de writes: Florian After update to 3.8 dmesg is spammed with: kernel: [ Florian 280.272094] 3w-: scsi8: Unknown scsi opcode: 0x41 kernel: [ Florian 280.272107] sd 8:0:0:0: [sda] Unhandled error code kernel: Interesting. It looks like the 3ware handles this at the driver level instead of passing the command through to the disk and letting it fail. That in turn means that the logic we have in place to disable WS when the disk does not support it does not get triggered. The driver should really fill out the sense buffer in that case. Could you please test the patch below? Florian This goes on and on. The second question is what it is that's issuing these zeroouts at boot? Which filesystem are you using? What's your DM/MD config? -- Martin K. Petersen Oracle Linux Engineering 3w-: Create sense buffer for unsupported commands Make the driver return appropriate sense data when an unsupported operation is queued. This will cause the SCSI layer to stop issuing the offending command. Reported-by: Florian Westphal f...@strlen.de CC: adam radford aradf...@gmail.com Signed-off-by: Martin K. Petersen martin.peter...@oracle.com diff --git a/drivers/scsi/3w-.c b/drivers/scsi/3w-.c index 56662ae..b9276d1 100644 --- a/drivers/scsi/3w-.c +++ b/drivers/scsi/3w-.c @@ -216,6 +216,7 @@ #include scsi/scsi_host.h #include scsi/scsi_tcq.h #include scsi/scsi_cmnd.h +#include scsi/scsi_eh.h #include 3w-.h /* Globals */ @@ -2009,7 +2010,8 @@ static int tw_scsi_queue_lck(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_c printk(KERN_NOTICE 3w-: scsi%d: Unknown scsi opcode: 0x%x\n, tw_dev-host-host_no, *command); tw_dev-state[request_id] = TW_S_COMPLETED; tw_state_request_finish(tw_dev, request_id); - SCpnt-result = (DID_BAD_TARGET 16); + SCpnt-result = (DRIVER_SENSE 24) | SAM_STAT_CHECK_CONDITION; + scsi_build_sense_buffer(1, SCpnt-sense_buffer, ILLEGAL_REQUEST, 0x20, 0); done(SCpnt); retval = 0; } -- 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: WRITE SAME failed. Manually zeroing with 3w-xxxx driver
Martin K. Petersen martin.peter...@oracle.com wrote: Florian After update to 3.8 dmesg is spammed with: kernel: [ Florian 280.272094] 3w-: scsi8: Unknown scsi opcode: 0x41 kernel: [ Florian 280.272107] sd 8:0:0:0: [sda] Unhandled error code kernel: Interesting. It looks like the 3ware handles this at the driver level instead of passing the command through to the disk and letting it fail. That in turn means that the logic we have in place to disable WS when the disk does not support it does not get triggered. The driver should really fill out the sense buffer in that case. Could you please test the patch below? Sure, I'll report back tomorrow. Thanks for the quick response, Florian -- 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