[Qemu-block] [PATCH v9 07/10] hbitmap: serialization

2016-10-04 Thread John Snow
From: Vladimir Sementsov-Ogievskiy Functions to serialize / deserialize(restore) HBitmap. HBitmap should be saved to linear sequence of bits independently of endianness and bitmap array element (unsigned long) size. Therefore Little Endian is chosen. These functions

[Qemu-block] [PATCH v9 10/10] block: More operations for meta dirty bitmap

2016-10-04 Thread John Snow
From: Fam Zheng Callers can create an iterator of meta bitmap with bdrv_dirty_meta_iter_new(), then use the bdrv_dirty_iter_* operations on it. Meta iterators are also counted by bitmap->active_iterators. Also add a couple of functions to retrieve granularity and count.

[Qemu-block] [PATCH v9 06/10] block: Assert that bdrv_release_dirty_bitmap succeeded

2016-10-04 Thread John Snow
From: Fam Zheng We use a loop over bs->dirty_bitmaps to make sure the caller is only releasing a bitmap owned by bs. Let's also assert that in this case the caller is releasing a bitmap that does exist. Signed-off-by: Fam Zheng Reviewed-by: Max Reitz

[Qemu-block] [PATCH v9 09/10] tests: Add test code for hbitmap serialization

2016-10-04 Thread John Snow
From: Fam Zheng Signed-off-by: Fam Zheng [Fixed minor constant issue. --js] Signed-off-by: John Snow Signed-off-by: John Snow --- tests/test-hbitmap.c | 155 +++ 1 file

[Qemu-block] [PATCH v9 08/10] block: BdrvDirtyBitmap serialization interface

2016-10-04 Thread John Snow
From: Vladimir Sementsov-Ogievskiy Several functions to provide necessary access to BdrvDirtyBitmap for block-migration.c Signed-off-by: Vladimir Sementsov-Ogievskiy [Add the "finish" parameters. - Fam] Signed-off-by: Fam Zheng

[Qemu-block] [PATCH v9 05/10] block: Add two dirty bitmap getters

2016-10-04 Thread John Snow
From: Fam Zheng For dirty bitmap users to get the size and the name of a BdrvDirtyBitmap. Signed-off-by: Fam Zheng Reviewed-by: John Snow Reviewed-by: Max Reitz Signed-off-by: John Snow ---

[Qemu-block] [PATCH v9 01/10] block: Hide HBitmap in block dirty bitmap interface

2016-10-04 Thread John Snow
From: Fam Zheng HBitmap is an implementation detail of block dirty bitmap that should be hidden from users. Introduce a BdrvDirtyBitmapIter to encapsulate the underlying HBitmapIter. A small difference in the interface is, before, an HBitmapIter is initialized in place, now the

[Qemu-block] [PATCH v9 00/10] Dirty bitmap changes for migration/persistence work

2016-10-04 Thread John Snow
Key: [] : patches are identical [] : number of functional differences between upstream/downstream patch [down] : patch is downstream-only The flags [FC] indicate (F)unctional and (C)ontextual differences, respectively 001/10:[] [--] 'block: Hide HBitmap in block dirty bitmap

[Qemu-block] [PATCH v9 02/10] HBitmap: Introduce "meta" bitmap to track bit changes

2016-10-04 Thread John Snow
From: Fam Zheng Upon each bit toggle, the corresponding bit in the meta bitmap will be set. Signed-off-by: Fam Zheng [Amended text inline. --js] Reviewed-by: Max Reitz Signed-off-by: John Snow --- include/qemu/hbitmap.h

[Qemu-block] [PATCH v9 03/10] tests: Add test code for meta bitmap

2016-10-04 Thread John Snow
From: Fam Zheng Signed-off-by: Fam Zheng Reviewed-by: John Snow Reviewed-by: Max Reitz Signed-off-by: John Snow --- tests/test-hbitmap.c | 116 +++ 1 file

Re: [Qemu-block] [Qemu-devel] [PATCH v2] qcow2: Add cache-size=max option to optimize caches for performance

2016-10-04 Thread no-reply
Hi, Your series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Type: series Message-id: 1475605184-29375-1-git-send-email-eswi...@skyportsystems.com Subject: [Qemu-devel] [PATCH v2] qcow2:

Re: [Qemu-block] [Qemu-devel] [PATCH] block: use bdrv_add_before_write_notifier

2016-10-04 Thread Eric Blake
On 10/04/2016 03:49 AM, Paolo Bonzini wrote: > Register the notifier using the specific API for block devices. > > Signed-off-by: Paolo Bonzini > --- > block/write-threshold.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) Reviewed-by: Eric Blake

Re: [Qemu-block] [Qemu-devel] [PATCH 1/1] qemu-iotests: update test 085.out with correct output

2016-10-04 Thread Jeff Cody
On Tue, Oct 04, 2016 at 02:48:41PM -0500, Eric Blake wrote: > On 10/04/2016 12:22 PM, Jeff Cody wrote: > > Commit 5c678ee8d9406b9baeec788530965483575db555 changed the qmp > > dispatch and validation code, and the error output that test > > 085 relied on changed. Update it to be correct. > > > >

Re: [Qemu-block] [Qemu-devel] [PATCH 1/1] qemu-iotests: update test 085.out with correct output

2016-10-04 Thread Eric Blake
On 10/04/2016 12:22 PM, Jeff Cody wrote: > Commit 5c678ee8d9406b9baeec788530965483575db555 changed the qmp > dispatch and validation code, and the error output that test > 085 relied on changed. Update it to be correct. > > Signed-off-by: Jeff Cody > --- >

Re: [Qemu-block] [Qemu-devel] [PATCH v2 03/11] Blockjobs: Internalize user_pause logic

2016-10-04 Thread John Snow
On 10/03/2016 08:57 PM, Jeff Cody wrote: On Fri, Sep 30, 2016 at 06:00:41PM -0400, John Snow wrote: BlockJobs will begin hiding their state in preparation for some refactorings anyway, so let's internalize the user_pause mechanism instead of leaving it to callers to correctly manage.

[Qemu-block] [PATCH v2] qcow2: Add cache-size=max option to optimize caches for performance

2016-10-04 Thread Ed Swierk
The optimal size of the qcow2 L2 cache depends on the working set size and the cluster size of the virtual disk. If the cache is too small, L2 tables are re-read from disk on every IO operation in the worst case. The host's buffer cache can paper over this inefficiency, but with cache=none or

[Qemu-block] [PATCH 1/1] qemu-iotests: update test 085.out with correct output

2016-10-04 Thread Jeff Cody
Commit 5c678ee8d9406b9baeec788530965483575db555 changed the qmp dispatch and validation code, and the error output that test 085 relied on changed. Update it to be correct. Signed-off-by: Jeff Cody --- tests/qemu-iotests/085.out | 2 +- 1 file changed, 1 insertion(+), 1

Re: [Qemu-block] [Qemu-devel] backup notifier fail policy

2016-10-04 Thread Denis V. Lunev
On 10/04/2016 07:03 PM, John Snow wrote: > > > On 10/04/2016 12:02 PM, Stefan Hajnoczi wrote: >> On Tue, Oct 04, 2016 at 01:55:30PM +0200, Kevin Wolf wrote: >>> Am 04.10.2016 um 12:41 hat Denis V. Lunev geschrieben: On 10/04/2016 12:34 PM, Kevin Wolf wrote: > Am 04.10.2016 um 11:23 hat

Re: [Qemu-block] [Qemu-devel] backup notifier fail policy

2016-10-04 Thread Stefan Hajnoczi
On Tue, Oct 04, 2016 at 01:55:30PM +0200, Kevin Wolf wrote: > Am 04.10.2016 um 12:41 hat Denis V. Lunev geschrieben: > > On 10/04/2016 12:34 PM, Kevin Wolf wrote: > > > Am 04.10.2016 um 11:23 hat Stefan Hajnoczi geschrieben: > > >> On Mon, Oct 03, 2016 at 02:07:34PM -0400, John Snow wrote: > > >>>

Re: [Qemu-block] [Qemu-devel] backup notifier fail policy

2016-10-04 Thread John Snow
On 10/04/2016 12:02 PM, Stefan Hajnoczi wrote: On Tue, Oct 04, 2016 at 01:55:30PM +0200, Kevin Wolf wrote: Am 04.10.2016 um 12:41 hat Denis V. Lunev geschrieben: On 10/04/2016 12:34 PM, Kevin Wolf wrote: Am 04.10.2016 um 11:23 hat Stefan Hajnoczi geschrieben: On Mon, Oct 03, 2016 at

Re: [Qemu-block] [PATCH] qcow2: Optimize L2 table cache size based on image and cluster sizes

2016-10-04 Thread Max Reitz
On 04.10.2016 17:36, Ed Swierk wrote: > On Tue, Oct 4, 2016 at 7:31 AM, Alberto Garcia wrote: >> That might be a lot of memory if the image is big. 1 TB qcow2 image == >> 128 MB L2 cache. >> >> See https://bugzilla.redhat.com/show_bug.cgi?id=1377735#c2 >> >> If we want to add

Re: [Qemu-block] [PATCH] qcow2: Optimize L2 table cache size based on image and cluster sizes

2016-10-04 Thread Ed Swierk
On Tue, Oct 4, 2016 at 7:31 AM, Alberto Garcia wrote: > That might be a lot of memory if the image is big. 1 TB qcow2 image == > 128 MB L2 cache. > > See https://bugzilla.redhat.com/show_bug.cgi?id=1377735#c2 > > If we want to add this feature, I think I'd rather make it

Re: [Qemu-block] [PATCH] qcow2: Optimize L2 table cache size based on image and cluster sizes

2016-10-04 Thread Alberto Garcia
On Tue 04 Oct 2016 03:39:52 PM CEST, Ed Swierk wrote: > This change replaces the hardcoded default L2 table cache size with a > value computed from the image size and cluster size. The resulting > default cache size is just large enough to service random accesses in > the entire image. That

Re: [Qemu-block] [Qemu-devel] [PATCH] raw-posix: add 'offset' and 'size' options

2016-10-04 Thread Eric Blake
On 10/04/2016 04:15 AM, Daniel P. Berrange wrote: > On Tue, Oct 04, 2016 at 10:57:49AM +0200, Kevin Wolf wrote: >> Am 03.10.2016 um 13:07 hat Tomáš Golembiovský geschrieben: >>> +if (((bs->drv != _file) || !bs->read_only) && >> >> Why the check against bdrv_file ? > >

Re: [Qemu-block] [Qemu-devel] [PULL v2 00/17] Block layer patches

2016-10-04 Thread Peter Maydell
On 29 September 2016 at 14:12, Kevin Wolf wrote: > The following changes since commit c640f2849ee8775fe1bbd7a2772610aa77816f9f: > > Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into > staging (2016-09-28 23:02:56 +0100) > > are available in the git

Re: [Qemu-block] [Qemu-devel] backup notifier fail policy

2016-10-04 Thread Denis V. Lunev
On 10/04/2016 12:34 PM, Kevin Wolf wrote: > Am 04.10.2016 um 11:23 hat Stefan Hajnoczi geschrieben: >> On Mon, Oct 03, 2016 at 02:07:34PM -0400, John Snow wrote: >>> >>> On 10/03/2016 09:11 AM, Stefan Hajnoczi wrote: On Fri, Sep 30, 2016 at 09:59:16PM +0300, Vladimir Sementsov-Ogievskiy

Re: [Qemu-block] [PATCH] raw-posix: add 'offset' and 'size' options

2016-10-04 Thread Kevin Wolf
Am 04.10.2016 um 12:12 hat Paolo Bonzini geschrieben: > > > On 04/10/2016 11:24, Kevin Wolf wrote: > > You also need to update the options for the blockdev-add QMP command in > > qapi/block-core.json. The relevant type is BlockdevOptionsFile. > > Is it? Or should he define a new

Re: [Qemu-block] [Qemu-devel] backup notifier fail policy

2016-10-04 Thread Kevin Wolf
Am 04.10.2016 um 12:41 hat Denis V. Lunev geschrieben: > On 10/04/2016 12:34 PM, Kevin Wolf wrote: > > Am 04.10.2016 um 11:23 hat Stefan Hajnoczi geschrieben: > >> On Mon, Oct 03, 2016 at 02:07:34PM -0400, John Snow wrote: > >>> > >>> On 10/03/2016 09:11 AM, Stefan Hajnoczi wrote: > On Fri,

Re: [Qemu-block] [Qemu-devel] [PATCH] raw-posix: add 'offset' and 'size' options

2016-10-04 Thread Tomáš Golembiovský
On Tue, 4 Oct 2016 10:57:49 +0200 Kevin Wolf wrote: > Am 03.10.2016 um 13:07 hat Tomáš Golembiovský geschrieben: > > > > > > +if (((bs->drv != _file) || !bs->read_only) && > > > > > > > > > > Why the check against bdrv_file ? > > > > > > > > To limit it only to

Re: [Qemu-block] [Qemu-devel] backup notifier fail policy

2016-10-04 Thread Kevin Wolf
Am 04.10.2016 um 11:23 hat Stefan Hajnoczi geschrieben: > On Mon, Oct 03, 2016 at 02:07:34PM -0400, John Snow wrote: > > > > > > On 10/03/2016 09:11 AM, Stefan Hajnoczi wrote: > > > On Fri, Sep 30, 2016 at 09:59:16PM +0300, Vladimir Sementsov-Ogievskiy > > > wrote: > > > > On 30.09.2016 20:11,

Re: [Qemu-block] [PATCH] raw-posix: add 'offset' and 'size' options

2016-10-04 Thread Kevin Wolf
Am 02.10.2016 um 21:13 hat Tomáš Golembiovský geschrieben: > Added two new options 'offset' and 'size'. This makes it possible to use > only part of the file as a device. This can be used e.g. to limit the > access only to single partition in a disk image or use a disk inside a > tar archive (like

Re: [Qemu-block] backup notifier fail policy

2016-10-04 Thread Stefan Hajnoczi
On Mon, Oct 03, 2016 at 02:07:34PM -0400, John Snow wrote: > > > On 10/03/2016 09:11 AM, Stefan Hajnoczi wrote: > > On Fri, Sep 30, 2016 at 09:59:16PM +0300, Vladimir Sementsov-Ogievskiy > > wrote: > > > On 30.09.2016 20:11, Vladimir Sementsov-Ogievskiy wrote: > > > > Hi all! > > > > > > > >

Re: [Qemu-block] [Qemu-devel] [PATCH] raw-posix: add 'offset' and 'size' options

2016-10-04 Thread Daniel P. Berrange
On Tue, Oct 04, 2016 at 10:57:49AM +0200, Kevin Wolf wrote: > Am 03.10.2016 um 13:07 hat Tomáš Golembiovský geschrieben: > > > > > > +if (((bs->drv != _file) || !bs->read_only) && > > > > > > > > > > Why the check against bdrv_file ? > > > > > > > > To limit it only to files. Maybe

Re: [Qemu-block] [Qemu-devel] [PATCH] raw-posix: add 'offset' and 'size' options

2016-10-04 Thread Kevin Wolf
Am 03.10.2016 um 13:07 hat Tomáš Golembiovský geschrieben: > > > > > +if (((bs->drv != _file) || !bs->read_only) && > > > > > > > > Why the check against bdrv_file ? > > > > > > To limit it only to files. Maybe there is better way to do that? The > > > devices have a nasty habit to

[Qemu-block] [PATCH] block: use bdrv_add_before_write_notifier

2016-10-04 Thread Paolo Bonzini
Register the notifier using the specific API for block devices. Signed-off-by: Paolo Bonzini --- block/write-threshold.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/block/write-threshold.c b/block/write-threshold.c index cc2ca71..0bd1a01 100644 ---