From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Stabellini Subject: Re: [PATCH 1 of 2] blkfront: sector size > 512 Date: Fri, 22 May 2009 15:55:31 +0100 Message-ID: <4A16BCE3.5080700@eu.citrix.com> References: <4A16B740.90809@eu.citrix.com> <20090522143610.GW10166@const.famille.thibault.fr> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20090522143610.GW10166@const.famille.thibault.fr> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Samuel Thibault , Stefano Stabellini , Keir Fraser , xen-devel List-Id: xen-devel@lists.xenproject.org Samuel Thibault wrote: > Stefano Stabellini, le Fri 22 May 2009 15:31:28 +0100, a =C3=A9crit : >> Keir Fraser wrote: >>> Yeah, I'd take a patch to add a nice clear comment about this to blki= f.h. >>> ;-) >> Is this comment clear enough? >=20 > Could you also document whether the 'sectors' node in the xenstore is > expressed in sector size or in 512 sectors? OK. --- diff -r 61404d971c92 xen/include/public/io/blkif.h --- a/xen/include/public/io/blkif.h Thu May 21 04:31:47 2009 +0100 +++ b/xen/include/public/io/blkif.h Fri May 22 15:54:29 2009 +0100 @@ -84,6 +84,14 @@ */ #define BLKIF_MAX_SEGMENTS_PER_REQUEST 11 =20 +/*=20 + * first_sect and last_sect in blkif_request_segment, as well as + * sector_number in blkif_request are all expressed in 512 bytes units, + * however they must be properly aligned to the real sector size of + * the physical disk, that is reported in the "sector-size" node in + * backend xenbus info. + * Also the "sectors" node on xenbus is expressed in 512 bytes units. + */ struct blkif_request_segment { grant_ref_t gref; /* reference to I/O buffer frame */ /* @first_sect: first sector in frame to transfer (inclusive). */