Re: tools support for non-512 byte sector sizes

From: Matt Domsch
Date: Wed Jul 30 2008 - 13:29:37 EST


On Wed, Jul 30, 2008 at 07:16:49PM +0200, Jim Meyering wrote:
> Matt Domsch <Matt_Domsch@xxxxxxxx> wrote:
> > On Tue, Jul 29, 2008 at 02:48:31PM -0400, Martin K. Petersen wrote:
> ...
> >> Just yesterday I received a couple of prototype drives in the mail.
> >> I'll ask the vendor whether they support 4KB and if so I'll give them
> >> a whirl.
> >
> > I have access to disks with native 4KB sectors now too. Would
>
> Do they expose that sector size?
> I.e., does ioctl(fd,BLKSSZGET,&ss) set ss to 4096?

yes.

> I'm interested because I'm preparing GNU Parted's partition table
> manipulation code (not its FS code) for just that.
> In particular, now I've heard two stories:
>
> - disk makers will eventually sell drives with >512-byte sectors

yes

> - some disk makers have sort of agreed not to do that, and
> expect forever to hide the larger underlying sector size
> behind a virtual 512 (of course, this imposes alignment
> restrictions, but that's a smaller problem)

yes, this is happening also.

There will be 3 types of disks eventually:
1) those that report a 512-byte sector size, and are really a 512-byte
size. This is nearly all disks today.

2) those that report a 512-byte sector size, but are really a
4096-byte size, and the drive does the conversions and
read/modify/write. T10 and T13 are looking to add commands to
expose this different underlying physical sector size so the OS
could be aware of it. This is primarily being driven to mitigate
any problems that may happen with "legacy" OSs that are not aware
of the difference.

3) those that report a 4096-byte sector size, and are really a
4096-byte size. This seems ideal for aware OSs.

Which of 2) or 3) hit the market in mass remains to be seen. I want
Linux to be able to handle either painlessly.


--
Matt Domsch
Linux Technology Strategist, Dell Office of the CTO
linux.dell.com & www.dell.com/linux
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/