[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.