public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Matthew Wilcox <willy@linux.intel.com>
Cc: 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 16:29:36 -0500	[thread overview]
Message-ID: <1236979776.31764.2.camel@localhost.localdomain> (raw)
In-Reply-To: <1236882030-27964-2-git-send-email-willy@linux.intel.com>

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

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

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

James



  parent reply	other threads:[~2009-03-13 21:29 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 [this message]
2009-03-13 21:45     ` Martin K. Petersen
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=1236979776.31764.2.camel@localhost.localdomain \
    --to=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