Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 06 Dec 2010 23:49:09 +0200
From:      Alexander Motin <mav@FreeBSD.org>
To:        Ivan Voras <ivoras@freebsd.org>
Cc:        Bruce Cran <bruce@cran.org.uk>, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r216230 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <4CFD5A55.5030702@FreeBSD.org>
In-Reply-To: <AANLkTinPLsTa=S6pvxG55rK%2B3MBVRmKbha5bSZSN6w6G@mail.gmail.com>
References:  <201012061218.oB6CI3oW032770@svn.freebsd.org> <AANLkTine9rGq_cM4ruFXYq=-F7cMXcQAr-zKHuWoQs2z@mail.gmail.com> <20101206195327.GD1936@garage.freebsd.pl> <201012061518.49835.jhb@freebsd.org> <AANLkTi=Bnkq8sR3j7kq-aKzbk0TEd=kFiyr%2BqeQpzXGc@mail.gmail.com> <20101206211607.GA65110@muon.cran.org.uk> <AANLkTinPLsTa=S6pvxG55rK%2B3MBVRmKbha5bSZSN6w6G@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 06.12.2010 23:22, Ivan Voras wrote:
> On 6 December 2010 22:16, Bruce Cran<bruce@cran.org.uk>  wrote:
>> On Mon, Dec 06, 2010 at 09:31:39PM +0100, Ivan Voras wrote:
>>> For what it's worth, apparently linux has the concept of "physical"
>>> and "logical" sector sizes (possibly in addition to "stripe size"),
>>> with physical being 4096 and logical 512, for example:
>>>
>>> # hdparm -I /dev/sde | grep size
>>> Logical  Sector size:                   512 bytes
>>> Physical Sector size:                  4096 bytes
>>> device size with M = 1024*1024:     1430799 MBytes
>>> device size with M = 1000*1000:     1500301 MBytes (1500 GB)
>>
>> So do we, except they're both the same for Advanced Format drives:
>
> There is a subtle difference here which may be important. We have the
> concepts of "sectorsize" and "stripesize".

It is only question of abstraction. As soon as any our disk device is 
GEOM abstraction - don't see reason why parameters should be specific.

> I think camcontrol actually reports logical and physical sector sizes
> as reported by low-level drivers but currently GEOM names "logical
> sector size" as "sectorsize" and "physical sector size" as
> "stripesize".

`camcontrol identify` directly requests IDENTIFY data and parses them. 
There is nobody between it and the device. To see what GEOM receives 
from the disk driver use diskinfo.

> The term "stripesize" can be overloaded to mean both the item in
> question - 4 KiB physical sector sizes and RAID stripe sizes. I think
> this situation is bad and that the two meanings should be split.

There could be a long list of different "stripesize" sources. It is not 
a task of the partitioning tool or file system to know all of them. As I 
have described in previous email - only size matters.

>> # camcontrol identify /dev/ada1
>> ...
>> device model            WDC WD10EARS-00Z5B1
>> ...
>> sector size             logical 512, physical 512, offset 0
>
> Agreed. Some drives lie.

"Everybody lies". :) If Linux example was taken from page I've seen - it 
was external WD USB storage somehow reporting that physical sector size, 
not the disk itself. I haven't seen proper reporting in any WD drive yet 
(started to think about adding quirk at ada driver). Now waiting for 
Seagate 4K disks reports to check how bad things are.

-- 
Alexander Motin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4CFD5A55.5030702>