Re: [Qemu-block] [Qemu-devel] [PATCH] block: implement the bdrv_reopen_prepare helper for LUKS driver

2018-01-19 Thread Daniel P. Berrange
On Thu, Jan 18, 2018 at 01:51:36PM -0600, Eric Blake wrote: > On 01/18/2018 04:31 AM, Daniel P. Berrange wrote: > > If the bdrv_reopen_prepare helper isn't provided, the qemu-img commit > > command fails to re-open the base layer after committing changes into > > it. Prov

[Qemu-block] [PATCH] block: implement the bdrv_reopen_prepare helper for LUKS driver

2018-01-18 Thread Daniel P. Berrange
If the bdrv_reopen_prepare helper isn't provided, the qemu-img commit command fails to re-open the base layer after committing changes into it. Provide a no-op implementation for the LUKS driver, since there is not any custom work that needs doing to re-open it. Signed-off-by: Daniel P. Ber

Re: [Qemu-block] [Qemu-devel] [RFC PATCH 02/10] block/qapi: Add qcow2 create options to schema

2018-01-15 Thread Daniel P. Berrange
On Mon, Jan 15, 2018 at 03:07:15PM +0100, Kevin Wolf wrote: > Am 15.01.2018 um 14:51 hat Daniel P. Berrange geschrieben: > > On Mon, Jan 15, 2018 at 02:38:48PM +0100, Kevin Wolf wrote: > > > Am 12.01.2018 um 11:53 hat Daniel P. Berrange geschrieben: > > > > On Thu, Ja

Re: [Qemu-block] [Qemu-devel] [RFC PATCH 02/10] block/qapi: Add qcow2 create options to schema

2018-01-15 Thread Daniel P. Berrange
On Mon, Jan 15, 2018 at 02:38:48PM +0100, Kevin Wolf wrote: > Am 12.01.2018 um 11:53 hat Daniel P. Berrange geschrieben: > > On Thu, Jan 11, 2018 at 08:52:17PM +0100, Kevin Wolf wrote: > > > Signed-off-by: Kevin Wolf > > > --- >

Re: [Qemu-block] [Qemu-devel] [RFC PATCH 02/10] block/qapi: Add qcow2 create options to schema

2018-01-12 Thread Daniel P. Berrange
On Thu, Jan 11, 2018 at 08:52:17PM +0100, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > qapi/block-core.json | 33 - > 1 file changed, 32 insertions(+), 1 deletion(-) > > diff --git a/qapi/block-core.json b/qapi/block-core.json > index 1749376c61..9341f670

Re: [Qemu-block] [Qemu-devel] [PATCH 1/2] Add save-snapshot, load-snapshot and delete-snapshot to QAPI

2018-01-11 Thread Daniel P. Berrange
On Thu, Jan 11, 2018 at 01:23:05PM +, Dr. David Alan Gilbert wrote: > * Daniel P. Berrange (berra...@redhat.com) wrote: > > On Thu, Jan 11, 2018 at 01:46:38PM +0100, Max Reitz wrote: > > > On 2018-01-08 14:52, Eric Blake wrote: > > > > On 01/07/2018 06:2

Re: [Qemu-block] [Qemu-devel] [PATCH 1/2] Add save-snapshot, load-snapshot and delete-snapshot to QAPI

2018-01-11 Thread Daniel P. Berrange
On Thu, Jan 11, 2018 at 01:46:38PM +0100, Max Reitz wrote: > On 2018-01-08 14:52, Eric Blake wrote: > > On 01/07/2018 06:23 AM, Richard Palethorpe wrote: > >> Add QAPI wrapper functions for the existing snapshot functionality. These > >> functions behave the same way as the HMP savevm, loadvm and d

Re: [Qemu-block] [Qemu-devel] [PATCH 2/5] configure: add dependency

2018-01-10 Thread Daniel P. Berrange
On Fri, Dec 22, 2017 at 03:38:02PM +0300, Roman Kagan wrote: > On Mon, Dec 18, 2017 at 02:09:08PM +0300, Denis V. Lunev wrote: > > From: Klim Kireev > > > > This dependency is required for adequate Parallels images support. > > Typically the disk consists of several images which are glued by > >

Re: [Qemu-block] [Qemu-devel] [PATCH 0/2] qemu-img: Let "info" warn and go ahead without -U

2018-01-10 Thread Daniel P. Berrange
On Wed, Jan 10, 2018 at 03:07:12PM +0100, Kevin Wolf wrote: > Am 10.01.2018 um 13:49 hat Daniel P. Berrange geschrieben: > > On Mon, Jan 08, 2018 at 03:41:36PM +0100, Kevin Wolf wrote: > > > Am 05.01.2018 um 07:55 hat Fam Zheng geschrieben: > > > > Management and use

Re: [Qemu-block] [Qemu-devel] [PATCH 0/2] qemu-img: Let "info" warn and go ahead without -U

2018-01-10 Thread Daniel P. Berrange
On Mon, Jan 08, 2018 at 06:57:29PM +0100, Kevin Wolf wrote: > Am 08.01.2018 um 18:07 hat Nir Soffer geschrieben: > > On Mon, Jan 8, 2018 at 4:48 PM Kevin Wolf wrote: > > > > > Am 05.01.2018 um 07:55 hat Fam Zheng geschrieben: > > > > Management and users are accustomed to "qemu-img info" to query

Re: [Qemu-block] [Qemu-devel] [PATCH 0/2] qemu-img: Let "info" warn and go ahead without -U

2018-01-10 Thread Daniel P. Berrange
On Mon, Jan 08, 2018 at 03:41:36PM +0100, Kevin Wolf wrote: > Am 05.01.2018 um 07:55 hat Fam Zheng geschrieben: > > Management and users are accustomed to "qemu-img info" to query status of > > images even when they are used by guests. Since image locking was added, > > the -U > > (--force-share)

Re: [Qemu-block] [Qemu-devel] [PATCH] file-posix: refuse to open directories

2017-12-22 Thread Daniel P. Berrange
); > +goto fail; > +} Should we also do the same for S_ISCHR & S_ISFIFO, because neither of them allow seeking, which IIUC would prevent usage in the file driver for random I/O. It would be fine todo that in a followup patch though, so from this patch pov Reviewed-by: Daniel P.

Re: [Qemu-block] [Qemu-devel] qemu 2.9.0 qcow2 file failed to open after hard server reset

2017-12-22 Thread Daniel P. Berrange
On Thu, Dec 21, 2017 at 05:58:47PM -0500, John Snow wrote: > > > On 12/21/2017 05:13 PM, Vasiliy Tolstov wrote: > > Hi! Today my server have forced reboot and one of my vm can't start > > with message: > > qcow2: Marking image as corrupt: L2 table offset 0x3f786d6c207600 > > unaligned (L1 index:

Re: [Qemu-block] [Qemu-devel] Raw notes from a small block layer/QAPI/something pre-christmas meeting

2017-12-20 Thread Daniel P. Berrange
On Wed, Dec 20, 2017 at 02:33:54PM +0100, Kevin Wolf wrote: > Am 20.12.2017 um 11:57 hat Daniel P. Berrange geschrieben: > > On Wed, Dec 20, 2017 at 11:44:36AM +0100, Kashyap Chamarthy wrote: > > > On Mon, Dec 18, 2017 at 11:11:00AM +0100, Markus Armbruster wrote: > &g

Re: [Qemu-block] [Qemu-devel] Raw notes from a small block layer/QAPI/something pre-christmas meeting

2017-12-20 Thread Daniel P. Berrange
On Fri, Dec 15, 2017 at 05:38:00PM +0100, Max Reitz wrote: > Image creation in qemu-system-* vs. qemu-img: > In order to get proper introspection for qemu-img create, we need a > QAPI schema. If we have a QAPI schema, we might as well add > blockdev-create to QMP. > As long as we do not h

Re: [Qemu-block] [Qemu-devel] Raw notes from a small block layer/QAPI/something pre-christmas meeting

2017-12-20 Thread Daniel P. Berrange
On Wed, Dec 20, 2017 at 11:44:36AM +0100, Kashyap Chamarthy wrote: > On Mon, Dec 18, 2017 at 11:11:00AM +0100, Markus Armbruster wrote: > > Max Reitz writes: > > [...] > > Thanks, Max, for the detailed notes. > > > > Image creation in qemu-system-* vs. qemu-img: > > > In order to get proper i

Re: [Qemu-block] [PATCH 8/9] iotests: replace assertEquals() by assertEqual() for python3 compatibility

2017-12-20 Thread Daniel P. Berrange
ns(+), 6 deletions(-) Reviewed-by: Daniel P. Berrange > > diff --git a/tests/qemu-iotests/041 b/tests/qemu-iotests/041 > index a860a31e9a..fa0f20af0e 100755 > --- a/tests/qemu-iotests/041 > +++ b/tests/qemu-iotests/041 > @@ -457,7 +457,7 @@ new_state = "1&qu

Re: [Qemu-block] [PATCH 6/9] iotests: replace dict.has_key() by 'in' operator for python3 compatibility

2017-12-20 Thread Daniel P. Berrange
On Tue, Dec 19, 2017 at 02:34:22PM -0300, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > tests/qemu-iotests/093 | 2 +- > tests/qemu-iotests/096 | 4 ++-- > tests/qemu-iotests/136 | 2 +- > 3 files changed, 4 insertions(+), 4 deletions(-) Rev

Re: [Qemu-block] [PATCH 9/9] iotests.py: use io.StringIO with python3

2017-12-20 Thread Daniel P. Berrange
On Tue, Dec 19, 2017 at 02:34:25PM -0300, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > tests/qemu-iotests/iotests.py | 7 +-- > 1 file changed, 5 insertions(+), 2 deletions(-) Reviewed-by: Daniel P. Berrange > > diff --git a/tests/qemu-

Re: [Qemu-block] [PATCH 5/9] iotests: replace xrange() by range() for python3 compatibility

2017-12-20 Thread Daniel P. Berrange
On Tue, Dec 19, 2017 at 02:34:21PM -0300, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > tests/qemu-iotests/044 | 14 +++--- > tests/qemu-iotests/163 | 2 +- > 2 files changed, 8 insertions(+), 8 deletions(-) Reviewed-by: Daniel P. Berran

Re: [Qemu-block] [PATCH 7/9] iotests: replace lambda function by lambda expression for python3 compatibility

2017-12-20 Thread Daniel P. Berrange
On Tue, Dec 19, 2017 at 02:34:23PM -0300, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > tests/qemu-iotests/065 | 4 ++-- > tests/qemu-iotests/139 | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Daniel P. Berrange > &g

Re: [Qemu-block] [PATCH 4/9] iotests: use octal numbers for python3 compatibility

2017-12-20 Thread Daniel P. Berrange
On Tue, Dec 19, 2017 at 02:34:20PM -0300, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > tests/qemu-iotests/118 | 24 > 1 file changed, 12 insertions(+), 12 deletions(-) Reviewed-by: Daniel P. Berrange > > diff

Re: [Qemu-block] [PATCH 3/9] iotests: replace print statement by print() function for python3 compatibility

2017-12-20 Thread Daniel P. Berrange
On Tue, Dec 19, 2017 at 02:34:19PM -0300, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > tests/qemu-iotests/149| 3 ++- > tests/qemu-iotests/165| 3 ++- > tests/qemu-iotests/iotests.py | 5 +++-- > 3 files changed, 7 insertions(+), 4 deletions(-) >

[Qemu-block] [PATCH v2 1/2] blockdev: convert internal NBD server to QIONetListener

2017-12-18 Thread Daniel P. Berrange
Instead of creating a QIOChannelSocket directly for the NBD server socket, use a QIONetListener. This provides the ability to listen on multiple sockets at the same time, so enables full support for IPv4/IPv6 dual stack. Reviewed-by: Eric Blake Signed-off-by: Daniel P. Berrange --- blockdev

[Qemu-block] [PATCH v2 2/2] blockdev: convert qemu-nbd server to QIONetListener

2017-12-18 Thread Daniel P. Berrange
. Reviewed-by: Eric Blake Signed-off-by: Daniel P. Berrange --- qemu-nbd.c | 61 - 1 file changed, 24 insertions(+), 37 deletions(-) diff --git a/qemu-nbd.c b/qemu-nbd.c index d75ca51482..3723493be1 100644 --- a/qemu-nbd.c +++ b/qemu

[Qemu-block] [PATCH v2 0/2] Enable full IPv4/IPv6 dual stack for NBD server

2017-12-18 Thread Daniel P. Berrange
stack, by fully honouring all addresses returned from a DNS lookup. There has been no change since v1, except for trivial rebase. Daniel P. Berrange (2): blockdev: convert internal NBD server to QIONetListener blockdev: convert qemu-nbd server to QIONetListener blockdev-nbd.c | 50

Re: [Qemu-block] [PATCH v2] qemu-io: fix EOF Ctrl-D handling in qemu-io readline code

2017-12-08 Thread Daniel P. Berrange
On Fri, Dec 08, 2017 at 10:21:35AM -0600, Eric Blake wrote: > On 12/08/2017 07:34 AM, Daniel P. Berrange wrote: > > qemu-io puts the TTY into non-canonical mode, which means no EOF processing > > is > > done and thus getchar() will never return the EOF constant. Instead we h

Re: [Qemu-block] [Qemu-devel] [PATCH v7 for-2.12 24/25] block/curl: Implement bdrv_refresh_filename()

2017-12-08 Thread Daniel P. Berrange
On Fri, Dec 08, 2017 at 02:47:52PM +0100, Max Reitz wrote: > On 2017-12-05 11:31, Alberto Garcia wrote: > > On Mon 04 Dec 2017 07:26:02 PM CET, Max Reitz wrote: > +static void curl_refresh_filename(BlockDriverState *bs) > +{ > +BDRVCURLState *s = bs->opaque; > + > +

Re: [Qemu-block] [Qemu-devel] [PATCH] qemu-io: fix EOF Ctrl-D handling in qemu-io readline code

2017-12-08 Thread Daniel P. Berrange
On Fri, Dec 08, 2017 at 12:15:21PM +, Dr. David Alan Gilbert wrote: > * Daniel P. Berrange (berra...@redhat.com) wrote: > > qemu-io puts the TTY into non-canonical mode, which means no EOF processing > > is > > done and thus getchar() will never return the EOF cons

[Qemu-block] [PATCH v2] qemu-io: fix EOF Ctrl-D handling in qemu-io readline code

2017-12-08 Thread Daniel P. Berrange
fixes the regression that prevented Ctrl-D from triggering an exit of qemu-io that has existed since readline was first added in commit 0cf17e181798063c3824c8200ba46f25f54faa1a Author: Stefan Hajnoczi Date: Thu Nov 14 11:54:17 2013 +0100 qemu-io: use readline.c Signed-off-by: Daniel P

Re: [Qemu-block] [Qemu-devel] [PATCH] qemu-io: fix EOF Ctrl-D handling in qemu-io readline code

2017-12-06 Thread Daniel P. Berrange
On Wed, Dec 06, 2017 at 08:22:35AM -0600, Eric Blake wrote: > On 12/06/2017 05:57 AM, Daniel P. Berrange wrote: > > qemu-io puts the TTY into non-canonical mode, which means no EOF processing > > is > > done and thus getchar() will never return the EOF constant. Instead we h

[Qemu-block] [PATCH] qemu-io: fix EOF Ctrl-D handling in qemu-io readline code

2017-12-06 Thread Daniel P. Berrange
triggering an exit of qemu-io that has existed since readline was first added in commit 0cf17e181798063c3824c8200ba46f25f54faa1a Author: Stefan Hajnoczi Date: Thu Nov 14 11:54:17 2013 +0100 qemu-io: use readline.c Signed-off-by: Daniel P. Berrange --- qemu-io.c | 4 +++- 1 file changed

Re: [Qemu-block] [Qemu-devel] Block layer complexity: what to do to keep it under control?

2017-11-29 Thread Daniel P. Berrange
describe the APIs. eg more of this: commit b461151ff31c7925f271c297e8abed20231ac7d3 Author: Daniel P. Berrange Date: Thu Aug 31 11:54:56 2017 +0100 block: document semantics of bdrv_co_preadv|pwritev > More thoughts? Currently the block driver layer has three different ways you c

Re: [Qemu-block] [PATCH v2 (for-2.11)] qcow2: fix image corruption after committing qcow2 image into base

2017-11-17 Thread Daniel P. Berrange
On Fri, Nov 17, 2017 at 08:32:32AM -0600, Eric Blake wrote: > On 11/17/2017 05:29 AM, Daniel P. Berrange wrote: > > After committing the qcow2 image contents into the base image, qemu-img > > will call bdrv_make_empty to drop the payload in the layered image. > > > >

[Qemu-block] [PATCH v2 (for-2.11)] qcow2: fix image corruption after committing qcow2 image into base

2017-11-17 Thread Daniel P. Berrange
qcow2 image, and the second (slower) codepath leaves the LUKS header intact, so force use of that codepath. Reviewed-by: Eric Blake Signed-off-by: Daniel P. Berrange --- block/qcow2.c| 6 +- tests/qemu-iotests/198 | 104 tests/qemu

Re: [Qemu-block] [Qemu-devel] [PATCH for-2.12 3/3] block: Deprecate "backing": ""

2017-11-13 Thread Daniel P. Berrange
On Fri, Nov 10, 2017 at 04:21:05PM -0600, Eric Blake wrote: > On 11/10/2017 04:13 PM, Max Reitz wrote: > > We have a clear replacement, so let's deprecate it. > > > > Signed-off-by: Max Reitz > > --- > > qapi/block-core.json | 4 ++-- > > block.c | 4 > > qemu-doc.texi|

Re: [Qemu-block] [Qemu-devel] [PATCH] qcow2: fix image corruption after committing qcow2 image into base

2017-11-10 Thread Daniel P. Berrange
On Fri, Nov 10, 2017 at 10:34:59AM -0600, Eric Blake wrote: > On 11/03/2017 09:41 AM, Daniel P. Berrange wrote: > > After committing the qcow2 image contents into the base image, qemu-img > > will call bdrv_make_empty to drop the payload in the layered image. > > > >

Re: [Qemu-block] [Qemu-devel] RFC: use case for adding QMP, block jobs & multiple exports to qemu-nbd ?

2017-11-09 Thread Daniel P. Berrange
On Thu, Nov 09, 2017 at 02:54:35PM +0100, Markus Armbruster wrote: > Max Reitz writes: > > > On 2017-11-02 13:02, Daniel P. Berrange wrote: > > [...] > >> One alternative approach to doing this would be to suggest that we should > >> instead just spawn qem

Re: [Qemu-block] [Qemu-devel] [PATCH] block: Deprecate bdrv_set_read_only() and users

2017-11-08 Thread Daniel P. Berrange
On Wed, Nov 08, 2017 at 12:51:27PM +0100, Kevin Wolf wrote: > Am 08.11.2017 um 11:49 hat Daniel P. Berrange geschrieben: > > On Wed, Nov 08, 2017 at 11:44:01AM +0100, Paolo Bonzini wrote: > > > On 07/11/2017 18:39, Daniel P. Berrange wrote: > > > > On Tue, Nov 07, 2

Re: [Qemu-block] [Qemu-devel] [PATCH] block: Deprecate bdrv_set_read_only() and users

2017-11-08 Thread Daniel P. Berrange
On Wed, Nov 08, 2017 at 11:44:01AM +0100, Paolo Bonzini wrote: > On 07/11/2017 18:39, Daniel P. Berrange wrote: > > On Tue, Nov 07, 2017 at 06:26:38PM +0100, Kevin Wolf wrote: > >> bdrv_set_read_only() is used by some block drivers to override the > >> read-only option

Re: [Qemu-block] [Qemu-devel] [PATCH] block: Deprecate bdrv_set_read_only() and users

2017-11-07 Thread Daniel P. Berrange
On Tue, Nov 07, 2017 at 06:26:38PM +0100, Kevin Wolf wrote: > bdrv_set_read_only() is used by some block drivers to override the > read-only option given by the user. This is not how read-only images > generally work in QEMU: Instead of second guessing what the user really > meant (which currently

[Qemu-block] [PATCH] qcow2: fix image corruption after committing qcow2 image into base

2017-11-03 Thread Daniel P. Berrange
qcow2 image, and the second (slower) codepaths leaves the LUKS header intact, so force use of that codepath. Signed-off-by: Daniel P. Berrange --- NB, ideally we would fix the faster codepath in make_completely_empty, but having looked at the code, I've really no idea how to even start on f

[Qemu-block] [PATCH] qcow2: don't permit changing encryption parameters

2017-11-03 Thread Daniel P. Berrange
'encrypt.' prefix. Signed-off-by: Daniel P. Berrange --- block/qcow2.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block/qcow2.c b/block/qcow2.c index 92cb9f9bfa..8edf8ac3c7 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -4062,6 +4062,9 @@ static int qcow2_amend_options(BlockD

Re: [Qemu-block] [Qemu-devel] [PATCH v2 7/7] qcow2: Assert that the crypto header does not overlap other metadata

2017-11-03 Thread Daniel P. Berrange
t; existing metadata sections then this is a serious bug in QEMU itself > so let's add an assertion. > > Signed-off-by: Alberto Garcia > --- > block/qcow2.c | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Daniel P. Berrange Regards, Daniel -- |: https://berrange.co

Re: [Qemu-block] RFC: use case for adding QMP, block jobs & multiple exports to qemu-nbd ?

2017-11-03 Thread Daniel P. Berrange
On Fri, Nov 03, 2017 at 10:04:57AM +, Stefan Hajnoczi wrote: > On Thu, Nov 02, 2017 at 12:50:39PM -0500, Eric Blake wrote: > > On 11/02/2017 12:04 PM, Daniel P. Berrange wrote: > > > > > vm-a-disk1.qcow2 open - its just a re

Re: [Qemu-block] RFC: use case for adding QMP, block jobs & multiple exports to qemu-nbd ?

2017-11-02 Thread Daniel P. Berrange
On Thu, Nov 02, 2017 at 05:40:28PM +0100, Kashyap Chamarthy wrote: > [Cc: Matt Booth from Nova upstream; so not snipping the email to retain > context for Matt.] > > On Thu, Nov 02, 2017 at 12:02:23PM +0000, Daniel P. Berrange wrote: > > I've been thinking about

[Qemu-block] RFC: use case for adding QMP, block jobs & multiple exports to qemu-nbd ?

2017-11-02 Thread Daniel P. Berrange
I've been thinking about a potential design/impl improvement for the way that OpenStack Nova handles disk images when booting virtual machines, and thinking if some enhancements to qemu-nbd could be beneficial... At a high level, OpenStack has a repository of disk images (Glance), and when we go t

Re: [Qemu-block] [PATCH] ide: avoid referencing NULL dev in rotational rate setting

2017-10-24 Thread Daniel P. Berrange
CC John On Fri, Oct 20, 2017 at 10:14:03AM +0100, Daniel P. Berrange wrote: > The 'dev' variable can be NULL when the guest OS calls identify on an IDE > unit that does not have a drive attached to it. > > Signed-off-by: Daniel P. Berrange > --- > hw/ide/core.c |

[Qemu-block] [PATCH] ide: avoid referencing NULL dev in rotational rate setting

2017-10-20 Thread Daniel P. Berrange
The 'dev' variable can be NULL when the guest OS calls identify on an IDE unit that does not have a drive attached to it. Signed-off-by: Daniel P. Berrange --- hw/ide/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index

Re: [Qemu-block] [Qemu-devel] [PATCH v1 2/2] ide: support reporting of rotation rate

2017-10-20 Thread Daniel P. Berrange
On Fri, Oct 20, 2017 at 10:42:21AM +0200, Kevin Wolf wrote: > [ Cc: qemu-block ] > > Am 04.10.2017 um 13:40 hat Daniel P. Berrange geschrieben: > > The Linux kernel will query the ATA IDENTITY DEVICE data, word 217 > > to determine the rotations per minute of the disk. If thi

Re: [Qemu-block] [Qemu-devel] [PATCH v5 03/10] qemu-iotests: automatically clean up bash protocol servers

2017-10-18 Thread Daniel P. Berrange
On Wed, Oct 18, 2017 at 04:46:20PM +0200, Paolo Bonzini wrote: > Maybe we should actually rewrite "check" in Python. That would force us > to think more about the design. I think that would be great. Any shell script that's more than 5 lines long is a shell script that should not exist. It is a

Re: [Qemu-block] [Qemu-devel] German BSI analysed security of KVM / QEMU

2017-10-16 Thread Daniel P. Berrange
On Mon, Oct 16, 2017 at 03:22:46PM +0200, Kevin Wolf wrote: > Am 13.10.2017 um 11:44 hat Daniel P. Berrange geschrieben: > > On Fri, Oct 13, 2017 at 11:37:08AM +0200, Cornelia Huck wrote: > > > - Lack of support for encryption/signing of network-based images was > > >

Re: [Qemu-block] [PATCH v2 04/10] nbd-server: refactor simple reply sending

2017-10-10 Thread Daniel P. Berrange
On Mon, Oct 09, 2017 at 02:18:10PM -0500, Eric Blake wrote: > [adding Dan for a qio question - search for your name below] > > On 10/09/2017 12:27 PM, Vladimir Sementsov-Ogievskiy wrote: > > Get rid of calculating structure fields offsets by hand and set_cork, > > rename nbd_co_send_reply to nbd_c

Re: [Qemu-block] [Qemu-devel] Patch to add helpful tracing output for driver authors in NVMe emulation

2017-10-06 Thread Daniel P. Berrange
On Fri, Oct 06, 2017 at 09:58:33AM -0400, Doug Gale wrote: > I tried to get tracing to work before and I have never gotten it > working. I'll give it another try and redo the patch with tracing > infrastructure if necessary. The printf are nice because the dev can > just look at the terminal where

Re: [Qemu-block] [Qemu-devel] Patch to add helpful tracing output for driver authors in NVMe emulation

2017-10-06 Thread Daniel P. Berrange
On Fri, Oct 06, 2017 at 08:50:31AM -0500, Eric Blake wrote: > On 10/05/2017 06:18 PM, Doug Gale wrote: > > I added the tracing output in this patch to assist me in implementing > > an NVMe driver. It helped tremendously. > > > >>From 1d19086cdef8d492929852d582cb41dcc5026f71 Mon Sep 17 00:00:00 200

Re: [Qemu-block] [Qemu-devel] [PATCH v2] virtio: introduce `info virtio' hmp command

2017-09-28 Thread Daniel P. Berrange
On Thu, Sep 28, 2017 at 02:05:37AM +0300, Jan Dakinevich wrote: > > OK but if it's useful as an hmp command, why not as a qmp command? > > > > The command is designed for debugging and produces quite sightly output. For > respective qmp command most of `info virtio' output would excessive and > un

Re: [Qemu-block] [PATCH v4 0/6] Misc improvements to crypto block driver

2017-09-28 Thread Daniel P. Berrange
On Wed, Sep 27, 2017 at 11:06:24PM +0200, Max Reitz wrote: > On 2017-09-27 14:53, Daniel P. Berrange wrote: > > This is a followup to > > > > v1: https://lists.gnu.org/archive/html/qemu-devel/2017-08/msg00781.html > > v2: https://lists.gnu.org/archive/html/qemu-

Re: [Qemu-block] [Qemu-devel] [PATCH 2/5] iotests: Set up Python logging

2017-09-27 Thread Daniel P. Berrange
-- > tests/qemu-iotests/iotests.py | 3 +++ > 1 file changed, 3 insertions(+) Reviewed-by: Daniel P. Berrange Regards, Daniel -- |: https://berrange.com -o-https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o-https://fstop138.berrange.com :|

[Qemu-block] [PATCH v4 5/6] block: convert qcrypto_block_encrypt|decrypt to take bytes offset

2017-09-27 Thread Daniel P. Berrange
Instead of sector offset, take the bytes offset when encrypting or decrypting data. Signed-off-by: Daniel P. Berrange --- block/crypto.c | 12 block/qcow.c | 11 +++ block/qcow2-cluster.c | 8 +++- block/qcow2.c | 4 ++-- crypto/block

[Qemu-block] [PATCH v4 4/6] block: convert crypto driver to bdrv_co_preadv|pwritev

2017-09-27 Thread Daniel P. Berrange
. Signed-off-by: Daniel P. Berrange --- block/crypto.c | 106 + 1 file changed, 54 insertions(+), 52 deletions(-) diff --git a/block/crypto.c b/block/crypto.c index 61f5d77bc0..965c173b01 100644 --- a/block/crypto.c +++ b/block/crypto.c @@ -387,18

[Qemu-block] [PATCH v4 2/6] crypto: expose encryption sector size in APIs

2017-09-27 Thread Daniel P. Berrange
: Daniel P. Berrange --- crypto/block-luks.c| 6 -- crypto/block-qcow.c| 1 + crypto/block.c | 6 ++ crypto/blockpriv.h | 1 + include/crypto/block.h | 15 +++ 5 files changed, 27 insertions(+), 2 deletions(-) diff --git a/crypto/block-luks.c b/crypto

[Qemu-block] [PATCH v4 6/6] block: support passthrough of BDRV_REQ_FUA in crypto driver

2017-09-27 Thread Daniel P. Berrange
The BDRV_REQ_FUA flag can trivially be allowed in the crypt driver as a passthrough to the underlying block driver. Reviewed-by: Max Reitz Reviewed-by: Eric Blake Signed-off-by: Daniel P. Berrange --- block/crypto.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a

[Qemu-block] [PATCH v4 3/6] block: fix data type casting for crypto payload offset

2017-09-27 Thread Daniel P. Berrange
truncation. Change the block crypto driver to use uint64_t, but add asserts that the value is less than INT64_MAX. Reviewed-by: Max Reitz Reviewed-by: Eric Blake Signed-off-by: Daniel P. Berrange --- block/crypto.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git

[Qemu-block] [PATCH v4 1/6] block: use 1 MB bounce buffers for crypto instead of 16KB

2017-09-27 Thread Daniel P. Berrange
fore completion. Signed-off-by: Daniel P. Berrange --- block/crypto.c | 28 +++- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/block/crypto.c b/block/crypto.c index 58ef6f2f52..684cabeaf8 100644 --- a/block/crypto.c +++ b/block/crypto.c @@ -379,7 +37

[Qemu-block] [PATCH v4 0/6] Misc improvements to crypto block driver

2017-09-27 Thread Daniel P. Berrange
GNED where appropriate (Eric) - Remove unused 'sector_num' variable (Eric) - Fix whitespace alignment (Eric) - Fix math error in qcow conversion (Eric) Daniel P. Berrange (6): block: use 1 MB bounce buffers for crypto instead of 16KB crypto: expose encryption sector size in AP

Re: [Qemu-block] [PATCH v3 5/7] block: convert crypto driver to bdrv_co_preadv|pwritev

2017-09-27 Thread Daniel P. Berrange
On Sat, Sep 16, 2017 at 06:54:58PM +0200, Max Reitz wrote: > On 2017-09-12 13:28, Daniel P. Berrange wrote: > > Make the crypto driver implement the bdrv_co_preadv|pwritev > > callbacks, and also use bdrv_co_preadv|pwritev for I/O > > with the protocol driver beneath. &

Re: [Qemu-block] [Qemu-devel] [PATCH v2 0/2] Truncate the tail of the image file in qcow2 shrinking

2017-09-22 Thread Daniel P. Berrange
On Fri, Sep 22, 2017 at 12:39:24PM +0300, Pavel Butsykin wrote: > Now after shrinking the qcow2 image, at the end of the image file, there might > be a tail that probably will never be used. Although it will not bring any > tangible benefit, we can cut the tail if it is. Yes, it will not free up di

Re: [Qemu-block] [Qemu-devel] image locking

2017-09-19 Thread Daniel P. Berrange
On Tue, Sep 19, 2017 at 06:46:19PM +0300, Vladimir Sementsov-Ogievskiy wrote: > Hi Fam! > > I have a question about your image locking series: > > Can you please explain, why OFD locking is enabled by default and posix > locking is not? What is wrong with posix locking, what are the problems? PO

Re: [Qemu-block] [Qemu-devel] [PATCH 2/4] scsi: build qemu-pr-helper

2017-09-19 Thread Daniel P. Berrange
On Tue, Sep 19, 2017 at 12:24:32PM +0200, Paolo Bonzini wrote: > Introduce a privileged helper to run persistent reservation commands. > This lets virtual machines send persistent reservations without using > CAP_SYS_RAWIO or out-of-tree patches. The helper uses Unix permissions > and SCM_RIGHTS t

Re: [Qemu-block] [Qemu-devel] [PATCH 4/4] scsi: add persistent reservation manager using qemu-pr-helper

2017-09-19 Thread Daniel P. Berrange
On Tue, Sep 19, 2017 at 12:24:34PM +0200, Paolo Bonzini wrote: > This adds a concrete subclass of pr-manager that talks to qemu-pr-helper. > > Signed-off-by: Paolo Bonzini > --- > v1->v2: fixed string property double-free > fixed/cleaned up error handling > handle buffer underrun

Re: [Qemu-block] [Qemu-devel] [PATCH 4/4] scsi: add persistent reservation manager using qemu-pr-helper

2017-09-19 Thread Daniel P. Berrange
On Tue, Sep 19, 2017 at 02:57:00PM +0200, Paolo Bonzini wrote: > On 19/09/2017 14:53, Daniel P. Berrange wrote: > >> +/* Try to reconnect while sending the CDB. */ > >> +for (attempts = 0; attempts < PR_MAX_RECONNECT_ATTEMPTS; attempts++) { > > > > I

Re: [Qemu-block] [Qemu-devel] [PATCH 4/4] scsi: add persistent reservation manager using qemu-pr-helper

2017-09-19 Thread Daniel P. Berrange
On Tue, Sep 19, 2017 at 03:23:09PM +0200, Paolo Bonzini wrote: > On 19/09/2017 15:12, Daniel P. Berrange wrote: > > On Tue, Sep 19, 2017 at 02:57:00PM +0200, Paolo Bonzini wrote: > >> On 19/09/2017 14:53, Daniel P. Berrange wrote: > >>>> +/* Try t

Re: [Qemu-block] [Qemu-devel] [PATCH 4/4] scsi: add persistent reservation manager using qemu-pr-helper

2017-09-19 Thread Daniel P. Berrange
On Tue, Sep 19, 2017 at 12:24:34PM +0200, Paolo Bonzini wrote: > This adds a concrete subclass of pr-manager that talks to qemu-pr-helper. > > Signed-off-by: Paolo Bonzini > --- > v1->v2: fixed string property double-free > fixed/cleaned up error handling > handle buffer underrun

Re: [Qemu-block] [Qemu-devel] [PATCH 15/18] block/mirror: Add active mirroring

2017-09-19 Thread Daniel P. Berrange
On Tue, Sep 19, 2017 at 10:44:16AM +0100, Stefan Hajnoczi wrote: > On Mon, Sep 18, 2017 at 06:26:51PM +0200, Max Reitz wrote: > > On 2017-09-18 12:06, Stefan Hajnoczi wrote: > > > On Sat, Sep 16, 2017 at 03:58:01PM +0200, Max Reitz wrote: > > >> On 2017-09-14 17:57, Stefan Hajnoczi wrote: > > >>> O

Re: [Qemu-block] [PATCH v3 4/7] block: don't use constant 512 as sector size in crypto driver

2017-09-18 Thread Daniel P. Berrange
On Sat, Sep 16, 2017 at 06:24:56PM +0200, Max Reitz wrote: > On 2017-09-12 13:28, Daniel P. Berrange wrote: > > Use the qcrypto_block_get_sector_size() value in the block > > crypto driver instead of hardcoding 512 as the sector size. > > > > Signed-off-by: Daniel P. B

Re: [Qemu-block] [PATCH v3 5/7] block: convert crypto driver to bdrv_co_preadv|pwritev

2017-09-12 Thread Daniel P. Berrange
On Tue, Sep 12, 2017 at 12:28:53PM +0100, Daniel P. Berrange wrote: > Make the crypto driver implement the bdrv_co_preadv|pwritev > callbacks, and also use bdrv_co_preadv|pwritev for I/O > with the protocol driver beneath. > > Signed-off-by: Daniel P. Berrange > --- >

[Qemu-block] [PATCH v3 7/7] block: support passthrough of BDRV_REQ_FUA in crypto driver

2017-09-12 Thread Daniel P. Berrange
The BDRV_REQ_FUA flag can trivially be allowed in the crypt driver as a passthrough to the underlying block driver. Signed-off-by: Daniel P. Berrange --- block/crypto.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/block/crypto.c b/block/crypto.c index 1f77095336

[Qemu-block] [PATCH v3 1/7] block: use 1 MB bounce buffers for crypto instead of 16KB

2017-09-12 Thread Daniel P. Berrange
fore completion. Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Daniel P. Berrange --- block/crypto.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/block/crypto.c b/block/crypto.c index 58ef6f2f52..cc8afe0e0d 100644 --- a/block/crypto.c +

[Qemu-block] [PATCH v3 6/7] block: convert qcrypto_block_encrypt|decrypt to take bytes offset

2017-09-12 Thread Daniel P. Berrange
Instead of sector offset, take the bytes offset when encrypting or decrypting data. Signed-off-by: Daniel P. Berrange --- block/crypto.c | 12 block/qcow.c | 7 +-- block/qcow2-cluster.c | 8 +++- block/qcow2.c | 4 ++-- crypto/block-luks.c

[Qemu-block] [PATCH v3 5/7] block: convert crypto driver to bdrv_co_preadv|pwritev

2017-09-12 Thread Daniel P. Berrange
Make the crypto driver implement the bdrv_co_preadv|pwritev callbacks, and also use bdrv_co_preadv|pwritev for I/O with the protocol driver beneath. Signed-off-by: Daniel P. Berrange --- block/crypto.c | 104 +++-- 1 file changed, 56

[Qemu-block] [PATCH v3 4/7] block: don't use constant 512 as sector size in crypto driver

2017-09-12 Thread Daniel P. Berrange
Use the qcrypto_block_get_sector_size() value in the block crypto driver instead of hardcoding 512 as the sector size. Signed-off-by: Daniel P. Berrange --- block/crypto.c | 34 ++ 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/block/crypto.c b

[Qemu-block] [PATCH v3 2/7] crypto: expose encryption sector size in APIs

2017-09-12 Thread Daniel P. Berrange
While current encryption schemes all have a fixed sector size of 512 bytes, this is not guaranteed to be the case in future. Expose the sector size in the APIs so the block layer can remove assumptions about fixed 512 byte sectors. Signed-off-by: Daniel P. Berrange --- crypto/block-luks.c

[Qemu-block] [PATCH v3 3/7] block: fix data type casting for crypto payload offset

2017-09-12 Thread Daniel P. Berrange
truncation. Change the block crypto driver to use uint64_t, but add asserts that the value is less than INT64_MAX. Signed-off-by: Daniel P. Berrange --- block/crypto.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/block/crypto.c b/block/crypto.c index

[Qemu-block] [PATCH v3 0/7] Misc improvements to crypto block driver

2017-09-12 Thread Daniel P. Berrange
r_num' variable (Eric) - Fix whitespace alignment (Eric) - Fix math error in qcow conversion (Eric) Daniel P. Berrange (7): block: use 1 MB bounce buffers for crypto instead of 16KB crypto: expose encryption sector size in APIs block: fix data type casting for crypto payload offs

Re: [Qemu-block] [PATCH v2 3/4] block: convert crypto driver to bdrv_co_preadv|pwritev

2017-09-12 Thread Daniel P. Berrange
On Thu, Aug 31, 2017 at 10:08:00AM -0500, Eric Blake wrote: > On 08/31/2017 06:05 AM, Daniel P. Berrange wrote: > > Make the crypto driver implement the bdrv_co_preadv|pwritev > > callbacks, and also use bdrv_co_preadv|pwritev for I/O > > with the protocol driver beneath. &

Re: [Qemu-block] [PATCH 3/3] nbd: Use new qio_channel_*_all() functions

2017-09-06 Thread Daniel P. Berrange
otests/083.out b/tests/qemu-iotests/083.out > index fb71b6f8ad..25dde519e3 100644 > --- a/tests/qemu-iotests/083.out > +++ b/tests/qemu-iotests/083.out > @@ -69,12 +69,12 @@ read failed: Input/output error > > === Check disconnect 4 reply === > > -End of file > +Unexpected

Re: [Qemu-block] [PATCH 2/3] io: Add new qio_channel_read{, v}_all_eof functions

2017-09-06 Thread Daniel P. Berrange
gt; const struct iovec *iov, > size_t niov, > @@ -205,6 +227,16 @@ ssize_t qio_channel_write(QIOChannel *ioc, > } > > > +int qio_channel_read_all_eof(QIOChannel *ioc, > + char *buf, > +

Re: [Qemu-block] [PATCH 1/3] io: Yield rather than wait when already in coroutine

2017-09-06 Thread Daniel P. Berrange
== QIO_CHANNEL_ERR_BLOCK) { > -qio_channel_wait(ioc, G_IO_OUT); > +if (qemu_in_coroutine()) { > +qio_channel_yield(ioc, G_IO_OUT); > +} else { > + qio_channel_wait(ioc, G_IO_OUT); > +} > continue; > }

Re: [Qemu-block] [PATCH v2 2/4] block: use BDRV_SECTOR_SIZE in crypto driver

2017-09-05 Thread Daniel P. Berrange
On Tue, Sep 05, 2017 at 11:52:15AM +0200, Kevin Wolf wrote: > Am 31.08.2017 um 13:05 hat Daniel P. Berrange geschrieben: > > Signed-off-by: Daniel P. Berrange > > --- > > block/crypto.c | 32 > > 1 file changed, 16 insertions(+), 16 del

Re: [Qemu-block] [Qemu-devel] [PATCH] qemu-iotests: Make test 192 use QMP; convert it to Python

2017-09-04 Thread Daniel P. Berrange
On Mon, Sep 04, 2017 at 01:16:16PM +0200, Kashyap Chamarthy wrote: > The test 192 ("Test NBD export with '-incoming' (non-shared > storage migration use case from libvirt")) is currently using HMP. > Replace the HMP usage with QMP, as the upstream preference seems to be: > "Use QMP where possible,

Re: [Qemu-block] [Qemu-devel] [PATCH 0/2] Fix / skip recent iotests with LUKS driver

2017-09-01 Thread Daniel P. Berrange
On Fri, Sep 01, 2017 at 09:26:30AM -0500, Eric Blake wrote: > On 09/01/2017 05:54 AM, Daniel P. Berrange wrote: > > Two recently added iotests are currently breaking 'check -luks', > > fix the easy one and disable the hard one. > > > > Daniel P. Berrange (

[Qemu-block] [PATCH 2/2] iotests: blacklist 194 with the luks driver

2017-09-01 Thread Daniel P. Berrange
The 194 test has alot of code that assumes a simple image file. Rewriting this to work with luks is possible, but non-trivial, so blacklist the luks format for now. Signed-off-by: Daniel P. Berrange --- tests/qemu-iotests/194| 1 + tests/qemu-iotests/iotests.py | 4 +++- 2 files changed

[Qemu-block] [PATCH 0/2] Fix / skip recent iotests with LUKS driver

2017-09-01 Thread Daniel P. Berrange
Two recently added iotests are currently breaking 'check -luks', fix the easy one and disable the hard one. Daniel P. Berrange (2): iotests: rewrite 192 to use _launch_qemu to fix LUKS support iotests: blacklist 194 with the luks driver tests/qemu-iotests/192

[Qemu-block] [PATCH 1/2] iotests: rewrite 192 to use _launch_qemu to fix LUKS support

2017-09-01 Thread Daniel P. Berrange
The LUKS driver requires extra args to QEMU to setup passwords. The _launch_qemu function takes care of this, so convert the test to use this function and use correct -drive syntax Signed-off-by: Daniel P. Berrange --- tests/qemu-iotests/192 | 23 --- 1 file changed, 16

Re: [Qemu-block] [PATCH v2 4/4] block: convert qcrypto_block_encrypt|decrypt to take bytes offset

2017-08-31 Thread Daniel P. Berrange
On Thu, Aug 31, 2017 at 10:17:43AM -0500, Eric Blake wrote: > On 08/31/2017 06:05 AM, Daniel P. Berrange wrote: > > Instead of sector offset, take the bytes offset when encrypting > > or decrypting data. > > > > Signed-off-by: Daniel P. Berrange > > ---

[Qemu-block] [PATCH v4] block: document semantics of bdrv_co_preadv|pwritev

2017-08-31 Thread Daniel P. Berrange
Reviewed-by: Stefan Hajnoczi Reviewed-by: Eric Blake Signed-off-by: Daniel P. Berrange --- Changed in v4: - Fix typo in commit message include/block/block_int.h | 31 +++ 1 file changed, 31 insertions(+) diff --git a/include/block/block_int.h b/include/block

[Qemu-block] [PATCH v2 4/4] block: convert qcrypto_block_encrypt|decrypt to take bytes offset

2017-08-31 Thread Daniel P. Berrange
Instead of sector offset, take the bytes offset when encrypting or decrypting data. Signed-off-by: Daniel P. Berrange --- block/crypto.c | 8 block/qcow.c | 7 +-- block/qcow2-cluster.c | 8 +++- block/qcow2.c | 4 ++-- crypto/block-luks.c

[Qemu-block] [PATCH v2 1/4] block: use 1 MB bounce buffers for crypto instead of 16KB

2017-08-31 Thread Daniel P. Berrange
fore completion. Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Signed-off-by: Daniel P. Berrange --- block/crypto.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/block/crypto.c b/block/crypto.c index 58ef6f2f52..cc8afe0e0d 100644 --- a/block/crypto.c +

[Qemu-block] [PATCH v2 0/4] block: improve luks driver perf & switch to byte APIs

2017-08-31 Thread Daniel P. Berrange
P. Berrange (4): block: use 1 MB bounce buffers for crypto instead of 16KB block: use BDRV_SECTOR_SIZE in crypto driver block: convert crypto driver to bdrv_co_preadv|pwritev block: convert qcrypto_block_encrypt|decrypt to take bytes offset block/crypto.c | 119

[Qemu-block] [PATCH v2 3/4] block: convert crypto driver to bdrv_co_preadv|pwritev

2017-08-31 Thread Daniel P. Berrange
Make the crypto driver implement the bdrv_co_preadv|pwritev callbacks, and also use bdrv_co_preadv|pwritev for I/O with the protocol driver beneath. Signed-off-by: Daniel P. Berrange --- block/crypto.c | 103 + 1 file changed, 53

  1   2   3   4   5   6   7   8   9   10   >