direct-io.hg

changeset 15009:3a5722420de7

blktap: Fix qcow max_aio_reqs calculation.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Thu May 03 19:25:47 2007 +0100 (2007-05-03)
parents 623a07dda15c
children 195e3dbba3ca
files tools/blktap/drivers/block-qcow.c
line diff
     1.1 --- a/tools/blktap/drivers/block-qcow.c	Thu May 03 15:39:45 2007 +0100
     1.2 +++ b/tools/blktap/drivers/block-qcow.c	Thu May 03 19:25:47 2007 +0100
     1.3 @@ -199,7 +199,8 @@ static int init_aio_state(struct disk_dr
     1.4  	}
     1.5  
     1.6          /* A segment (i.e. a page) can span multiple clusters */
     1.7 -        s->max_aio_reqs = (getpagesize() / s->cluster_size) + 1;
     1.8 +        s->max_aio_reqs = ((getpagesize() / s->cluster_size) + 1) *
     1.9 +            MAX_SEGMENTS_PER_REQ * MAX_REQUESTS;
    1.10  
    1.11          /* Initialize AIO */
    1.12          s->iocb_free_count = s->max_aio_reqs;