From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Matthew Wilcox <matthew@wil.cx>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
James.Bottomley@hansenpartnership.com,
linux-scsi@vger.kernel.org
Subject: Re: [PATCH 4 of 4] sd: Correctly handle 6-byte commands with DIX
Date: Sun, 04 Jan 2009 21:35:06 -0500 [thread overview]
Message-ID: <yq18wpq4h0l.fsf@sermon.lab.mkp.net> (raw)
In-Reply-To: <20090104132855.GC2002@parisc-linux.org> (Matthew Wilcox's message of "Sun\, 4 Jan 2009 06\:28\:55 -0700")
>>>>> "Matthew" == Matthew Wilcox <matthew@wil.cx> writes:
>> + BUG_ON(dif && (scmd->cmnd[0] == READ_6 || scmd->cmnd[0] ==
>> WRITE_6));
Matthew> This BUG_ON gave me a 'Huh?' moment. I immediately wondered if
Matthew> it was user-triggerable. The answer is "no, this is kosher".
Matthew> sd_dif_op() is only called from sd.c where it has chosen which
Matthew> READ_*/WRITE_* opcode to set up, and it would indeed be an
Matthew> internal bug for this combination of conditions to exist.
Yep, I recently had to track down a bug where we had accidentally (for
completely different reasons) switched to 6-byte commands. The code in
the completion path that triggered this condition is now gone, thanks to
Alan. But I left the BUG_ON in place because it was no fun track this
down.
--
Martin K. Petersen Oracle Linux Engineering
prev parent reply other threads:[~2009-01-05 2:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-04 8:04 [PATCH 0 of 4] DIF/DIX fixes for 2.6.29 Martin K. Petersen
2009-01-04 8:04 ` [PATCH 1 of 4] scsi: Fix error handling for DIF/DIX Martin K. Petersen
2009-01-04 8:04 ` [PATCH 2 of 4] sd: Show app tag on error Martin K. Petersen
2009-01-04 8:04 ` [PATCH 3 of 4] sd: Fix tagging on platforms with signed char Martin K. Petersen
2009-01-04 8:04 ` [PATCH 4 of 4] sd: Correctly handle 6-byte commands with DIX Martin K. Petersen
2009-01-04 13:28 ` Matthew Wilcox
2009-01-05 2:35 ` Martin K. Petersen [this message]
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=yq18wpq4h0l.fsf@sermon.lab.mkp.net \
--to=martin.petersen@oracle.com \
--cc=James.Bottomley@hansenpartnership.com \
--cc=linux-scsi@vger.kernel.org \
--cc=matthew@wil.cx \
/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