Skip to contentSkip to conversation

blkback driver I/O request size in Xen 3.3.0

DISCUSSION 韩春晓 1 participant 1 message Apr 15, 2009

lore
Share & tools
lore

韩春晓

author
#0 lore raw

Hi,all

In the vbd blkback driver(linux/drivers/xen/blkback/blkback.c),

when function dispatch_rw_block_io() try to do the real I/O job,

it will do a sanity check on I/O request sent from DomU in the following code fragment:

...

    430         for (i = 0; i < nseg; i++) {
    431                 uint32_t flags;
    432
    433                 seg[i].nsec = req->seg[i].last_sect -
    434                         req->seg[i].first_sect + 1;
    435
    436                 if ((req->seg[i].last_sect >= (PAGE_SIZE >> 9)) ||
    437                     (req->seg[i].last_sect < req->seg[i].first_sect))
    438                         goto fail_response;

...

L436 check whether the number of sectors in a segment of the I/O request exceeds (PAGE_SIZE >> 9), which is 8 in x86, does that means vbd blkback driver would not handle I/O request larger than 4k, I'm a newbie to Xen, so would someone kindly explain the reason behind this, thanks.

Best Regards.

Han