search for: guestfs_int_drive_source_qemu_param

Displaying 20 results from an estimated 26 matches for "guestfs_int_drive_source_qemu_param".

2018 Feb 15
1
[PATCH] lib: qemu: help GCC 8 by break'ing a case in a switch
...ive_protocol_gluster may fall through, most probably because the only code is a switch case that handles the elements of an enum, and thus letting other fall through. In reality this ought to not happen at all, so help GCC by break'ing the case, which will then lead to the abort() at the end of guestfs_int_drive_source_qemu_param. --- lib/qemu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/qemu.c b/lib/qemu.c index cd859139d..a50eca988 100644 --- a/lib/qemu.c +++ b/lib/qemu.c @@ -746,6 +746,7 @@ guestfs_int_drive_source_qemu_param (guestfs_h *g, return make_uri (g, "gluster+unix", NULL, NULL,...
2017 Sep 05
4
[PATCH] lib: direct: Disable qemu locking when opening drives
Incomplete fix for https://bugzilla.redhat.com/show_bug.cgi?id=1417306 The full fix is waiting for a libvirt change, but this can still go upstream. Rich.
2017 Sep 05
1
Re: [PATCH] lib: direct: Disable qemu locking when opening drives readonly.
...1 deletion(-) > > diff --git a/lib/launch-direct.c b/lib/launch-direct.c > index 3b848165c..e5465539d 100644 > --- a/lib/launch-direct.c > +++ b/lib/launch-direct.c > @@ -221,8 +221,11 @@ add_drive_standard_params (guestfs_h *g, struct backend_direct_data *data, > file = guestfs_int_drive_source_qemu_param (g, &drv->src); > append_list_format ("file=%s", file); > > - if (drv->readonly) > + if (drv->readonly) { > append_list ("snapshot=on"); > + if (guestfs_int_version_ge (&data->qemu_version, 2, 10, 0)) > + a...
2016 May 17
0
[PATCH 1/2] src: start unifying version handling
...+#define version_init_null(v) guestfs_int_version_from_values (v, 0, 0, 0) + /* handle.c */ extern int guestfs_int_get_backend_setting_bool (guestfs_h *g, const char *name); @@ -903,7 +915,7 @@ extern void guestfs_int_cleanup_cmd_close (struct command **); /* launch-direct.c */ extern char *guestfs_int_drive_source_qemu_param (guestfs_h *g, const struct drive_source *src); -extern bool guestfs_int_discard_possible (guestfs_h *g, struct drive *drv, unsigned long qemu_version); +extern bool guestfs_int_discard_possible (guestfs_h *g, struct drive *drv, const struct version *qemu_version); extern char *guestfs_int_qemu_es...
2017 Sep 05
0
[PATCH] lib: direct: Disable qemu locking when opening drives readonly.
...- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/launch-direct.c b/lib/launch-direct.c index 3b848165c..e5465539d 100644 --- a/lib/launch-direct.c +++ b/lib/launch-direct.c @@ -221,8 +221,11 @@ add_drive_standard_params (guestfs_h *g, struct backend_direct_data *data, file = guestfs_int_drive_source_qemu_param (g, &drv->src); append_list_format ("file=%s", file); - if (drv->readonly) + if (drv->readonly) { append_list ("snapshot=on"); + if (guestfs_int_version_ge (&data->qemu_version, 2, 10, 0)) + append_list ("locking=off"...
2017 Sep 12
0
Re: [PATCH] lib: direct: Disable qemu locking when opening drives readonly.
...diff --git a/lib/launch-direct.c b/lib/launch-direct.c > > index 3b848165c..e5465539d 100644 > > --- a/lib/launch-direct.c > > +++ b/lib/launch-direct.c > > @@ -221,8 +221,11 @@ add_drive_standard_params (guestfs_h *g, struct backend_direct_data *data, > > file = guestfs_int_drive_source_qemu_param (g, &drv->src); > > append_list_format ("file=%s", file); > > > > - if (drv->readonly) > > + if (drv->readonly) { > > append_list ("snapshot=on"); > > + if (guestfs_int_version_ge (&data->qemu_versi...
2017 Sep 12
0
[PATCH v2 4/5] lib: qemu: Add accessor to test if qemu does mandatory locking.
..._int_qemu_supports (guestfs_h *g, const struct qemu_data *, const char *option); extern int guestfs_int_qemu_supports_device (guestfs_h *g, const struct qemu_data *, const char *device_name); +extern int guestfs_int_qemu_mandatory_locking (guestfs_h *g, const struct qemu_data *data); extern char *guestfs_int_drive_source_qemu_param (guestfs_h *g, const struct drive_source *src); extern bool guestfs_int_discard_possible (guestfs_h *g, struct drive *drv, const struct version *qemu_version); extern char *guestfs_int_qemu_escape_param (guestfs_h *g, const char *param); diff --git a/lib/qemu.c b/lib/qemu.c index 34775041f..32f93...
2015 Dec 01
2
[PATCH 1/2] launch: direct: manually compose iscsi:// URIs
...percent-encoded by libxml. --- src/launch-direct.c | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/src/launch-direct.c b/src/launch-direct.c index 559a032..a26b9c4 100644 --- a/src/launch-direct.c +++ b/src/launch-direct.c @@ -1274,9 +1274,34 @@ guestfs_int_drive_source_qemu_param (guestfs_h *g, const struct drive_source *sr return make_uri (g, "https", src->username, src->secret, &src->servers[0], src->u.exportname); - case drive_protocol_iscsi: - return make_uri (g, "iscsi", NULL, NULL, -...
2016 Aug 02
0
[PATCH] launch: libvirt: Autodetect backing format for drive overlays (RHBZ#1354335).
...== -1) { free (overlay); @@ -196,13 +240,18 @@ create_cow_overlay_libvirt (guestfs_h *g, void *datav, struct drive *drv) struct backend_libvirt_data *data = datav; #endif CLEANUP_FREE char *backing_drive = NULL; + CLEANUP_FREE char *format = NULL; char *overlay; backing_drive = guestfs_int_drive_source_qemu_param (g, &drv->src); if (!backing_drive) return NULL; - overlay = make_qcow2_overlay (g, backing_drive, drv->src.format); + format = get_source_format_or_autodetect (g, drv); + if (!format) + return NULL; + + overlay = make_qcow2_overlay (g, backing_drive, format); if (!ove...
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.
2018 Aug 09
0
Using SPDK as QEMU's rootfs disk && A patch for libguestfs to support SPDK
...port SPDK driver protocol yet; try setting LIBGUESTFS_BACKEND=direct")); + return -1; } if (construct_libvirt_xml_disk_target (g, xo, drv_index) == -1) diff --git a/lib/qemu.c b/lib/qemu.c index 887e31b..a77ea87 100644 --- a/lib/qemu.c +++ b/lib/qemu.c @@ -942,6 +942,8 @@ guestfs_int_drive_source_qemu_param (guestfs_h *g, case drive_protocol_tftp: return make_uri (g, "tftp", src->username, src->secret, &src->servers[0], src->u.exportname); + case drive_protocol_spdk: + return safe_strdup(g, src->servers[0].u.socket); } abort (); @@...
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 13
1
[PATCH] lib: direct: Query qemu binary for availability of KVM (RHBZ#1605071).
...int guestfs_int_qemu_supports_device (guestfs_h *g, const struct qemu_data *, const char *device_name); extern int guestfs_int_qemu_mandatory_locking (guestfs_h *g, const struct qemu_data *data); +extern bool guestfs_int_platform_has_kvm (guestfs_h *g, const struct qemu_data *data); extern char *guestfs_int_drive_source_qemu_param (guestfs_h *g, const struct drive_source *src); extern bool guestfs_int_discard_possible (guestfs_h *g, struct drive *drv, const struct version *qemu_version); extern char *guestfs_int_qemu_escape_param (guestfs_h *g, const char *param); diff --git a/lib/launch-direct.c b/lib/launch-direct.c inde...
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
2017 Apr 19
2
[PATCH] lib: direct: Remove support for virtio-blk as the default.
...*g, const struct qemu_data *, const char *option); extern int guestfs_int_qemu_supports_device (guestfs_h *g, const struct qemu_data *, const char *device_name); -extern int guestfs_int_qemu_supports_virtio_scsi (guestfs_h *g, struct qemu_data *, const struct version *qemu_version); extern char *guestfs_int_drive_source_qemu_param (guestfs_h *g, const struct drive_source *src); extern bool guestfs_int_discard_possible (guestfs_h *g, struct drive *drv, const struct version *qemu_version); extern char *guestfs_int_qemu_escape_param (guestfs_h *g, const char *param); diff --git a/lib/launch-direct.c b/lib/launch-direct.c inde...
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
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 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 17
3
[PATCH 0/2] src: introduce an helper version struct
Hi, this adds an helper version struct, and uses it in the backends (for the libvirt and qemu versions) and inspection code. This also moves common code to that, so it is not repeated in many places. This should help with the small refactoring proposed with https://www.redhat.com/archives/libguestfs/2016-May/msg00070.html Thanks, Pino Toscano (2): src: start unifying version handling
2016 May 18
3
[PATCH v2 0/2] src: introduce an helper version struct
Hi, this adds an helper version struct, and uses it in the backends (for the libvirt and qemu versions) and inspection code. This also moves common code to that, so it is not repeated in many places. This should help with the small refactoring proposed with https://www.redhat.com/archives/libguestfs/2016-May/msg00070.html Thanks, Pino Toscano (2): src: start unifying version handling