From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Florian Westphal <fw@strlen.de>
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
martin.petersen@oracle.com, axboe@kernel.dk,
adam radford <aradford@gmail.com>
Subject: Re: "WRITE SAME failed. Manually zeroing" with 3w-xxxx driver
Date: Mon, 29 Apr 2013 12:13:01 -0400 [thread overview]
Message-ID: <yq1obcxpb76.fsf@sermon.lab.mkp.net> (raw)
In-Reply-To: <20130429152639.GG32324@breakpoint.cc> (Florian Westphal's message of "Mon, 29 Apr 2013 17:26:39 +0200")
>>>>> "Florian" == Florian Westphal <fw@strlen.de> writes:
Florian> After update to 3.8 dmesg is spammed with: kernel: [
Florian> 280.272094] 3w-xxxx: 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-xxxx: 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 <fw@strlen.de>
CC: adam radford <aradford@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
diff --git a/drivers/scsi/3w-xxxx.c b/drivers/scsi/3w-xxxx.c
index 56662ae..b9276d1 100644
--- a/drivers/scsi/3w-xxxx.c
+++ b/drivers/scsi/3w-xxxx.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-xxxx.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-xxxx: 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;
}
next prev parent reply other threads:[~2013-04-29 16:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-29 15:26 "WRITE SAME failed. Manually zeroing" with 3w-xxxx driver Florian Westphal
2013-04-29 16:13 ` Martin K. Petersen [this message]
2013-04-29 16:29 ` Florian Westphal
2013-04-30 7:36 ` Florian Westphal
2013-05-21 20:04 ` adam radford
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=yq1obcxpb76.fsf@sermon.lab.mkp.net \
--to=martin.petersen@oracle.com \
--cc=aradford@gmail.com \
--cc=axboe@kernel.dk \
--cc=fw@strlen.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox