WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] first_sect & last_sect in blkif_request_segment

To: James Harper <james.harper@xxxxxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] first_sect & last_sect in blkif_request_segment
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Mon, 29 Oct 2007 11:41:07 +0000
Delivery-date: Mon, 29 Oct 2007 04:42:46 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <AEC6C66638C05B468B556EA548C1A77D01249D12@trantor>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcgaHtMyxHJRbt8PSqiOYRLI8s/IYwAAcS2B
Thread-topic: [Xen-devel] first_sect & last_sect in blkif_request_segment
User-agent: Microsoft-Entourage/11.3.6.070618
On 29/10/07 11:28, "James Harper" <james.harper@xxxxxxxxxxxxxxxx> wrote:

> Am I right in saying that first_sect & last_sect in
> blkif_request_segment are the relative sector numbers in the transfer?
> 
> So if I wanted to transfer 9 sectors starting at 100, the resultant
> contents of the request would look like:
> 
> req->sector_number = 100
> req->seg[0].first_sect = 0
> req->seg[0].last_sect = 3
> req->seg[1].first_sect = 4
> req->seg[1].last_sect = 7
> req->seg[2].first_sect = 8
> req->seg[2].last_sect = 8

They are basically offsets into the per-segment page. So the allowable range
of first_sect and last_sect is 0..7 inclusive (8 512-byte sectors fit in a
4kB page), and also last_sect must be >= first_sect. They define a sub-range
of the page that is accessed by the I/O.

 -- Keir



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>