[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] storage: replace the deprecated option of qemu-img.

于 2011年03月09日 20:50, Jiri Denemark 写道:
On Wed, Mar 09, 2011 at 20:27:41 +0800, Osier Yang wrote:
qemu-img silently disable "-e", so we can't use it for volume
encryption anymore, change it into "-o encryption=on".

I'm afraid of it will inroduce compatibility problem for older
qemu without "-o" option, but "-o" option is already used in the
codes, seems it's fine.

* src/storage/storage_backend.c
  src/storage/storage_backend.c |   17 +++++++++++------
  1 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/src/storage/storage_backend.c b/src/storage/storage_backend.c
index 2eede74..c381444 100644
--- a/src/storage/storage_backend.c
+++ b/src/storage/storage_backend.c
@@ -778,7 +778,7 @@ virStorageBackendCreateQemuImg(virConnectPtr conn,
              imgargv[8] = vol->target.path;
              imgargv[9] = size;
              if (vol->target.encryption != NULL)
-                imgargv[10] = "-e";
+                imgargv[10] = "-o encryption=on";

Are you sure qemu-img is able to parse this option and you don't need to
add two args "-o" and "encryption=on" instead of passing it as a single

Changed it, thanks, :-)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]