Re: [Qemu-block] [PATCH 2/4] nbd: Limit nbdflags to 16 bits

2016-08-01 Thread Paolo Bonzini
On 01/08/2016 13:43, Eric Blake wrote: > On 08/01/2016 03:17 AM, Paolo Bonzini wrote: >> >> >> On 21/07/2016 21:34, Eric Blake wrote: >>> Furthermore, upstream NBD has never passed the global flags to >>> the kernel via ioctl(NBD_SET_FLAGS) (the ioctl was first >>> introduced in NBD 2.9.22; then

Re: [Qemu-block] [PATCH v4 01/11] block: Accept node-name for block-stream

2016-08-01 Thread Alberto Garcia
On Thu 14 Jul 2016 03:28:04 PM CEST, Kevin Wolf wrote: > In order to remove the necessity to use BlockBackend names in the > external API, we want to allow node-names everywhere. This converts > block-stream to accept a node-name without lifting the restriction that > we're operating at a root

Re: [Qemu-block] [PATCH v4 02/11] block: Accept node-name for block-commit

2016-08-01 Thread Alberto Garcia
On Thu 14 Jul 2016 03:28:05 PM CEST, Kevin Wolf wrote: > -blk = blk_by_name(device); > -if (!blk) { > -error_set(errp, ERROR_CLASS_DEVICE_NOT_FOUND, > - "Device '%s' not found", device); > +bs = qmp_get_root_bs(device, _err); > +if (!bs) { > +bs =

Re: [Qemu-block] [PATCH 3/4] osdep: Document differences in rounding macros

2016-08-01 Thread Paolo Bonzini
On 21/07/2016 21:34, Eric Blake wrote: > Make it obvious which macros are safe in which situations. > > Useful since QEMU_ALIGN_UP and ROUND_UP both purport to do > the same thing, but differ on whether the alignment must be > a power of 2. > > Signed-off-by: Eric Blake >

Re: [Qemu-block] [PATCH 4/4] block: Cater to iscsi with non-power-of-2 discard

2016-08-01 Thread Paolo Bonzini
On 28/07/2016 04:39, Eric Blake wrote: > On 07/27/2016 01:25 AM, Fam Zheng wrote: >> On Thu, 07/21 13:34, Eric Blake wrote: >>> +max_write_zeroes = max_write_zeroes / alignment * alignment; >> >> Not using QEMU_ALIGN_DOWN despite patch 3? > > Looks like I missed that on the rebase. Can fix

Re: [Qemu-block] [PATCH v4 04/11] block: Accept node-name for blockdev-mirror

2016-08-01 Thread Alberto Garcia
On Thu 14 Jul 2016 03:28:07 PM CEST, Kevin Wolf wrote: > In order to remove the necessity to use BlockBackend names in the > external API, we want to allow node-names everywhere. This converts > blockdev-mirror to accept a node-name without lifting the restriction > that we're operating at a root

Re: [Qemu-block] [PATCH 2/4] nbd: Limit nbdflags to 16 bits

2016-08-01 Thread Eric Blake
On 08/01/2016 03:17 AM, Paolo Bonzini wrote: > > > On 21/07/2016 21:34, Eric Blake wrote: >> Furthermore, upstream NBD has never passed the global flags to >> the kernel via ioctl(NBD_SET_FLAGS) (the ioctl was first >> introduced in NBD 2.9.22; then a latent bug in NBD 3.1 actually >> tried to

Re: [Qemu-block] [PATCH 2/4] nbd: Limit nbdflags to 16 bits

2016-08-01 Thread Paolo Bonzini
On 21/07/2016 21:34, Eric Blake wrote: > Furthermore, upstream NBD has never passed the global flags to > the kernel via ioctl(NBD_SET_FLAGS) (the ioctl was first > introduced in NBD 2.9.22; then a latent bug in NBD 3.1 actually > tried to OR the global flags with the transmission flags, with >

Re: [Qemu-block] [PATCH for-2.8] qtail: clean up direct access to tqe_prev field

2016-08-01 Thread Paolo Bonzini
On 25/07/2016 14:47, Igor Mammedov wrote: > instead of accessing tqe_prev field dircetly outside > of queue.h use macros to check if element is in list > and make sure that afer element is removed from list > tqe_prev field could be used to do the same check. > > Signed-off-by: Igor Mammedov

Re: [Qemu-block] [PATCH v4 08/11] block: Accept node-name for drive-backup

2016-08-01 Thread Alberto Garcia
On Thu 14 Jul 2016 03:28:11 PM CEST, Kevin Wolf wrote: > In order to remove the necessity to use BlockBackend names in the > external API, we want to allow node-names everywhere. This converts > drive-backup and the corresponding transaction action to accept a > node-name without lifting the

Re: [Qemu-block] [PATCH v4 05/11] block: Accept node-name for blockdev-snapshot-delete-internal-sync

2016-08-01 Thread Alberto Garcia
On Thu 14 Jul 2016 03:28:08 PM CEST, Kevin Wolf wrote: > In order to remove the necessity to use BlockBackend names in the > external API, we want to allow node-names everywhere. This converts > blockdev-snapshot-delete-internal-sync to accept a node-name without > lifting the restriction that

Re: [Qemu-block] [PATCH v4 07/11] block: Accept node-name for change-backing-file

2016-08-01 Thread Alberto Garcia
On Thu 14 Jul 2016 03:28:10 PM CEST, Kevin Wolf wrote: > In order to remove the necessity to use BlockBackend names in the > external API, we want to allow node-names everywhere. This converts > change-backing-file to accept a node-name without lifting the > restriction that we're operating at a

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

2016-08-01 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 v8 02/10] HBitmap: Introduce "meta" bitmap to track bit changes

2016-08-01 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 v8 00/10] Dirty bitmap changes for migration/persistence work

2016-08-01 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:[] [-C] 'block: Hide HBitmap in block dirty bitmap

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

2016-08-01 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 v8 06/10] block: Assert that bdrv_release_dirty_bitmap succeeded

2016-08-01 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 v8 09/10] tests: Add test code for hbitmap serialization

2016-08-01 Thread John Snow
From: Fam Zheng Signed-off-by: Fam Zheng [Fixed minor constant issue. --js] Signed-off-by: John Snow Reviewed-by: Max Reitz Signed-off-by: John Snow --- tests/test-hbitmap.c | 139

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

2016-08-01 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 v8 03/10] tests: Add test code for meta bitmap

2016-08-01 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] [PATCH] backup: block-job error BUG

2016-08-01 Thread John Snow
On 07/18/2016 05:22 PM, Vladimir Sementsov-Ogievskiy wrote: Hi all! This is a variant of existing test case which produces test failure. It looks like the reason is: one block job is in backup_complete, in synchronous bdrv_flush (success job) other (job with injected io err) tries to

[Qemu-block] [PATCH v8 04/10] block: Support meta dirty bitmap

2016-08-01 Thread John Snow
From: Fam Zheng The added group of operations enables tracking of the changed bits in the dirty bitmap. Signed-off-by: Fam Zheng Reviewed-by: Max Reitz Signed-off-by: John Snow --- block/dirty-bitmap.c | 52

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

2016-08-01 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 v8 01/10] block: Hide HBitmap in block dirty bitmap interface

2016-08-01 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

Re: [Qemu-block] [PATCH for-2.7 1/1] ide: fix halted IO segfault at reset

2016-08-01 Thread John Snow
On 08/01/2016 04:52 AM, Paolo Bonzini wrote: On 27/07/2016 00:07, John Snow wrote: If one attempts to perform a system_reset after a failed IO request that causes the VM to enter a paused state, QEMU will segfault trying to free up the pending IO requests. These requests have already been

Re: [Qemu-block] [PATCH for-2.7 1/1] ide: fix halted IO segfault at reset

2016-08-01 Thread John Snow
On 08/01/2016 04:52 AM, Paolo Bonzini wrote: On 27/07/2016 00:07, John Snow wrote: If one attempts to perform a system_reset after a failed IO request that causes the VM to enter a paused state, QEMU will segfault trying to free up the pending IO requests. These requests have already been