Re: [Qemu-devel] [PATCH] ide: fail I/O to empty disk

2012-02-16 Thread Kevin Wolf
Am 16.02.2012 08:45, schrieb Stefan Hajnoczi: > On Wed, Feb 15, 2012 at 11:46:11AM +0100, Paolo Bonzini wrote: >> Requesting a read or a write operation on an empty disk can lead >> to QEMU dumping core. >> >> Also fix a few braces here and there. >> >> Signed-off-by: Paolo Bonzini >> --- >> hw/i

Re: [Qemu-devel] [PATCH] slirp: kill ugly macros

2012-02-16 Thread Kevin Wolf
Am 15.02.2012 19:55, schrieb Jan Kiszka: > On 2012-02-15 19:45, Michael S. Tsirkin wrote: >> Remove ugly macros for field names, >> change done by the following script: >> >> s#\bifq_prev\b#m_prev#g; >> s#\bifq_next\b#m_next#g; >> s#\bifs_prev\b#m_prevpkt#g; >> s#\bifs_next\b#m_nextpkt#g; >> s#\bif

Re: [Qemu-devel] [Bug 932487] [NEW] win32: git rev 59f971d crashes when accessing disk (coroutine issue)

2012-02-16 Thread Kevin Wolf
Am 16.02.2012 12:01, schrieb Paolo Bonzini: > On 02/16/2012 11:34 AM, Kevin Wolf wrote: >> Remember that I saw a similar crash a while ago? It was definitely a >> NULL pointer access somewhere inside SwitchToFiber. I can't remember >> exactly what came out of it, but I th

Re: [Qemu-devel] [PATCH] slirp: kill ugly macros

2012-02-16 Thread Kevin Wolf
Am 16.02.2012 12:09, schrieb Peter Maydell: > On 16 February 2012 11:06, Kevin Wolf wrote: >> What are all these m_ and mh_ prefixes for struct fields even about? >> When I have an mbuf, I know perfectly well that it is one, and that >> m_hdr is a header of it. > > Th

Re: [Qemu-devel] [PATCH 4/4] qmp: add BLOCK_MEDIUM_EJECT event

2012-02-16 Thread Kevin Wolf
Am 16.02.2012 14:14, schrieb Luiz Capitulino: > On Thu, 16 Feb 2012 10:25:43 +0100 > Markus Armbruster wrote: > >> Luiz Capitulino writes: >> >>> It's emitted whenever the tray is moved by the guest or by HMP/QMP >>> commands. >> >> I like the simplicity of this patch. A few remarks inline. >>

[Qemu-devel] Merging qemu-iotests into qemu.git?

2012-02-16 Thread Kevin Wolf
Hi Christoph, I just talked to Stefan about our testing, both regarding the block layer and qemu in general, and we came to the conclusion that it would probably make sense to merge qemu-iotests into qemu.git. The immediate benefit would be that we could include some short-running tests into 'mak

Re: [Qemu-devel] [PATCH 4/4] qmp: add BLOCK_MEDIUM_EJECT event

2012-02-17 Thread Kevin Wolf
Am 16.02.2012 19:30, schrieb Markus Armbruster: > Let's figure out how this stuff really works. > > 1. Guest load/eject > > Guest commands load or eject. Device model updates its state of virtual > tray (e.g. IDEState member tray_open) unless locked, then calls > bdrv_eject(). > > bdrv_eject()

Re: [Qemu-devel] [PATCH 4/4] qmp: add BLOCK_MEDIUM_EJECT event

2012-02-17 Thread Kevin Wolf
Am 17.02.2012 11:32, schrieb Paolo Bonzini: > On 02/16/2012 03:10 PM, Luiz Capitulino wrote: >> We have two external entities: the guest and the mngt app. It seems to me >> that >> the guest is seeing each step at a time. > > The guest is seeing each step separately, but that is managed by the >

Re: [Qemu-devel] [PATCH 4/4] qmp: add BLOCK_MEDIUM_EJECT event

2012-02-17 Thread Kevin Wolf
Am 17.02.2012 12:48, schrieb Markus Armbruster: > Kevin Wolf writes: > >> Am 17.02.2012 11:32, schrieb Paolo Bonzini: >>> On 02/16/2012 03:10 PM, Luiz Capitulino wrote: >>>> We have two external entities: the guest and the mngt app. It seems to me >>>&g

[Qemu-devel] [PATCH] qcow2: Fix build with DEBUG_EXT enabled

2012-02-17 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/qcow2.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 3692b45..dea12c1 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -89,7 +89,6 @@ static int qcow2_read_extensions(BlockDriverState *bs

Re: [Qemu-devel] [PATCH v2 2/3] monitor: Enable adding an inherited fd to an fd set

2012-10-11 Thread Kevin Wolf
Am 10.10.2012 16:20, schrieb Corey Bryant: > qmp_add_fd() gets an fd that was received over a socket with > SCM_RIGHTS and adds it to an fd set. This patch adds support > that will enable adding an fd that was inherited on the > command line to an fd set. > > This patch also prevents removal of a

Re: [Qemu-devel] Block I/O outside the QEMU global mutex was "Re: [RFC PATCH 00/17] Support for multiple "AIO contexts""

2012-10-11 Thread Kevin Wolf
Am 09.10.2012 17:02, schrieb Anthony Liguori: > Stefan Hajnoczi writes: > >> On Mon, Oct 08, 2012 at 03:00:04PM +0200, Paolo Bonzini wrote: >>> Another important step would be to add bdrv_drain. Kevin pointed out to >>> me that only ->file and ->backing_hd need to be drained. Well, there >>> ma

Re: [Qemu-devel] [PATCH v2 2/3] monitor: Enable adding an inherited fd to an fd set

2012-10-12 Thread Kevin Wolf
Am 11.10.2012 17:04, schrieb Corey Bryant: > > > On 10/11/2012 07:25 AM, Kevin Wolf wrote: >> Am 10.10.2012 16:20, schrieb Corey Bryant: >>> qmp_add_fd() gets an fd that was received over a socket with >>> SCM_RIGHTS and adds it to an fd set. This patch adds su

[Qemu-devel] [PATCH 0/2] qemu-img: Fix division by zero for zero size images

2012-10-12 Thread Kevin Wolf
Kevin Wolf (2): qemu-img: Fix division by zero for zero size images qemu-iotests: Test qemu-img operation on zero size image qemu-img.c | 23 tests/qemu-iotests/041 | 78 tests/qemu-iotests/041.out | 15

[Qemu-devel] [PATCH 1/2] qemu-img: Fix division by zero for zero size images

2012-10-12 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- qemu-img.c | 23 +++ 1 files changed, 15 insertions(+), 8 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index f17f187..849eb41 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -674,7 +674,7 @@ static int img_convert(int argc, char **argv

[Qemu-devel] [PATCH 2/2] qemu-iotests: Test qemu-img operation on zero size image

2012-10-12 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- tests/qemu-iotests/041 | 78 tests/qemu-iotests/041.out | 15 tests/qemu-iotests/group |1 + 3 files changed, 94 insertions(+), 0 deletions(-) create mode 100755 tests/qemu-iotests/041 create mode

Re: [Qemu-devel] [PATCH] qemu-img: Add --backing-chain option to info command

2012-10-12 Thread Kevin Wolf
Am 12.10.2012 16:24, schrieb Eric Blake: > On 10/12/2012 08:09 AM, Stefan Hajnoczi wrote: >> The qemu-img info --backing-chain option enumerates the backing file >> chain. For example, for base.qcow2 <- snap1.qcow2 <- snap2.qcow2 the >> output becomes: >> > >> +do { >> +bs = bdrv_new_

Re: [Qemu-devel] [PATCH] qemu-img: Add --backing-chain option to info command

2012-10-12 Thread Kevin Wolf
Am 12.10.2012 16:32, schrieb Eric Blake: > On 10/12/2012 08:27 AM, Kevin Wolf wrote: >> Am 12.10.2012 16:24, schrieb Eric Blake: >>> On 10/12/2012 08:09 AM, Stefan Hajnoczi wrote: >>>> The qemu-img info --backing-chain option enumerates the backing file >>&g

Re: [Qemu-devel] [PATCH 2/2] qemu-iotests: Test qemu-img operation on zero size image

2012-10-15 Thread Kevin Wolf
Am 12.10.2012 18:57, schrieb Paolo Bonzini: > FWIW, this will require renaming the mirror test to 042 :( Since I have > multiple patches touching the file while you have just one, any chance > you can hold up this series for a week or so? So is 042 still free? Then I'd just change this patch to u

Re: [Qemu-devel] [PATCH v3 22/22] qidl: unit tests and build infrastructure

2012-10-15 Thread Kevin Wolf
Am 12.10.2012 23:39, schrieb Michael Roth: > On Fri, Oct 05, 2012 at 10:24:30AM +0200, Paolo Bonzini wrote: >> Il 04/10/2012 19:33, Michael Roth ha scritto: >>> + >>> +%.qidl.c: %.c $(SRC_PATH)/qidl.h $(addprefix $(SRC_PATH)/scripts/,lexer.py >>> qidl.py qidl_parser.py qapi.py qapi_visit.py) >>> +

Re: [Qemu-devel] fixing qemu-0.1X endless loop in qcow2_alloc_cluster_offset

2012-10-15 Thread Kevin Wolf
Am 12.10.2012 17:52, schrieb Andreas Färber: > Am 12.06.2012 15:44, schrieb Kevin Wolf: >> Am 12.06.2012 15:33, schrieb Andreas Färber: >>> Am 14.05.2012 14:20, schrieb Kevin Wolf: >>>> Am 13.05.2012 10:03, schrieb Zhouyi Zhou: >>>>> hi all >>&

Re: [Qemu-devel] Silent filesystem/qcow2 corruptions with qemu-kvm-1.0 and 1.1.1

2012-10-15 Thread Kevin Wolf
Am 12.10.2012 10:53, schrieb Tiziano Müller: > Am Freitag, den 12.10.2012, 10:33 +0200 schrieb Stefan Hajnoczi: >> On Thu, Oct 11, 2012 at 03:33:23PM +0200, Tiziano Müller wrote: >>> Checking the image using `qemu-img check` then gives something like >>> this: >>> >>> ERROR OFLAG_COPIED: offset=3bc

Re: [Qemu-devel] delvm does not reduce the qcow2 file size

2012-10-15 Thread Kevin Wolf
Am 15.10.2012 15:25, schrieb Paolo Bonzini: > Il 15/10/2012 11:33, Kuniyasu Suzaki ha scritto: >> Hello, >> >> "delvm" is a command to delete a snapshot image in a qcow2 file. >> However it does not reduce the qcow2 file size. > > Note that the file will not grow when new allocations are performed

Re: [Qemu-devel] fixing qemu-0.1X endless loop in qcow2_alloc_cluster_offset

2012-10-15 Thread Kevin Wolf
Am 15.10.2012 16:28, schrieb Andreas Färber: >> What I'm suggesting (not even compile tested!) is: >> >> Signed-off-by: Kevin Wolf >> >> diff --git a/block/qcow2.c b/block/qcow2.c >> index 48e1b95..d665675 100644 >> --- a/block/qcow2.c >> +++ b

Re: [Qemu-devel] [PATCH v2 19/45] block: add bdrv_query_info

2012-10-15 Thread Kevin Wolf
Am 26.09.2012 17:56, schrieb Paolo Bonzini: > Extract it out of the implementation of "info block". > > Signed-off-by: Paolo Bonzini > --- > v1->v2: moved bdrv_query_info close to qmp_query_block. > Fixed conflicts for the new field 'encryption_key_missing' > too. > > bl

Re: [Qemu-devel] [PATCH v2 23/45] block: export dirty bitmap information in query-block

2012-10-15 Thread Kevin Wolf
Am 26.09.2012 17:56, schrieb Paolo Bonzini: > Signed-off-by: Paolo Bonzini > --- > v1->v2: new > > block.c | 6 ++ > qapi-schema.json | 20 ++-- > 2 file modificati, 24 inserzioni(+), 2 rimozioni(-) > > diff --git a/block.c b/block.c > index 2c1273c..074325

Re: [Qemu-devel] [PATCH v2 26/45] mirror: introduce mirror job

2012-10-15 Thread Kevin Wolf
Am 26.09.2012 17:56, schrieb Paolo Bonzini: > This patch adds the implementation of a new job that mirrors a disk to > a new image while letting the guest continue using the old image. > The target is treated as a "black box" and data is copied from the > source to the target in the background. Th

Re: [Qemu-devel] [PATCH v2 27/45] qmp: add drive-mirror command

2012-10-15 Thread Kevin Wolf
Am 26.09.2012 17:56, schrieb Paolo Bonzini: > This adds the monitor commands that start the mirroring job. > > Signed-off-by: Paolo Bonzini > --- > blockdev.c | 125 > ++- > hmp-commands.hx | 21 ++ > hmp.c| 28 +++

Re: [Qemu-devel] [PATCH v2 28/45] mirror: implement completion

2012-10-15 Thread Kevin Wolf
Am 26.09.2012 17:56, schrieb Paolo Bonzini: > Switching to the target of the migration is done mostly asynchronously, > and reported to management via the BLOCK_JOB_COMPLETED event; the only > synchronous phase is opening the backing files. bdrv_open_backing_file > can always be done, even for mig

Re: [Qemu-devel] [PATCH v2] qmp: fix __accept() in qmp.py

2012-10-16 Thread Kevin Wolf
Am 15.10.2012 22:58, schrieb Jeff Cody: > In QEMUMonitorProtocol, commit e9d17b6 removed the __sockfile creation > from __negotiate_capabilities(), which breaks _accept(). This causes > failures in qemu-io python based tests (i.e. tests 030 and 040). > > This patch creates the sockfile in __accep

Re: [Qemu-devel] [PATCH v2 26/45] mirror: introduce mirror job

2012-10-16 Thread Kevin Wolf
Am 16.10.2012 08:36, schrieb Paolo Bonzini: > Il 15/10/2012 18:57, Kevin Wolf ha scritto: >> Am 26.09.2012 17:56, schrieb Paolo Bonzini: >>> + >>> +/* We're out of the streaming phase. From now on, if the job >>> + * is cancelled

Re: [Qemu-devel] [PATCH 2/2] Fix a race condition in E1000 device live migration. One of data-transfer related flags not in migrated fields list.

2012-10-16 Thread Kevin Wolf
Am 16.10.2012 10:32, schrieb Stefan Hajnoczi: > On Mon, Oct 15, 2012 at 06:48:53PM +0200, Dmitry Fleytman wrote: > > The commit message is very long but the commit description is empty. > Please keep the message short and add the rest into the description. > >> Signed-off-by: Dmitry Fleytman >>

Re: [Qemu-devel] [PATCH v2 1/3] qemu-img: Add --backing-chain option to info command

2012-10-16 Thread Kevin Wolf
Am 15.10.2012 14:44, schrieb Stefan Hajnoczi: > 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: q

Re: [Qemu-devel] [PATCH v2 2/3] qemu-img: Detect backing file chain infinite loops

2012-10-16 Thread Kevin Wolf
Am 15.10.2012 14:44, schrieb Stefan Hajnoczi: > A malicious or corruption image can contain an infinite loop of backing > files. The qemu-img info --backing-chain command must not hang when > such files are encountered. > > Signed-off-by: Stefan Hajnoczi This seems to do what is intended, but I

Re: [Qemu-devel] [PATCH v2 3/3] qemu-iotests: Add 041 backing file chain infinite loop test

2012-10-16 Thread Kevin Wolf
Am 15.10.2012 14:44, schrieb Stefan Hajnoczi: > This new test verifies that qemu-img info --backing-chain safely aborts > when an image file has a backing file infinite loop. > > Signed-off-by: Stefan Hajnoczi > --- > tests/qemu-iotests/041 | 90 > +

Re: [Qemu-devel] [PATCHv3] qemu-img rebase: use empty string to rebase without backing file

2012-10-16 Thread Kevin Wolf
Am 15.10.2012 22:50, schrieb Alex Bligh: > 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'

Re: [Qemu-devel] [PATCH 1/2] block: make bdrv_find_backing_image compare canonical filenames

2012-10-16 Thread Kevin Wolf
Am 13.10.2012 17:25, schrieb Jeff Cody: > On 10/12/2012 05:52 PM, Eric Blake wrote: >> On 10/09/2012 11:56 PM, Jeff Cody wrote: >>> Currently, bdrv_find_backing_image compares bs->backing_file with >>> what is passed in as a backing_file name. Mismatches may occur, >>> however, when bs->backing_fi

Re: [Qemu-devel] [PATCHv4] qemu-img rebase: use empty string to rebase without backing file

2012-10-16 Thread Kevin Wolf
Am 16.10.2012 14:46, schrieb Alex Bligh: > 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'

Re: [Qemu-devel] [PATCH v2 2/3] qemu-img: Detect backing file chain infinite loops

2012-10-16 Thread Kevin Wolf
Am 16.10.2012 16:42, schrieb Stefan Hajnoczi: > On Tue, Oct 16, 2012 at 12:11:44PM +0200, Kevin Wolf wrote: >> Am 15.10.2012 14:44, schrieb Stefan Hajnoczi: >>> A malicious or corruption image can contain an infinite loop of backing >>> files. The qemu-img info --bac

Re: [Qemu-devel] [PATCH v3 0/4] block-commit fixes

2012-10-17 Thread Kevin Wolf
Am 16.10.2012 22:33, schrieb Eric Blake: > On 10/16/2012 01:49 PM, Jeff Cody wrote: >> v2 -> v3 differences: >> >> * Simplified code in patch 2, minor commit rewording >> * Made conditional check more valgrind-friendly >> >> v1 -> v2 differences: >> >> * Updated changes to be protocol friendly >> *

Re: [Qemu-devel] [PATCH v3 2/4] monitor: Enable adding an inherited fd to an fd set

2012-10-17 Thread Kevin Wolf
Am 16.10.2012 20:08, schrieb Corey Bryant: > qmp_add_fd() gets an fd that was received over a socket with > SCM_RIGHTS and adds it to an fd set. This patch adds support > that will enable adding an fd that was inherited on the > command line to an fd set. > > Note: All of the code added to monito

Re: [Qemu-devel] [PATCH v3 4/4] qemu-config: Add new -add-fd command line option

2012-10-17 Thread Kevin Wolf
Am 17.10.2012 06:16, schrieb Eric Blake: > I'm still seeing the corner case of: > > qemu-kvm -add-fd fd=3,set=1 -add-fd fd=4,set=2 4<&- > > where the dup(3) will populate fd 4 prior to the point where we get to > process the -add-fd fd=4 command to notice that the user started > qemu-kvm with fd

Re: [Qemu-devel] [PATCHv4] qemu-img rebase: use empty string to rebase without backing file

2012-10-17 Thread Kevin Wolf
Am 16.10.2012 14:46, schrieb Alex Bligh: > 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'

Re: [Qemu-devel] [PATCH v3 0/2] qemu-img: Add --backing-chain option to info command

2012-10-17 Thread Kevin Wolf
Am 17.10.2012 14:02, schrieb Stefan Hajnoczi: > This series adds the --backing-chain option for enumerating the backing file > chain. Given the topmost image it will print qemu-img info information for > each image file in the chain. > > Special care needs to be taken when image files form an inf

Re: [Qemu-devel] [PATCH v3 4/4] qemu-config: Add new -add-fd command line option

2012-10-17 Thread Kevin Wolf
Am 17.10.2012 17:01, schrieb Eric Blake: > On 10/17/2012 08:02 AM, Kevin Wolf wrote: >> Am 17.10.2012 06:16, schrieb Eric Blake: >>> I'm still seeing the corner case of: >>> >>> qemu-kvm -add-fd fd=3,set=1 -add-fd fd=4,set=2 4<&- >>> >>

Re: [Qemu-devel] qemu-img: document 'info --backing-chain

2012-10-17 Thread Kevin Wolf
Am 14.10.2012 07:30, schrieb Kashyap Chamarthy: > From a6233277e17338f571dda27cd9192d764f824b18 Mon Sep 17 00:00:00 2001 > From: Kashyap Chamarthy > Date: Sun, 14 Oct 2012 09:51:18 +0530 > Subject: [PATCH v2] qemu-img: document 'info --backing-chain' > > Signed-off-by: Kashyap Chamarthy > @@ -1

Re: [Qemu-devel] [PATCH v3] qemu-img: document 'info --backing-chain'

2012-10-18 Thread Kevin Wolf
Am 18.10.2012 07:55, schrieb Kashyap Chamarthy: > Signed-off-by: Kashyap Chamarthy > --- > qemu-img-cmds.hx | 4 ++-- > qemu-img.texi| 21 - > 2 files changed, 22 insertions(+), 3 deletions(-) Thanks, applied to the block branch. Kevin

Re: [Qemu-devel] [PATCH] block: bdrv_create(): don't leak cco.filename on error

2012-10-18 Thread Kevin Wolf
Am 17.10.2012 21:45, schrieb Luiz Capitulino: > > Signed-off-by: Luiz Capitulino Thanks, applied to the block branch. Kevin

Re: [Qemu-devel] [PATCH 2/2] qemu queue: fix uninitialized removals

2012-10-18 Thread Kevin Wolf
Am 17.10.2012 23:24, schrieb Tim Hardeck: > Hi Andreas, > > On Wednesday 17 October 2012 17:00:15 Andreas Färber wrote: >> Tim, >> >> Am 14.10.2012 15:08, schrieb Tim Hardeck: >>> When calling QTAILQ_REMOVE or QLIST_REMOVE on an unitialized list >>> QEMU segfaults. >> >> Can this be reproduced by

Re: [Qemu-devel] [PATCH 2/8] block: bdrv_img_create(): add param_list argument

2012-10-18 Thread Kevin Wolf
Am 17.10.2012 21:35, schrieb Luiz Capitulino: > If set returns a copy of the parameter list used by the block driver > to create the new image. > > Signed-off-by: Luiz Capitulino > --- > block.c| 7 ++- > block.h| 3 ++- > blockdev.c | 2 +- > qemu-img.c | 2 +- > 4 files changed, 10

Re: [Qemu-devel] [PATCH 3/8] block: bdrv_img_create(): move parameter list printing to qemu-img

2012-10-18 Thread Kevin Wolf
Am 17.10.2012 21:35, schrieb Luiz Capitulino: > Today, bdrv_img_create() prints the parameter list used to create the > new image to stdout, like this: > >Formatting '/tmp/a', fmt=qcow2 size=10737418240 encryption=off > cluster_size=65536 lazy_refcounts=off > > As the transaction QMP command

Re: [Qemu-devel] [PATCH 4/8] block: bdrv_img_create(): add Error ** argument

2012-10-18 Thread Kevin Wolf
Am 17.10.2012 21:35, schrieb Luiz Capitulino: > 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 t

Re: [Qemu-devel] [PATCH 5/8] qemu-img: img_create(): use Error object

2012-10-18 Thread Kevin Wolf
Am 17.10.2012 21:35, schrieb Luiz Capitulino: > Signed-off-by: Luiz Capitulino > --- > qemu-img.c | 10 +++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > > diff --git a/qemu-img.c b/qemu-img.c > index 12fb6c2..dfde588 100644 > --- a/qemu-img.c > +++ b/qemu-img.c > @@ -302,6 +302,7 @

Re: [Qemu-devel] [PATCH 3/8] block: bdrv_img_create(): move parameter list printing to qemu-img

2012-10-18 Thread Kevin Wolf
Am 18.10.2012 14:01, schrieb Kevin Wolf: > Am 17.10.2012 21:35, schrieb Luiz Capitulino: >> Today, bdrv_img_create() prints the parameter list used to create the >> new image to stdout, like this: >> >>Formatting '/tmp/a', fmt=qcow2 size=10737418240

Re: [Qemu-devel] [PATCH v2 29/45] qemu-iotests: add mirroring test case

2012-10-18 Thread Kevin Wolf
Am 26.09.2012 17:56, schrieb Paolo Bonzini: > Signed-off-by: Paolo Bonzini > --- > tests/qemu-iotests/040 | 353 > + > tests/qemu-iotests/040.out | 5 + > tests/qemu-iotests/group | 3 +- > 3 file modificati, 360 inserzioni(+). 1 rimozione(-)

Re: [Qemu-devel] [PATCH v2 31/45] mirror: add support for on-source-error/on-target-error

2012-10-18 Thread Kevin Wolf
Am 26.09.2012 17:56, schrieb Paolo Bonzini: > Error management is important for mirroring; otherwise, an error on the > target (even something as "innocent" as ENOSPC) requires to start again > with a full copy. Similar to on_read_error/on_write_error, two separate > knobs are provided for on_sour

Re: [Qemu-devel] [PATCH v2 29/45] qemu-iotests: add mirroring test case

2012-10-18 Thread Kevin Wolf
Am 18.10.2012 14:50, schrieb Paolo Bonzini: > Il 18/10/2012 14:43, Kevin Wolf ha scritto: >>>> tests/qemu-iotests/040 | 353 >>>> + >>>> tests/qemu-iotests/040.out | 5 + >>>> tests/qemu-io

Re: [Qemu-devel] [PATCH v2 31/45] mirror: add support for on-source-error/on-target-error

2012-10-18 Thread Kevin Wolf
Am 18.10.2012 15:10, schrieb Paolo Bonzini: > Il 18/10/2012 15:07, Kevin Wolf ha scritto: >>>> +s->synced = false; >>>> +if (read) { >>>> +return block_job_error_action(&s->common, s->common.bs, >>>> +

Re: [Qemu-devel] [PATCH 5/8] qemu-img: img_create(): use Error object

2012-10-18 Thread Kevin Wolf
Am 18.10.2012 15:49, schrieb Luiz Capitulino: > On Thu, 18 Oct 2012 14:11:40 +0200 > Kevin Wolf wrote: > >> Am 17.10.2012 21:35, schrieb Luiz Capitulino: >>> Signed-off-by: Luiz Capitulino >>> --- >>> qemu-img.c | 10 +++--- >>> 1 file ch

Re: [Qemu-devel] [PATCH v2 31/45] mirror: add support for on-source-error/on-target-error

2012-10-19 Thread Kevin Wolf
Am 18.10.2012 16:52, schrieb Paolo Bonzini: > Il 18/10/2012 15:56, Kevin Wolf ha scritto: >> Am 18.10.2012 15:10, schrieb Paolo Bonzini: >>> Il 18/10/2012 15:07, Kevin Wolf ha scritto: >>>>>> +s->synced = false; >>>>>> +if (read) {

Re: [Qemu-devel] [PATCH 2/8] block: bdrv_img_create(): add param_list argument

2012-10-19 Thread Kevin Wolf
Am 18.10.2012 19:18, schrieb Luiz Capitulino: > On Thu, 18 Oct 2012 10:33:30 -0300 > Luiz Capitulino wrote: > >> On Thu, 18 Oct 2012 13:57:45 +0200 >> Kevin Wolf wrote: >> >>> Am 17.10.2012 21:35, schrieb Luiz Capitulino: >>>> If set returns a cop

Re: [Qemu-devel] [PATCH v4 4/4] qemu-config: Add new -add-fd command line option

2012-10-19 Thread Kevin Wolf
Am 18.10.2012 23:37, schrieb Corey Bryant: > > > On 10/18/2012 04:43 PM, Eric Blake wrote: >> On 10/18/2012 01:19 PM, Corey Bryant wrote: >>> This option can be used for passing file descriptors on the >>> command line. It mirrors the existing add-fd QMP command which >>> allows an fd to be pass

Re: [Qemu-devel] [PATCH v3 10/16] qmp: add drive-mirror command

2012-10-19 Thread Kevin Wolf
Am 18.10.2012 16:49, schrieb Paolo Bonzini: > This adds the monitor commands that start the mirroring job. > > Signed-off-by: Paolo Bonzini > --- > v2->v3: bdrv_is_inserted pulled before dereference of bs->drv > > blockdev.c | 124 > +++

Re: [Qemu-devel] [PATCH v3 12/16] qemu-iotests: add mirroring test case

2012-10-19 Thread Kevin Wolf
Am 18.10.2012 16:49, schrieb Paolo Bonzini: > Signed-off-by: Paolo Bonzini > --- > v2->v3: new testcases test_cancel_after_ready and > test_medium_not_found, removed obsolete workaround > for os.remove failure. Fixed copyright header. > > tests/qemu-iotests/041 | 364

Re: [Qemu-devel] [PATCHv4] qemu-img rebase: use empty string to rebase without backing file

2012-10-19 Thread Kevin Wolf
Am 18.10.2012 23:20, schrieb Alex Bligh: > Kevin, > > --On 17 October 2012 16:45:39 +0200 Kevin Wolf wrote: > >> um_sectors) { >>> @@ -1675,7 +1679,12 @@ static int img_rebase(int argc, char **argv) >>> * backing file are overwritten in the COW f

Re: [Qemu-devel] [PATCH v3 12/16] qemu-iotests: add mirroring test case

2012-10-19 Thread Kevin Wolf
Am 18.10.2012 16:49, schrieb Paolo Bonzini: > Signed-off-by: Paolo Bonzini > --- > v2->v3: new testcases test_cancel_after_ready and > test_medium_not_found, removed obsolete workaround > for os.remove failure. Fixed copyright header. > > tests/qemu-iotests/041 | 364

Re: [Qemu-devel] [PATCH v3 12/16] qemu-iotests: add mirroring test case

2012-10-22 Thread Kevin Wolf
Am 20.10.2012 15:47, schrieb Paolo Bonzini: > Il 19/10/2012 18:19, Kevin Wolf ha scritto: >> Am 18.10.2012 16:49, schrieb Paolo Bonzini: >>> Signed-off-by: Paolo Bonzini >>> --- >>> v2->v3: new testcases test_cancel_after_ready and >>>

Re: [Qemu-devel] [PATCH v3 01/26] blockdev: Introduce a default machine blockdev interface field, QEMUMachine->mach_if

2012-10-22 Thread Kevin Wolf
Am 22.10.2012 12:47, schrieb Michael S. Tsirkin: > On Fri, Oct 19, 2012 at 04:43:26PM -0400, Jason Baron wrote: >> From: Jason Baron >> >> The current QEMUMachine definition has a 'use_scsi' field to indicate if a >> machine type should use scsi by default. However, Q35 wants to use ahci by >> def

Re: [Qemu-devel] [PATCH v3 02/26] blockdev: Introduce IF_AHCI

2012-10-22 Thread Kevin Wolf
Am 22.10.2012 12:48, schrieb Michael S. Tsirkin: > On Fri, Oct 19, 2012 at 04:43:27PM -0400, Jason Baron wrote: >> From: Jason Baron >> >> Introduce IF_AHCI so that q35 can differentiate between ide and ahci disks. >> This allows q35 to specify its default disk type. It also allows q35 to >> diffe

Re: [Qemu-devel] [PATCH v2 1/1] atapi: make change media detection for guests easier

2012-10-22 Thread Kevin Wolf
Am 04.10.2012 16:16, schrieb Pavel Hrdina: > If you have a guest with a media in the cdrom and you change it, > the windows and the linux guests cannot properly recognize this > media change. > For this purpose we have to pretend for some time (2s), that we > don't have any media inserted. This us

Re: [Qemu-devel] buildbot failure in qemu on block_mingw32

2012-10-22 Thread Kevin Wolf
Am 20.10.2012 03:04, schrieb q...@buildbot.b1-systems.de: > The Buildbot has detected a new failure on builder block_mingw32 while > building qemu. > Full details are available at: > http://buildbot.b1-systems.de/qemu/builders/block_mingw32/builds/359 > > Buildbot URL: http://buildbot.b1-systems

[Qemu-devel] [PATCH v5] qemu-config: Add new -add-fd command line option

2012-10-22 Thread Kevin Wolf
t Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- Sorry, Corey, hope you're okay with me taking over your patch... Your patch was against the unmodified version while I already did some changes after the v4 review, so it didn't apply. This version just completely disables fd passi

Re: [Qemu-devel] [PATCH] main: Hide F_GETFD and FD_CLOEXEC use for _WIN32

2012-10-23 Thread Kevin Wolf
Am 22.10.2012 19:46, schrieb Corey Bryant: > > > On 10/22/2012 12:16 PM, Luiz Capitulino wrote: >> On Mon, 22 Oct 2012 09:53:44 -0400 >> Corey Bryant wrote: >> >>> >>> Signed-off-by: Corey Bryant >>> --- >>> vl.c | 2 ++ >>> 1 file changed, 2 insertions(+) >>> >>> diff --git a/vl.c b/vl.c >>

Re: [Qemu-devel] [PATCH 5/8] qemu-img: img_create(): use Error object

2012-10-23 Thread Kevin Wolf
Am 23.10.2012 11:58, schrieb Markus Armbruster: > Kevin Wolf writes: > >> Am 18.10.2012 15:49, schrieb Luiz Capitulino: >>> On Thu, 18 Oct 2012 14:11:40 +0200 >>> Kevin Wolf wrote: >>> >>>> Am 17.10.2012 21:35, schrieb Luiz Capitulino: >>

Re: [Qemu-devel] [PATCH 1/3] nbd: Only try to send flush/discard commands if connected to the NBD server

2012-10-23 Thread Kevin Wolf
Am 22.10.2012 13:09, schrieb n...@bytemark.co.uk: > > This is unlikely to come up now, but is a necessary prerequisite for > reconnection > behaviour. > > Signed-off-by: Nick Thomas > --- > block/nbd.c | 13 +++-- > 1 files changed, 11 insertions(+), 2 deletions(-) What's the real r

Re: [Qemu-devel] [PATCH 2/3] nbd: Explicitly disconnect and fail inflight I/O requests on error, then reconnect next I/O request.

2012-10-23 Thread Kevin Wolf
Am 22.10.2012 13:09, schrieb n...@bytemark.co.uk: > > The previous behaviour when an NBD connection broke was to fail just the > broken I/O request > and (sometimes) never unlock send_mutex. Now we explicitly call > nbd_teardown_connection and > fail all NBD requests in the "inflight" state - th

Re: [Qemu-devel] [PATCH 1/3] nbd: Only try to send flush/discard commands if connected to the NBD server

2012-10-23 Thread Kevin Wolf
Am 23.10.2012 13:08, schrieb Nicholas Thomas: > On Tue, 2012-10-23 at 12:33 +0200, Kevin Wolf wrote: >> Am 22.10.2012 13:09, schrieb n...@bytemark.co.uk: >>> >>> This is unlikely to come up now, but is a necessary prerequisite for >>> reconnection >>>

Re: [Qemu-devel] [PATCH] osdep: Less restrictive F_SEFL in qemu_dup_flags()

2012-10-23 Thread Kevin Wolf
Am 18.10.2012 22:41, schrieb Corey Bryant: > qemu_dup_flags() currently limits the flags that can be set on the > fcntl() F_SETFL call to those that we currently know can be set with > fcntl() F_SETFL. The problem with this is that it will prevent use > of new flags in the future without a code up

Re: [Qemu-devel] buildbot failure in qemu on block_mingw32

2012-10-24 Thread Kevin Wolf
Am 24.10.2012 03:05, schrieb q...@buildbot.b1-systems.de: > The Buildbot has detected a new failure on builder block_mingw32 while > building qemu. > Full details are available at: > http://buildbot.b1-systems.de/qemu/builders/block_mingw32/builds/363 > > Buildbot URL: http://buildbot.b1-systems

[Qemu-devel] [PATCH 19/32] block: introduce new dirty bitmap functionality

2012-10-24 Thread Kevin Wolf
From: Paolo Bonzini Assert that write_compressed is never used with the dirty bitmap. Setting the bits early is wrong, because a coroutine might concurrently examine them and copy incomplete data from the source. Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- block.c | 51

[Qemu-devel] [PATCH 12/32] monitor: Allow add-fd to any specified fd set

2012-10-24 Thread Kevin Wolf
. Signed-off-by: Corey Bryant Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- monitor.c| 54 +- qapi-schema.json |2 +- 2 files changed, 38 insertions(+), 18 deletions(-) diff --git a/monitor.c b/monitor.c index d17ae2d..3519b39

[Qemu-devel] [PATCH 13/32] monitor: Enable adding an inherited fd to an fd set

2012-10-24 Thread Kevin Wolf
exception of the error path for non-valid fdset-id, is code motion from qmp_add_fd(). Signed-off-by: Corey Bryant Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- monitor.c | 157 + monitor.h |3 + 2 files changed, 88 insertions

[Qemu-devel] [PATCH 21/32] block: rename block_job_complete to block_job_completed

2012-10-24 Thread Kevin Wolf
From: Paolo Bonzini The imperative will be used for the QMP command. Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- block/commit.c |2 +- block/stream.c |4 ++-- blockjob.c |2 +- blockjob.h |4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff

[Qemu-devel] [PATCH 18/32] block: add bdrv_open_backing_file

2012-10-24 Thread Kevin Wolf
does not assume that the file is closed immediately after it returns failure, so it keeps the BDRV_O_NO_BACKING flag up-to-date. Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- block.c | 56 ++-- block.h |1 + 2 files changed

[Qemu-devel] [PATCH 31/32] qemu-iotests: add testcases for mirroring on-source-error/on-target-error

2012-10-24 Thread Kevin Wolf
From: Paolo Bonzini The new options are tested with blkdebug on both the source and the target. Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- tests/qemu-iotests/041| 253 + tests/qemu-iotests/041.out|4 +- tests/qemu

[Qemu-devel] [PATCH 28/32] iostatus: forward block_job_iostatus_reset to block job

2012-10-24 Thread Kevin Wolf
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- block.c|3 +++ blockjob.c |3 +++ blockjob.h |6 +- 3 files changed, 11 insertions(+), 1 deletions(-) diff --git a/block.c b/block.c index ad5e240..1564137 100644 --- a/block.c +++ b/block.c

[Qemu-devel] [PATCH 27/32] qemu-iotests: add mirroring test case

2012-10-24 Thread Kevin Wolf
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- tests/qemu-iotests/041 | 362 tests/qemu-iotests/041.out |5 + tests/qemu-iotests/group |1 + 3 files changed, 368 insertions(+), 0 deletions(-) create

[Qemu-devel] [PATCH 17/32] block: add bdrv_query_stats

2012-10-24 Thread Kevin Wolf
From: Paolo Bonzini qmp_query_blockstat cannot have errors, remove the Error argument and create a new public function bdrv_query_stats out of it. Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- block.c | 18 ++ block.h |1 + 2 files changed, 7 insertions

[Qemu-devel] [PATCH 04/32] qemu-img rebase: use empty string to rebase without backing file

2012-10-24 Thread Kevin Wolf
ds support when -u is not used. Signed-off-by: Alex Bligh Signed-off-by: Kevin Wolf --- qemu-img.c| 29 +++-- qemu-img.texi |4 +++- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 849eb41..c092ccf 100644 --- a/qemu-i

[Qemu-devel] [PATCH 26/32] mirror: implement completion

2012-10-24 Thread Kevin Wolf
sync: 'full'). In this case, qmp_drive_mirror will create the target disk with no backing file at all, and bdrv_open_backing_file will be a no-op. Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- block/mirror.c | 45 - 1 files c

[Qemu-devel] [PATCH 08/32] qemu-img: Add --backing-chain option to info command

2012-10-24 Thread Kevin Wolf
image: base.qcow2 file format: qcow2 virtual size: 100M (104857600 bytes) disk size: 136K cluster_size: 65536 Signed-off-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- qemu-img.c | 167 +++- 1 files changed, 153 insertions(+), 14 del

[Qemu-devel] [PATCH 32/32] osdep: Less restrictive F_SEFL in qemu_dup_flags()

2012-10-24 Thread Kevin Wolf
checking and lets fcntl() determine the flags it can set. Signed-off-by: Corey Bryant Signed-off-by: Kevin Wolf --- osdep.c | 12 +--- 1 files changed, 1 insertions(+), 11 deletions(-) diff --git a/osdep.c b/osdep.c index 3b25297..c822a01 100644 --- a/osdep.c +++ b/osdep.c @@ -88,7

[Qemu-devel] [PATCH 05/32] block: make bdrv_find_backing_image compare canonical filenames

2012-10-24 Thread Kevin Wolf
_image to no longer be recursive, but iterative. Signed-off-by: Jeff Cody Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- block.c | 60 ++-- 1 files changed, 54 insertions(+), 6 deletions(-) diff --git a/block.c b/block.c inde

[Qemu-devel] [PATCH 14/32] monitor: Prevent removing fd from set during init

2012-10-24 Thread Kevin Wolf
From: Corey Bryant If an fd is added to an fd set via the command line, and it is not referenced by another command line option (ie. -drive), then clean it up after QEMU initialization is complete. Signed-off-by: Corey Bryant Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- monitor.c

[Qemu-devel] [PATCH 15/32] qemu-config: Add new -add-fd command line option

2012-10-24 Thread Kevin Wolf
t Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- qemu-config.c | 22 + qemu-options.hx | 36 + vl.c| 94 +++ 3 files changed, 152 insertions(+), 0 deletions(-) diff --git a/qemu-config.c b

[Qemu-devel] [PATCH 09/32] qemu-iotests: Add 043 backing file chain infinite loop test

2012-10-24 Thread Kevin Wolf
From: Stefan Hajnoczi This new test verifies that qemu-img info --backing-chain safely aborts when an image file has a backing file infinite loop. Signed-off-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- tests/qemu-iotests/043 | 95

[Qemu-devel] [PATCH 16/32] block: add bdrv_query_info

2012-10-24 Thread Kevin Wolf
From: Paolo Bonzini Extract it out of the implementation of "info block". Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- block.c | 106 +++--- block.h |1 + 2 files changed, 54 insertions(+), 53 deletions(-)

[Qemu-devel] [PATCH 03/32] qmp: fix __accept() in qmp.py

2012-10-24 Thread Kevin Wolf
: Jeff Cody Reviewed-by: Stefan Hajnoczi Acked-by: Luiz Capitulino Signed-off-by: Kevin Wolf --- QMP/qmp.py |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/QMP/qmp.py b/QMP/qmp.py index 33c7d36..32510a1 100644 --- a/QMP/qmp.py +++ b/QMP/qmp.py @@ -96,6 +96,7 @@ class

[Qemu-devel] [PATCH 07/32] qemu-iotests: add relative backing file tests for block-commit (040)

2012-10-24 Thread Kevin Wolf
From: Jeff Cody The previous block commit used absolute filenames for all block-commit images and commands; this adds relative filenames for the same tests. Signed-off-by: Jeff Cody Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- tests/qemu-iotests/040 | 102

[Qemu-devel] [PATCH 06/32] block: in commit, determine base image from the top image

2012-10-24 Thread Kevin Wolf
-by: Kevin Wolf --- block/commit.c |9 - blockdev.c | 21 +++-- tests/qemu-iotests/040 |4 ++-- 3 files changed, 13 insertions(+), 21 deletions(-) diff --git a/block/commit.c b/block/commit.c index 733c914..13d9e82 100644 --- a/block/commit.c

<    1   2   3   4   5   6   7   8   9   10   >