- 06 Sep, 2013 3 commits
-
-
Paolo Bonzini authored
Some bdrv_is_allocated callers do not expect errors, but the fallback in qcow2.c might make other callers trip on assertion failures or infinite loops. Fix the callers to always look for errors. Cc: qemu-stable@nongnu.org Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Fam Zheng authored
Manage BlockDriverState lifecycle with refcnt, so bdrv_delete() is no longer public and should be called by bdrv_unref() if refcnt is decreased to 0. This is an identical change because effectively, there's no multiple reference of BDS now: no caller of bdrv_ref() yet, only bdrv_new() sets bs->refcnt to 1, so all bdrv_unref() now actually delete the BDS. Signed-off-by:
Fam Zheng <famz@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Alexandre Derumier authored
Add a -n option to skip volume creation on qemu-img convert. This is useful for targets such as rbd / ceph, where the target volume may already exist; we cannot always rely on qemu-img convert to create the image, as dependent on the output format, there may be parameters which are not possible to specify through the qemu-img convert command line. Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Alexandre Derumier <aderumier@odiso.com> Signed-off-by:
Alex Bligh <alex@alex.org.uk> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- 06 Aug, 2013 2 commits
-
-
MORITA Kazutaka authored
This prevents the tools from being stopped when they write data to a closed connection in the other side. Signed-off-by:
MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp> Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Kevin Wolf authored
Don't silently ignore excess arguments at the end of the command line, but error out instead. This can catch typos like 'resize test.img + 1G', which doesn't increase the image size by 1G as intended, but truncates the image to 1G. Even for less dangerous commands, the old behaviour is confusing. Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Reviewed-by:
Laszlo Ersek <lersek@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- 15 Jul, 2013 1 commit
-
-
Kevin Wolf authored
One of the major reasons for doing something new for -blockdev and blockdev-add was that the old block layer code parses filenames instead of just taking them literally. So we should really leave it untouched when it's passing using the new interfaces (like -drive file.filename=...). This allows opening relative file names that contain a colon. Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com>
-
- 21 Jun, 2013 1 commit
-
-
Stefan Weil authored
Signed-off-by:
Stefan Weil <sw@weilnetz.de> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru>
-
- 07 Jun, 2013 2 commits
-
-
Wenchao Xia authored
This patch adds function bdrv_query_image_info(), which will retrieve image info in qmp object format. The implementation is based on the code moved from qemu-img.c, but uses block layer function to get snapshot info. Signed-off-by:
Wenchao Xia <xiawenc@linux.vnet.ibm.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Wenchao Xia authored
This patch adds function bdrv_query_snapshot_info_list(), which will retrieve snapshot info of an image in qmp object format. The implementation is based on the code moved from qemu-img.c with modification to fit more for qmp based block layer API. Signed-off-by:
Wenchao Xia <xiawenc@linux.vnet.ibm.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- 06 Jun, 2013 1 commit
-
-
Kevin Wolf authored
Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- 04 Jun, 2013 2 commits
-
-
Wenchao Xia authored
bdrv_snapshot_dump() and bdrv_image_info_dump() do not dump to a buffer now, some internal buffers are still used for format control, which have no chance to be truncated. As a result, these two functions have no more issue of truncation, and they can be used by both qemu and qemu-img with correct parameter specified. Signed-off-by:
Wenchao Xia <xiawenc@linux.vnet.ibm.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Wenchao Xia authored
This patch is a pure code move patch, except following modification: 1 get_human_readable_size() is changed to static function. 2 dump_human_image_info() is renamed to bdrv_image_info_dump(). 3 in qmp_query_block() and qmp_query_blockstats, use bdrv_next(bs) instead of direct traverse of global array 'bdrv_states'. 4 collect_snapshots() and collect_image_info() are renamed, unused parameter *fmt in collect_image_info() is removed. 5 code style fix. To avoid conflict and tip better, macro in header file is BLOCK_QAPI_H instead of QAPI_H. Now block.h and snapshot.h are at the same level in include path, block_int.h and qapi.h will both include them. Signed-off-by:
Wenchao Xia <xiawenc@linux.vnet.ibm.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
- 22 Apr, 2013 1 commit
-
-
Stefan Hajnoczi authored
bdrv_write_compressed() does not allow requests that span the end of the device. Therefore it is useless to zero-pad the last cluster and thereby exceed the end of the device. Let image formats handle zero-padding the final compressed cluster, if necessary. Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
- 15 Mar, 2013 1 commit
-
-
Kevin Wolf authored
It doesn't do anything yet except storing the options QDict in the BlockDriverState. Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- 22 Feb, 2013 6 commits
-
-
Miroslav Rezanina authored
This patch adds new qemu-img subcommand that compares content of two disk images. Signed-off-by:
Miroslav Rezanina <mrezanin@redhat.com> Reviewed-by:
Kevin Wolf <kwolf@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Miroslav Rezanina authored
There can be a need to turn output to stdout off. This patch adds a -q option that enable "Quiet mode". In Quiet mode, only errors are printed out. Signed-off-by:
Miroslav Rezanina <mrezanin@redhat.com> Reviewed-by:
Kevin Wolf <kwolf@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Stefan Hajnoczi authored
Show how many clusters are compressed. This can be used to monitor how many compressed clusters remain and whether to recompress the image. Suggested-by:
Cole Robinson <crobinso@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Stefan Hajnoczi authored
The qemu-img check fragmentation printf() is missing a space before the '=' sign. The human output is not guaranteed to be stable and we are not aware of screen scrapers, so add the missing space. Also fix the missing indentation of the printf() arguments. Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Federico Simoncelli authored
This option --output=[human|json] makes qemu-img check output a human or JSON representation at the choice of the user. Signed-off-by:
Federico Simoncelli <fsimonce@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Federico Simoncelli authored
This patch adds the support for reporting the image end offset (in bytes). This is particularly useful after a conversion (or a rebase) where the destination is a block device in order to find the first unused byte at the end of the image. Signed-off-by:
Federico Simoncelli <fsimonce@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
- 02 Jan, 2013 1 commit
-
-
liguang authored
qemu-img will complain when qcow or qcow2 size overflow for 64 bits, report the right message in this condition. $./qemu-img create -f qcow2 /tmp/foo 0x10000000000000000 before change: qemu-img: Invalid image size specified! You may use k, M, G or T suffixes for qemu-img: kilobytes, megabytes, gigabytes and terabytes. after change: qemu-img: Image size must be less than 8 EiB! [Resolved conflict with a9300911 goto removal -- Stefan] Signed-off-by:
liguang <lig.fnst@cn.fujitsu.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- 19 Dec, 2012 4 commits
-
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- 11 Dec, 2012 4 commits
-
-
Dong Xu Wang authored
We will use qemu_opts_create_nofail function, it can make code more readable. Signed-off-by:
Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Luiz Capitulino authored
Signed-off-by:
Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Luiz Capitulino authored
Signed-off-by:
Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Luiz Capitulino authored
This commit adds an Error ** argument to bdrv_img_create() and set it appropriately on error. Callers of bdrv_img_create() pass NULL for the new argument and still rely on bdrv_img_create()'s return value. Next commits will change callers to use the Error object instead. Signed-off-by:
Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
- 05 Nov, 2012 1 commit
-
-
Paolo Bonzini authored
Tools were broken because they initialized the block layer while qemu_aio_context was still NULL. Reported-by:
malc <av1474@comtv.ru> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
malc <av1474@comtv.ru>
-
- 24 Oct, 2012 3 commits
-
-
Stefan Hajnoczi authored
The qemu-img info --backing-chain option enumerates the backing file chain. For example, for base.qcow2 <- snap1.qcow2 <- snap2.qcow2 the output becomes: $ qemu-img info --backing-chain snap2.qcow2 image: snap2.qcow2 file format: qcow2 virtual size: 100M (104857600 bytes) disk size: 196K cluster_size: 65536 backing file: snap1.qcow2 backing file format: qcow2 image: snap1.qcow2 file format: qcow2 virtual size: 100M (104857600 bytes) disk size: 196K cluster_size: 65536 backing file: base.qcow2 backing file format: qcow2 image: base.qcow2 file format: qcow2 virtual size: 100M (104857600 bytes) disk size: 136K cluster_size: 65536 Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Alex Bligh authored
This patch allows an empty filename to be passed as the new base image name for qemu-img rebase to mean base the image on no backing file (i.e. independent of any backing file). According to Eric Blake, qemu-img rebase already supports this when '-u' is used; this adds support when -u is not used. Signed-off-by:
Alex Bligh <alex@alex.org.uk> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Kevin Wolf authored
Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- 14 Sep, 2012 1 commit
-
-
Stefan Weil authored
These wrong spellings were detected by codespell: * successully -> successfully * alot -> a lot * wanna -> want to * infomation -> information * occured -> occurred ["also is" -> "is also" and "ressources" -> "resources" suggested by Peter Maydell <peter.maydell@linaro.org>] Signed-off-by:
Stefan Weil <sw@weilnetz.de> Signed-off-by:
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
-
- 12 Sep, 2012 2 commits
-
-
Daniel P. Berrange authored
The encryption password is only required if I/O is going to be performed on a disk image. The 'qemu-img info' command merely reports metadata, so it should not ask for a decryption password Signed-off-by:
Daniel P. Berrange <berrange@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Benoît Canet authored
This option --output=[human|json] make qemu-img info output on human or JSON representation at the choice of the user. example: { "snapshots": [ { "vm-clock-nsec": 637102488, "name": "vm-20120821145509", "date-sec": 1345553709, "date-nsec": 220289000, "vm-clock-sec": 20, "id": "1", "vm-state-size": 96522745 }, { "vm-clock-nsec": 28210866, "name": "vm-20120821154059", "date-sec": 1345556459, "date-nsec": 171392000, "vm-clock-sec": 46, "id": "2", "vm-state-size": 101208714 } ], "virtual-size": 1073741824, "filename": "snap.qcow2", "cluster-size": 65536, "format": "qcow2", "actual-size": 985587712, "dirty-flag": false } Signed-off-by:
Benoit Canet <benoit@irqsave.net> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
- 10 Aug, 2012 1 commit
-
-
Stefan Hajnoczi authored
Image formats with a dirty bit, like qed and qcow2, repair dirty image files upon open with BDRV_O_RDWR. Performing automatic repair when qemu-img check runs is not ideal because the bdrv_open() call repairs the image before the actual bdrv_check() call from qemu-img.c. Fix this "double repair" since it leads to confusing output from qemu-img check. Tell the block driver that this image is being opened just for bdrv_check(). This skips automatic repair and qemu-img.c can invoke it manually with bdrv_check(). Update the golden output for qemu-iotests 039 to reflect the new qemu-img check output. Signed-off-by:
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
- 06 Aug, 2012 1 commit
-
-
Dong Xu Wang authored
Signed-off-by:
Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Reviewed-by:
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
- 02 Aug, 2012 1 commit
-
-
Peter Maydell authored
For command line options which permit '?' meaning 'please list the permitted values', add support for 'help' as a synonym, by abstracting the check out into a helper function. This change means that in some cases where we were being lazy in our string parsing, "?junk" will now be rejected as an invalid option rather than being (undocumentedly) treated the same way as "?". Update the documentation to use 'help' rather than '?', since '?' is a shell metacharacter and thus prone to fail confusingly if there is a single character filename in the current working directory and the '?' has not been escaped. It's therefore better to steer users towards 'help', though '?' is retained for backwards compatibility. We do not, however, update the output of the system emulator's -help (or any documentation autogenerated from the qemu-options.hx which is the source of the -help text) because libvirt parses our -help output and will break. At a later date when QEMU provides a better interface so libvirt can avoid having to do this, we can update the -help text too. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Signed-off-by:
Anthony Liguori <aliguori@us.ibm.com>
-
- 15 Jun, 2012 1 commit
-
-
Markus Armbruster authored
So callers don't need to know anything about maximum name length. Returning a pointer is safe, because the name string lives as long as the block driver it names, and block drivers don't die. Requested by Peter Maydell. Signed-off-by:
Markus Armbruster <armbru@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-