All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <matthew@wil.cx>
To: linux-scsi@vger.kernel.org
Subject: Re: sd: Refactor sd_read_capacity()
Date: Tue, 23 Dec 2008 09:59:00 -0700	[thread overview]
Message-ID: <20081223165900.GC19967@parisc-linux.org> (raw)
In-Reply-To: <20081223164509.GA19967@parisc-linux.org>

On Tue, Dec 23, 2008 at 09:45:10AM -0700, Matthew Wilcox wrote:
> The sd_read_capacity() function was about 180 lines long and
> included a backwards goto and a tricky state variable.  Splitting out
> read_capacity_10() and read_capacity_16() (about 50 lines each) reduces
> sd_read_capacity to about 100 lines and gets rid of the backwards goto
> and the state variable.  I've tried to avoid any behaviour change with
> this patch.

I should have probably said what testing I've done (with both patches
applied, not just this one).

I've tried numerous <= SCSI-2 devices -- USB keys, older SCSI drives ...
even newer SCSI drives still seem to claim SCSI-2 compliance.  Almost
all my equipment claims ANSI rev 2.

I've tried a few libata devices (which claim ANSI rev 5).  I've tried a
WD My Book (attached via firewire) which claims ANSI rev 4.  I've also
tried an HP fibre channel array which claims ANSI rev 3.

I can't claim to have exercised all the error paths here.  

-- 
Matthew Wilcox				Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."

      reply	other threads:[~2008-12-23 16:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-23 16:45 sd: Refactor sd_read_capacity() Matthew Wilcox
2008-12-23 16:59 ` Matthew Wilcox [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=20081223165900.GC19967@parisc-linux.org \
    --to=matthew@wil.cx \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.