From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753092Ab1I0TBa (ORCPT ); Tue, 27 Sep 2011 15:01:30 -0400 Received: from acsinet15.oracle.com ([141.146.126.227]:30141 "EHLO acsinet15.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751833Ab1I0TB3 (ORCPT ); Tue, 27 Sep 2011 15:01:29 -0400 To: Arun Cc: Joshua Scoggins , Mike Snitzer , Alan Cox , linux-kernel@vger.kernel.org Subject: Re: Detection of Advanced Format drives From: "Martin K. Petersen" Organization: Oracle References: <20110926111522.2a053ceb@lxorguk.ukuu.org.uk> Date: Tue, 27 Sep 2011 14:59:18 -0400 In-Reply-To: (Arun's message of "Wed, 28 Sep 2011 00:06:16 +0530") Message-ID: User-Agent: Gnus/5.110017 (No Gnus v0.17) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Source-IP: rtcsinet21.oracle.com [66.248.204.29] X-CT-RefId: str=0001.0A090201.4E821D80.008D,ss=1,re=0.000,fgs=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>>>> "Arun" == Arun 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