Richard W.M. Jones
2018-Sep-12 16:16 UTC
[Libguestfs] [PATCH] lib: Use qemu-img info -U option to avoid locking error.
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] == '/') -- 2.19.0.rc0
Pino Toscano
2018-Sep-21 09:21 UTC
Re: [Libguestfs] [PATCH] lib: Use qemu-img info -U option to avoid locking error.
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
Possibly Parallel Threads
- [PATCH v2] lib: Use qemu-img info -U option to avoid locking error.
- Re: [PATCH v2] lib: Use qemu-img info -U option to avoid locking error.
- [PATCH] lib: Pick up qemu-img path at build time.
- [PATCH v2 0/1] RFC: switch from YAJL to Jansson
- [PATCH v2] lib/info: Remove /dev/fd hacking and pass a true filename to qemu-img info.