Re: [Qemu-block] [PATCH] iotests: test clearing unknown autoclear_features by qcow2

2017-11-16 Thread John Snow
On 11/10/2017 03:02 PM, Kevin Wolf wrote: > Am 10.11.2017 um 18:54 hat Vladimir Sementsov-Ogievskiy geschrieben: >> Test clearing unknown autoclear_features by qcow2 on incoming >> migration. >> >> Signed-off-by: Vladimir Sementsov-Ogievskiy >> --- >> >> Hi all! >> >>

Re: [Qemu-block] [Qemu-devel] [PATCH v8 10/14] migration: add postcopy migration of dirty bitmaps

2017-11-16 Thread John Snow
On 11/16/2017 05:24 AM, Vladimir Sementsov-Ogievskiy wrote: >>> +    /* if a block is zero we need to flush here since the network >>> + * bandwidth is now a lot higher than the storage device bandwidth. >>> + * thus if we queue zero blocks we slow down the migration. */ >> Can you

Re: [Qemu-block] [Qemu-devel] [PATCH v8 10/14] migration: add postcopy migration of dirty bitmaps

2017-11-16 Thread John Snow
On 11/16/2017 05:24 AM, Vladimir Sementsov-Ogievskiy wrote: > 15.11.2017 04:58, John Snow wrote: >> >> On 10/30/2017 12:33 PM, Vladimir Sementsov-Ogievskiy wrote: >>> Postcopy migration of dirty bitmaps. Only named dirty bitmaps, >>> associated with ro

Re: [Qemu-block] [Qemu-devel] [PATCH v8 10/14] migration: add postcopy migration of dirty bitmaps

2017-11-16 Thread John Snow
On 11/16/2017 11:50 AM, Dr. David Alan Gilbert wrote: > * John Snow (js...@redhat.com) wrote: >> >> >> On 10/30/2017 12:33 PM, Vladimir Sementsov-Ogievskiy wrote: >>> Postcopy migration of dirty bitmaps. Only named dirty bitmaps, >>> associated w

Re: [Qemu-block] [Qemu-devel] [PATCH for-2.12 0/4] qmp dirty bitmap API

2017-11-16 Thread John Snow
On 11/16/2017 03:17 AM, Vladimir Sementsov-Ogievskiy wrote: > 16.11.2017 00:20, John Snow wrote: >> >> On 11/13/2017 11:20 AM, Vladimir Sementsov-Ogievskiy wrote: >>> Hi all. >>> >>> There are three qmp commands, needed to implement external backup API.

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

2017-11-13 Thread John Snow
Jeff, I think this ought to go through your tree, but I'll sign off on it. Fam: Do you agree? (Probably -next material, but I'm sending this email because I'm taking it out of my review queue and I don't want it to get lost.) --js On 10/12/2017 09:53 AM, Vladimir Sementsov-Ogievskiy wrote: >

Re: [Qemu-block] [Qemu-devel] [PATCH v8 03/14] block/dirty-bitmap: add bdrv_dirty_bitmap_release_successor

2017-11-13 Thread John Snow
*bdrv_query_dirty_bitmaps(BlockDriverState *bs) > { > BdrvDirtyBitmap *bm; > Not sure what this is useful for just yet, but it looks okay, tentatively.. Reviewed-by: John Snow <js...@redhat.com>

Re: [Qemu-block] [Qemu-devel] [PATCH for-2.11] iotests: Fix 176 on 32-bit host

2017-11-17 Thread John Snow
e this test is merely testing that the bitmap exists. >> >> So for this test, the easiest solution is to filter out the >> actual hash value. Broken in commit 4096974e. > > Of course, if Kevin sends a v2 pull, it's probably better to just squash > this in to my original tes

Re: [Qemu-block] [Qemu-devel] [PATCH v8 04/14] block/dirty-bitmap: add bdrv_dirty_bitmap_set_frozen

2017-11-17 Thread John Snow
On 11/17/2017 12:30 PM, Vladimir Sementsov-Ogievskiy wrote: > 17.11.2017 20:20, John Snow wrote: >> >> On 11/17/2017 09:46 AM, Vladimir Sementsov-Ogievskiy wrote: >>> 14.11.2017 02:32, John Snow wrote: >>>> On 10/30/2017 12:32 PM, Vladimir Sementsov-Ogievskiy

Re: [Qemu-block] [Qemu-devel] [PATCH v3 16/46] hw/ide: Replace fprintf(stderr, "*\n" with error_report()

2017-11-01 Thread John Snow
ide/core.c | 2 +- >> 2 files changed, 4 insertions(+), 4 deletions(-) >> >> diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c >> index c25e293d88..2ed015285a 100644 >> --- a/hw/ide/ahci.c >> +++ b/hw/ide/ahci.c >> @@ -410,8 +410,8 @@ static void ahci_mem_write

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

2017-11-03 Thread John Snow
On 11/02/2017 11:50 PM, Fam Zheng wrote: > On Thu, 11/02 17:02, John Snow wrote: >> >> >> On 10/20/2017 02:53 AM, Ashijeet Acharya wrote: >>> >>> On Fri, Oct 20, 2017 at 11:58 Fam Zheng <f...@redhat.com >>> <mailto:f...@redhat.com>

Re: [Qemu-block] [Qemu-devel] [PATCH 3/5] backup: init copy_bitmap from sync_bitmap for incremental

2017-11-06 Thread John Snow
On 10/12/2017 07:23 AM, Vladimir Sementsov-Ogievskiy wrote: > 10.10.2017 01:56, John Snow wrote: >> >> On 10/02/2017 10:39 AM, Vladimir Sementsov-Ogievskiy wrote: >>> We should not copy non-dirty clusters in write notifiers. So, >>> initialize copy_bitmap from s

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

2017-11-06 Thread John Snow
On 10/12/2017 09:53 AM, Vladimir Sementsov-Ogievskiy wrote: > Hi all. Here is a continuation of my "new backup architecture" series, > The very first part, but it is meaningful itself. > > v2: rebase on master > 01: add test and fix bug Nice, glad you caught it. R

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] [Qemu-devel] [PATCH] block/snapshot: dirty all dirty bitmaps on snapshot-switch

2017-11-02 Thread John Snow
t compatible, but this makes it more obvious and less error-prone to an end user. > Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> Reviewed-by: John Snow <js...@redhat.com> > --- > block/snapshot.c | 14 ++ > 1 file changed, 14 insertions(+)

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] blockdev-backup: enable non-root nodes for backup

2017-11-09 Thread John Snow
On 11/09/2017 09:16 AM, Vladimir Sementsov-Ogievskiy wrote: > What was the reason to abandon non-root nodes? Eric had it correct: we were never convinced it work would properly, so we went with a smaller set.

Re: [Qemu-block] [Qemu-devel] [PATCH v8 01/14] block/dirty-bitmap: add bdrv_dirty_bitmap_enable_successor()

2017-11-09 Thread John Snow
a successor, yield our name to the successor, > * delete the old bitmap, and return a handle to the new bitmap. > Mechanically correct; though I haven't looked forward to how it's used yet. Reviewed-by: John Snow <js...@redhat.com>

Re: [Qemu-block] [Qemu-devel] [PATCH for-2.12 0/4] qmp dirty bitmap API

2017-12-07 Thread John Snow
On 12/07/2017 06:56 AM, Kashyap Chamarthy wrote: > On Tue, Nov 21, 2017 at 07:10:19PM -0500, John Snow wrote: >> On 11/21/2017 12:23 PM, Kevin Wolf wrote: > > [...] # Snip lot of good discussion. > >>> On another note, I would double check before

Re: [Qemu-block] [Qemu-devel] [PATCH] blockdev-backup: enable non-root nodes for backup

2017-12-08 Thread John Snow
On 12/08/2017 09:30 AM, Max Reitz wrote: > On 2017-12-05 01:48, John Snow wrote: >> >> >> On 12/04/2017 05:21 PM, Max Reitz wrote: >>> On 2017-12-04 23:15, John Snow wrote: >>>> >>>> >>>> On 12/01/2017 02:41 PM, Max Reitz wr

Re: [Qemu-block] [PATCH 2/2] qcow2: fix indentation after previous patch

2017-12-08 Thread John Snow
= QCOW2_OPT_OVERLAP_REFCOUNT_TABLE, > +[QCOW2_OL_REFCOUNT_BLOCK_BITNR] = QCOW2_OPT_OVERLAP_REFCOUNT_BLOCK, > +[QCOW2_OL_SNAPSHOT_TABLE_BITNR] = QCOW2_OPT_OVERLAP_SNAPSHOT_TABLE, > +[QCOW2_OL_INACTIVE_L1_BITNR] = QCOW2_OPT_OVERLAP_INACTIVE_L1, > +[QCOW2_OL_INACTIVE_L2_BITNR] = QCOW2_OPT_OVERLAP_INACTIVE_L2, > [QCOW2_OL_BITMAP_DIRECTORY_BITNR] = QCOW2_OPT_OVERLAP_BITMAP_DIRECTORY, > }; > > Squash it in, or don't, either way: Reviewed-by: John Snow <js...@redhat.com>

Re: [Qemu-block] [Qemu-devel] [PATCH] iotests: Tweak 030 in order to trigger a race condition with parallel jobs

2017-12-08 Thread John Snow
roduce the bug. I assume that > block-stream doesn't copy the data in that case. Changing it to anything > != 0 solves the problem. > I think I ran into a similar problem with an AHCI test once. Reviewed-by: John Snow <js...@redhat.com> > And answering your question, it doesn'

Re: [Qemu-block] [Qemu-devel] [PATCH 3/3] ide: abort TRIM operation for invalid range

2017-12-08 Thread John Snow
; ide_issue_trim_cb(iocb, 0); > return >common; > }> Looks about right, just remember that this flow won't call block_acct_invalid because you're bypassing the return to ide_dma_cb. I assume you'll get to that in your next series. For now, this should properly reject bogus TRIM commands. When you send your next series, may I ask for a simple test case if possible? 1-3: Reviewed-by: John Snow <js...@redhat.com>

Re: [Qemu-block] [PATCH 4/4] iotests: add dirty bitmap migration test

2017-12-05 Thread John Snow
- /dev/null > +++ b/tests/qemu-iotests/169.out > @@ -0,0 +1,5 @@ > +. > +-- > +Ran 1 tests > + > +OK > diff --git a/tests/qemu-iotests/group b/tests/qemu-iotests/group > index 3e688678dd..e879c7ebc7 10064

Re: [Qemu-block] [PATCH 1/4] qcow2-bitmap: add qcow2_reopen_bitmaps_rw_hint()

2017-12-05 Thread John Snow
se); > } > > @@ -1063,6 +1071,11 @@ out: > return ret; > } > > +int qcow2_reopen_bitmaps_rw(BlockDriverState *bs, Error **errp) > +{ > +return qcow2_reopen_bitmaps_rw_hint(bs, NULL, errp); > +} > + > /* store_bitmap_data() > * Store bitmap to image, filling bitmap table accordingly. > */ > Reviewed-by: John Snow <js...@redhat.com>

Re: [Qemu-block] [PATCH 3/4] scripts/qemu.py: tiny enhancement for event_wiat

2017-12-05 Thread John Snow
On 11/28/2017 02:14 AM, Vladimir Sementsov-Ogievskiy wrote: > - add comment > - allow int timeout and disallow bool (which has special > meaning for pull_event()) > - remove unreachable 'return None' > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- >

Re: [Qemu-block] [PATCH 2/4] qcow2: handle reopening bitmaps on bdrv_invalidate_cache

2017-12-05 Thread John Snow
r = false; > } > if (local_err != NULL) { > It sounds right to me, but I'm going to ask for eyes from Kevin or Max. Acked-by: John Snow <js...@redhat.com>

Re: [Qemu-block] [PATCH 1/2] qcow2: add overlap check for bitmap directory

2017-12-07 Thread John Snow
On 12/07/2017 04:43 AM, Vladimir Sementsov-Ogievskiy wrote: > 07.12.2017 01:56, John Snow wrote: >> >> On 11/30/2017 11:47 AM, Vladimir Sementsov-Ogievskiy wrote: >>> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> >>>

Re: [Qemu-block] [Qemu-devel] [PATCH for-2.12 0/4] qmp dirty bitmap API

2017-12-08 Thread John Snow
This is going to be a long one. Maybe go get a cup of coffee. On 12/07/2017 04:39 AM, Vladimir Sementsov-Ogievskiy wrote: > 07.12.2017 03:38, John Snow wrote: >> I'm sorry, I don't think I understand. >> >> "customers needs a possibility to create a backup of data c

Re: [Qemu-block] [Qemu-devel] [PATCH 15/17] iotests: Make 184 image-less

2017-12-08 Thread John Snow
On 11/22/2017 09:08 PM, Max Reitz wrote: > 184 does not need an image, so don't use one. > > Signed-off-by: Max Reitz <mre...@redhat.com> Seems sane. Reviewed-by: John Snow <js...@redhat.com> > --- > tests/qemu-iotests/184 | 25 -- > t

Re: [Qemu-block] [Qemu-devel] [PATCH 08/17] iotests: Skip 103 for refcount_bits=1

2017-12-08 Thread John Snow
" 0 1 2 3 15 >>> _supported_fmt qcow2 >>> _supported_proto file nfs >>> _supported_os Linux >>> +# Internal snapshots are (currently) impossible with refcount_bits=1 >>> +_unsupported_imgopts 'refcount_bits=1[^0-9]' >> >> What is the "[^0-

Re: [Qemu-block] [Qemu-devel] [PATCH 14/17] iotests: Make 089 compatible with compat=0.10

2017-12-08 Thread John Snow
On 11/22/2017 09:08 PM, Max Reitz wrote: > The only thing that is missing is a _filter_img_info after the > "$QEMU_IO -c info" invocations. > > Signed-off-by: Max Reitz <mre...@redhat.com> Reviewed-by: John Snow <js...@redhat.com>

Re: [Qemu-block] [Qemu-devel] [PATCH 09/17] iotests: Disable some tests for compat=0.10

2017-12-08 Thread John Snow
nscope your test? > Signed-off-by: Max Reitz <mre...@redhat.com> Without agonizing over it, I don't see an easy win either, so: Reviewed-by: John Snow <js...@redhat.com> (but it is a shame to lose the ability to test it.)

Re: [Qemu-block] [Qemu-devel] [PATCH] blockdev-backup: enable non-root nodes for backup

2017-12-11 Thread John Snow
On 12/11/2017 11:31 AM, Max Reitz wrote: > On 2017-12-08 18:09, John Snow wrote: >> >> >> On 12/08/2017 09:30 AM, Max Reitz wrote: >>> On 2017-12-05 01:48, John Snow wrote: >>>> >>>> >>>> On 12/04/2017 05:

Re: [Qemu-block] [Qemu-devel] [PATCH] blockdev-backup: enable non-root nodes for backup

2017-12-11 Thread John Snow
On 12/11/2017 12:05 PM, Max Reitz wrote: > On 2017-12-11 17:47, John Snow wrote: >> On 12/11/2017 11:31 AM, Max Reitz wrote: >>> On 2017-12-08 18:09, John Snow wrote: >>>> On 12/08/2017 09:30 AM, Max Reitz wrote: >>>>> On 2017-12-05 01:48, John Snow w

Re: [Qemu-block] [Qemu-devel] [PATCH 08/17] iotests: Skip 103 for refcount_bits=1

2017-12-11 Thread John Snow
On 12/11/2017 12:17 PM, Max Reitz wrote: > On 2017-12-09 02:36, John Snow wrote: >> >> >> On 11/30/2017 08:23 AM, Max Reitz wrote: >>> On 2017-11-30 04:18, Fam Zheng wrote: >>>> On Thu, 11/23 03:08, Max Reitz wrote: >>>>> Signed-off-by:

Re: [Qemu-block] [Qemu-devel] [PATCH for-2.12 0/4] qmp dirty bitmap API

2017-12-11 Thread John Snow
On 12/11/2017 06:15 AM, Kevin Wolf wrote: > Am 09.12.2017 um 01:57 hat John Snow geschrieben: >> Here's an idea of what this API might look like without revealing >> explicit merge/split primitives. >> >> A new bitmap property that lets us set retention: >> >&

Re: [Qemu-block] [PATCH 4/4] iotests: add dirty bitmap migration test

2017-12-06 Thread John Snow
On 12/06/2017 04:51 AM, Vladimir Sementsov-Ogievskiy wrote: > 28.11.2017 10:14, Vladimir Sementsov-Ogievskiy wrote: >> The test creates two vms (vm_a, vm_b), create dirty bitmap in >> the first one, do several writes to corresponding device and >> then migrate vm_a to vm_b with dirty bitmaps. >>

Re: [Qemu-block] [Qemu-devel] [PATCH 2/7] ide: account UNMAP (TRIM) operations

2017-12-06 Thread John Snow
On 12/05/2017 12:14 PM, Anton Nefedov wrote: > > > On 5/12/2017 6:21 PM, Alberto Garcia wrote: >> On Mon 20 Nov 2017 05:50:59 PM CET, Anton Nefedov wrote: >>> Signed-off-by: Anton Nefedov >>> Reviewed-by: Vladimir Sementsov-Ogievskiy >>>

Re: [Qemu-block] [Qemu-devel] [PATCH v2] hw/ide: Remove duplicated definitions from ahci_internal.h

2017-12-06 Thread John Snow
I tweaked this again, sorry: The names need to stay public, but the wrappers to manipulate the objects can stay internal. Minor difference. If that's okay, I'll just merge this in. OK? --js diff --git a/hw/ide/ahci_internal.h b/hw/ide/ahci_internal.h index ce2e818c8c..8c755d4ca1 100644 ---

Re: [Qemu-block] [PATCH 1/2] qcow2: add overlap check for bitmap directory

2017-12-06 Thread John Snow
On 11/30/2017 11:47 AM, Vladimir Sementsov-Ogievskiy wrote: > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/qcow2.h | 7 +-- > block/qcow2-refcount.c | 12 > block/qcow2.c | 6 ++ > 3 files changed, 23

Re: [Qemu-block] [Qemu-devel] [PATCH for-2.12 0/4] qmp dirty bitmap API

2017-12-06 Thread John Snow
On 11/30/2017 07:10 AM, Vladimir Sementsov-Ogievskiy wrote: > 18.11.2017 00:35, John Snow wrote: >> >> On 11/17/2017 03:22 AM, Vladimir Sementsov-Ogievskiy wrote: >>> 17.11.2017 06:10, John Snow wrote: >>>> On 11/16/2017 03:17 AM, Vladimir Sementsov-Ogievskiy

Re: [Qemu-block] [Qemu-devel] [PATCH 13/17] iotests: Fix 067 for compat=0.10

2017-12-08 Thread John Snow
On 11/22/2017 09:08 PM, Max Reitz wrote: > 067 works very well with compat=0.10 once you remove format-specific > information from the QMP output. > > Signed-off-by: Max Reitz <mre...@redhat.com> Reviewed-by: John Snow <js...@redhat.com>

Re: [Qemu-block] [Qemu-devel] [PATCH 16/17] iotests: Make 191 work with qcow2 options

2017-12-08 Thread John Snow
; > --- > tests/qemu-iotests/191 | 5 +- "Looks good!" > tests/qemu-iotests/191.out | 313 > + * just runs the test instead * Reviewed-by: John Snow <js...@redhat.com>

Re: [Qemu-block] [Qemu-devel] [PATCH 17/17] iotests: Filter compat-dependent info in 198

2017-12-08 Thread John Snow
se we > do need the "encrypt" information. > I imagine it's not worth your time to factor this out. That makes sense to me. > Signed-off-by: Max Reitz <mre...@redhat.com> Reviewed-by: John Snow <js...@redhat.com>

[Qemu-block] [PATCH] blockjob: kick jobs on set-speed

2017-12-11 Thread John Snow
it to recalculate its delay. Signed-off-by: John Snow <js...@redhat.com> --- blockjob.c | 5 + 1 file changed, 5 insertions(+) diff --git a/blockjob.c b/blockjob.c index 715c2c2680..43f01ad190 100644 --- a/blockjob.c +++ b/blockjob.c @@ -483,6 +483,7 @@ static void block_job_completed_txn_s

Re: [Qemu-block] [Qemu-devel] [PATCH 0/3] ide: abort TRIM operation for invalid range

2017-12-08 Thread John Snow
On 12/08/2017 07:10 AM, Anton Nefedov wrote: > Started from the separate series discussion (trim statistics) , see > http://lists.nongnu.org/archive/html/qemu-devel/2017-12/msg01059.html > > There is no range check for IDE trim requests now. > Such request will likely be rejected by the block

Re: [Qemu-block] [Qemu-devel] [PATCH v2] hw/ide: Remove duplicated definitions from ahci_internal.h

2017-12-08 Thread John Snow
On 12/05/2017 02:10 AM, Thomas Huth wrote: > The same definitions can also be found in include/hw/ide/ahci.h > so let's remove these #defines from ahci_internal.h. > > Signed-off-by: Thomas Huth > --- > v2: Also remove TYPE_ICH9_AHCI as suggested by John > >

Re: [Qemu-block] [Qemu-devel] [RFC PATCH 4/4] hw/ide/ahci: Remove AllwinnerAHCIState from qemu/typedefs.h

2018-05-08 Thread John Snow
rtyBitmap BdrvDirtyBitmap; > typedef struct BdrvDirtyBitmapIter BdrvDirtyBitmapIter; > Hm, sure; I suppose we don't need QEMU-wide definitions of these sorts of things. Acked-by: John Snow <js...@redhat.com>

Re: [Qemu-block] [Qemu-devel] [PATCH] hw/ide/ahci: Keep ALLWINNER_AHCI() macro internal

2018-05-08 Thread John Snow
On 05/08/2018 10:49 AM, Philippe Mathieu-Daudé wrote: > The ALLWINNER_AHCI() macro is only used in ahci-allwinner.c. > extra internal! > Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> Reviewed-by: John Snow <js...@redhat.com> Feel free to stage in trivial, thanks.

Re: [Qemu-block] [Qemu-devel] [PATCH 06/42] blockjob: Add block_job_driver()

2018-05-14 Thread John Snow
is series yet but I suppose it turns out that it's more useful to get the driver than to ask the job system what the job type is. Probably there's some QAPI reasons for why that's true, too... Reviewed-by: John Snow <js...@redhat.com>.

Re: [Qemu-block] [Qemu-devel] [PATCH 08/42] job: Create Job, JobDriver and job_create()

2018-05-14 Thread John Snow
mething looks distinctly wrong. Anything that simply doesn't get cleaned up is something we can fix later, so unless it looks like it's painting us into a corner, it probably doesn't need to be addressed right away. Reviewed-by: John Snow <js...@redhat.com>

Re: [Qemu-block] [Qemu-devel] [PATCH 02/42] blockjob: Wrappers for progress counter access

2018-05-14 Thread John Snow
t;kw...@redhat.com> > Reviewed-by: Eric Blake <ebl...@redhat.com> The backup code takes a hot second to read, but it seems correct. Having both a common len and a backup len is a bit awful, but only in this patch diff where you have to deal with both. Reviewed-by: John Snow <js...@redhat.com>

Re: [Qemu-block] [Qemu-devel] [PATCH 10/42] job: Add JobDriver.job_type

2018-05-14 Thread John Snow
On 05/11/2018 06:53 PM, Max Reitz wrote: > On 2018-05-09 18:26, Kevin Wolf wrote: >> This moves the job_type field from BlockJobDriver to JobDriver. >> >> Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: John Snow <js...@redhat.com> >> --

Re: [Qemu-block] [Qemu-devel] [PATCH 07/42] blockjob: Remove block_job_pause/resume_all()

2018-05-14 Thread John Snow
all deletion diffstats. > Reviewed-by: Max Reitz <mre...@redhat.com> > Reviewed-by: John Snow <js...@redhat.com>

Re: [Qemu-block] [Qemu-devel] [PATCH 03/42] blockjob: Move RateLimit to BlockJob

2018-05-14 Thread John Snow
Blake <ebl...@redhat.com> Reviewed-by: John Snow <js...@redhat.com>

Re: [Qemu-block] [Qemu-devel] [PATCH 12/42] job: Maintain a list of all jobs

2018-05-14 Thread John Snow
On 05/09/2018 12:26 PM, Kevin Wolf wrote: > This moves the job list from BlockJob to Job. Now we can check for > duplicate IDs in job_create(). > > Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: John Snow <js...@redhat.com>

Re: [Qemu-block] [Qemu-devel] [PATCH 13/42] job: Move state transitions to Job

2018-05-14 Thread John Snow
om> In good faith that the TODOs dissolve by the end of the series: Reviewed-by: John Snow <js...@redhat.com> (As a bonus, removing 'BLOCK' out of all of those enum names made the table a little thinner column-wise. nice!)

Re: [Qemu-block] [Qemu-devel] [PATCH 04/42] blockjob: Implement block_job_set_speed() centrally

2018-05-14 Thread John Snow
ewed-by: Eric Blake <ebl...@redhat.com> Reviewed-by: John Snow <js...@redhat.com>

Re: [Qemu-block] [Qemu-devel] [PATCH 05/42] blockjob: Introduce block_job_ratelimit_get_delay()

2018-05-14 Thread John Snow
On 05/09/2018 12:26 PM, Kevin Wolf wrote: > This gets us rid of more direct accesses to BlockJob fields from the > job drivers. > > Signed-off-by: Kevin Wolf <kw...@redhat.com> > Reviewed-by: Eric Blake <ebl...@redhat.com> Reviewed-by: John Snow <js...@redha

Re: [Qemu-block] [Qemu-devel] [PATCH 09/42] job: Rename BlockJobType into JobType

2018-05-14 Thread John Snow
entral place. > Signed-off-by: Kevin Wolf <kw...@redhat.com> > Reviewed-by: Eric Blake <ebl...@redhat.com> Seems fine. Reviewed-by: John Snow <js...@redhat.com>

Re: [Qemu-block] [Qemu-devel] [PATCH 17/42] job: Move defer_to_main_loop to Job

2018-05-14 Thread John Snow
On 05/09/2018 12:26 PM, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf Hmm, this one is a bit more than just code motion due to the way the aio_context acquisition has changed. I think at a minimum a good commit message is warranted. > --- > include/block/blockjob.h |

Re: [Qemu-block] [Qemu-devel] [PATCH 20/42] job: Move pause/resume functions to Job

2018-05-14 Thread John Snow
new callback, because it still seems silly to have to specify something that's enforced with an assertion to be ubiquitously true, but I think any other way of fixing that is probably uglier. So OK. Reviewed-by: John Snow <js...@redhat.com>

Re: [Qemu-block] [Qemu-devel] [PATCH 21/42] job: Replace BlockJob.completed with job_is_completed()

2018-05-14 Thread John Snow
> diff --git a/job.c b/job.c > index 94ad01a51a..60ccb0640b 100644 > --- a/job.c > +++ b/job.c > @@ -121,6 +121,28 @@ bool job_is_cancelled(Job *job) > return job->cancelled; > } > > +bool job_is_completed(Job *job) > +{ > +switch (job->status) { >

Re: [Qemu-block] [Qemu-devel] [PATCH 14/42] job: Add reference counting

2018-05-14 Thread John Snow
s makes the whole re-factoring process an awful lot simpler... ...Or maybe I'm getting ahead of myself, there's a lot of series left to go. Ah, anyway: Reviewed-by: John Snow <js...@redhat.com>

Re: [Qemu-block] [Qemu-devel] [PATCH 16/42] job: Add Job.aio_context

2018-05-14 Thread John Snow
com> Nothing uses the field yet, but so far so good. Reviewed-by: John Snow <js...@redhat.com>

Re: [Qemu-block] [Qemu-devel] [PATCH 19/42] job: Add job_sleep_ns()

2018-05-14 Thread John Snow
include/qemu/job.h > +++ b/include/qemu/job.h > @@ -168,6 +168,13 @@ void job_enter_cond(Job *job, bool(*fn)(Job *job)); > void job_start(Job *job); > > /** > + * @job: The job to enter. > + * > + * Continue the specified job by entering the coroutine. > + */ > +void job_enter(Job *job); > + Is this a holdout from #18? Eh, either way. Reviewed-by: John Snow <js...@redhat.com>

Re: [Qemu-block] [Qemu-devel] [PATCH 18/42] job: Move coroutine and related code to Job

2018-05-14 Thread John Snow
lse; > +job_state_transition(job, JOB_STATUS_RUNNING); > +aio_co_enter(job->aio_context, job->co); I suppose patch 16 was the time to ask this, but are there any detriments to setting the AIO Context at creation time and then using that consistently instead of just fetching the AIO context of the BDS whenever we need it? I guess if the context changes then we've got it covered in block_job_attached_aio_context. Reviewed-by: John Snow <js...@redhat.com>

[Qemu-block] [PATCH] blockjob: expose error string via query

2018-05-08 Thread John Snow
an explicit return code enumeration later. I didn't bother to make it only show up if we are in the concluded state; I don't think it's necessary. Signed-off-by: John Snow <js...@redhat.com> --- blockjob.c | 2 ++ qapi/block-core.json | 6 +- 2 files changed, 7 insertions

Re: [Qemu-block] [Qemu-devel] [PATCH v2 2/7] block: Add Error parameter to bdrv_amend_options

2018-05-09 Thread John Snow
into assertions (the caller has to > make sure these conditions are met), and rephrase the error message on > using compat=1.1 to get refcount widths other than 16 bits. > > Signed-off-by: Max Reitz <mre...@redhat.com> Reviewed-by: John Snow <js...@redhat.com> thx@u

[Qemu-block] [RFC PATCH 12/12] qemu-img: add bitmap clear

2018-05-11 Thread John Snow
Signed-off-by: John Snow <js...@redhat.com> --- qemu-img-cmds.hx | 4 ++-- qemu-img.c | 46 -- 2 files changed, 46 insertions(+), 4 deletions(-) diff --git a/qemu-img-cmds.hx b/qemu-img-cmds.hx index d25f359f5a..7b6ec73488 100644 --- a/qe

[Qemu-block] [RFC PATCH 10/12] qemu-img: split off common chunk of map command

2018-05-11 Thread John Snow
It will be re-used for a bitmap listing command. Signed-off-by: John Snow <js...@redhat.com> --- qemu-img.c | 192 +++-- 1 file changed, 110 insertions(+), 82 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index ea62d2d61e..e31e

[Qemu-block] [RFC PATCH 05/12] qcow2-bitmap: track bitmap type

2018-05-11 Thread John Snow
in the forthcoming info script. Signed-off-by: John Snow <js...@redhat.com> --- block/qcow2-bitmap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block/qcow2-bitmap.c b/block/qcow2-bitmap.c index b556dbdccd..60e01abfd7 100644 --- a/block/qcow2-bitmap.c +++ b/block/qcow2-bitmap.c @@ -83,6

[Qemu-block] [RFC PATCH 06/12] qapi: add bitmap info

2018-05-11 Thread John Snow
Add some of the necessary scaffolding for reporting bitmap information. Signed-off-by: John Snow <js...@redhat.com> --- qapi/block-core.json | 60 +++- 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/qapi/block-core.json b/qapi

[Qemu-block] [RFC PATCH 04/12] qcow2/dirty-bitmaps: load IN_USE bitmaps if disk is RO

2018-05-11 Thread John Snow
For the purposes of qemu-img manipulation and querying of bitmaps, load bitmaps that are "in use" -- if the image is read only. This will allow us to diagnose problems with this flag using the qemu-img tool. Signed-off-by: John Snow <js...@redhat.com> --- block/qco

[Qemu-block] [RFC PATCH 08/12] qjson: allow caller to ask for arbitrary indent

2018-05-11 Thread John Snow
The function already exists, just expose it. Signed-off-by: John Snow <js...@redhat.com> --- include/qapi/qmp/qjson.h | 1 + qobject/qjson.c | 21 +++-- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/include/qapi/qmp/qjson.h b/include/qapi/qmp/q

[Qemu-block] [RFC PATCH 03/12] block/qcow2-bitmap: avoid adjusting bm->flags for RO bitmaps

2018-05-11 Thread John Snow
Instead of always setting IN_USE, handle whether or not the bitmap is read-only instead of a two-loop pass. This will allow us to show the flags exactly as they appear for bitmaps in `qemu-img info`. Signed-off-by: John Snow <js...@redhat.com> --- block/qcow2-bitmap.

[Qemu-block] [RFC PATCH 01/12] qcow2-bitmap: cache bm_list

2018-05-11 Thread John Snow
We don't need to re-read this list every time, exactly. We can keep it cached and delete our copy when we flush to disk. Because we don't try to flush bitmaps on close if there's nothing to flush, add a new conditional to delete the state anyway for a clean exit. Signed-off-by: John Snow <

[Qemu-block] [RFC PATCH 09/12] qapi/block-core: add BitmapMapping and BitmapEntry structs

2018-05-11 Thread John Snow
Add two new structures for detailing the marked regions of bitmaps as saved in e.g. qcow2 files. Signed-off-by: John Snow <js...@redhat.com> --- qapi/block-core.json | 32 1 file changed, 32 insertions(+) diff --git a/qapi/block-core.json b/qapi/block-cor

[Qemu-block] [RFC PATCH 02/12] qcow2/dirty-bitmap: cache loaded bitmaps

2018-05-11 Thread John Snow
For bitmaps that we succeeded in loading, we can cache a reference to that object. This will let us iterate over the more convenient form of in-memory bitmaps for qemu-img bitmap manipulation tools. Signed-off-by: John Snow <js...@redhat.com> --- block/qcow2-bitmap.c | 1 + 1 file chan

[Qemu-block] [RFC PATCH 00/12] qemu-img: add bitmap queries

2018-05-11 Thread John Snow
st option. - Un-set in-use: VERY dangerous; would rather not. John Snow (12): qcow2-bitmap: cache bm_list qcow2/dirty-bitmap: cache loaded bitmaps block/qcow2-bitmap: avoid adjusting bm->flags for RO bitmaps qcow2/dirty-bitmaps: load IN_USE bitmaps if disk is RO qcow2-bitmap: tra

[Qemu-block] [RFC PATCH 07/12] qcow2-bitmap: add basic bitmaps info

2018-05-11 Thread John Snow
Add functions for querying the basic information inside of bitmaps. Restructure the bitmaps flags masks to facilitate providing a list of flags belonging to the bitmap(s) being queried. Signed-off-by: John Snow <js...@redhat.com> --- block/qcow2-bitmap.

Re: [Qemu-block] [Qemu-devel] [PATCH 01/42] blockjob: Fix assertion in block_job_finalize()

2018-05-11 Thread John Snow
before we run into that assertion. > > Signed-off-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: John Snow <js...@redhat.com> > --- > blockjob.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/blockjob.c b/blockjob.c > index 4de48166b2

Re: [Qemu-block] [Qemu-devel] Restoring bitmaps after failed/cancelled migration

2018-05-11 Thread John Snow
On 04/18/2018 10:00 AM, Vladimir Sementsov-Ogievskiy wrote: > Hi all. > > We now have the following problem: > > If dirty-bitmaps migration capability is enabled, persistance flag is > dropped for all migrated bitmaps, to prevent their storing to the > storage on inactivate. It works ok,

Re: [Qemu-block] [Qemu-devel] [RFC PATCH 06/12] qapi: add bitmap info

2018-05-17 Thread John Snow
On 05/17/2018 06:01 AM, Vladimir Sementsov-Ogievskiy wrote: > 17.05.2018 00:15, John Snow wrote: >> >> On 05/14/2018 10:30 AM, Vladimir Sementsov-Ogievskiy wrote: >>> 12.05.2018 04:25, John Snow wrote: >>>> Add some of the necessary scaffolding for reporting

Re: [Qemu-block] [Qemu-devel] [PATCH 18/42] job: Move coroutine and related code to Job

2018-05-16 Thread John Snow
On 05/16/2018 12:50 PM, Kevin Wolf wrote: > Am 15.05.2018 um 01:02 hat John Snow geschrieben: >> >> >> On 05/09/2018 12:26 PM, Kevin Wolf wrote: >>> This commit moves some core functions for dealing with the job coroutine >>> from BlockJob to Job. This in

Re: [Qemu-block] [Qemu-devel] [RFC PATCH 03/12] block/qcow2-bitmap: avoid adjusting bm->flags for RO bitmaps

2018-05-15 Thread John Snow
On 05/14/2018 08:44 AM, Vladimir Sementsov-Ogievskiy wrote: > 12.05.2018 04:25, John Snow wrote: >> Instead of always setting IN_USE, handle whether or not the bitmap >> is read-only instead of a two-loop pass. This will allow us to show >> the flags exactly as they appear

Re: [Qemu-block] [Qemu-devel] [RFC PATCH 01/12] qcow2-bitmap: cache bm_list

2018-05-15 Thread John Snow
On 05/14/2018 08:15 AM, Vladimir Sementsov-Ogievskiy wrote: > 14.05.2018 14:55, Vladimir Sementsov-Ogievskiy wrote: >> 12.05.2018 04:25, John Snow wrote: >>> We don't need to re-read this list every time, exactly. We can keep >>> it cached >>> and delete our c

Re: [Qemu-block] [Qemu-devel] [RFC PATCH 06/12] qapi: add bitmap info

2018-05-15 Thread John Snow
On 05/14/2018 10:30 AM, Vladimir Sementsov-Ogievskiy wrote: > 12.05.2018 04:25, John Snow wrote: >> Add some of the necessary scaffolding for reporting bitmap information. >> >> Signed-off-by: John Snow <js...@redhat.com> >> -

Re: [Qemu-block] [Qemu-devel] [RFC PATCH 04/12] qcow2/dirty-bitmaps: load IN_USE bitmaps if disk is RO

2018-05-15 Thread John Snow
On 05/14/2018 08:55 AM, Vladimir Sementsov-Ogievskiy wrote: > 12.05.2018 04:25, John Snow wrote: >> For the purposes of qemu-img manipulation and querying of bitmaps, load >> bitmaps that are "in use" -- if the image is read only. This will allow >> us to diagnos

Re: [Qemu-block] [Qemu-devel] [RFC PATCH 01/12] qcow2-bitmap: cache bm_list

2018-05-15 Thread John Snow
On 05/14/2018 07:55 AM, Vladimir Sementsov-Ogievskiy wrote: > 12.05.2018 04:25, John Snow wrote: >> We don't need to re-read this list every time, exactly. We can keep it >> cached >> and delete our copy when we flush to disk. > > Why not simply delete cache only on c

Re: [Qemu-block] [Qemu-devel] [RFC PATCH 07/12] qcow2-bitmap: add basic bitmaps info

2018-05-15 Thread John Snow
On 05/14/2018 11:12 AM, Vladimir Sementsov-Ogievskiy wrote: > 12.05.2018 04:25, John Snow wrote: >> Add functions for querying the basic information inside of bitmaps. >> Restructure the bitmaps flags masks to facilitate providing a list of >> flags belonging to the bi

Re: [Qemu-block] [PATCH 1/8] parallels: Switch to byte-based calls

2018-05-23 Thread John Snow
On 05/23/2018 04:09 PM, Eric Blake wrote: > On 05/23/2018 02:19 PM, John Snow wrote: >> >> >> On 04/25/2018 02:32 PM, Eric Blake wrote: >>> We are gradually moving away from sector-based interfaces, towards >>> byte-based.  Make the change for the last fe

Re: [Qemu-block] [Qemu-devel] [PATCH v2 21/40] job: Convert block_job_cancel_async() to Job

2018-05-23 Thread John Snow
On 05/18/2018 09:20 AM, Kevin Wolf wrote: > block_job_cancel_async() did two things that were still block job > specific: > > * Setting job->force. This field makes sense on the Job level, so we can > just move it. While at it, rename it to job->force_cancel to make its > purpose more

Re: [Qemu-block] [Qemu-devel] [PATCH v2 36/40] job: Add lifecycle QMP commands

2018-05-23 Thread John Snow
On 05/18/2018 09:21 AM, Kevin Wolf wrote: > +{ 'command': 'job-complete', 'data': { 'id': 'str' } } Do we have to name it this? I've always disliked how "complete" is used as both a verb and an adjective in our code (hence why I used such bizarre phrasings like "concluded" in my jobs patches)

Re: [Qemu-block] [Qemu-devel] [PATCH v2 17/40] job: Move BlockJobCreateFlags to Job

2018-05-23 Thread John Snow
On 05/18/2018 09:20 AM, Kevin Wolf wrote: > +job->auto_finalize = !(flags & JOB_MANUAL_FINALIZE); > +job->auto_dismiss = !(flags & JOB_MANUAL_DISMISS); Job API might be a good chance to say "No, this is the default behavior for this API." I don't know how possible this is, but could

Re: [Qemu-block] [Qemu-devel] [PATCH v2 31/40] job: Add job_is_ready()

2018-05-23 Thread John Snow
On 05/18/2018 09:21 AM, Kevin Wolf wrote: > Instead of having a 'bool ready' in BlockJob, add a function that > derives its value from the job status. > > At the same time, this fixes the behaviour to match what the QAPI > documentation promises for query-block-job: 'true if the job may be >

Re: [Qemu-block] [Qemu-devel] [PATCH v2 35/40] job: Add JOB_STATUS_CHANGE QMP event

2018-05-23 Thread John Snow
On 05/18/2018 09:21 AM, Kevin Wolf wrote: > This adds a QMP event that is emitted whenever a job transitions from > one status to another. > > Signed-off-by: Kevin Wolf That's a lot of events, and a lot are redundant to what we already transmitted under block jobs; it also

<    10   11   12   13   14   15   16   17   18   19   >