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

2017-11-02 Thread Kashyap Chamarthy
[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 +, Daniel P. Berrange wrote: > I've been thinking about a potential design/impl improvement for the way > that OpenStack Nova handles disk images when booting virtual

Re: [Qemu-block] [PATCH v6 09/25] block: Fix bdrv_find_backing_image()

2017-11-02 Thread Max Reitz
On 2017-10-30 15:47, Alberto Garcia wrote: > On Fri 29 Sep 2017 06:53:31 PM CEST, Max Reitz wrote: >> @@ -4096,22 +4086,31 @@ BlockDriverState >> *bdrv_find_backing_image(BlockDriverState *bs, >> } else { >> /* If not an absolute filename path, make it relative to the >>

Re: [Qemu-block] [PATCH v6 16/25] block: Add 'base-directory' BDS option

2017-11-02 Thread Max Reitz
On 2017-11-02 15:40, Alberto Garcia wrote: > On Fri 29 Sep 2017 06:53:38 PM CEST, Max Reitz wrote: >> Using this option, one can directly override what bdrv_dirname() will >> return. This is useful if one uses e.g. qcow2 on top of quorum (with >> only protocol BDSs under the quorum BDS) and wants

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 +, Daniel P. Berrange wrote: > > I've been thinking about a potential design/impl

Re: [Qemu-block] [PATCH 1/4] qcow2: Prevent allocating refcount blocks at offset 0

2017-11-02 Thread Max Reitz
On 2017-11-01 16:42, Alberto Garcia wrote: > Each entry in the qcow2 cache contains an offset field indicating the > location of the data in the qcow2 image. If the offset is 0 then it > means that the entry contains no data and is available to be used when > needed. > > Because of that it is not

Re: [Qemu-block] [PATCH v6 18/25] block: Add sgfnt_runtime_opts to BlockDriver

2017-11-02 Thread Max Reitz
On 2017-11-02 17:11, Alberto Garcia wrote: > On Fri 29 Sep 2017 06:53:40 PM CEST, Max Reitz wrote: >> QLIST_ENTRY(BlockDriver) list; >> + >> +/* Pointer to a NULL-terminated array of names of significant options >> that >> + * can be specified for bdrv_open(). A significant option is

Re: [Qemu-block] [PATCH v6 18/25] block: Add sgfnt_runtime_opts to BlockDriver

2017-11-02 Thread Alberto Garcia
On Fri 29 Sep 2017 06:53:40 PM CEST, Max Reitz wrote: > QLIST_ENTRY(BlockDriver) list; > + > +/* Pointer to a NULL-terminated array of names of significant options > that > + * can be specified for bdrv_open(). A significant option is one that > + * changes the data of a BDS. > +

Re: [Qemu-block] [PATCH 0/4] Misc qcow2 corruption checks

2017-11-02 Thread Max Reitz
On 2017-11-01 16:42, Alberto Garcia wrote: > Misc qcow2 corruption checks > > This series contains a few checks that prevent QEMU from crashing > under some scenarios with corrupted qcow2 images. > > The first patch solves the crash reported here: > >

Re: [Qemu-block] [PATCH 2/4] qcow2: Prevent allocating L2 tables at offset 0

2017-11-02 Thread Max Reitz
On 2017-11-01 16:42, Alberto Garcia wrote: > If the refcount data is corrupted then we can end up trying to > allocate a new L2 table at offset 0 in the image, triggering an > assertion in the qcow2 cache that would crash QEMU: > > qcow2_cache_entry_mark_dirty: Assertion `c->entries[i].offset

Re: [Qemu-block] [PATCH 3/4] qcow2: Don't open images with header.refcount_table_clusters == 0

2017-11-02 Thread Max Reitz
On 2017-11-01 16:42, Alberto Garcia wrote: > qcow2_do_open() is checking that header.refcount_table_clusters is not > too large, but it doesn't check that it's greater than zero. Apart > from the fact that an image like that is obviously corrupted, trying > to use it crashes QEMU since we end up

Re: [Qemu-block] [PATCH 4/4] qcow2: Add iotest for an empty refcount table

2017-11-02 Thread Max Reitz
On 2017-11-01 16:42, Alberto Garcia wrote: > This patch adds a simple iotests in which we try to write to an image > with an empty refcount table (i.e. with all entries set to 0). > > This scenario was already handled by the existing consistency checks, > but we add an explicit test case for

Re: [Qemu-block] [PATCH 1/2] nbd/server: fix nbd_negotiate_handle_info

2017-11-02 Thread Eric Blake
On 11/01/2017 10:42 AM, Vladimir Sementsov-Ogievskiy wrote: It's best to send a 0/2 cover letter for a series, even when both patches are small, as that helps automation tools. > namelen should be here, lenght is unrelated. s/lenght/length/ Broken in introduction in commit f37708f6; hence

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

2017-11-02 Thread Paolo Bonzini
On 02/11/2017 13:02, Daniel P. Berrange wrote: > > After all that long background explanation, what I'm wondering is whether > there is any interest / desire to extend qemu-nbd to have more advanced > featureset than simply exporting a single disk image which must be listed > at startup time. >

Re: [Qemu-block] [PATCH 2/2] nbd/server: add assert to nbd_negotiate_handle_info

2017-11-02 Thread Eric Blake
On 11/01/2017 10:42 AM, Vladimir Sementsov-Ogievskiy wrote: > Add an assert here to make last length assignment meaningful and > following return without tail dropping obvious. Not quite sure I followed your explanation, which means it's difficult for me to propose an alternative wording. Maybe:

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

2017-11-02 Thread Eric Blake
On 11/02/2017 12:04 PM, Daniel P. Berrange wrote: > vm-a-disk1.qcow2 open - its just a regular backing file setup. > >> >>> | (format=qcow2, proto=file) >>> | >>> +- vm-a-disk1.qcow2 (qemu-system-XXX) >>> >>> The problem is that many VMs are wanting to use

Re: [Qemu-block] ping Re: [PATCH v2 0/5] backup improvements part 1

2017-11-02 Thread John Snow
On 10/31/2017 06:26 AM, Vladimir Sementsov-Ogievskiy wrote: > Hey, what about this? > Sorry Vladimir, unexpected leave of absence from work. It's at the top of my pile. I invite others to come take a look, too.

Re: [Qemu-block] [Qemu-devel] [PATCH] hw/ide/ahci: Move allwinner code into a separate file

2017-11-02 Thread John Snow
On 10/23/2017 02:48 PM, Thomas Huth wrote: > The allwinner code is only needed for the allwinner board (for which > we also have a separate CONFIG_ALLWINNER_A10 config switch), so it > does not make sense that we compile this for all the other boards > that need AHCI, too. Let's move it to a

Re: [Qemu-block] [Qemu-devel] [PATCH v9 0/8] Optimize VMDK I/O by allocating multiple clusters

2017-11-02 Thread John Snow
On 10/20/2017 02:53 AM, Ashijeet Acharya wrote: > > On Fri, Oct 20, 2017 at 11:58 Fam Zheng > wrote: > > On Mon, 10/09 22:12, Fam Zheng wrote: > > On Mon, 10/09 18:29, Ashijeet Acharya wrote: > > > Optimization test results: > > > >

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

2017-11-02 Thread Max Reitz
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 qemu-system-x86_64 with '--machine none' and use that > as a replacement for qemu-nbd, since it already has a built-in NBD server > which can do

Re: [Qemu-block] [Qemu-devel] [PATCH] block/snapshot: dirty all dirty bitmaps on snapshot-switch

2017-11-02 Thread John Snow
On 10/23/2017 05:29 AM, Vladimir Sementsov-Ogievskiy wrote: > Snapshot-switch actually changes active state of disk so it should > reflect on dirty bitmaps. Otherwise next incremental backup using > these bitmaps will be invalid. > Good call. I knew that snapshots weren't compatible, but this

Re: [Qemu-block] [Qemu-devel] [PATCH v6 00/24] make bdrv_get_block_status byte-based

2017-11-02 Thread John Snow
On 10/20/2017 12:45 PM, Kevin Wolf wrote: > Am 12.10.2017 um 05:46 hat Eric Blake geschrieben: >> There are patches floating around to add NBD_CMD_BLOCK_STATUS, >> but NBD wants to report status on byte granularity (even if the >> reporting will probably be naturally aligned to sectors or even

Re: [Qemu-block] [PATCH v6 16/25] block: Add 'base-directory' BDS option

2017-11-02 Thread Eric Blake
On 11/02/2017 11:07 AM, Max Reitz wrote: > On 2017-11-02 15:40, Alberto Garcia wrote: >> On Fri 29 Sep 2017 06:53:38 PM CEST, Max Reitz wrote: >>> Using this option, one can directly override what bdrv_dirname() will >>> return. This is useful if one uses e.g. qcow2 on top of quorum (with >>> only

Re: [Qemu-block] [Qemu-devel] [PATCH v6 00/24] make bdrv_get_block_status byte-based

2017-11-02 Thread Eric Blake
On 11/02/2017 04:01 PM, John Snow wrote: >>> The overall conversion currently looks like: >>> part 1: bdrv_is_allocated (merged, commit 51b0a488) >>> part 2: dirty-bitmap (merged, commit ca759622) >>> part 3: bdrv_get_block_status (this series, v5 at [1]) >>> part 4: .bdrv_co_block_status (v3 is

[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

Re: [Qemu-block] [PATCH v13 2/6] qmp: Use ThrottleLimits structure

2017-11-02 Thread Pradeep Jagadeesh
On 10/13/2017 4:26 PM, Eric Blake wrote: [adding Markus, and block list] On 10/13/2017 09:16 AM, Alberto Garcia wrote: On Mon 02 Oct 2017 04:33:28 PM CEST, Pradeep Jagadeesh wrote: This patch factors out code to use the ThrottleLimits structure. { 'struct': 'BlockIOThrottle', - 'data': {

Re: [Qemu-block] [PATCH v6 16/25] block: Add 'base-directory' BDS option

2017-11-02 Thread Alberto Garcia
On Fri 29 Sep 2017 06:53:38 PM CEST, Max Reitz wrote: > Using this option, one can directly override what bdrv_dirname() will > return. This is useful if one uses e.g. qcow2 on top of quorum (with > only protocol BDSs under the quorum BDS) and wants to be able to use > relative backing filenames.

Re: [Qemu-block] ping Re: [PATCH v2 0/5] backup improvements part 1

2017-11-02 Thread Vladimir Sementsov-Ogievskiy
02.11.2017 23:52, John Snow wrote: On 10/31/2017 06:26 AM, Vladimir Sementsov-Ogievskiy wrote: Hey, what about this? Sorry Vladimir, unexpected leave of absence from work. It's at the top of my pile. I invite others to come take a look, too. No problems, thank you. -- Best regards,

Re: [Qemu-block] [PATCH 2/2] nbd/server: add assert to nbd_negotiate_handle_info

2017-11-02 Thread Vladimir Sementsov-Ogievskiy
02.11.2017 21:06, Eric Blake wrote: On 11/01/2017 10:42 AM, Vladimir Sementsov-Ogievskiy wrote: Add an assert here to make last length assignment meaningful and following return without tail dropping obvious. Not quite sure I followed your explanation, which means it's difficult for me to