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:
Keir Fraser committed 2009-12-17 06:27:56 +00:00
1 parent bc51449693
commit 5db8a5259c
1 file changed
+11
+11
View File
@@ -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;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.