public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Matthew Wilcox <willy@linux.intel.com>,
	linux-scsi@vger.kernel.org, Matthew Wilcox <matthew@wil.cx>
Subject: Re: [PATCH 1/2] sd: Refactor sd_read_capacity()
Date: Fri, 13 Mar 2009 17:45:23 -0400	[thread overview]
Message-ID: <yq14oxxksgc.fsf@sermon.lab.mkp.net> (raw)
In-Reply-To: <1236979776.31764.2.camel@localhost.localdomain> (James Bottomley's message of "Fri\, 13 Mar 2009 16\:29\:36 -0500")

>>>>> "James" == James Bottomley <James.Bottomley@HansenPartnership.com> writes:

James> On Thu, 2009-03-12 at 14:20 -0400, Matthew Wilcox wrote:
>> +#define RC16_LEN 13

James> Shouldn't this be 32, the defined length of a READ CAPACITY 16
James> return?

James> In theory asking for less is fine, since the spec allows it, but
James> it's setting a trap for expanded users of READ_CAPACITY 16 since
James> they might blindly use a buffer[13] or beyond, not realising we
James> didn't actually ask for data beyond buffer[12].

I have this bumped to 16 in my tree (after being bitten by what you
describe).  I'm open to upping it further even if none of the remaining
16 bytes have been defined yet.

-- 
Martin K. Petersen	Oracle Linux Engineering


  reply	other threads:[~2009-03-13 21:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-12 18:20 Support READ CAPACITY 16 on more drives Matthew Wilcox
2009-03-12 18:20 ` [PATCH 1/2] sd: Refactor sd_read_capacity() Matthew Wilcox
2009-03-12 18:35   ` Martin K. Petersen
2009-03-13 21:29   ` James Bottomley
2009-03-13 21:45     ` Martin K. Petersen [this message]
2009-03-14  1:19     ` Matthew Wilcox
2009-03-14 13:40       ` James Bottomley
2009-03-12 18:20 ` [PATCH 2/2] sd: Try READ CAPACITY 16 first for SBC-2 devices Matthew Wilcox
2009-03-14 20:41   ` James Bottomley
2009-03-14 22:48     ` Matthew Wilcox
2009-03-14 23:34       ` James Bottomley
2009-03-14 23:47         ` Matthew Wilcox
2009-03-15  2:36         ` Douglas Gilbert
2009-03-15  3:30           ` James Bottomley

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=yq14oxxksgc.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 \
    --cc=willy@linux.intel.com \
    /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