[Qemu-block] [PATCH 3/6] virtio-blk: convert to virtqueue_map

2015-10-27 Thread Michael S. Tsirkin
Drop deprecated use of virtqueue_map_sg. Signed-off-by: Michael S. Tsirkin --- hw/block/virtio-blk.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index 8beb26b..3e230de 100644 --- a/hw/block/virtio-blk.c

Re: [Qemu-block] [PATCH v8 01/15] block: Add blk_remove_bs()

2015-10-27 Thread Alberto Garcia
On Mon 26 Oct 2015 09:39:05 PM CET, Max Reitz wrote: > +void blk_remove_bs(BlockBackend *blk) > +{ > +blk_update_root_state(blk); > + > +blk->bs->blk = NULL; > +bdrv_unref(blk->bs); > +blk->bs = NULL; > +} I cannot think of any example out of the blue but I

Re: [Qemu-block] [PATCH 3/4] ide: add support for cancelable read requests

2015-10-27 Thread Peter Lieven
Am 26.10.2015 um 11:39 schrieb Stefan Hajnoczi: On Mon, Oct 12, 2015 at 02:27:24PM +0200, Peter Lieven wrote: this patch adds a new aio readv compatible function which copies all data through a bounce buffer. The benefit is that these requests can be flagged as canceled to avoid guest memory

Re: [Qemu-block] [PATCH v2 1/3] qemu-io: fix cvtnum lval types

2015-10-27 Thread Kevin Wolf
Am 27.10.2015 um 00:45 hat John Snow geschrieben: > cvtnum() returns int64_t: we should not be storing this > result inside of an int. > > In a few cases, we need an extra sprinkling of error handling > where we expect to pass this number on towards a function that > expects something smaller

Re: [Qemu-block] [PATCH v5 5/6] block: Drop BlockDriverState.filename

2015-10-27 Thread Kevin Wolf
Am 19.10.2015 um 20:49 hat Max Reitz geschrieben: > That field is now only used during initialization of BlockDriverStates > (opening images) and for error or warning messages. Performance is not > that much of an issue here, so we can drop the field and replace its use > by a call to

Re: [Qemu-block] [PATCH v8 02/15] block: Make bdrv_states public

2015-10-27 Thread Alberto Garcia
On Mon 26 Oct 2015 09:39:06 PM CET, Max Reitz wrote: > When inserting a BDS tree into a BB, we will need to add the root BDS to > this list. Since we will want to do that in the blockdev-insert-medium > implementation in blockdev.c, we will need access to it there. > > This patch is not exactly

Re: [Qemu-block] [PATCH v5 6/6] iotests: Test changed Quorum filename

2015-10-27 Thread Kevin Wolf
Am 19.10.2015 um 20:49 hat Max Reitz geschrieben: > After drive-mirror replacing a Quorum child, the filename of the Quorum > BDS should reflect the change. This patch replaces the existing test for > whether the operation did actually exchange the BDS (which simply tested > whether the new BDS

Re: [Qemu-block] [PATCH v2 2/3] qemu-io: Check for trailing chars

2015-10-27 Thread Kevin Wolf
Am 27.10.2015 um 00:45 hat John Snow geschrieben: > Make sure there's not trailing garbage, e.g. > "64k-whatever-i-want-here" > > Reported-by: Max Reitz > Signed-off-by: John Snow > Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf

Re: [Qemu-block] [PATCH v2 3/3] qemu-io: Correct error messages

2015-10-27 Thread Kevin Wolf
Am 27.10.2015 um 00:45 hat John Snow geschrieben: > Reported-by: Max Reitz > Signed-off-by: John Snow > Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf

Re: [Qemu-block] [PATCH v2 3/3] qemu-io: Correct error messages

2015-10-27 Thread Kevin Wolf
Am 27.10.2015 um 03:26 hat Eric Blake geschrieben: > On 10/26/2015 05:45 PM, John Snow wrote: > > Reported-by: Max Reitz > > Signed-off-by: John Snow > > Reviewed-by: Eric Blake > > --- > > qemu-io-cmds.c | 53

[Qemu-block] [PATCH 1/1] qemu-iotests: Test the reopening of overlay_bs in 'block-commit'

2015-10-27 Thread Alberto Garcia
The 'block-commit' command needs the overlay image of 'top' to be opened in read-write mode in order to update the backing file string. If 'top' is not the active layer or its backing file then its overlay needs to be reopened during the block job. This is a test case for that scenario.

Re: [Qemu-block] [Qemu-devel] [PATCH v2 3/3] qemu-io: Correct error messages

2015-10-27 Thread John Snow
On 10/26/2015 10:26 PM, Eric Blake wrote: > On 10/26/2015 05:45 PM, John Snow wrote: >> Reported-by: Max Reitz >> Signed-off-by: John Snow >> Reviewed-by: Eric Blake >> --- >> qemu-io-cmds.c | 53

Re: [Qemu-block] [PATCH v8 0/5] Add 'blockdev-snapshot' command

2015-10-27 Thread Kevin Wolf
Am 26.10.2015 um 13:27 hat Alberto Garcia geschrieben: > This series adds a new 'blockdev-snapshot' command, that is similar to > 'blockdev-snapshot-sync' but takes references to two existing block > devices. > > This finally applies (and works) cleanly on master. Max's patch to > allow creating

Re: [Qemu-block] [Qemu-devel] [PATCH v2 3/3] qemu-io: Correct error messages

2015-10-27 Thread Kevin Wolf
Am 27.10.2015 um 16:50 hat John Snow geschrieben: > > > On 10/26/2015 10:26 PM, Eric Blake wrote: > > On 10/26/2015 05:45 PM, John Snow wrote: > >> Reported-by: Max Reitz > >> Signed-off-by: John Snow > >> Reviewed-by: Eric Blake > >>

Re: [Qemu-block] [Qemu-devel] [PATCH v2 3/3] qemu-io: Correct error messages

2015-10-27 Thread Eric Blake
On 10/27/2015 09:50 AM, John Snow wrote: >>> +default: >>> +printf("Parsing error -- %s\n", arg); >> >> I still think ':' is better than ' --' in error messages, but I'll leave >> it up to the maintainer. >> > > Crud, sorry Eric -- I didn't do this on purpose. As Kevin notes, I was >

Re: [Qemu-block] [PATCH] ide: remove hardcoded 2GiB transactional limit

2015-10-27 Thread Stefan Hajnoczi
On Mon, Oct 26, 2015 at 07:38:02PM -0400, John Snow wrote: > Not that you can request a >2GiB transaction, but that's why checking > for it makes no sense anymore. > > With the newer 'limit' parameter to prepare_buf, we no longer need a > static limit. The maximum limit is still 2GiB, but the

[Qemu-block] [PATCH 0/1] Test the reopening of overlay_bs in 'block-commit'

2015-10-27 Thread Alberto Garcia
Hi, looks like we have a bug in the bdrv_reopen() code. It turns out that 'block-commit' fails if the 'top' node is not the active layer or its immediate backing file, and none of our test cases has detected that. I'm attaching one that reproduces the problem. What happens is that 'block-commit'

Re: [Qemu-block] [PATCH v8 00/15] blockdev: BlockBackend and media

2015-10-27 Thread Kevin Wolf
Am 26.10.2015 um 21:39 hat Max Reitz geschrieben: > Now that the main rework part of this series is merged, these remaining > patches here implement atomic tray/medium operations and add the > read-only-mode parameter to change and blockdev-change-medium (which was > the original purpose of this

Re: [Qemu-block] [PATCH v8 06/15] blockdev: Add blockdev-remove-medium

2015-10-27 Thread Kevin Wolf
Am 26.10.2015 um 21:39 hat Max Reitz geschrieben: > Signed-off-by: Max Reitz > +if (bdrv_op_is_blocked(bs, BLOCK_OP_TYPE_EJECT, errp)) { > +goto out; > +} > + > +/* This follows the convention established by bdrv_make_anon() */ > +if