[Libguestfs] [PATCH] lib: Use qemu-img info -U option to avoid locking error.

Pino Toscano ptoscano at redhat.com
Fri Sep 21 09:21:44 UTC 2018


On Wednesday, 12 September 2018 18:16:50 CEST Richard W.M. Jones wrote:
> https://bugs.launchpad.net/qemu/+bug/1740364
> ---
>  lib/info.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/lib/info.c b/lib/info.c
> index 442a9755b..86044855e 100644
> --- a/lib/info.c
> +++ b/lib/info.c
> @@ -149,6 +149,7 @@ get_json_output (guestfs_h *g, const char *filename)
>  
>    guestfs_int_cmd_add_arg (cmd, QEMU_IMG);
>    guestfs_int_cmd_add_arg (cmd, "info");
> +  guestfs_int_cmd_add_arg (cmd, "-U");
>    guestfs_int_cmd_add_arg (cmd, "--output");
>    guestfs_int_cmd_add_arg (cmd, "json");
>    if (filename[0] == '/')

Unfortunately -U does not exist in qemu prior to 2.11, i.e. when the
locking stuff was implemented.

OTOH we already have that information (see qemu_data), although it is
available only during launch.

-- 
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20180921/6febb5cf/attachment.sig>


More information about the Libguestfs mailing list