From: Matthew Wilcox <matthew@wil.cx>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Jeff Garzik <jgarzik@pobox.com>,
linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org,
Matt_Domsch@dell.com, Matthew Wilcox <willy@linux.intel.com>
Subject: Re: [PATCH] ata: Add support for Long Logical Sectors and Long Physical Sectors
Date: Mon, 18 Aug 2008 12:42:46 -0600 [thread overview]
Message-ID: <20080818184246.GH677@parisc-linux.org> (raw)
In-Reply-To: <20080818190629.22fd618c@lxorguk.ukuu.org.uk>
On Mon, Aug 18, 2008 at 07:06:29PM +0100, Alan Cox wrote:
> > + static const char command_sect_size[256] = {
> > + [ ATA_CMD_CFA_TRANSLATE_SECTOR ] = DEVICE,
>
> Should be a bit array so we can do a single fast test_bit()
>
> > + if (size == UNKNOWN && printk_ratelimit())
> > + printk("Unknown ata cmd %d, assuming 512 byte sector size\n",
> > + command);
>
> or two bits ;)
;-) How about two 256-bit arrays?
The first is set for "Use device sector size", the second is set for
"Yes, we know about this command, don't warn". The most common commands
(reads and writes) will hit the first test and never try the second test.
> Rest looks ok. I'll probably send a follow up patch to make most pata
> drivers return "no" to anything but 512 until we can test them with real
> devices.
Why do we need to do that? Leaving sector_size_supported() unset means
exactly "no to anything but 512". I'll be quite surprised if we see
PATA drives supporting 4096 or 520 byte sectors anyway. It seems like
a premium feature.
--
Intel are signing my paycheques ... these opinions are still mine
"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."
next prev parent reply other threads:[~2008-08-18 18:42 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-05 17:26 LibATA support for long sectors Matthew Wilcox
2008-08-05 17:26 ` [PATCH] ata: Define new commands from ATA8 Matthew Wilcox
2008-08-05 20:10 ` Greg Freemyer
2008-08-05 17:26 ` [PATCH] ata: Add support for Long Logical Sectors and Long Physical Sectors Matthew Wilcox
2008-08-05 20:46 ` Alan Cox
2008-08-06 2:22 ` Matthew Wilcox
2008-08-06 9:06 ` Alan Cox
2008-08-06 13:11 ` Matthew Wilcox
2008-08-06 14:13 ` Alan Cox
2008-08-06 15:13 ` Matthew Wilcox
2008-08-06 15:06 ` Alan Cox
2008-08-17 23:19 ` Jeff Garzik
2008-08-18 18:15 ` Matthew Wilcox
2008-08-18 18:06 ` Alan Cox
2008-08-18 18:42 ` Matthew Wilcox [this message]
2008-08-18 18:49 ` Alan Cox
2008-08-18 19:04 ` Matthew Wilcox
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=20080818184246.GH677@parisc-linux.org \
--to=matthew@wil.cx \
--cc=Matt_Domsch@dell.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).