mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
Request re-coalescing for qcow disks. qcow driver had the habit of breaking each
(4K) block read into 8 (512 bytes) sector reads. This is inefficient, but also prevents sharing detector from working, as it is based on page-size reads. Signed-off-by: Grzegorz Milos <Grzegorz.Milos@citrix.com>
This commit is contained in:
1 parent
bc51449693
commit
5db8a5259c
1 file changed
+11
@@ -1035,6 +1035,17 @@ void tdqcow_queue_read(td_driver_t *driver, td_request_t treq)
|
||||
}
|
||||
|
||||
if(!cluster_offset) {
|
||||
int i;
|
||||
/* Forward entire request if possible. */
|
||||
for(i=0; i<nb_sectors; i++)
|
||||
if(get_cluster_offset(s, (sector+i) << 9, 0, 0, 0, 0))
|
||||
goto coalesce_failed;
|
||||
treq.buf = buf;
|
||||
treq.sec = sector;
|
||||
treq.secs = nb_sectors;
|
||||
td_forward_request(treq);
|
||||
return;
|
||||
coalesce_failed:
|
||||
treq.buf = buf;
|
||||
treq.sec = sector;
|
||||
treq.secs = n;
|
||||
|
||||