[Qemu-block] [PATCH for-2.12] hw/block/pflash_cfi: fix off-by-one error

2018-04-04 Thread Philippe Mathieu-Daudé
ASAN reported: hw/block/pflash_cfi02.c:245:33: runtime error: index 82 out of bounds for type 'uint8_t [82]' Since the 'cfi_len' member is not used, remove it to keep the code safer. Reported-by: AddressSanitizer Signed-off-by: Philippe Mathieu-Daudé ---

Re: [Qemu-block] [PULL for-2.12 0/1] Block patches

2018-04-04 Thread Peter Maydell
On 4 April 2018 at 17:10, Jeff Cody wrote: > The following changes since commit fd69ad866b62ca8ed4337ffee83b6d82a4e99282: > > Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging > (2018-04-04 14:00:07 +0100) > > are available in the git repository at:

Re: [Qemu-block] [PATCH for-2.12] gluster: Fix blockdev-add with server.N.type=unix

2018-04-04 Thread Eric Blake
On 04/04/2018 01:37 PM, Kevin Wolf wrote: > Am 04.04.2018 um 20:16 hat Eric Blake geschrieben: >> On 04/04/2018 10:54 AM, Kevin Wolf wrote: >> > Should we also add a deprecation warning for 'socket' and update the > deprecation documentation, so we can start the clock ticking on getting

Re: [Qemu-block] [PATCH for-2.12] gluster: Fix blockdev-add with server.N.type=unix

2018-04-04 Thread Kevin Wolf
Am 04.04.2018 um 20:16 hat Eric Blake geschrieben: > On 04/04/2018 10:54 AM, Kevin Wolf wrote: > > >>> Should we also add a deprecation warning for 'socket' and update the > >>> deprecation documentation, so we can start the clock ticking on getting > >>> rid of maintaining the back-compat glue

Re: [Qemu-block] [PATCH for-2.12] gluster: Fix blockdev-add with server.N.type=unix

2018-04-04 Thread Eric Blake
On 04/04/2018 10:54 AM, Kevin Wolf wrote: >>> Should we also add a deprecation warning for 'socket' and update the >>> deprecation documentation, so we can start the clock ticking on getting >>> rid of maintaining the back-compat glue forever? >> >> Well, that won't be as easy. Since there is at

Re: [Qemu-block] [PATCH for-2.12 v2] qemu-iotests: update 185 output

2018-04-04 Thread Max Reitz
On 2018-04-04 17:01, Stefan Hajnoczi wrote: > Commit 4486e89c219c0d1b9bd8dfa0b1dd5b0d51ff2268 ("vl: introduce > vm_shutdown()") added a bdrv_drain_all() call. As a side-effect of the > drain operation the block job iterates one more time than before. The > 185 output no longer matches and the

[Qemu-block] [PULL for-2.12 0/1] Block patches

2018-04-04 Thread Jeff Cody
The following changes since commit fd69ad866b62ca8ed4337ffee83b6d82a4e99282: Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2018-04-04 14:00:07 +0100) are available in the git repository at: git://github.com/codyprime/qemu-kvm-jtc.git tags/block-pull-request

[Qemu-block] [PULL for-2.12 1/1] block/rbd: remove processed options from qdict

2018-04-04 Thread Jeff Cody
Commit 4bfb274 added some QAPIfication of option parsing in qemu_rbd_open(). We need to remove all the options we processed, otherwise in bdrv_open_inherit() we will think the remaining options are invalid. (This needs to go in 2.12 to avoid a regression that prevents rbd from being opened.)

Re: [Qemu-block] [PATCH for-2.12] block/rbd: remove processed options from qdict

2018-04-04 Thread Kevin Wolf
Am 04.04.2018 um 17:53 hat Jeff Cody geschrieben: > Commit 4bfb274 added some QAPIfication of option parsing in > qemu_rbd_open(). We need to remove all the options we processed, > otherwise in bdrv_open_inherit() we will think the remaining options are > invalid. > > (This needs to go in 2.12

Re: [Qemu-block] [PATCH for-2.12] gluster: Fix blockdev-add with server.N.type=unix

2018-04-04 Thread Kevin Wolf
Am 04.04.2018 um 17:41 hat Peter Krempa geschrieben: > On Tue, Apr 03, 2018 at 08:09:49 -0500, Eric Blake wrote: > > On 04/03/2018 06:08 AM, Kevin Wolf wrote: > > > The legacy command line interface gets the socket path from an option > > > called 'socket'. QAPI in contract uses SocketAddress,

[Qemu-block] [PATCH for-2.12] block/rbd: remove processed options from qdict

2018-04-04 Thread Jeff Cody
Commit 4bfb274 added some QAPIfication of option parsing in qemu_rbd_open(). We need to remove all the options we processed, otherwise in bdrv_open_inherit() we will think the remaining options are invalid. (This needs to go in 2.12 to avoid a regression that prevents rbd from being opened.)

Re: [Qemu-block] [PATCH for-2.12] gluster: Fix blockdev-add with server.N.type=unix

2018-04-04 Thread Peter Krempa
On Tue, Apr 03, 2018 at 08:09:49 -0500, Eric Blake wrote: > On 04/03/2018 06:08 AM, Kevin Wolf wrote: > > The legacy command line interface gets the socket path from an option > > called 'socket'. QAPI in contract uses SocketAddress, where the > > corresponding option is called 'path'. > > > >

Re: [Qemu-block] [Qemu-devel] [PATCH for-2.12 v2] qemu-iotests: update 185 output

2018-04-04 Thread Eric Blake
On 04/04/2018 10:01 AM, Stefan Hajnoczi wrote: > Commit 4486e89c219c0d1b9bd8dfa0b1dd5b0d51ff2268 ("vl: introduce > vm_shutdown()") added a bdrv_drain_all() call. As a side-effect of the > drain operation the block job iterates one more time than before. The > 185 output no longer matches and the

Re: [Qemu-block] [RFC PATCH 0/8] qemu-img convert with copy offloading

2018-04-04 Thread Paolo Bonzini
On 04/04/2018 15:49, Fam Zheng wrote: >> I posted concerns about the bdrv_co_map_range() interface. It would be >> safer to only have a copy_range() interface without exposing how data is >> mapped outside the driver where race conditions can occur and the format >> driver no longer has full

Re: [Qemu-block] [Qemu-devel] [PATCH] qemu-iotests: update 185 output

2018-04-04 Thread Stefan Hajnoczi
On Wed, Apr 04, 2018 at 02:59:14PM +0800, QingFeng Hao wrote: > 在 2018/4/3 22:03, Stefan Hajnoczi 写道: > Need we add the comment in 185.out that this change is to make the test pass > for the superfluous block job iteration? Thanks, I have sent v2. Stefan signature.asc Description: PGP

Re: [Qemu-block] [PATCH] qemu-iotests: update 185 output

2018-04-04 Thread Stefan Hajnoczi
On Tue, Apr 03, 2018 at 04:13:36PM +0200, Kevin Wolf wrote: > Am 03.04.2018 um 16:03 hat Stefan Hajnoczi geschrieben: > > Commit 4486e89c219c0d1b9bd8dfa0b1dd5b0d51ff2268 ("vl: introduce > > vm_shutdown()") added a bdrv_drain_all() call. As a side-effect of the > > drain operation the block job

[Qemu-block] [PATCH for-2.12 v2] qemu-iotests: update 185 output

2018-04-04 Thread Stefan Hajnoczi
Commit 4486e89c219c0d1b9bd8dfa0b1dd5b0d51ff2268 ("vl: introduce vm_shutdown()") added a bdrv_drain_all() call. As a side-effect of the drain operation the block job iterates one more time than before. The 185 output no longer matches and the test is failing now. It may be possible to avoid the

Re: [Qemu-block] [PULL 0/9] Block layer patches for 2.12.0-rc2

2018-04-04 Thread Peter Maydell
On 3 April 2018 at 17:33, Kevin Wolf wrote: > The following changes since commit f184de7553272223d6af731d7d623a7cebf710b5: > > Merge remote-tracking branch > 'remotes/riscv/tags/riscv-qemu-2.12-critical-fixes' into staging (2018-03-31 > 09:42:33 +0100) > > are available in

Re: [Qemu-block] [RFC PATCH 0/8] qemu-img convert with copy offloading

2018-04-04 Thread Fam Zheng
On Wed, 04/04 14:23, Stefan Hajnoczi wrote: > On Thu, Mar 29, 2018 at 07:09:06PM +0800, Fam Zheng wrote: > > [Posting a preview RFC for the general idea discussion and internal API > > review. > > Libiscsi support is being worked on in the meantime.] > > > > This series introduces block layer

Re: [Qemu-block] [RFC PATCH 0/8] qemu-img convert with copy offloading

2018-04-04 Thread Stefan Hajnoczi
On Thu, Mar 29, 2018 at 07:09:06PM +0800, Fam Zheng wrote: > [Posting a preview RFC for the general idea discussion and internal API > review. > Libiscsi support is being worked on in the meantime.] > > This series introduces block layer API for copy offloading and makes use of it > in qemu-img

Re: [Qemu-block] [RFC PATCH 4/8] file-posix: Implement bdrv_co_copy_range

2018-04-04 Thread Stefan Hajnoczi
On Thu, Mar 29, 2018 at 07:09:10PM +0800, Fam Zheng wrote: > +static ssize_t handle_aiocb_copy_range(RawPosixAIOData *aiocb) > +{ > +#ifndef HAS_COPY_FILE_RANGE > +return -ENOTSUP; > +#else > +uint64_t bytes = aiocb->aio_nbytes; > +off_t in_off = aiocb->aio_offset; > +off_t out_off

Re: [Qemu-block] [RFC PATCH 1/8] block: Introduce bdrv_co_map_range API

2018-04-04 Thread Stefan Hajnoczi
On Thu, Mar 29, 2018 at 07:09:07PM +0800, Fam Zheng wrote: > diff --git a/block/io.c b/block/io.c > index bd9a19a9c4..1b4cfcacb1 100644 > --- a/block/io.c > +++ b/block/io.c > @@ -2826,3 +2826,47 @@ void bdrv_unregister_buf(BlockDriverState *bs, void > *host) >

Re: [Qemu-block] [PULL 0/3] Block patches for 2.12-rc2

2018-04-04 Thread Peter Maydell
On 3 April 2018 at 17:13, Jeff Cody wrote: > The following changes since commit f184de7553272223d6af731d7d623a7cebf710b5: > > Merge remote-tracking branch > 'remotes/riscv/tags/riscv-qemu-2.12-critical-fixes' into staging (2018-03-31 > 09:42:33 +0100) > > are available in

Re: [Qemu-block] [RFC PATCH 1/8] block: Introduce bdrv_co_map_range API

2018-04-04 Thread Stefan Hajnoczi
On Thu, Mar 29, 2018 at 07:09:07PM +0800, Fam Zheng wrote: > +int coroutine_fn bdrv_co_map_range(BdrvChild *child, int64_t offset, > + int64_t bytes, int64_t *pnum, int64_t > *map, I just noticed that .bdrv_co_block_status() also calls the argument "map". In

Re: [Qemu-block] [PATCH 0/3] iotests: blacklist bochs and cloop for 205 and 208

2018-04-04 Thread Kevin Wolf
Am 30.03.2018 um 17:16 hat Vladimir Sementsov-Ogievskiy geschrieben: > Blacklist these formats, as they don't support image creation, as they > say: > > ./qemu-img create -f bochs x 1m > qemu-img: x: Format driver 'bochs' does not support image creation > > > ./qemu-img create -f

Re: [Qemu-block] [Qemu-devel] [PULL 1/9] gluster: Fix blockdev-add with server.N.type=unix

2018-04-04 Thread Kevin Wolf
Am 03.04.2018 um 23:03 hat Jeff Cody geschrieben: > On Tue, Apr 03, 2018 at 06:33:52PM +0200, Kevin Wolf wrote: > > The legacy command line interface gets the socket path from an option > > called 'socket'. QAPI in contract uses SocketAddress, where the > > corresponding option is called 'path'. >

Re: [Qemu-block] [PATCH 1/3] iotests.py: improve verify_image_format helper

2018-04-04 Thread Kevin Wolf
Am 04.04.2018 um 10:48 hat Vladimir Sementsov-Ogievskiy geschrieben: > 03.04.2018 16:54, Kevin Wolf wrote: > > Am 30.03.2018 um 17:16 hat Vladimir Sementsov-Ogievskiy geschrieben: > > > Add an assert (we don't want set both arguments) and remove > > > duplication. > > > > > > Signed-off-by:

Re: [Qemu-block] [PATCH 1/3] iotests.py: improve verify_image_format helper

2018-04-04 Thread Vladimir Sementsov-Ogievskiy
03.04.2018 16:54, Kevin Wolf wrote: Am 30.03.2018 um 17:16 hat Vladimir Sementsov-Ogievskiy geschrieben: Add an assert (we don't want set both arguments) and remove duplication. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/iotests.py | 6

Re: [Qemu-block] [Qemu-devel] [PATCH] qemu-iotests: update 185 output

2018-04-04 Thread QingFeng Hao
在 2018/4/3 22:03, Stefan Hajnoczi 写道: > Commit 4486e89c219c0d1b9bd8dfa0b1dd5b0d51ff2268 ("vl: introduce > vm_shutdown()") added a bdrv_drain_all() call. As a side-effect of the > drain operation the block job iterates one more time than before. The > 185 output no longer matches and the test