mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
blktap: Fix qcow max_aio_reqs calculation.
Signed-off-by: Keir Fraser <keir@xensource.com>
This commit is contained in:
1 parent
9d604d2ead
commit
5ea167dcd7
1 file changed
+2
-1
@@ -199,7 +199,8 @@ static int init_aio_state(struct disk_driver *dd)
|
||||
}
|
||||
|
||||
/* A segment (i.e. a page) can span multiple clusters */
|
||||
s->max_aio_reqs = (getpagesize() / s->cluster_size) + 1;
|
||||
s->max_aio_reqs = ((getpagesize() / s->cluster_size) + 1) *
|
||||
MAX_SEGMENTS_PER_REQ * MAX_REQUESTS;
|
||||
|
||||
/* Initialize AIO */
|
||||
s->iocb_free_count = s->max_aio_reqs;
|
||||
|
||||