From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: bug when using 4K sectors? Date: Wed, 5 Sep 2012 16:29:27 -0400 Message-ID: <20120905202927.GD27814@phenom.dumpdata.com> References: <6035A0D088A63A46850C3988ED045A4B299F74F8@BITCOM1.int.sbss.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <6035A0D088A63A46850C3988ED045A4B299F74F8@BITCOM1.int.sbss.com.au> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: James Harper Cc: "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Mon, Aug 13, 2012 at 02:12:58PM +0000, James Harper wrote: > I notice this code in drivers/block/xen-blkback/common.h > > #define vbd_sz(_v) ((_v)->bdev->bd_part ? \ > (_v)->bdev->bd_part->nr_sects : \ > get_capacity((_v)->bdev->bd_disk)) > > is the value returned by vbd_sz(_v) the number of sectors in the Linux device (eg size / 4096), or the number of 512 byte sectors? I suspect the former which is causing block requests beyond 1/8th the size of the device to fail (assuming 4K sectors are expected to work at all - I can't quite get my head around how it would be expected to work - does Linux do the read-modify-write if required?) I think you need to instrument it to be sure.. But more interesting, do you actually have a disk that exposes a 4KB hardware and logical sector? So far I've only found SSDs that expose a 512kB logical sector but also expose the 4KB hardware. Never could figure out how that is all suppose to work as the blkback is filled with << 9 on a bunch of things. > > I can't test until tomorrow AEDT, but maybe someone here knows the answer already? > > James > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel