search for: free_drive_serv

Displaying 17 results from an estimated 17 matches for "free_drive_serv".

2014 Aug 18
3
[PATCH] drives: fix deletion of servers on error
...--git a/src/drives.c b/src/drives.c index 4bd8328..85c1495 100644 --- a/src/drives.c +++ b/src/drives.c @@ -743,8 +743,7 @@ parse_servers (guestfs_h *g, char *const *strs, for (i = 0; i < n; ++i) { if (parse_one_server (g, strs[i], &servers[i]) == -1) { - if (i > 0) - free_drive_servers (servers, i-1); + free_drive_servers (servers, i); return -1; } } --- src/drives.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/drives.c b/src/drives.c index 4bd8328..85c1495 100644 --- a/src/drives.c +++ b/src/drives.c @@ -743,8 +743,7 @@ parse_...
2014 Mar 12
3
Re: [PATCH v2 03/18] New API parameter: Add discard parameter to guestfs_add_drive_opts.
On Tuesday 11 March 2014 23:13:46 Richard W.M. Jones wrote: > diff --git a/src/drives.c b/src/drives.c > index 2c85b52..68e37f7 100644 > --- a/src/drives.c > +++ b/src/drives.c > @@ -115,7 +115,8 @@ static struct drive * > create_drive_file (guestfs_h *g, const char *path, > bool readonly, const char *format, > const char *iface,
2016 Dec 24
0
[PATCH] lib: Use a common function to validate strings.
...t char *filename, return -1; } - if (data.format && !valid_format_iface (data.format)) { + if (data.format && !VALID_FORMAT_IFACE (data.format)) { error (g, _("%s parameter is empty or contains disallowed characters"), "format"); free_drive_servers (data.servers, data.nr_servers); return -1; } - if (data.iface && !valid_format_iface (data.iface)) { + if (data.iface && !VALID_FORMAT_IFACE (data.iface)) { error (g, _("%s parameter is empty or contains disallowed characters"), "iface&q...
2016 Dec 24
2
[PATCH] lib: Use a common function to validate strings.
As discussed in the thread on validating $TERM, it would be good to have a common function to do this. This is such a function. The main advantage is it includes unit tests which the previous functions did not. Rich.
2013 Apr 05
3
[PATCH] Add support for SSH (Secure Shell) block device.
Note this patch requires a non-upstream qemu patch that I've been experimenting with. See qemu-devel list. Rich.
2020 Feb 11
2
[PATCH v2] lib: add support for disks with 4096 bytes sector size
...ead : false; + data.blocksize = + optargs->bitmask & GUESTFS_ADD_DRIVE_OPTS_BLOCKSIZE_BITMASK + ? optargs->blocksize : 0; + if (data.readonly && data.discard == discard_enable) { error (g, _("discard support cannot be enabled on read-only drives")); free_drive_servers (data.servers, data.nr_servers); @@ -796,6 +821,11 @@ guestfs_impl_add_drive_opts (guestfs_h *g, const char *filename, free_drive_servers (data.servers, data.nr_servers); return -1; } + if (data.blocksize && !valid_blocksize (data.blocksize)) { + error (g, _("%s par...
2013 May 07
7
[PATCH 0/5] rbd improvements
This series improves ceph rbd support in libguestfs. It uses the servers list, adds support for a custom username, and starts to add support for custom secret.
2020 Feb 10
1
[PATCH] lib: allow to specify physical/logical block size for disks
...ead : false; + data.blocksize = + optargs->bitmask & GUESTFS_ADD_DRIVE_OPTS_BLOCKSIZE_BITMASK + ? optargs->blocksize : 0; + if (data.readonly && data.discard == discard_enable) { error (g, _("discard support cannot be enabled on read-only drives")); free_drive_servers (data.servers, data.nr_servers); @@ -796,6 +821,11 @@ guestfs_impl_add_drive_opts (guestfs_h *g, const char *filename, free_drive_servers (data.servers, data.nr_servers); return -1; } + if (!valid_blocksize (data.blocksize)) { + error (g, _("%s parameter is invalid"),...
2020 Feb 20
1
[PATCH] lib: Move guestfs_device_index impl from daemon to library.
Although the commit message ties this to https://bugzilla.redhat.com/1804207, in fact I believe this commit could be applied independently. It's a simple optimization. Rich.
2015 Jul 01
2
Re: URI Handling Patch
Hi All, Here's the latest patch. I think this should address the problem. The query string is now only appended to the end of a URI in the HTTP and HTTPS cases. The add-uri test now passes, and 'make check' still passes. -- Gabriel
2020 Feb 10
0
Re: [RFC] lib: allow to specify physical/logical block size for disks
...= > + optargs->bitmask & GUESTFS_ADD_DRIVE_OPTS_LBLOCKSIZE_BITMASK > + ? optargs->lblocksize : 0; > + > if (data.readonly && data.discard == discard_enable) { > error (g, _("discard support cannot be enabled on read-only drives")); > free_drive_servers (data.servers, data.nr_servers); > diff --git a/lib/guestfs-internal.h b/lib/guestfs-internal.h > index 6799c265d..20f22a674 100644 > --- a/lib/guestfs-internal.h > +++ b/lib/guestfs-internal.h > @@ -261,6 +261,8 @@ struct drive { > char *cachemode; > enum discard disc...
2020 Feb 07
8
[RFC] lib: allow to specify physical/logical block size for disks
...size : 0; + + data.lblocksize = + optargs->bitmask & GUESTFS_ADD_DRIVE_OPTS_LBLOCKSIZE_BITMASK + ? optargs->lblocksize : 0; + if (data.readonly && data.discard == discard_enable) { error (g, _("discard support cannot be enabled on read-only drives")); free_drive_servers (data.servers, data.nr_servers); diff --git a/lib/guestfs-internal.h b/lib/guestfs-internal.h index 6799c265d..20f22a674 100644 --- a/lib/guestfs-internal.h +++ b/lib/guestfs-internal.h @@ -261,6 +261,8 @@ struct drive { char *cachemode; enum discard discard; bool copyonread; + int pbl...
2014 Mar 10
5
[PATCH 0/3] Add discard support.
These patches contain the beginnings of discard (a.k.a. trim or unmap) support. This will allow us to change virt-sparsify to work on disk images in-place (instead of using slow & inefficient copying). The approach used is to add an optional 'discard' parameter to add-drive. It has 3 possible settings: - 'disable' : the default, no discard is done - 'besteffort' :
2014 Mar 12
12
[PATCH v3 00/10] Add discard support.
This set of patches: - Adds new APIs to support discard in libguestfs. - Adds discard support to virt-format. - Adds discard support to virt-sysprep. - Implements virt-sparsify --in-place. This is now working, after fixing the rather stupid bug in fstrim. I've pushed the ones which were ACKed previously + the fstrim fix. Rich.
2014 Jan 16
3
[PATCH 0/2] Don't use snapshot=on
QEMU upstream has broken snapshot=on ... again. These two patches stop using it entirely. Instead we run 'qemu-img create' to create overlay disks as required. Note that the libvirt and UML backends were already doing this: The libvirt backend because <transient/> has never worked, and the UML backend was running uml_mkcow because the UML-equivalent syntax of snapshot=on was
2014 Mar 11
21
[PATCH v2 00/18] Add discard support.
This still isn't working at the moment. See: http://marc.info/?t=139457409300003&r=1&w=2 This set of patches: - Adds new APIs to support discard in libguestfs. - Adds discard support to virt-format. - Adds discard support to virt-sysprep. - Implements virt-sparsify --in-place. Rich.
2017 Apr 04
1
[PATCH] Use Unicode single quotes ‘’ in place of short single quoted strings throughout.
...uot;besteffort")) data.discard = discard_besteffort; else { - error (g, _("discard parameter must be 'disable', 'enable' or 'besteffort'")); + error (g, _("discard parameter must be ‘disable’, ‘enable’ or ‘besteffort’")); free_drive_servers (data.servers, data.nr_servers); return -1; } @@ -792,7 +792,7 @@ guestfs_impl_add_drive_opts (guestfs_h *g, const char *filename, } if (data.cachemode && !(STREQ (data.cachemode, "writeback") || STREQ (data.cachemode, "unsafe"))) { - error...