Re: [Qemu-block] [PATCH] xen: piix reuse pci generic class init function

2016-04-06 Thread Michael S. Tsirkin
On Wed, Apr 06, 2016 at 04:56:12PM -0700, Stefano Stabellini wrote: > On Sun, 3 Apr 2016, Michael S. Tsirkin wrote: > > piix3_ide_xen_class_init is identical to piix3_ide_class_init > > except it's buggy as it does not set exit and does not disable > > hotplug properly. > > > > Switch to the gener

Re: [Qemu-block] [PATCH] xen: piix reuse pci generic class init function

2016-04-06 Thread Stefano Stabellini
On Sun, 3 Apr 2016, Michael S. Tsirkin wrote: > piix3_ide_xen_class_init is identical to piix3_ide_class_init > except it's buggy as it does not set exit and does not disable > hotplug properly. > > Switch to the generic one. > > Reviewed-by: Stefano Stabellini > Signed-off-by: Michael S. Tsirki

Re: [Qemu-block] [PATCH for-2.6] block: Forbid I/O throttling on nodes with multiple parents for 2.6

2016-04-06 Thread Alberto Garcia
On Mon 04 Apr 2016 05:26:02 PM CEST, Kevin Wolf wrote: > As the patches to move I/O throttling to BlockBackend didn't make it in > time for the 2.6 release, but the release adds new ways of configuring > VMs whose behaviour would change once the move is done, we need to > outlaw such configurations

[Qemu-block] [PATCH v3 14/14] iotests: Add test for NBD's blockdev-add interface

2016-04-06 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/147 | 194 + tests/qemu-iotests/147.out | 5 ++ tests/qemu-iotests/group | 1 + 3 files changed, 200 insertions(+) create mode 100755 tests/qemu-iotests/147 create mode 100644 tests/qemu-iotest

[Qemu-block] [PATCH v3 12/14] iotests.py: Allow concurrent qemu instances

2016-04-06 Thread Max Reitz
By adding an optional suffix to the files used for communication with a VM, we can launch multiple VM instances concurrently. Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/iotests.py b

Re: [Qemu-block] [PATCH v3 0/7] bdrv_flush_io_queue removal, shared LinuxAioState

2016-04-06 Thread Kevin Wolf
Am 06.04.2016 um 20:28 hat Paolo Bonzini geschrieben: > > > On 06/04/2016 20:19, Kevin Wolf wrote: > >> > > >> > Great, I'll send v4 as soon as possible for inclusion in the block-next > >> > branch. > > Are you still working on v4 or did I miss it? All of the block-next > > candidate series are

[Qemu-block] [PATCH v3 13/14] socket_scm_helper: Accept fd directly

2016-04-06 Thread Max Reitz
This gives us more freedom about the fd that is passed to qemu, allowing us to e.g. pass sockets. Signed-off-by: Max Reitz --- tests/qemu-iotests/socket_scm_helper.c | 29 ++--- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/tests/qemu-iotests/socket_scm_

[Qemu-block] [PATCH v3 11/14] iotests.py: Add qemu_nbd function

2016-04-06 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 8499e1b..b3c00dd 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotes

[Qemu-block] [PATCH v3 08/14] block/nbd: Accept SocketAddress

2016-04-06 Thread Max Reitz
Add a new option "address" to the NBD block driver which accepts a SocketAddress. "path", "host" and "port" are still supported as legacy options and are mapped to their corresponding SocketAddress representation. Signed-off-by: Max Reitz --- block/nbd.c | 97 +

[Qemu-block] [PATCH v3 10/14] qapi: Allow blockdev-add for NBD

2016-04-06 Thread Max Reitz
Signed-off-by: Max Reitz --- qapi/block-core.json | 23 +-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 1d09079..6e38ff0 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -1632,13 +1632,14 @@ #

[Qemu-block] [PATCH v3 06/14] block/nbd: Add nbd_has_filename_options_conflict()

2016-04-06 Thread Max Reitz
Right now, we have four possible options that conflict with specifying an NBD filename, and a future patch will add another one ("address"). This future option is a nested QDict that is flattened at this point, requiring as to test each option whether its key has an "address." prefix. Therefore, we

[Qemu-block] [PATCH v3 09/14] block/nbd: Use SocketAddress options

2016-04-06 Thread Max Reitz
Drop the use of legacy options in favor of the SocketAddress representation, even for internal use (i.e. for storing the result of the filename parsing). Signed-off-by: Max Reitz --- block/nbd.c | 34 +- 1 file changed, 21 insertions(+), 13 deletions(-) diff --gi

[Qemu-block] [PATCH v3 07/14] block/nbd: "address" in nbd_refresh_filename()

2016-04-06 Thread Max Reitz
As of a future patch, the NBD block driver will accept a SocketAddress structure for a new "address" option. In order to support this, nbd_refresh_filename() needs some changes. The two TODOs introduced by this patch will be removed in the very next one. They exist to explain that it is currently

[Qemu-block] [PATCH v3 03/14] block/nbd: Reject port parameter without host

2016-04-06 Thread Max Reitz
This is better than the generic block layer finding out later that the port parameter has not been used. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- block/nbd.c | 4 1 file changed, 4 insertions(+) diff --git a/block/nbd.c b/block/nbd.c index d9b946f..2112ec0 100644 --- a/block/n

[Qemu-block] [PATCH v3 04/14] block/nbd: Default port in nbd_refresh_filename()

2016-04-06 Thread Max Reitz
Instead of not emitting the port in nbd_refresh_filename(), just set it to the default if the user did not specify it. This makes the logic a bit simpler. Signed-off-by: Max Reitz --- block/nbd.c | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/block/nbd.c

[Qemu-block] [PATCH v3 05/14] block/nbd: Use qdict_put()

2016-04-06 Thread Max Reitz
Instead of inlining this nice macro (i.e. resorting to qdict_put_obj(..., QOBJECT(...))), use it. Signed-off-by: Max Reitz --- block/nbd.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/block/nbd.c b/block/nbd.c index efa5d3d..d12bcc6 100644 --- a/block/nbd.c ++

[Qemu-block] [PATCH v3 01/14] qdict: Add qdict_change_key()

2016-04-06 Thread Max Reitz
This is a shorthand function for changing a QDict's entry's key. Signed-off-by: Max Reitz --- include/qapi/qmp/qdict.h | 1 + qobject/qdict.c | 23 +++ 2 files changed, 24 insertions(+) diff --git a/include/qapi/qmp/qdict.h b/include/qapi/qmp/qdict.h index 8a3ac13.

[Qemu-block] [PATCH v3 02/14] block/nbd: Drop trailing "." in error messages

2016-04-06 Thread Max Reitz
Signed-off-by: Max Reitz --- block/nbd.c | 4 ++-- tests/qemu-iotests/051.out| 4 ++-- tests/qemu-iotests/051.pc.out | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/block/nbd.c b/block/nbd.c index f7ea3b3..d9b946f 100644 --- a/block/nbd.c +++ b/block

[Qemu-block] [PATCH v3 for-2.7 00/14] qapi: Allow blockdev-add for NBD

2016-04-06 Thread Max Reitz
Turns out NBD is not so simple to do if you do it right. Anyway, this series adds blockdev-add support for NBD clients. Patch 1 adds a QDict function which I needed in later NBD patches for handling legacy options (move "host" to "address.data.host" etc.). Patches 2, 3, 4, and 5 are minor patches

Re: [Qemu-block] [PATCH v3 0/7] bdrv_flush_io_queue removal, shared LinuxAioState

2016-04-06 Thread Paolo Bonzini
On 06/04/2016 20:19, Kevin Wolf wrote: >> > >> > Great, I'll send v4 as soon as possible for inclusion in the block-next >> > branch. > Are you still working on v4 or did I miss it? All of the block-next > candidate series are waiting to be rebased on this one, and moving parts > at the bottom o

Re: [Qemu-block] [PATCH v3 0/7] bdrv_flush_io_queue removal, shared LinuxAioState

2016-04-06 Thread Kevin Wolf
Am 30.03.2016 um 15:17 hat Paolo Bonzini geschrieben: > On 30/03/2016 15:06, Stefan Hajnoczi wrote: > > Acked-by: Stefan Hajnoczi > > Great, I'll send v4 as soon as possible for inclusion in the block-next > branch. Are you still working on v4 or did I miss it? All of the block-next candidate se

[Qemu-block] [PATCH v2 for-2.7 4/8] block: Drop blk_new_with_bs()

2016-04-06 Thread Max Reitz
Its only caller is blk_new_open(), so we can just inline it there. Signed-off-by: Max Reitz --- block/block-backend.c | 28 ++-- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/block/block-backend.c b/block/block-backend.c index 66b8bad..4e8e8ab 100644 ---

[Qemu-block] [PATCH v2 for-2.7 3/8] tests: Drop BDS from test-throttle.c

2016-04-06 Thread Max Reitz
Now that throttling has been moved to the BlockBackend level, we do not need to create a BDS along with the BB in the I/O throttling test. Signed-off-by: Max Reitz --- tests/test-throttle.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test-throttle.c b/tests/te

[Qemu-block] [PATCH v2 for-2.7 8/8] block: Drop bdrv_parent_cb_...() from bdrv_close()

2016-04-06 Thread Max Reitz
bdrv_close() now asserts that the BDS's refcount is 0, therefore it cannot have any parents and the bdrv_parent_cb_change_media() call is a no-op. Signed-off-by: Max Reitz --- block.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/block.c b/block.c index 963abcc..7d7fd89 100644 --- a/block

[Qemu-block] [PATCH v2 for-2.7 7/8] block: Assert !bs->refcnt in bdrv_close()

2016-04-06 Thread Max Reitz
The only caller of bdrv_close() left is bdrv_delete(). We may as well assert that, in a way (there are some things in bdrv_close() that make more sense under that assumption, such as the call to bdrv_release_all_dirty_bitmaps() which in turn assumes that no frozen bitmaps are attached to the BDS).

[Qemu-block] [PATCH v2 for-2.7 6/8] block: Make bdrv_open() return a BDS

2016-04-06 Thread Max Reitz
There are no callers to bdrv_open() or bdrv_open_inherit() left that pass a pointer to a non-NULL BDS pointer as the first argument of these functions, so we can finally drop that parameter and just make them return the new BDS. Generally, the following pattern is applied: bs = NULL; ret

[Qemu-block] [PATCH v2 for-2.7 5/8] block: Drop bdrv_new_root()

2016-04-06 Thread Max Reitz
By now it has become just a wrapper around bdrv_new() and it has only a single user. Use bdrv_new() there instead and drop this function. Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia --- block.c | 5 - include/block/block.h | 1 - 2 files changed, 6 deletions(-) diff

[Qemu-block] [PATCH v2 for-2.7 1/8] block: Drop useless bdrv_new() call

2016-04-06 Thread Max Reitz
bdrv_append_temp_snapshot() uses bdrv_new() to create an empty BDS before invoking bdrv_open() on that BDS. This is probably a relict from when it used to do some modifications on that empty BDS, but now that is unnecessary, so we can just set bs_snapshot to NULL and let bdrv_open() do the rest. S

[Qemu-block] [PATCH v2 for-2.7 2/8] block: Let bdrv_open_inherit() return the snapshot

2016-04-06 Thread Max Reitz
If bdrv_open_inherit() creates a snapshot BDS and *pbs is NULL, that snapshot BDS should be returned instead of the BDS under it. To this end, bdrv_append_temp_snapshot() now returns the snapshot BDS instead of just appending it on top of the snapshotted BDS. Also, it calls bdrv_ref() before bdrv_

[Qemu-block] [PATCH v2 for-2.7 0/8] blockdev: (Nearly) free clean-up work

2016-04-06 Thread Max Reitz
After a lot has been restructed in the block layer in the past, we can now reap at least one of the fruits: Make bdrv_open() return a BDS! This series depends on the following series/patches: - Revert "block: Forbid I/O throttling on nodes with multiple parents for 2.6" This is something I su

[Qemu-block] [PATCH v2] qcow2: Prevent backing file names longer than 1023

2016-04-06 Thread Max Reitz
We reject backing file names with a length of more than 1023 characters when opening a qcow2 file, so we should not produce such files ourselves. Cc: qemu-sta...@nongnu.org Signed-off-by: Max Reitz --- v2: - Move the check to qcow2_change_backing_file() so the BDS state will not be modified if

Re: [Qemu-block] [PATCH 6/7] qemu-iotests: 141: reduce likelihood of race condition on systems with fast IO

2016-04-06 Thread Kevin Wolf
Am 06.04.2016 um 18:15 hat Max Reitz geschrieben: > On 05.04.2016 11:21, Sascha Silbe wrote: > > On systems with fast IO, qemu-io may write more than 1 MiB before > > receiving the block-job-cancel command, causing the test case to fail. > > > > 141 is inherently racy, but we can at least reduce t

Re: [Qemu-block] [PATCH 7/7] qemu-iotests: iotests.py: get rid of __all__

2016-04-06 Thread Max Reitz
On 05.04.2016 11:21, Sascha Silbe wrote: > The __all__ list contained a typo for as long as the iotests module > existed. That typo prevented "from iotests import *" (which is the > only case where iotests.__all__ is used at all) from ever working. Hahaha :D Nice one. > The names used by iotests

Re: [Qemu-block] [PATCH] qcow2: Prevent backing file names longer than 1023

2016-04-06 Thread Kevin Wolf
Am 06.04.2016 um 17:14 hat Max Reitz geschrieben: > We reject backing file names with a length of more than 1023 characters > when opening a qcow2 file, so we should not produce such files > ourselves. > > Cc: qemu-sta...@nongnu.org > Signed-off-by: Max Reitz > --- > block/qcow2.c | 5 + > 1

Re: [Qemu-block] [PATCH 6/7] qemu-iotests: 141: reduce likelihood of race condition on systems with fast IO

2016-04-06 Thread Max Reitz
On 05.04.2016 11:21, Sascha Silbe wrote: > On systems with fast IO, qemu-io may write more than 1 MiB before > receiving the block-job-cancel command, causing the test case to fail. > > 141 is inherently racy, but we can at least reduce the likelihood of the > job completing before the cancel comm

Re: [Qemu-block] [PATCH 5/7] qemu-iotests: 068: don't require KVM

2016-04-06 Thread Max Reitz
On 05.04.2016 11:21, Sascha Silbe wrote: > None of the other test cases explicitly enable KVM and there's no > obvious reason for 068 to require it. Drop this so all test cases can be > executed in environments where KVM is not available (e.g. because the > user doesn't have sufficient permissions

Re: [Qemu-block] [PATCH for-2.6 2/2] block/gluster: prevent data loss after i/o error

2016-04-06 Thread Jeff Cody
On Wed, Apr 06, 2016 at 04:47:32PM +0200, Niels de Vos wrote: > On Wed, Apr 06, 2016 at 08:44:18AM -0400, Jeff Cody wrote: > > On Wed, Apr 06, 2016 at 01:02:16PM +0200, Kevin Wolf wrote: > > > [ Adding some CCs ] > > > > > > Am 06.04.2016 um 05:29 hat Jeff Cody geschrieben: > > > > Upon receiving

Re: [Qemu-block] [PATCH 4/7] qemu-iotests: 148: properly skip test if quorum support is missing

2016-04-06 Thread Max Reitz
On 05.04.2016 11:21, Sascha Silbe wrote: > qemu-iotests test case 148 already had some code for skipping the test > if quorum support is missing, but it didn't work in all > cases. TestQuorumEvents.setUp() gets run before the actual test class > (which contains the skipping code) and tries to start

Re: [Qemu-block] [PATCH for-2.6] block: Forbid I/O throttling on nodes with multiple parents for 2.6

2016-04-06 Thread Paolo Bonzini
On 06/04/2016 17:55, Alberto Garcia wrote: >> > [BB] overlay >> > | >> > | >> > [BDS] qcow2 [BB] backing >> > || >> > ++ >> > .| >> > . I/O throttling >> >

Re: [Qemu-block] [PATCH for-2.6] block: Forbid I/O throttling on nodes with multiple parents for 2.6

2016-04-06 Thread Alberto Garcia
On Wed 06 Apr 2016 11:59:47 AM CEST, Kevin Wolf wrote: > Let me draw some ASCII art. I'm drawing I/O throttling like a filter > to make the difference clear; in reality it's part of the BDS now or > of the BB in 2.7, so don't let this confuse you. > > Let's assume these command line options: > > -d

Re: [Qemu-block] [PATCH 3/7] qemu-iotests: iotests.VM: remove qtest socket on error

2016-04-06 Thread Max Reitz
On 05.04.2016 11:21, Sascha Silbe wrote: > On error, VM.launch() cleaned up the monitor unix socket, but left the > qtest unix socket behind. This caused the remaining sub-tests to fail > with EADDRINUSE: > > +== > +ERROR: testQuo

Re: [Qemu-block] [PATCH 2/7] qemu-iotests: fix 051 on non-PC architectures

2016-04-06 Thread Max Reitz
On 05.04.2016 11:21, Sascha Silbe wrote: > Commit 61de4c68 [block: Remove BDRV_O_CACHE_WB] updated the reference > output for PCs, but neglected to do the same for the generic reference > output file. Fix 051 on all non-PC architectures by applying the same > change to the generic output file. > >

Re: [Qemu-block] [Qemu-devel] [PATCH] qcow2: Prevent backing file names longer than 1023

2016-04-06 Thread Eric Blake
On 04/06/2016 09:14 AM, Max Reitz wrote: > We reject backing file names with a length of more than 1023 characters > when opening a qcow2 file, so we should not produce such files > ourselves. > > Cc: qemu-sta...@nongnu.org > Signed-off-by: Max Reitz > --- > block/qcow2.c | 5 + > 1 file cha

Re: [Qemu-block] [PATCH 1/7] qemu-iotests: check: don't place files with predictable names in /tmp

2016-04-06 Thread Max Reitz
On 05.04.2016 11:21, Sascha Silbe wrote: > Placing files with predictable or even hard-coded names in /tmp is a > security risk and can prevent or disturb operation on a multi-user > machine. Place them inside the "scratch" directory instead, as we > already do for most other test-related files. >

[Qemu-block] [PATCH] qcow2: Prevent backing file names longer than 1023

2016-04-06 Thread Max Reitz
We reject backing file names with a length of more than 1023 characters when opening a qcow2 file, so we should not produce such files ourselves. Cc: qemu-sta...@nongnu.org Signed-off-by: Max Reitz --- block/qcow2.c | 5 + 1 file changed, 5 insertions(+) diff --git a/block/qcow2.c b/block/q

Re: [Qemu-block] Possible bug: virtio-scsi + iothread (Former x-data-plane) = "Guest moved index from 0 to 61440" warning

2016-04-06 Thread Paolo Bonzini
On 06/04/2016 16:59, Zir Blazer wrote: >> On Tue, Apr 05, 2016 at 07:49:47PM -0300, Zir Blazer wrote: >> > The bare minimum script that produces the warning, should be this: >> > #!/bin/bash >> > qemu-system-x86_64 \-m 1024M \-enable-kvm \-object > iothread,id=iothread0 \-device virtio-scsi-pci,i

Re: [Qemu-block] Possible bug: virtio-scsi + iothread (Former x-data-plane) = "Guest moved index from 0 to 61440" warning

2016-04-06 Thread Zir Blazer
> On Tue, Apr 05, 2016 at 07:49:47PM -0300, Zir Blazer wrote:> > The bare > minimum script that produces the warning, should be this: > > #!/bin/bash > > qemu-system-x86_64 \-m 1024M \-enable-kvm \-object iothread,id=iothread0 > > \-device virtio-scsi-pci,iothread=iothread0 \ > > This produces

Re: [Qemu-block] [PATCH for-2.6 1/2] block/gluster: return correct error value

2016-04-06 Thread Niels de Vos
On Tue, Apr 05, 2016 at 11:29:51PM -0400, Jeff Cody wrote: > Upon error, gluster will call the aio callback function with a > ret value of -1, with errno set to the proper error value. If > we set the acb->ret value to the return value in the callback, > that results in every error being EPERM (i.

Re: [Qemu-block] [PATCH for-2.6 2/2] block/gluster: prevent data loss after i/o error

2016-04-06 Thread Niels de Vos
On Wed, Apr 06, 2016 at 08:44:18AM -0400, Jeff Cody wrote: > On Wed, Apr 06, 2016 at 01:02:16PM +0200, Kevin Wolf wrote: > > [ Adding some CCs ] > > > > Am 06.04.2016 um 05:29 hat Jeff Cody geschrieben: > > > Upon receiving an I/O error after an fsync, by default gluster will > > > dump its cache.

Re: [Qemu-block] [Qemu-devel] [PATCH] qemu-img: fix formatting of error message

2016-04-06 Thread Eric Blake
On 04/06/2016 03:16 AM, Daniel P. Berrange wrote: > The error_reportf_err() will not automatically append a > ': ' before adding its suffix, so we must include that > in the message we pass it, otherwise we get a badly > formatted message lacking whitespace: > > qemu-img: Could not open > 'driver

Re: [Qemu-block] [PATCH for-2.6 2/2] block/gluster: prevent data loss after i/o error

2016-04-06 Thread Ric Wheeler
We had a thread discussing this not on the upstream list. My summary of the thread is that I don't understand why gluster should drop cached data after a failed fsync() for any open file. For closed files, I think it might still happen but this is the same as any file system (and unlikely to

Re: [Qemu-block] [Qemu-devel] [PATCH] block: initialize qcrypto API at startup

2016-04-06 Thread Alex Bligh
On 6 Apr 2016, at 12:12, Daniel P. Berrange wrote: > Any programs which call the qcrypto APIs should ensure that > qcrypto_init() has been called before anything else which > can use crypto. Essentially this means right at the start > of the main method before initializing anything else. > > Th

Re: [Qemu-block] [PATCH for-2.6 2/2] block/gluster: prevent data loss after i/o error

2016-04-06 Thread Kevin Wolf
Am 06.04.2016 um 15:10 hat Jeff Cody geschrieben: > On Wed, Apr 06, 2016 at 01:51:59PM +0200, Kevin Wolf wrote: > > Am 06.04.2016 um 13:41 hat Kevin Wolf geschrieben: > > > Am 06.04.2016 um 13:19 hat Ric Wheeler geschrieben: > > > > > > > > We had a thread discussing this not on the upstream list.

Re: [Qemu-block] [PATCH for-2.6 2/2] block/gluster: prevent data loss after i/o error

2016-04-06 Thread Jeff Cody
On Wed, Apr 06, 2016 at 01:51:59PM +0200, Kevin Wolf wrote: > Am 06.04.2016 um 13:41 hat Kevin Wolf geschrieben: > > Am 06.04.2016 um 13:19 hat Ric Wheeler geschrieben: > > > > > > We had a thread discussing this not on the upstream list. > > > > > > My summary of the thread is that I don't under

Re: [Qemu-block] [PATCH for-2.6 2/2] block/gluster: prevent data loss after i/o error

2016-04-06 Thread Jeff Cody
On Wed, Apr 06, 2016 at 01:02:16PM +0200, Kevin Wolf wrote: > [ Adding some CCs ] > > Am 06.04.2016 um 05:29 hat Jeff Cody geschrieben: > > Upon receiving an I/O error after an fsync, by default gluster will > > dump its cache. However, QEMU will retry the fsync, which is especially > > useful wh

Re: [Qemu-block] [PATCH for-2.6 2/2] block/gluster: prevent data loss after i/o error

2016-04-06 Thread Kevin Wolf
Am 06.04.2016 um 13:41 hat Kevin Wolf geschrieben: > Am 06.04.2016 um 13:19 hat Ric Wheeler geschrieben: > > > > We had a thread discussing this not on the upstream list. > > > > My summary of the thread is that I don't understand why gluster > > should drop cached data after a failed fsync() for

Re: [Qemu-block] [PATCH for-2.6 2/2] block/gluster: prevent data loss after i/o error

2016-04-06 Thread Kevin Wolf
Am 06.04.2016 um 13:19 hat Ric Wheeler geschrieben: > > We had a thread discussing this not on the upstream list. > > My summary of the thread is that I don't understand why gluster > should drop cached data after a failed fsync() for any open file. It certainly shouldn't, but it does by default

[Qemu-block] [PATCH] block: initialize qcrypto API at startup

2016-04-06 Thread Daniel P. Berrange
Any programs which call the qcrypto APIs should ensure that qcrypto_init() has been called before anything else which can use crypto. Essentially this means right at the start of the main method before initializing anything else. This is important because some versions of gnutls/gcrypt require exp

Re: [Qemu-block] [PATCH for-2.6 2/2] block/gluster: prevent data loss after i/o error

2016-04-06 Thread Kevin Wolf
[ Adding some CCs ] Am 06.04.2016 um 05:29 hat Jeff Cody geschrieben: > Upon receiving an I/O error after an fsync, by default gluster will > dump its cache. However, QEMU will retry the fsync, which is especially > useful when encountering errors such as ENOSPC when using the werror=stop > optio

Re: [Qemu-block] [PATCH] qemu-img: fix formatting of error message

2016-04-06 Thread Kevin Wolf
Am 06.04.2016 um 11:16 hat Daniel P. Berrange geschrieben: > The error_reportf_err() will not automatically append a > ': ' before adding its suffix, so we must include that > in the message we pass it, otherwise we get a badly > formatted message lacking whitespace: > > qemu-img: Could not open

Re: [Qemu-block] [PATCH for-2.6] block: Forbid I/O throttling on nodes with multiple parents for 2.6

2016-04-06 Thread Kevin Wolf
Am 06.04.2016 um 11:45 hat Alberto Garcia geschrieben: > On Mon 04 Apr 2016 05:26:02 PM CEST, Kevin Wolf wrote: > > The problem exists whenever a BDS has more users than just its BB, for > > example it is used as a backing file for another node. > > The code seems correct, but I don't understand t

Re: [Qemu-block] [PATCH for-2.6] block: Forbid I/O throttling on nodes with multiple parents for 2.6

2016-04-06 Thread Alberto Garcia
On Mon 04 Apr 2016 05:26:02 PM CEST, Kevin Wolf wrote: > The problem exists whenever a BDS has more users than just its BB, for > example it is used as a backing file for another node. The code seems correct, but I don't understand this use case. Berto

[Qemu-block] [PATCH] qemu-img: fix formatting of error message

2016-04-06 Thread Daniel P. Berrange
The error_reportf_err() will not automatically append a ': ' before adding its suffix, so we must include that in the message we pass it, otherwise we get a badly formatted message lacking whitespace: qemu-img: Could not open 'driver=nbd,host=127.0.0.1,port=,tls-creds=tls0'Failed to connect s

Re: [Qemu-block] Possible bug: virtio-scsi + iothread (Former x-data-plane) = "Guest moved index from 0 to 61440" warning

2016-04-06 Thread Stefan Hajnoczi
On Tue, Apr 05, 2016 at 07:49:47PM -0300, Zir Blazer wrote: > The bare minimum script that produces the warning, should be this: > #!/bin/bash > qemu-system-x86_64 \-m 1024M \-enable-kvm \-object iothread,id=iothread0 > \-device virtio-scsi-pci,iothread=iothread0 \ > This produces the "Guest moved

Re: [Qemu-block] [PATCH v12 2/3] quorum: implement bdrv_add_child() and bdrv_del_child()

2016-04-06 Thread Wen Congyang
On 04/01/2016 11:20 PM, Max Reitz wrote: > On 31.03.2016 13:42, Alberto Garcia wrote: >> On Wed 30 Mar 2016 05:07:15 PM CEST, Max Reitz wrote: I also have another (not directly related) question: why not simply use the node name when removing children? I understood that the idea was