Re: [Qemu-block] [PATCH v3 0/4] virtio/block: handle zoned backing devices

2019-07-26 Thread Dmitry Fomichev
John, please see inline... Regards, Dmitry On Thu, 2019-07-25 at 13:58 -0400, John Snow wrote: > > On 7/23/19 6:19 PM, Dmitry Fomichev wrote: > > Currently, attaching zoned block devices (i.e., storage devices > > compliant to ZAC/ZBC standards) using several virtio methods doesn't > > work

[Qemu-block] [PATCH 2/2] iotests: use python logging for iotests.log()

2019-07-26 Thread John Snow
We can turn logging on/off globally instead of per-function. Remove use_log from run_job, and use python logging to turn on diffable output when we run through a script entry point. (No, I have no idea why output on 245 changed. I really don't.) Signed-off-by: John Snow ---

[Qemu-block] [PATCH 1/2] iotests: add script_initialize

2019-07-26 Thread John Snow
Like script_main, but doesn't require a single point of entry. Replace all existing initialization sections with this drop-in replacement. This brings debug support to all existing script-style iotests. Note: supported_oses=['linux'] was omitted, as it is a default argument. Signed-off-by: John

[Qemu-block] [PATCH 0/2] iotests: use python logging

2019-07-26 Thread John Snow
Based-on: https://github.com/jnsnow/qemu/tree/bitmaps This is a quick hack-em-up of what it might look like to use python logging to enable output conditionally on iotests.log(). We unify an initialization call (which also enables debugging output for those tests with -d) and then make the switch

Re: [Qemu-block] [QEMU-SECURITY] ide: fix assertion in ide_dma_cb() to prevent qemu DoS from quest

2019-07-26 Thread Alexander Popov
26 июля 2019 г. 2:25:03 GMT+02:00, John Snow пишет: >Oh, this is fun. ... >I can worry about a proper fix for 4.2+. Hello John, Thanks for your letter. I double-checked the git history and mailing list, I'm still sure that my fix for this assertion is correct. You know this code very

Re: [Qemu-block] [Qemu-devel] [PATCH] Fix Guest VM crash due to iSCSI Sense Key error

2019-07-26 Thread John Snow
Paolo, Stefan and Kevin: can I loop you in here? I'm quite uncertain about this and I'd like to clear this up quickly if it's possible: On 7/25/19 8:58 PM, John Snow wrote: > > > On 7/7/19 10:55 PM, shaju.abra...@nutanix.com wrote: >> From: Shaju Abraham >> >> During the IDE DMA transfer for

Re: [Qemu-block] [Qemu-devel] [PATCH v3 0/3] qapi: block-dirty-bitmap-remove transaction action

2019-07-26 Thread Vladimir Sementsov-Ogievskiy
24.07.2019 15:52, John Snow wrote: > > > On 7/24/19 7:12 AM, Vladimir Sementsov-Ogievskiy wrote: >> 15.07.2019 22:48, John Snow wrote: >>> >>> >>> On 7/8/19 6:04 PM, John Snow wrote: Hi, this is a proposal based off of Vladimir's patchset: [Qemu-devel] [PATCH 0/4] qapi:

Re: [Qemu-block] [Qemu-devel] [PATCH 0/2] ssh: add password and privkey auth methods

2019-07-26 Thread Daniel P . Berrangé
On Fri, Jul 26, 2019 at 04:35:27PM +0100, Richard W.M. Jones wrote: > On Fri, Jul 26, 2019 at 10:06:43AM -0500, Eric Blake wrote: > > On 7/26/19 9:45 AM, Pino Toscano wrote: > > > On Friday, 26 July 2019 16:27:11 CEST Richard W.M. Jones wrote: > > >> On Fri, Jul 26, 2019 at 04:09:52PM +0200, Pino

Re: [Qemu-block] [Qemu-devel] [PATCH 0/2] ssh: add password and privkey auth methods

2019-07-26 Thread Richard W.M. Jones
On Fri, Jul 26, 2019 at 10:06:43AM -0500, Eric Blake wrote: > On 7/26/19 9:45 AM, Pino Toscano wrote: > > On Friday, 26 July 2019 16:27:11 CEST Richard W.M. Jones wrote: > >> On Fri, Jul 26, 2019 at 04:09:52PM +0200, Pino Toscano wrote: > >>> These two patches add the password and private key

Re: [Qemu-block] [Qemu-devel] [PATCH 0/2] ssh: add password and privkey auth methods

2019-07-26 Thread Eric Blake
On 7/26/19 9:45 AM, Pino Toscano wrote: > On Friday, 26 July 2019 16:27:11 CEST Richard W.M. Jones wrote: >> On Fri, Jul 26, 2019 at 04:09:52PM +0200, Pino Toscano wrote: >>> These two patches add the password and private key authentication >>> methods to the ssh block driver, using secure objects

Re: [Qemu-block] [PATCH 0/2] ssh: add password and privkey auth methods

2019-07-26 Thread Richard W.M. Jones
On Fri, Jul 26, 2019 at 04:45:03PM +0200, Pino Toscano wrote: > On Friday, 26 July 2019 16:27:11 CEST Richard W.M. Jones wrote: > > On Fri, Jul 26, 2019 at 04:09:52PM +0200, Pino Toscano wrote: > > > These two patches add the password and private key authentication > > > methods to the ssh block

Re: [Qemu-block] [PATCH 0/2] ssh: add password and privkey auth methods

2019-07-26 Thread Pino Toscano
On Friday, 26 July 2019 16:27:11 CEST Richard W.M. Jones wrote: > On Fri, Jul 26, 2019 at 04:09:52PM +0200, Pino Toscano wrote: > > These two patches add the password and private key authentication > > methods to the ssh block driver, using secure objects for > > passwords/passphrases. > > I was

Re: [Qemu-block] [Qemu-devel] [PATCH 2/2] ssh: implement private key authentication

2019-07-26 Thread Richard W.M. Jones
On Fri, Jul 26, 2019 at 09:24:34AM -0500, Eric Blake wrote: > On a different topic, how much of this work overlaps with the nbdkit ssh > plugin? Should we be duplicating efforts with both projects supporting > ssh natively, or is it worth considering getting qemu out of the ssh > business and

Re: [Qemu-block] [PATCH 0/2] ssh: add password and privkey auth methods

2019-07-26 Thread Richard W.M. Jones
On Fri, Jul 26, 2019 at 04:09:52PM +0200, Pino Toscano wrote: > These two patches add the password and private key authentication > methods to the ssh block driver, using secure objects for > passwords/passphrases. I was attempting to test this but couldn't work out the full command line to use

Re: [Qemu-block] [Qemu-devel] [PATCH 2/2] ssh: implement private key authentication

2019-07-26 Thread Eric Blake
On 7/26/19 9:09 AM, Pino Toscano wrote: > Add a 'private-key' option which represents the path of a private key > to use for authentication, and 'private-key-secret' as the name of an > object with its passphrase. > > Signed-off-by: Pino Toscano > +++ b/qapi/block-core.json > @@ -3226,6

[Qemu-block] [PATCH 1/2] ssh: implement password authentication

2019-07-26 Thread Pino Toscano
Add a 'password-secret' option which represents the name of an object with the password of the user. Signed-off-by: Pino Toscano --- block/ssh.c | 35 --- block/trace-events | 1 + docs/qemu-block-drivers.texi | 7 +--

[Qemu-block] [PATCH 2/2] ssh: implement private key authentication

2019-07-26 Thread Pino Toscano
Add a 'private-key' option which represents the path of a private key to use for authentication, and 'private-key-secret' as the name of an object with its passphrase. Signed-off-by: Pino Toscano --- block/ssh.c | 98 block/trace-events

[Qemu-block] [PATCH 0/2] ssh: add password and privkey auth methods

2019-07-26 Thread Pino Toscano
These two patches add the password and private key authentication methods to the ssh block driver, using secure objects for passwords/passphrases. Pino Toscano (2): ssh: implement password authentication ssh: implement private key authentication block/ssh.c | 133

Re: [Qemu-block] [PATCH v5 30/42] qemu-img: Use child access functions

2019-07-26 Thread Vladimir Sementsov-Ogievskiy
25.07.2019 19:34, Max Reitz wrote: > On 24.07.19 11:54, Vladimir Sementsov-Ogievskiy wrote: >> 21.06.2019 16:15, Vladimir Sementsov-Ogievskiy wrote: >>> 19.06.2019 18:49, Max Reitz wrote: On 19.06.19 11:18, Vladimir Sementsov-Ogievskiy wrote: > 13.06.2019 1:09, Max Reitz wrote: >>

Re: [Qemu-block] [PATCH v3] block/rbd: add preallocation support

2019-07-26 Thread Jason Dillaman
On Fri, Jul 26, 2019 at 4:48 AM Stefano Garzarella wrote: > > On Thu, Jul 25, 2019 at 09:30:30AM -0400, Jason Dillaman wrote: > > On Thu, Jul 25, 2019 at 4:13 AM Stefano Garzarella > > wrote: > > > > > > On Wed, Jul 24, 2019 at 01:48:42PM -0400, Jason Dillaman wrote: > > > > On Tue, Jul 23,

Re: [Qemu-block] [PATCH 4/4] block-backend: Queue requests while drained

2019-07-26 Thread Max Reitz
On 26.07.19 13:49, Kevin Wolf wrote: > Am 26.07.2019 um 12:50 hat Max Reitz geschrieben: >> On 25.07.19 18:27, Kevin Wolf wrote: >>> This fixes device like IDE that can still start new requests from I/O >> >> *devices >> >>> handlers in the CPU thread while the block backend is drained. >>> >>>

Re: [Qemu-block] [PATCH 3/4] mirror: Keep target drained until graph changes are done

2019-07-26 Thread Max Reitz
On 26.07.19 13:36, Kevin Wolf wrote: > Am 26.07.2019 um 11:52 hat Max Reitz geschrieben: >> On 25.07.19 18:27, Kevin Wolf wrote: >>> Calling bdrv_drained_end() for target_bs can restarts requests too >>> early, so that they would execute on mirror_top_bs, which however has >>> already dropped all

Re: [Qemu-block] [PATCH v2 03/11] block: Add bdrv_has_zero_init_truncate()

2019-07-26 Thread Stefano Garzarella
On Fri, Jul 26, 2019 at 12:58:58PM +0200, Max Reitz wrote: > On 26.07.19 11:04, Stefano Garzarella wrote: > > On Wed, Jul 24, 2019 at 07:12:31PM +0200, Max Reitz wrote: > >> No .bdrv_has_zero_init() implementation returns 1 if growing the file > >> would add non-zero areas (at least with

Re: [Qemu-block] [PATCH 4/4] block-backend: Queue requests while drained

2019-07-26 Thread Kevin Wolf
Am 26.07.2019 um 12:50 hat Max Reitz geschrieben: > On 25.07.19 18:27, Kevin Wolf wrote: > > This fixes device like IDE that can still start new requests from I/O > > *devices > > > handlers in the CPU thread while the block backend is drained. > > > > The basic assumption is that in a drain

Re: [Qemu-block] [PATCH 3/4] mirror: Keep target drained until graph changes are done

2019-07-26 Thread Kevin Wolf
Am 26.07.2019 um 11:52 hat Max Reitz geschrieben: > On 25.07.19 18:27, Kevin Wolf wrote: > > Calling bdrv_drained_end() for target_bs can restarts requests too > > early, so that they would execute on mirror_top_bs, which however has > > already dropped all permissions. > > > > Keep the target

Re: [Qemu-block] [PATCH v2 05/11] block: Use bdrv_has_zero_init_truncate()

2019-07-26 Thread Max Reitz
On 26.07.19 11:43, Stefano Garzarella wrote: > On Wed, Jul 24, 2019 at 07:12:33PM +0200, Max Reitz wrote: >> Signed-off-by: Max Reitz >> --- >> block/parallels.c | 2 +- >> block/vhdx.c | 2 +- >> 2 files changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/block/parallels.c

Re: [Qemu-block] [PATCH v2 03/11] block: Add bdrv_has_zero_init_truncate()

2019-07-26 Thread Max Reitz
On 26.07.19 11:04, Stefano Garzarella wrote: > On Wed, Jul 24, 2019 at 07:12:31PM +0200, Max Reitz wrote: >> No .bdrv_has_zero_init() implementation returns 1 if growing the file >> would add non-zero areas (at least with PREALLOC_MODE_OFF), so using it >> in lieu of this new function was always

Re: [Qemu-block] [PATCH 4/4] block-backend: Queue requests while drained

2019-07-26 Thread Max Reitz
On 25.07.19 18:27, Kevin Wolf wrote: > This fixes device like IDE that can still start new requests from I/O *devices > handlers in the CPU thread while the block backend is drained. > > The basic assumption is that in a drain section, no new requests should > be allowed through a BlockBackend

Re: [Qemu-block] [PATCH 3/4] mirror: Keep target drained until graph changes are done

2019-07-26 Thread Max Reitz
On 25.07.19 18:27, Kevin Wolf wrote: > Calling bdrv_drained_end() for target_bs can restarts requests too > early, so that they would execute on mirror_top_bs, which however has > already dropped all permissions. > > Keep the target node drained until all graph changes have completed. > >

Re: [Qemu-block] [PATCH v2 04/11] block: Implement .bdrv_has_zero_init_truncate()

2019-07-26 Thread Stefano Garzarella
On Wed, Jul 24, 2019 at 07:12:32PM +0200, Max Reitz wrote: > We need to implement .bdrv_has_zero_init_truncate() for every block > driver that supports truncation and has a .bdrv_has_zero_init() > implementation. > > Implement it the same way each driver implements .bdrv_has_zero_init(). > This

Re: [Qemu-block] [PATCH v2 05/11] block: Use bdrv_has_zero_init_truncate()

2019-07-26 Thread Stefano Garzarella
On Wed, Jul 24, 2019 at 07:12:33PM +0200, Max Reitz wrote: > Signed-off-by: Max Reitz > --- > block/parallels.c | 2 +- > block/vhdx.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/block/parallels.c b/block/parallels.c > index 00fae125d1..7cd2714b69 100644 >

Re: [Qemu-block] [PATCH v2 01/11] qemu-img: Fix bdrv_has_zero_init() use in convert

2019-07-26 Thread Stefano Garzarella
On Wed, Jul 24, 2019 at 07:12:29PM +0200, Max Reitz wrote: > bdrv_has_zero_init() only has meaning for newly created images or image > areas. If qemu-img convert did not create the image itself, it cannot > rely on bdrv_has_zero_init()'s result to carry any meaning. > > Signed-off-by: Max Reitz

Re: [Qemu-block] [PATCH 1/4] block: Remove blk_pread_unthrottled()

2019-07-26 Thread Max Reitz
On 25.07.19 18:27, Kevin Wolf wrote: > The functionality offered by blk_pread_unthrottled() goes back to commit > 498e386c584. Then, we couldn't perform I/O throttling with synchronous > requests because timers wouldn't be executed in polling loops. So the > commit automatically disabled I/O

Re: [Qemu-block] [PATCH v2 03/11] block: Add bdrv_has_zero_init_truncate()

2019-07-26 Thread Stefano Garzarella
On Wed, Jul 24, 2019 at 07:12:31PM +0200, Max Reitz wrote: > No .bdrv_has_zero_init() implementation returns 1 if growing the file > would add non-zero areas (at least with PREALLOC_MODE_OFF), so using it > in lieu of this new function was always safe. > > But on the other hand, it is possible

Re: [Qemu-block] [PATCH v3] block/rbd: add preallocation support

2019-07-26 Thread Stefano Garzarella
On Thu, Jul 25, 2019 at 09:30:30AM -0400, Jason Dillaman wrote: > On Thu, Jul 25, 2019 at 4:13 AM Stefano Garzarella > wrote: > > > > On Wed, Jul 24, 2019 at 01:48:42PM -0400, Jason Dillaman wrote: > > > On Tue, Jul 23, 2019 at 3:13 AM Stefano Garzarella > > > wrote: > > > > > > > > This patch

Re: [Qemu-block] [Qemu-devel] [PATCH 7/7] iotests: Disable 126 for some vmdk subformats

2019-07-26 Thread Max Reitz
On 25.07.19 19:00, Eric Blake wrote: > On 7/25/19 10:57 AM, Max Reitz wrote: >> Several vmdk subformats do not work with iotest 126, so disable them. >> >> (twoGbMaxExtentSparse actually should work, but fixing that is a bit >> difficult. The problem is that the vmdk descriptor file will contain