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

Displaying 20 results from an estimated 800 matches similar to: "[PATCH v2] lib: Use qemu-img info -U option to avoid locking error."

2018 Oct 02
0
Re: [PATCH v2] lib: Use qemu-img info -U option to avoid locking error.
+1 LGTM. Thanks Richard. On Fri, Sep 21, 2018 at 12:53 PM Richard W.M. Jones <rjones@redhat.com> wrote: > https://bugs.launchpad.net/qemu/+bug/1740364 > --- > lib/guestfs-internal.h | 3 +++ > lib/handle.c | 2 ++ > lib/info.c | 39 +++++++++++++++++++++++++++++++++++++++ > 3 files changed, 44 insertions(+) > > diff --git
2018 Oct 04
2
Re: [PATCH v2] lib: Use qemu-img info -U option to avoid locking error.
On Wed, Sep 26, 2018 at 06:36:47PM +0200, Pino Toscano wrote: > On Friday, 21 September 2018 11:53:52 CEST Richard W.M. Jones wrote: > > +/** > > + * Test if the qemu-img info command supports the C<-U> option to > > + * disable locking. The result is memoized in the handle. > > + * > > + * Note this option was added in qemu 2.11. We can remove this test
2018 Oct 04
1
Re: [PATCH v2] lib: Use qemu-img info -U option to avoid locking error.
On Thursday, 4 October 2018 14:50:07 CEST Richard W.M. Jones wrote: > On Thu, Oct 04, 2018 at 01:34:59PM +0100, Richard W.M. Jones wrote: > > On Wed, Sep 26, 2018 at 06:36:47PM +0200, Pino Toscano wrote: > > > On Friday, 21 September 2018 11:53:52 CEST Richard W.M. Jones wrote: > > > > +/** > > > > + * Test if the qemu-img info command supports the
2017 Sep 12
8
[PATCH v3 0/6] launch: direct: Disable qemu locking when opening drives readonly.
v2 -> v3: - I addressed everything that Pino mentioned last time. - It's tricky to get a stable run when multiple copies of qemu are involved, because the same cache files get overwritten by parallel libguestfs. So I changed the names of the cache files to include the qemu binary key (size, mtime), which removes this conflict. This is in new patch 4/6. Rich.
2017 Sep 11
4
[PATCH 0/4] lib: qemu: Add test for mandatory locking.
The patch I posted last week to disable mandatory locking for readonly drives (https://www.redhat.com/archives/libguestfs/2017-September/msg00013.html) was wrong in a couple of respects. Firstly it didn't work, which I didn't detect because my tests were testing the wrong thing. Oops. Secondly it used a simple version number check to detect qemu binaries implementing mandatory locking.
2017 Sep 12
9
[PATCH v2 0/5] launch: direct: Disable qemu locking when opening drives readonly (RHBZ#1417306)
Patches 1-4 are almost the same as they are when previously posted here: https://www.redhat.com/archives/libguestfs/2017-September/msg00039.html Patch 5 actually uses the mandatory locking test to turn off locking in the narrow case where a drive is opened readonly, and then only for the drive being inspected. Passes ordinary tests (‘check-direct’ and ‘check-valgrind-direct’). Rich.
2016 May 18
2
[PATCH v2 0/2] lib: qemu: Memoize qemu feature detection.
v1 -> v2: - Rebase on top of Pino's version work. Two patches went upstream, these are the two remaining patches. Note the generation number is still inside the qemu.stat file. We could put it in the filename, I have no particular preference. Rich.
2016 May 12
7
[PATCH 0/4] lib: qemu: Memoize qemu feature detection.
Doing qemu feature detection in the direct backend takes ~100ms because we need to run `qemu -help' and `qemu -devices ?', and each of those interacts with glibc's very slow link loader. Fixing the link loader is really hard. Instead memoize the output of those two commands. This patch series first separates all the code dealing with qemu into a separate module (src/qemu.c) and
2018 Sep 12
1
[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"); +
2016 May 25
4
[PATCH 0/4] qemu: Use sqlite to store qemu detection data.
Patches 1 & 2 were posted previously here: https://www.redhat.com/archives/libguestfs/2016-May/msg00134.html Patch 3 is a hack so I can test this using my own version of qemu (the `-L ?' stuff is not upstream). Patch 4 is where the real action takes place: Replace the caching of qemu features in blob-like files with a sqlite database. Probably the best way to approach this patch is to
2016 May 18
2
[PATCH v2 0/2] Use -bios bios-fast.bin where supported.
This commit uses -bios bios-fast.bin if available, which basically stops SeaBIOS from trying to do PCI probing during boot, which is a waste of time when using the -kernel option. v1 -> v2: - Rebase on top of Pino's work. This still has 3 dependencies: - The qemu memoization work (v2). - Support for '-L ?' in qemu:
2018 Sep 26
0
Re: [PATCH v2] lib: Use qemu-img info -U option to avoid locking error.
On Friday, 21 September 2018 11:53:52 CEST Richard W.M. Jones wrote: > +/** > + * Test if the qemu-img info command supports the C<-U> option to > + * disable locking. The result is memoized in the handle. > + * > + * Note this option was added in qemu 2.11. We can remove this test > + * when we can assume everyone is using qemu >= 2.11. > + */ > +static int >
2018 Oct 04
0
Re: [PATCH v2] lib: Use qemu-img info -U option to avoid locking error.
On Thu, Oct 04, 2018 at 01:34:59PM +0100, Richard W.M. Jones wrote: > On Wed, Sep 26, 2018 at 06:36:47PM +0200, Pino Toscano wrote: > > On Friday, 21 September 2018 11:53:52 CEST Richard W.M. Jones wrote: > > > +/** > > > + * Test if the qemu-img info command supports the C<-U> option to > > > + * disable locking. The result is memoized in the handle.
2016 May 17
2
[PATCH 0/2] Use -bios bios-fast.bin where supported.
NOTE: Not for upstream, yet. This depends on 3 non-upstream patches. - The qemu rework in libguestfs, which in turn depends on what Pino is up to. - Support for '-L ?' in qemu: https://lists.gnu.org/archive/html/qemu-devel/2016-05/threads.html#02596 - Support for bios-fast.bin in qemu: https://lists.gnu.org/archive/html/qemu-devel/2016-05/threads.html#02408 This commit
2017 Sep 12
0
[PATCH v2 2/5] lib: qemu: Factor out common code for reading and writing cache files.
The previous code duplicated a lot of common code for reading and writing the cache file per data field. This change simply factors out that common code. This makes it simpler to add new tests in future. This is just refactoring, it should have no effect. --- lib/qemu.c | 375 +++++++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 238 insertions(+), 137 deletions(-)
2018 Feb 12
2
[PATCH v2 0/1] RFC: switch from YAJL to Jansson
Hi, recently, there was a discussion in the development list of libvirt on switching to a different JSON library than YAJL [1]. Since we use YAJL, and the points there IMHO apply to libguestfs as well, I decided to give a try in switching to Jansson [2]. The result IMHO is nice, with the additional APIs of Jansson that simplify some of our code. Unlike with YAJL, I did not set a minimum
2017 Dec 15
2
[PATCH v2] lib/info: Remove /dev/fd hacking and pass a true filename
v1 posted here: https://www.redhat.com/archives/libguestfs/2017-December/msg00050.html v2 fixes the tests by rewriting relative paths as ./filename (so that filenames like "file:foo" work).
2017 Dec 15
0
[PATCH v2] lib/info: Remove /dev/fd hacking and pass a true filename to qemu-img info.
It obscures what's really going on and is no longer necessary for the original purpose. This reverts commit d50cb7bbb4cc18f69ea1425e9f5cee9685825f95. See also: https://www.redhat.com/archives/libguestfs/2017-November/thread.html#00226 https://www.redhat.com/archives/libguestfs/2017-December/thread.html#00044 --- lib/info.c | 34 ++++++++-------------------------- 1 file changed, 8
2016 May 12
0
[PATCH 4/4] lib: qemu: Memoize qemu feature detection.
qemu feature detection takes about 95ms on my laptop. The overhead is almost all due to the time taken by the glibc link loader opening the 170+ libraries that qemu is linked to (×2 because we need to run qemu twice). Fixing that is seriously hard work. Therefore memoize the results of guestfs_int_test_qemu. This is keyed on the size and mtime of the qemu binary, so if the user changes the
2016 Jan 09
0
[PATCH] build: Require qemu >= 1.3.0 and yajl.
Require qemu >= 1.3.0, the first version that supported `qemu-img --output=json'. This means we require yajl (for parsing the JSON output of qemu-img), and that in turn has consequences elsewhere. --- README | 10 +- builder/Makefile.am | 2 - builder/sources.ml | 9 +- builder/yajl-c.c | 30 ----- builder/yajl.ml | 2 - builder/yajl.mli