search for: backend_direct_data

Displaying 20 results from an estimated 40 matches for "backend_direct_data".

2016 Mar 22
0
[PATCH v3 07/11] launch: direct: Don't run qemu -version.
.... --- src/launch-direct.c | 54 +++++++++++++++++++---------------------------------- 1 file changed, 19 insertions(+), 35 deletions(-) diff --git a/src/launch-direct.c b/src/launch-direct.c index e8450e1..25b0349 100644 --- a/src/launch-direct.c +++ b/src/launch-direct.c @@ -54,7 +54,6 @@ struct backend_direct_data { pid_t recoverypid; /* Recovery process PID. */ char *qemu_help; /* Output of qemu -help. */ - char *qemu_version; /* Output of qemu -version. */ char *qemu_devices; /* Output of qemu -device ? */ /* qemu version (0, 0 if unable to parse). */ @@...
2013 Dec 09
1
[PATCH] launch: switch from -nographic to -display none
...ata, "-nodefaults")) ADD_CMDLINE ("-nodefaults"); - ADD_CMDLINE ("-nographic"); + ADD_CMDLINE ("-display"); + ADD_CMDLINE ("none"); #ifdef MACHINE_TYPE ADD_CMDLINE ("-M"); @@ -918,7 +919,8 @@ test_qemu (guestfs_h *g, struct backend_direct_data *data) data->qemu_devices = NULL; guestfs___cmd_add_arg (cmd1, g->hv); - guestfs___cmd_add_arg (cmd1, "-nographic"); + guestfs___cmd_add_arg (cmd1, "-display"); + guestfs___cmd_add_arg (cmd1, "none"); guestfs___cmd_add_arg (cmd1, "-help");...
2019 Oct 29
2
[PATCH] fish: add option --blocksize for disks
...REPLACED_BY(s) diff --git a/lib/launch-direct.c b/lib/launch-direct.c index ee2dcb8..57d1ad6 100644 --- a/lib/launch-direct.c +++ b/lib/launch-direct.c @@ -49,6 +49,8 @@ #include "guestfs_protocol.h" #include "qemuopts.h" +int blocksize = 0; + /* Per-handle data. */ struct backend_direct_data { pid_t pid; /* Qemu PID. */ @@ -315,6 +317,8 @@ add_drive (guestfs_h *g, struct backend_direct_data *data, start_list ("-device") { append_list ("scsi-hd"); append_list_format ("drive=hd%zu", i); + append_list_format (&quo...
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.
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.
2020 Feb 10
0
Re: [RFC] lib: allow to specify physical/logical block size for disks
...}; > > /* Extra hv parameters (from guestfs_config). */ > diff --git a/lib/launch-direct.c b/lib/launch-direct.c > index ae6ca093b..518bd24fc 100644 > --- a/lib/launch-direct.c > +++ b/lib/launch-direct.c > @@ -273,6 +273,26 @@ add_drive_standard_params (guestfs_h *g, struct backend_direct_data *data, > return -1; > } > > +/** > + * Add the blockio elements of the C<-device> parameter. > + */ > +static int > +add_device_blockio_params (guestfs_h *g, struct qemuopts *qopts, > + struct drive *drv) > +{ > + if (drv->p...
2016 May 17
0
[PATCH 1/2] src: start unifying version handling
...t version *qemu_version); extern char *guestfs_int_qemu_escape_param (guestfs_h *g, const char *param); /* launch-*.c constructors */ diff --git a/src/launch-direct.c b/src/launch-direct.c index 1b012cf..832b975 100644 --- a/src/launch-direct.c +++ b/src/launch-direct.c @@ -62,7 +62,7 @@ struct backend_direct_data { char *qemu_devices; /* Output of qemu -device ? */ /* qemu version (0, 0 if unable to parse). */ - int qemu_version_major, qemu_version_minor; + struct version qemu_version; int virtio_scsi; /* See function qemu_supports_virtio_scsi */ @@ -420,8 +420,7 @@ launch_di...
2017 Sep 12
0
[PATCH v2 5/5] launch: direct: Disable qemu locking when opening drives readonly (RHBZ#1417306).
--- lib/launch-direct.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/launch-direct.c b/lib/launch-direct.c index 9f85013f9..00cb25077 100644 --- a/lib/launch-direct.c +++ b/lib/launch-direct.c @@ -66,6 +66,7 @@ struct backend_direct_data { pid_t recoverypid; /* Recovery process PID. */ struct version qemu_version; /* qemu version (0 if unable to parse). */ + int qemu_mandatory_locking; /* qemu >= 2.10 does mandatory locking */ struct qemu_data *qemu_data; /* qemu -help output etc. */ char guestfsd...
2017 Sep 12
1
Re: [PATCH v2 5/5] launch: direct: Disable qemu locking when opening drives readonly (RHBZ#1417306).
On Tuesday, 12 September 2017 14:29:16 CEST Richard W.M. Jones wrote: > @@ -255,11 +256,13 @@ add_drive_standard_params (guestfs_h *g, struct backend_direct_data *data, > } > else { > /* Writable qcow2 overlay on top of read-only drive. */ > - append_list_format ("file=%s", drv->overlay); > + append_list_format ("file.file.filename=%s", drv->overlay); > + append_list ("file.driver=qcow2&qu...
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
2020 Feb 07
8
[RFC] lib: allow to specify physical/logical block size for disks
...nt pblocksize; + int lblocksize; }; /* Extra hv parameters (from guestfs_config). */ diff --git a/lib/launch-direct.c b/lib/launch-direct.c index ae6ca093b..518bd24fc 100644 --- a/lib/launch-direct.c +++ b/lib/launch-direct.c @@ -273,6 +273,26 @@ add_drive_standard_params (guestfs_h *g, struct backend_direct_data *data, return -1; } +/** + * Add the blockio elements of the C<-device> parameter. + */ +static int +add_device_blockio_params (guestfs_h *g, struct qemuopts *qopts, + struct drive *drv) +{ + if (drv->pblocksize) + append_list_format ("physical_bloc...
2017 Sep 05
1
Re: [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_versio...
2014 Apr 29
2
Adventures in building libguestfs on non-x86 architectures for Debian
...ldd.debian.org/status/package.php?p=supermin [2] https://buildd.debian.org/status/package.php?p=libguestfs diff --git a/src/launch-direct.c b/src/launch-direct.c index 1460c56..2332368 100644 --- a/src/launch-direct.c +++ b/src/launch-direct.c @@ -1020,6 +1020,10 @@ test_qemu (guestfs_h *g, struct backend_direct_data *data) guestfs___cmd_add_arg (cmd3, g->hv); guestfs___cmd_add_arg (cmd3, "-display"); guestfs___cmd_add_arg (cmd3, "none"); +#ifdef MACHINE_TYPE + guestfs___cmd_add_arg (cmd3, "-M"); + guestfs___cmd_add_arg (cmd3, MACHINE_TYPE); +#endif guestfs___cmd_a...
2014 Jan 01
0
[PATCH] Allow ./configure --without-qemu.
...safe_strdup (g, QEMU) : safe_strdup (g, qemu); + g->hv = new_hv; + return 0; } diff --git a/src/launch-direct.c b/src/launch-direct.c index f45f582..2d4073a 100644 --- a/src/launch-direct.c +++ b/src/launch-direct.c @@ -101,6 +101,7 @@ static int qemu_supports_device (guestfs_h *g, struct backend_direct_data *, con static int qemu_supports_virtio_scsi (guestfs_h *g, struct backend_direct_data *); static char *qemu_escape_param (guestfs_h *g, const char *param); +#ifdef QEMU_OPTIONS /* Like 'add_cmdline' but allowing a shell-quoted string of zero or * more options. XXX The unquoting is n...
2020 Feb 11
2
[PATCH v2] lib: add support for disks with 4096 bytes sector size
...ool copyonread; + int blocksize; }; /* Extra hv parameters (from guestfs_config). */ diff --git a/lib/launch-direct.c b/lib/launch-direct.c index ae6ca093b..0f4bbf15f 100644 --- a/lib/launch-direct.c +++ b/lib/launch-direct.c @@ -273,6 +273,27 @@ add_drive_standard_params (guestfs_h *g, struct backend_direct_data *data, return -1; } +/** + * Add the physical_block_size and logical_block_size elements of the C<-device> + * parameter. + */ +static int +add_device_blocksize_params (guestfs_h *g, struct qemuopts *qopts, + struct drive *drv) +{ + if (drv->blocksize) { +...
2017 Apr 19
2
[PATCH] lib: direct: Remove support for virtio-blk as the default.
...truct 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 index db9b9f3ef..b0038c6a9 100644 --- a/lib/launch-direct.c +++ b/lib/launch-direct.c @@ -60,7 +60,7 @@ struct backend_direct_data { }; static int is_openable (guestfs_h *g, const char *path, int flags); -static char *make_appliance_dev (guestfs_h *g, int virtio_scsi); +static char *make_appliance_dev (guestfs_h *g); static void print_qemu_command_line (guestfs_h *g, char **argv); static char * @@ -234,7 +234,6 @@ laun...
2020 Feb 10
1
[PATCH] lib: allow to specify physical/logical block size for disks
...ool copyonread; + int blocksize; }; /* Extra hv parameters (from guestfs_config). */ diff --git a/lib/launch-direct.c b/lib/launch-direct.c index ae6ca093b..0f4bbf15f 100644 --- a/lib/launch-direct.c +++ b/lib/launch-direct.c @@ -273,6 +273,27 @@ add_drive_standard_params (guestfs_h *g, struct backend_direct_data *data, return -1; } +/** + * Add the physical_block_size and logical_block_size elements of the C<-device> + * parameter. + */ +static int +add_device_blocksize_params (guestfs_h *g, struct qemuopts *qopts, + struct drive *drv) +{ + if (drv->blocksize) { +...
2017 Sep 05
0
[PATCH] lib: direct: Disable qemu locking when opening drives readonly.
...17306 --- lib/launch-direct.c | 5 ++++- 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...
2017 Sep 12
0
Re: [PATCH] lib: direct: Disable qemu locking when opening drives readonly.
...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"); >...
2017 Nov 23
0
[PATCH] launch: direct: Omit locking option for non-file disks (RHBZ#1516094)
...-- lib/launch-direct.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/launch-direct.c b/lib/launch-direct.c index 87ac121c7558..678c8c68d59d 100644 --- a/lib/launch-direct.c +++ b/lib/launch-direct.c @@ -260,7 +260,11 @@ add_drive_standard_params (guestfs_h *g, struct backend_direct_data *data, append_list ("cache=unsafe"); if (drv->disk_label) append_list_format ("serial=%s", drv->disk_label); - if (data->qemu_mandatory_locking) + + /* Add the file-specific locking option only for files, as qemu + * won't accept options u...