[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] Request re-coalescing for qcow disks. qcow driver had the habit of breaking each
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1261031276 0 # Node ID 180d46ac70d3b3572277dc2223d42cbd04dab632 # Parent 51d1fec19ad44a882def905df7559f4be7f91d92 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@xxxxxxxxxx> --- tools/blktap2/drivers/block-qcow.c | 11 +++++++++++ 1 files changed, 11 insertions(+) diff -r 51d1fec19ad4 -r 180d46ac70d3 tools/blktap2/drivers/block-qcow.c --- a/tools/blktap2/drivers/block-qcow.c Thu Dec 17 06:27:56 2009 +0000 +++ b/tools/blktap2/drivers/block-qcow.c Thu Dec 17 06:27:56 2009 +0000 @@ -1035,6 +1035,17 @@ void tdqcow_queue_read(td_driver_t *driv } 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; _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |