Re: Detection of Advanced Format drives

From: Martin K. Petersen
Date: Tue Sep 27 2011 - 15:01:33 EST


>>>>> "Arun" == Arun <engineerarun@xxxxxxxxx> writes:

Arun> Should I suppose that it is an already available piece of
Arun> information to the userland?

Yes, in the sysfs locations Mike mentioned:

/sys/block/foo/queue/physical_block_size

Or you can use the BLKPBSZGET ioctl.


Arun> Or do I need to modify the hdparm/fdisk code to get this piece of
Arun> info?

Recent hdparm versions will also report the right thing:

# hdparm -I /dev/sdc | grep Sector
Logical Sector size: 512 bytes
Physical Sector size: 4096 bytes
Logical Sector-0 offset: 512 bytes

--
Martin K. Petersen Oracle Linux Engineering
--
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/