search for: drive_to_string

Displaying 9 results from an estimated 9 matches for "drive_to_string".

2020 Feb 11
2
[PATCH v2] lib: add support for disks with 4096 bytes sector size
...rv->discard = data->discard; drv->copyonread = data->copyonread; + drv->blocksize = data->blocksize; if (data->readonly) { if (create_overlay (g, drv) == -1) { @@ -501,8 +504,13 @@ guestfs_int_drive_protocol_to_string (enum drive_protocol protocol) static char * drive_to_string (guestfs_h *g, const struct drive *drv) { + CLEANUP_FREE char *s_blocksize = NULL; + + if (drv->blocksize) + s_blocksize = safe_asprintf (g, "%d", drv->blocksize); + return safe_asprintf - (g, "%s%s%s%s protocol=%s%s%s%s%s%s%s%s%s%s%s", + (g, "%s%s%s%s...
2020 Feb 10
1
[PATCH] lib: allow to specify physical/logical block size for disks
...rv->discard = data->discard; drv->copyonread = data->copyonread; + drv->blocksize = data->blocksize; if (data->readonly) { if (create_overlay (g, drv) == -1) { @@ -501,8 +504,13 @@ guestfs_int_drive_protocol_to_string (enum drive_protocol protocol) static char * drive_to_string (guestfs_h *g, const struct drive *drv) { + CLEANUP_FREE char *s_blocksize = NULL; + + if (drv->blocksize) + s_blocksize = safe_asprintf (g, "%d", drv->blocksize); + return safe_asprintf - (g, "%s%s%s%s protocol=%s%s%s%s%s%s%s%s%s%s%s", + (g, "%s%s%s%s...
2013 Mar 15
0
[PATCH] lib: Add direct support for the NBD (Network Block Device) protocol.
...e (drv->iface); free (drv->name); free (drv->disk_label); + if (drv->priv && drv->free_priv) drv->free_priv (drv->priv); + free (drv); } +/* Convert a struct drive to a string for debugging. The caller + * must free this string. + */ +static char * +drive_to_string (guestfs_h *g, const struct drive *drv) +{ + CLEANUP_FREE char *p = NULL; + + switch (drv->protocol) { + case drive_protocol_file: + p = safe_asprintf (g, "path=%s", drv->u.path); + break; + case drive_protocol_nbd: + if (STREQ (drv->u.nbd.exportname, ""))...
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.
2015 Feb 14
2
[PATCH 0/2] Change guestfs__*
libguestfs has used double and triple underscores in identifiers. These aren't valid for global names in C++. (http://stackoverflow.com/a/228797) These large but completely mechanical patches change the illegal identifiers to legal ones. Rich.
2013 Aug 24
67
[PATCH 00/67] Proposed patches for libguestfs 1.22.6.
In the kernel and qemu communities it is routine for patches that will be backported to stable branches to be posted for review. I'm proposing we do the same for libguestfs stable branches. All of the attached have been tested with 'make check-release'. Rich.