[Pkg-libvirt-commits] [libguestfs] 118/179: v2v: vcenter: Hoist readahead configurables to top of file.

Hilko Bengen bengen at moszumanska.debian.org
Fri Oct 31 19:08:45 UTC 2014


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to branch experimental
in repository libguestfs.

commit 496d0c45bc5e8c361d2cccb20b0f3a64443b05ab
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Mon Oct 20 21:48:08 2014 +0100

    v2v: vcenter: Hoist readahead configurables to top of file.
    
    No change, just code motion.
---
 v2v/input_libvirt_vcenter_https.ml | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/v2v/input_libvirt_vcenter_https.ml b/v2v/input_libvirt_vcenter_https.ml
index 5d98a86..71c2edd 100644
--- a/v2v/input_libvirt_vcenter_https.ml
+++ b/v2v/input_libvirt_vcenter_https.ml
@@ -28,6 +28,10 @@ open Input_libvirt_other
 
 open Printf
 
+(* See RHBZ#1151033 and RHBZ#1153589. *)
+let readahead_for_conversion = None
+let readahead_for_copying = Some (64 * 1024 * 1024)
+
 (* Return the session cookie.  It is memoized, so you can call this
  * as often as required.
  *)
@@ -244,7 +248,9 @@ object
 
     let disks = List.map (
       fun ({ s_qemu_uri = path } as disk) ->
-        let qemu_uri = map_source_to_uri verbose parsed_uri scheme server path in
+        let readahead = readahead_for_conversion in
+        let qemu_uri = map_source_to_uri ?readahead
+	  verbose parsed_uri scheme server path in
 
         (* The libvirt ESX driver doesn't normally specify a format, but
          * the format of the -flat file is *always* raw, so force it here.
@@ -260,7 +266,8 @@ object
       try Hashtbl.find saved_source_paths overlay.ov_source.s_disk_id
       with Not_found -> failwith "internal error in adjust_overlay_parameters" in
     let backing_qemu_uri =
-      map_source_to_uri ~readahead:(64 * 1024 * 1024)
+      let readahead = readahead_for_copying in
+      map_source_to_uri ?readahead
         verbose parsed_uri scheme server orig_path in
 
     (* Rebase the qcow2 overlay to adjust the readahead parameter. *)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list