|
|
e76f14 |
From 3064454f1a56589e47907e9c7a2742643e9fde91 Mon Sep 17 00:00:00 2001
|
|
|
e76f14 |
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
|
e76f14 |
Date: Thu, 23 Jun 2016 13:11:45 +0100
|
|
|
e76f14 |
Subject: [PATCH] v2v: Move calculation of overlay directory to common code.
|
|
|
e76f14 |
|
|
|
e76f14 |
There is a tiny functional change in this patch, since overlay_dir is
|
|
|
e76f14 |
now always evaluated once (eg. even in --inplace mode), whereas
|
|
|
e76f14 |
previously it was evaluated twice but only in copying mode.
|
|
|
e76f14 |
|
|
|
e76f14 |
(cherry picked from commit a7fb3d601ab2ae3cdf2074d4c47afe59f00eea6d)
|
|
|
e76f14 |
---
|
|
|
e76f14 |
v2v/v2v.ml | 4 ++--
|
|
|
e76f14 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
e76f14 |
|
|
|
e76f14 |
diff --git a/v2v/v2v.ml b/v2v/v2v.ml
|
|
|
e76f14 |
index f2f1cff..ebbfa68 100644
|
|
|
e76f14 |
--- a/v2v/v2v.ml
|
|
|
e76f14 |
+++ b/v2v/v2v.ml
|
|
|
e76f14 |
@@ -201,10 +201,11 @@ and amend_source cmdline source =
|
|
|
e76f14 |
|
|
|
e76f14 |
{ source with s_nics = nics }
|
|
|
e76f14 |
|
|
|
e76f14 |
+and overlay_dir = (open_guestfs ())#get_cachedir ()
|
|
|
e76f14 |
+
|
|
|
e76f14 |
(* Create a qcow2 v3 overlay to protect the source image(s). *)
|
|
|
e76f14 |
and create_overlays src_disks =
|
|
|
e76f14 |
message (f_"Creating an overlay to protect the source from being modified");
|
|
|
e76f14 |
- let overlay_dir = (open_guestfs ())#get_cachedir () in
|
|
|
e76f14 |
List.mapi (
|
|
|
e76f14 |
fun i ({ s_qemu_uri = qemu_uri; s_format = format } as source) ->
|
|
|
e76f14 |
let overlay_file =
|
|
|
e76f14 |
@@ -720,7 +721,6 @@ and actual_target_size target =
|
|
|
e76f14 |
|
|
|
e76f14 |
(* Save overlays if --debug-overlays option was used. *)
|
|
|
e76f14 |
and preserve_overlays overlays src_name =
|
|
|
e76f14 |
- let overlay_dir = (open_guestfs ())#get_cachedir () in
|
|
|
e76f14 |
List.iter (
|
|
|
e76f14 |
fun ov ->
|
|
|
e76f14 |
let saved_filename =
|
|
|
e76f14 |
--
|
|
|
e76f14 |
1.8.3.1
|
|
|
e76f14 |
|