blkif: Clarify units for 'sector'-sized blkif request params.
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 26 May 2009 09:01:54 +0000 (10:01 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 26 May 2009 09:01:54 +0000 (10:01 +0100)
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
xen/include/public/io/blkif.h

index 2380066b8cb53aa8b106fb8bbe2176c644d49a19..3e0c5abae3957dada775027ed288a86f9b709f9e 100644 (file)
  */
 #define BLKIF_MAX_SEGMENTS_PER_REQUEST 11
 
+/* 
+ * NB. first_sect and last_sect in blkif_request_segment, as well as
+ * sector_number in blkif_request, are always expressed in 512-byte units.
+ * However they must be properly aligned to the real sector size of the
+ * physical disk, which is reported in the "sector-size" node in the backend
+ * xenbus info. Also the xenbus "sectors" node is expressed in 512-byte units.
+ */
 struct blkif_request_segment {
     grant_ref_t gref;        /* reference to I/O buffer frame        */
     /* @first_sect: first sector in frame to transfer (inclusive).   */