Re: [Qemu-block] [PATCH 2/4] nbd/server: add nbd_meta_single_query helper

2018-04-13 Thread Vladimir Sementsov-Ogievskiy
21.03.2018 18:05, Eric Blake wrote: On 03/21/2018 07:19 AM, Vladimir Sementsov-Ogievskiy wrote: The helper will be reused for bitmaps namespace. Signed-off-by: Vladimir Sementsov-Ogievskiy ---   nbd/server.c | 41 -   1 file

[Qemu-block] [PATCH v2 3/3] qapi: new qmp command nbd-server-add-bitmap

2018-04-13 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/block.json | 23 +++ blockdev-nbd.c | 23 +++ 2 files changed, 46 insertions(+) diff --git a/qapi/block.json b/qapi/block.json index c694524002..cc0e607b5b 100644 ---

[Qemu-block] [PATCH v2 0/3] NBD export bitmaps

2018-04-13 Thread Vladimir Sementsov-Ogievskiy
Hi all. This is a proposal and realization of new NBD meta context: qemu. (I hope to send corresponding proposal to NBD protocol soon) New possible queries will look like: qemu:dirty-bitmap: Mapping from export-bitmap-name to BdrvDirtyBitmap is done through qmp command nbd-server-add-bitmap.

Re: [Qemu-block] [PATCH 2/4] nbd/server: add nbd_meta_single_query helper

2018-04-13 Thread John Snow
On 04/13/2018 01:44 PM, Vladimir Sementsov-Ogievskiy wrote: > > will add, as always, thank you for natural rewording) Hm, I have a > question: why do you often use double white-space "  " between > sentences? Is it something meaningful? There is some GREAT DEBATE in the English-speaking world

[Qemu-block] [PATCH 3/3] qemu-iotests: Test new qemu-nbd --nolist option

2018-04-13 Thread Nir Soffer
Add new test module for tesing the --nolist option. Signed-off-by: Nir Soffer --- tests/qemu-iotests/214 | 46 ++ tests/qemu-iotests/214.out | 2 ++ tests/qemu-iotests/group | 1 + 3 files changed, 49 insertions(+) create

[Qemu-block] [PATCH 0/3] qemu-nbd: Disallow listing exports

2018-04-13 Thread Nir Soffer
oVirt uses random URLs to expose images temporarily via HTTPS. We would like to integrated qemu-nbd in the same system, proving a user an easy and uniform way to access an image - either using HTTPS: https://server:54322/images/dc72d3cc-b933-45e8-89a2-e028e1c2ef3d Or using NBD over TLS:

Re: [Qemu-block] [PATCH 1/3] nbd: Add option to disallow listing exports

2018-04-13 Thread Richard W.M. Jones
On Fri, Apr 13, 2018 at 10:26:03PM +0300, Nir Soffer wrote: > When a management application expose images using qemu-nbd, it needs a > secure way to allow temporary access to the disk. Using a random export > name can solve this problem: > >

[Qemu-block] [PATCH 2/3] iotests.py: Add helper for running commands

2018-04-13 Thread Nir Soffer
Add few helpers for running external commands: - CommandFailed: exception, keeping all the info related to a failed command, and providing a useful error message. (Unfortunately subprocess.CalledProcessError does not). - run(): run a command collecting output from the underlying process

Re: [Qemu-block] [PATCH v4 2/5] qcow2: Document some maximum size constraints

2018-04-13 Thread Max Reitz
On 2018-02-28 15:20, Alberto Garcia wrote: > On Wed 28 Feb 2018 03:01:33 PM CET, Eric Blake wrote: > The refcount table has implications on the maximum host file size; a larger cluster size is required for the refcount table to cover larger offsets. >>> >>> Why is this? Because of

[Qemu-block] [PATCH v2 1/3] nbd/server: add nbd_meta_single_query helper

2018-04-13 Thread Vladimir Sementsov-Ogievskiy
The helper will be reused for bitmaps namespace. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- nbd/server.c | 40 +++- 1 file changed, 27 insertions(+), 13 deletions(-) diff --git

[Qemu-block] [PATCH v2 2/3] nbd/server: implement dirty bitmap export

2018-04-13 Thread Vladimir Sementsov-Ogievskiy
Handle new NBD meta namespace: "qemu", and corresponding queries: "qemu:dirty-bitmap:". With new metadata context negotiated, BLOCK_STATUS query will reply with dirty-bitmap data, converted to extents. New public function nbd_export_bitmap selects bitmap to export. For now, only one bitmap may be

Re: [Qemu-block] [PATCH 07/19] block: Really pause block jobs on drain

2018-04-13 Thread Kevin Wolf
Am 12.04.2018 um 22:44 hat Paolo Bonzini geschrieben: > On 12/04/2018 16:25, Kevin Wolf wrote: > > This is already the order we have there. What is probably different from > > what you envision is that after the parents have concluded, we still > > check that they are still quiescent in every

Re: [Qemu-block] [PATCH 07/19] block: Really pause block jobs on drain

2018-04-13 Thread Paolo Bonzini
On 13/04/2018 10:01, Kevin Wolf wrote: >> Or bs->quiescent, for the sake of bikeshedding. > Yes, that sounds better. > > The only problem with the proposal as I made it is that it's wrong. We > can't keep bs->quiescent until bdrv_do_drained_end() because the caller > can issue new requests and

Re: [Qemu-block] [PATCH] scripts/dump-qcow2.pl: Script to dump qcow2 metadata

2018-04-13 Thread Alberto Garcia
On Fri 13 Apr 2018 04:45:15 PM CEST, Max Reitz wrote: > OK, now that that's out of the way... I'm wondering why you want to > add this to the qemu tree? If you'd written an iotest that would make > use of it, sure. But if it's just for debugging, then I'd personally > think it would be better

Re: [Qemu-block] [PATCH 07/19] block: Really pause block jobs on drain

2018-04-13 Thread Kevin Wolf
Am 13.04.2018 um 13:05 hat Paolo Bonzini geschrieben: > On 13/04/2018 10:01, Kevin Wolf wrote: > >> Or bs->quiescent, for the sake of bikeshedding. > > Yes, that sounds better. > > > > The only problem with the proposal as I made it is that it's wrong. We > > can't keep bs->quiescent until

[Qemu-block] [PATCH] nbd/server: introduce NBD_CMD_CACHE

2018-04-13 Thread Vladimir Sementsov-Ogievskiy
Handle nbd CACHE command. Just do read, without sending read data back. Cache mechanism should be done by exported node driver chain. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/nbd.h | 3 ++- nbd/server.c| 10 ++ 2 files changed, 8

Re: [Qemu-block] [PATCH 0/2] Minor fixes about compressed clusters with OFLAG_COPIED

2018-04-13 Thread Max Reitz
On 2018-04-10 18:05, Alberto Garcia wrote: > Hi, > > while reviewing one previous patch about data corruption and > compressed clusters we discussed that the documentation doesn't > clarify that L2 entries for compressed clusters are not supposed to > have the OFLAG_COPIED bit set. > > Here's a

Re: [Qemu-block] [PATCH] nbd/server: introduce NBD_CMD_CACHE

2018-04-13 Thread Vladimir Sementsov-Ogievskiy
13.04.2018 17:31, Vladimir Sementsov-Ogievskiy wrote: Handle nbd CACHE command. Just do read, without sending read data back. Cache mechanism should be done by exported node driver chain. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/nbd.h | 3 ++-

Re: [Qemu-block] [PATCH] scripts/dump-qcow2.pl: Script to dump qcow2 metadata

2018-04-13 Thread Max Reitz
On 2018-03-28 15:38, Alberto Garcia wrote: > This script takes a qcow2 image and dumps its metadata: header, > snapshot table and some extensions (although not all qcow2 features > are supported yet). > > It can also display a list of all host clusters and the guest -> host > address mappings, so

Re: [Qemu-block] [PATCH v2 1/2] qcow2: Give the refcount cache the minimum possible size by default

2018-04-13 Thread Max Reitz
On 2018-03-14 09:29, Alberto Garcia wrote: > The L2 and refcount caches have default sizes that can be overridden > using the l2-cache-size and refcount-cache-size (an additional > parameter named cache-size sets the combined size of both caches). > > Unless forced by one of the aforementioned

Re: [Qemu-block] [Qemu-devel] [PATCH] iotests: fix 169

2018-04-13 Thread Max Reitz
On 2018-04-12 11:09, Vladimir Sementsov-Ogievskiy wrote: > 12.04.2018 11:34, Vladimir Sementsov-Ogievskiy wrote: >> 11.04.2018 19:11, Max Reitz wrote: >>> On 2018-04-11 15:05, Vladimir Sementsov-Ogievskiy wrote: >>> >>> [...] >>> Hmm, first type? I'm now not sure about, did I really see

Re: [Qemu-block] [RFC] Intermediate block mirroring

2018-04-13 Thread Max Reitz
On 2018-04-12 19:07, Alberto Garcia wrote: > Hello, > > I mentioned this some time ago, but I'd like to retake it now: I'm > checking how to copy arbitrary nodes on a backing chain, so if I have > e.g. > >[A] <- [B] <- [C] <- [D] > > I'd like to end up with > >[A] <- [E] <- [C] <- [D]