[PATCH 4/7] copy-on-read: Support refreshing filename

2020-04-20 Thread Andrey Shinkevich
Signed-off-by: Andrey Shinkevich --- block/copy-on-read.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/block/copy-on-read.c b/block/copy-on-read.c index ad6577d..e45eab9 100644 --- a/block/copy-on-read.c +++ b/block/copy-on-read.c @@ -21,6 +21,7 @@ */ #include "qemu/os

[PATCH 1/7] block: prepare block-stream for using COR-filter

2020-04-20 Thread Andrey Shinkevich
This patch is the first one in the series where the COR-filter node will be hard-coded for using in the block-stream job. The job may be run with a block-commit job in parallel. Set the condition to avoid the job conflicts. Signed-off-by: Andrey Shinkevich --- blockdev.c | 7 +-- 1 file

[PATCH 0/7] Apply COR-filter to the block-stream permanently

2020-04-20 Thread Andrey Shinkevich
pply "char-socket: Fix race condition" to avoid sporadic segmentation faults. With this series, all the block-stream COR operations pass through the COR-filter. Andrey Shinkevich (7): block: prepare block-stream for using COR-filter stream: exclude a link to filter from freez

[PATCH 3/7] block: protect parallel jobs from overlapping

2020-04-20 Thread Andrey Shinkevich
When it comes to the check for the blocked operations, the node may be a filter linked to blk. In that case, do not miss to set blocked operations for the underlying node. Signed-off-by: Andrey Shinkevich --- blockjob.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff

[PATCH 6/7] iotests: prepare 245 for using filter in block-stream

2020-04-20 Thread Andrey Shinkevich
The preliminary patch modifies the test 245 to prepare the block-stream job for using COR-filter. The filter breaks the backing chain being connected to the underlying node by file child link. Signed-off-by: Andrey Shinkevich --- tests/qemu-iotests/245 | 10 +++--- 1 file changed, 7

Re: [PATCH v12 2/3] qcow2: Allow writing compressed data of multiple clusters

2020-04-09 Thread Andrey Shinkevich
Sent: Thursday, April 9, 2020 9:39 PM To: Alberto Garcia ; Andrey Shinkevich ; qemu-de...@nongnu.org ; qemu-block@nongnu.org Cc: kw...@redhat.com ; arm...@redhat.com ; mre...@redhat.com ; Denis Lunev Subject: Re: [PATCH v12 2/3] qcow2: Allow writing compressed data of multiple clusters

Re: [PATCH v2] qcow2: Check request size in qcow2_co_pwritev_compressed_part()

2020-04-07 Thread Andrey Shinkevich
I wouldn't mind either. Andrey From: Alberto Garcia Sent: Monday, April 6, 2020 7:08 PM To: qemu-de...@nongnu.org Cc: qemu-block@nongnu.org ; Andrey Shinkevich ; Max Reitz ; Kevin Wolf ; Vladimir Sementsov-Ogievskiy ; Pavel Butsykin Subject: Re: [PATCH v2

Re: [PATCH v2] qcow2: Check request size in qcow2_co_pwritev_compressed_part()

2020-04-06 Thread Andrey Shinkevich
Reviewed-by: Andrey Shinkevich From: Alberto Garcia Sent: Monday, April 6, 2020 5:34 PM To: qemu-de...@nongnu.org Cc: Alberto Garcia ; qemu-block@nongnu.org ; Andrey Shinkevich ; Max Reitz ; Kevin Wolf ; Vladimir Sementsov-Ogievskiy ; Pavel Butsykin

Re: [PATCH for-5.0] qcow2: Check request size in qcow2_co_pwritev_compressed_part()

2020-04-03 Thread Andrey Shinkevich
From: Alberto Garcia Sent: Friday, April 3, 2020 7:57 PM To: qemu-de...@nongnu.org Cc: Alberto Garcia; qemu-block@nongnu.org; Andrey Shinkevich; Max Reitz; Kevin Wolf; Vladimir Sementsov-Ogievskiy; Pavel Butsykin Subject: [PATCH for-5.0] qcow2: Check

Re: [PATCH] block: Avoid memleak on qcow2 image info failure

2020-03-23 Thread Andrey Shinkevich
From: Eric Blake Sent: Friday, March 20, 2020 9:36 PM To: qemu-de...@nongnu.org Cc: peter.mayd...@linaro.org ; Andrey Shinkevich ; Kevin Wolf ; Max Reitz ; open list:qcow2 Subject: [PATCH] block: Avoid memleak on qcow2 image info failure If we fail to get

Re: [PATCH v3 7/9] block/block-copy: rename start to offset in interfaces

2020-03-10 Thread Andrey Shinkevich
On 10/03/2020 18:14, Max Reitz wrote: On 10.03.20 15:55, Andrey Shinkevich wrote: On 10/03/2020 17:50, Max Reitz wrote: On 06.03.20 08:38, Vladimir Sementsov-Ogievskiy wrote: offset/bytes pair is more usual naming in block layer, let's use it. Signed-off-by: Vladimir Sementsov-Ogievskiy

Re: [PATCH v3 7/9] block/block-copy: rename start to offset in interfaces

2020-03-10 Thread Andrey Shinkevich
On 10/03/2020 17:50, Max Reitz wrote: On 06.03.20 08:38, Vladimir Sementsov-Ogievskiy wrote: offset/bytes pair is more usual naming in block layer, let's use it. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Andrey Shinkevich Reviewed-by: Max Reitz --- include/block/block

Re: [PATCH v3 9/9] block/block-copy: hide structure definitions

2020-03-10 Thread Andrey Shinkevich
100644 --- a/include/block/block-copy.h +++ b/include/block/block-copy.h Reviewed-by: Andrey Shinkevich -- With the best regards, Andrey Shinkevich

Re: [PATCH v3 1/9] job: refactor progress to separate object

2020-03-10 Thread Andrey Shinkevich
On 06/03/2020 10:38, Vladimir Sementsov-Ogievskiy wrote: We need it in separate to pass to the block-copy object in the next commit. Cc: qemu-sta...@nongnu.org Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Andrey Shinkevich --- include/qemu/job.h| 11 ++- include

Re: [PATCH v2 00/22] Fix error handling during bitmap postcopy

2020-02-19 Thread Andrey Shinkevich
On 19/02/2020 17:58, Eric Blake wrote: On 2/19/20 7:52 AM, Andrey Shinkevich wrote: +od: unrecognized option '--endian=big' +Try 'od --help' for more information. +od: invalid -N argument '--endian=big' Yay, same problem for both tests.  Fix common.rc once, and both tests should start

Re: [PATCH v2 22/22] qemu-iotests/199: add source-killed case to bitmaps postcopy

2020-02-19 Thread Andrey Shinkevich
--- a/tests/qemu-iotests/199.out +++ b/tests/qemu-iotests/199.out @@ -1,5 +1,5 @@ -.. +... -- -Ran 2 tests +Ran 3 tests OK The updated test passed. Reviewed-by: Andrey Shinkevich -- With the best regards, Andrey Shinkevich

Re: [PATCH v2 21/22] qemu-iotests/199: add early shutdown case to bitmaps postcopy

2020-02-19 Thread Andrey Shinkevich
OK The updated test passed. Reviewed-by: Andrey Shinkevich -- With the best regards, Andrey Shinkevich

Re: [PATCH v2 21/22] qemu-iotests/199: add early shutdown case to bitmaps postcopy

2020-02-19 Thread Andrey Shinkevich
@@ -. +.. -- -Ran 1 tests +Ran 2 tests OK -- With the best regards, Andrey Shinkevich

Re: [PATCH v2 20/22] qemu-iotests/199: check persistent bitmaps

2020-02-19 Thread Andrey Shinkevich
(self.vm_b, nb_bitmaps) # Check content of migrated bitmaps. Still, don't waste time checking Reviewed-by: Andrey Shinkevich -- With the best regards, Andrey Shinkevich

Re: [PATCH v2 19/22] qemu-iotests/199: prepare for new test-cases addition

2020-02-19 Thread Andrey Shinkevich
if __name__ == '__main__': Reviewed-by: Andrey Shinkevich -- With the best regards, Andrey Shinkevich

Re: [PATCH v2 17/22] qemu-iotests/199: increase postcopy period

2020-02-19 Thread Andrey Shinkevich
sha256) if __name__ == '__main__': The updated test passed. Reviewed-by: Andrey Shinkevich -- With the best regards, Andrey Shinkevich

Re: [PATCH v2 16/22] qemu-iotests/199: change discard patterns

2020-02-19 Thread Andrey Shinkevich
On 19/02/2020 17:33, Andrey Shinkevich wrote: On 17/02/2020 18:02, Vladimir Sementsov-Ogievskiy wrote: iotest 40 works too long because of many discard opertion. On the same operations At the same time time, postcopy period is very short, in spite of all these efforts. So, let's use

Re: [PATCH v2 16/22] qemu-iotests/199: change discard patterns

2020-02-19 Thread Andrey Shinkevich
e_complete = self.vm_b.event_wait('MIGRATION', match=match) Reviewed-by: Andrey Shinkevich -- With the best regards, Andrey Shinkevich

Re: [PATCH v2 15/22] qemu-iotests/199: improve performance: set bitmap by discard

2020-02-19 Thread Andrey Shinkevich
%d' % (s, chunk)) s += 0x1 match = {'data': {'status': 'completed'}} Reviewed-by: Andrey Shinkevich -- With the best regards, Andrey Shinkevich

Re: [PATCH v2 00/22] Fix error handling during bitmap postcopy

2020-02-19 Thread Andrey Shinkevich
On 19/02/2020 16:36, Eric Blake wrote: On 2/19/20 7:25 AM, Andrey Shinkevich wrote: On 18/02/2020 23:57, Eric Blake wrote: On 2/18/20 2:02 PM, Andrey Shinkevich wrote: qemu-iotests:$ ./check -qcow2 PASSED (except always failed 261 and 272) Have you reported those failures

Re: [PATCH v2 00/22] Fix error handling during bitmap postcopy

2020-02-19 Thread Andrey Shinkevich
On 18/02/2020 23:57, Eric Blake wrote: On 2/18/20 2:02 PM, Andrey Shinkevich wrote: qemu-iotests:$ ./check -qcow2 PASSED (except always failed 261 and 272) Have you reported those failures on the threads that introduced those tests? Not yet unfortunately. I have not investigated

Re: [PATCH v2 14/22] qemu-iotests/199: better catch postcopy time

2020-02-19 Thread Andrey Shinkevich
ew writes) bitmap result = self.vm_b.qmp('x-debug-block-dirty-bitmap-sha256', node='drive0', name='bitmap') - self.assert_qmp(result, 'return/sha256', sha256) Reviewed-by: Andrey Shinkevich -- With the best regards, Andrey Shinkevich

Re: [PATCH v2 13/22] qemu-iotests/199: drop extra constraints

2020-02-19 Thread Andrey Shinkevich
TestDirtyBitmapPostcopyMigration(iotests.QMPTestCase): if __name__ == '__main__': -iotests.main(supported_fmts=['qcow2'], supported_cache_modes=['none'], - supported_protocols=['file']) +iotests.main(supported_fmts=['qcow2']) Reviewed-by: Andrey Shinkevich -- With the best regards

Re: [PATCH v2 12/22] qemu-iotests/199: fix style

2020-02-18 Thread Andrey Shinkevich
es=['none'], Reviewed-by: Andrey Shinkevich -- With the best regards, Andrey Shinkevich

Re: [PATCH v2 00/22] Fix error handling during bitmap postcopy

2020-02-18 Thread Andrey Shinkevich
sts/qemu-iotests/199 | 244 ++ tests/qemu-iotests/199.out | 4 +- 7 files changed, 529 insertions(+), 230 deletions(-) -- With the best regards, Andrey Shinkevich

Re: [PATCH v2 10/22] migration/block-dirty-bitmap: cancel migration on shutdown

2020-02-18 Thread Andrey Shinkevich
ss never considered as + * something serious. + */ +dirty_bitmap_mig_cancel_incoming(); } /* For outgoing */ Reviewed-by: Andrey Shinkevich -- With the best regards, Andrey Shinkevich

Re: [PATCH v2 09/22] migration/block-dirty-bitmap: relax error handling in incoming part

2020-02-18 Thread Andrey Shinkevich
ex_lock(>lock); + ret = dirty_bitmap_load_header(f, s); if (ret < 0) { +cancel_incoming_locked(s); +qemu_mutex_unlock(>lock); return ret; } @@ -695,8 +769,12 @@ static int dirty_bitmap_load(QEMUFile *f, void *opaque, int version_id) } if (ret) { +cancel_incoming_locked(s); +qemu_mutex_unlock(>lock); return ret; } + +qemu_mutex_unlock(>lock); } while (!(s->flags & DIRTY_BITMAP_MIG_FLAG_EOS)); trace_dirty_bitmap_load_success(); Reviewed-by: Andrey Shinkevich -- With the best regards, Andrey Shinkevich

Re: [PATCH v2 08/22] migration/block-dirty-bitmap: keep bitmap state for all bitmaps

2020-02-18 Thread Andrey Shinkevich
tem->data; if (b->bitmap == s->bitmap) { b->migrated = true; +if (s->before_vm_start_handled) { + s->bitmaps = g_slist_remove(s->bitmaps, b); +g_free(b); +} break; } } Reviewed-by: Andrey Shinkevich -- With the best regards, Andrey Shinkevich

Re: [PATCH v2 07/22] migration/block-dirty-bitmap: simplify dirty_bitmap_load_complete

2020-02-18 Thread Andrey Shinkevich
merge fail, but merge can't fail when second - * bitmap is empty - */ -assert(ret == s->bitmap && - count == bdrv_get_dirty_count(s->bitmap)); -} -bdrv_dirty_bitmap_unlock(s->bitmap); - } - qemu_mutex_unlock(>

Re: [PATCH v2 06/22] migration/block-dirty-bitmap: rename finish_lock to just lock

2020-02-18 Thread Andrey Shinkevich
p_handlers = { void dirty_bitmap_mig_init(void) { QSIMPLEQ_INIT(_state.save.dbms_list); -qemu_mutex_init(_state.load.finish_lock); +qemu_mutex_init(_state.load.lock); register_savevm_live("dirty-bitmap", 0, 1, _dirty_bitmap_handlers, Review

Re: [PATCH v2 05/22] migration/block-dirty-bitmap: refactor state global variables

2020-02-18 Thread Andrey Shinkevich
active_iterate(void *opaque) @@ -727,10 +746,10 @@ static SaveVMHandlers savevm_dirty_bitmap_handlers = { void dirty_bitmap_mig_init(void) { -QSIMPLEQ_INIT(_bitmap_mig_state.dbms_list); -qemu_mutex_init(_lock); +QSIMPLEQ_INIT(_state.save.dbms_list); +qemu_mutex_init(_state.load.finish_lock); register_savevm_live("dirty-bitmap", 0, 1, _dirty_bitmap_handlers, - _bitmap_mig_state); + _state); } Reviewed-by: Andrey Shinkevich -- With the best regards, Andrey Shinkevich

Re: [PATCH v2 04/22] migration/block-dirty-bitmap: move mutex init to dirty_bitmap_mig_init

2020-02-18 Thread Andrey Shinkevich
urrent_migration, )) { error_report_err(err); exit(1); I rely on that the mutex initialization is being made in proper time. Reviewed-by: Andrey Shinkevich -- With the best regards, Andrey Shinkevich

Re: [PATCH v2 03/22] migration/block-dirty-bitmap: rename dirty_bitmap_mig_cleanup

2020-02-18 Thread Andrey Shinkevich
opportunity, I would suggest the name like "dirty_bitmap_do_clean_after_saving()" and similar for dirty_bitmap_save_cleanup() "dirty_bitmap_clean_after_saving()". Reviewed-by: Andrey Shinkevich -- With the best regards, Andrey Shinkevich

Re: [PATCH v2 01/22] migration/block-dirty-bitmap: fix dirty_bitmap_mig_before_vm_start

2020-02-18 Thread Andrey Shinkevich
} else { bdrv_dirty_bitmap_enable_successor(b->bitmap); } Reviewed-by: Andrey Shinkevich -- With the best regards, Andrey Shinkevich

Re: [PATCH] iotests: Remove the superfluous 2nd check for the availability of quorum

2020-01-31 Thread Andrey Shinkevich
by: Andrey Shinkevich Tested-by: Andrey Shinkevich -- With the best regards, Andrey Shinkevich

Re: [PATCH v2 7/7] block/block-copy: hide structure definitions

2020-01-30 Thread Andrey Shinkevich
+BdrvDirtyBitmap *block_copy_dirty_bitmap(BlockCopyState *s) +{ +return s->copy_bitmap; +} + +void block_copy_set_skip_unallocated(BlockCopyState *s, bool skip) +{ + s->skip_unallocated = skip; +} The idea of API is OK but we have got the duplicated members in the nested structures. Reviewed-by: Andrey Shinkevich -- With the best regards, Andrey Shinkevich

Re: [PATCH v2 6/7] block/block-copy: reduce intersecting request lock

2020-01-30 Thread Andrey Shinkevich
On 30/01/2020 20:09, Vladimir Sementsov-Ogievskiy wrote: 30.01.2020 19:24, Andrey Shinkevich wrote: On 30/01/2020 16:45, Vladimir Sementsov-Ogievskiy wrote: 29.01.2020 23:05, Andrey Shinkevich wrote: On 27/11/2019 21:08, Vladimir Sementsov-Ogievskiy wrote: Currently, block_copy

Re: [PATCH v2 6/7] block/block-copy: reduce intersecting request lock

2020-01-30 Thread Andrey Shinkevich
On 30/01/2020 16:45, Vladimir Sementsov-Ogievskiy wrote: 29.01.2020 23:05, Andrey Shinkevich wrote: On 27/11/2019 21:08, Vladimir Sementsov-Ogievskiy wrote: Currently, block_copy operation lock the whole requested region. But there is no reason to lock clusters, which are already copied

Re: [PATCH v2 6/7] block/block-copy: reduce intersecting request lock

2020-01-30 Thread Andrey Shinkevich
*/ + +if (!block_copy_wait_one(s, start, bytes)) { +/* No dirty bits and nothing to wait: the whole request is done */ +break; +} +} + +return 0; } -- With the best regards, Andrey Shinkevich

Re: [PATCH v2 6/7] block/block-copy: reduce intersecting request lock

2020-01-29 Thread Andrey Shinkevich
ns the whole block_copy request > + * failed. > + */ > +return ret; > + } > +if (ret) { > +/* > + * Something was copied, which means that there were yield points > + * and some new dirty bits may appered (due to failed parallel > + * block-copy requests). > + */ > +continue; > +} > + > +/* > + * Here ret == 0, which means that there is no dirty clusters in there is no dirty cluster in > + * requested region. > + */ > + > +if (!block_copy_wait_one(s, start, bytes)) { > +/* No dirty bits and nothing to wait: the whole request is done > */ > +break; > +} > +} > + > +return 0; > } > -- With the best regards, Andrey Shinkevich

Re: [PATCH v2 5/7] block/block-copy: rename start to offset in interfaces

2020-01-29 Thread Andrey Shinkevich
status_bytes; > bytes -= status_bytes; > continue; > } > > cur_bytes = MIN(cur_bytes, status_bytes); > > -trace_block_copy_process(s, start); > + trace_block_copy_process(s, offset); > > -bdrv_reset_dirty_bitmap(s->copy_bitmap, start, cur_bytes); > +bdrv_reset_dirty_bitmap(s->copy_bitmap, offset, cur_bytes); > > co_get_from_shres(s->mem, cur_bytes); > -ret = block_copy_do_copy(s, start, cur_bytes, ret & BDRV_BLOCK_ZERO, > +ret = block_copy_do_copy(s, offset, cur_bytes, ret & BDRV_BLOCK_ZERO, >error_is_read); > co_put_to_shres(s->mem, cur_bytes); > if (ret < 0) { > -bdrv_set_dirty_bitmap(s->copy_bitmap, start, cur_bytes); > +bdrv_set_dirty_bitmap(s->copy_bitmap, offset, cur_bytes); > break; > } > > s->progress_bytes_callback(cur_bytes, s->progress_opaque); > -start += cur_bytes; > +offset += cur_bytes; > bytes -= cur_bytes; > } > > Reviewed-by: Andrey Shinkevich -- With the best regards, Andrey Shinkevich

Re: [PATCH v2 4/7] block/block-copy: refactor interfaces to use bytes instead of end

2020-01-29 Thread Andrey Shinkevich
error_is_read); > -co_put_to_shres(s->mem, chunk_end - start); > +co_put_to_shres(s->mem, cur_bytes); > if (ret < 0) { > -bdrv_set_dirty_bitmap(s->copy_bitmap, start, chunk_end - start); > +bdrv_set_dirty_bitmap(s->copy_bitmap, start, cur_bytes); > break; > } > > -s->progress_bytes_callback(chunk_end - start, s->progress_opaque); > -start = chunk_end; > -ret = 0; > +s->progress_bytes_callback(cur_bytes, s->progress_opaque); > +start += cur_bytes; > +bytes -= cur_bytes; > } > > block_copy_inflight_req_end(); > At the first glance, we would only benefit from the 'while' loop by that substitution to reduce the number of addition operations. Reviewed-by: Andrey Shinkevich -- With the best regards, Andrey Shinkevich

Re: [PATCH v2 3/7] block/block-copy: factor out block_copy_find_inflight_req

2020-01-29 Thread Andrey Shinkevich
reak; > -} > -} > -} while (waited); > + > +while ((req = block_copy_find_inflight_req(s, start, end))) { > + qemu_co_queue_wait(>wait_queue, NULL); > +} > } > > static void block_copy_inflight_req_begin(BlockCopyState *s, > Reviewed-by: Andrey Shinkevich -- With the best regards, Andrey Shinkevich

Re: [PATCH v2 2/7] block/block-copy: use block_status

2020-01-29 Thread Andrey Shinkevich
copy_bitmap, start, chunk_end - start); > diff --git a/block/trace-events b/block/trace-events > index 6ba86decca..346537a1d2 100644 > --- a/block/trace-events > +++ b/block/trace-events > @@ -48,6 +48,7 @@ block_copy_process(void *bcs, int64_t start) "bcs %p start > %"PRId64 > block_copy_copy_range_fail(void *bcs, int64_t start, int ret) "bcs %p start > %"PRId64" ret %d" > block_copy_read_fail(void *bcs, int64_t start, int ret) "bcs %p start > %"PRId64" ret %d" > block_copy_write_fail(void *bcs, int64_t start, int ret) "bcs %p start > %"PRId64" ret %d" > +block_copy_write_zeroes_fail(void *bcs, int64_t start, int ret) "bcs %p > start %"PRId64" ret %d" > > # ../blockdev.c > qmp_block_job_cancel(void *job) "job %p" > Reviewed-by: Andrey Shinkevich -- With the best regards, Andrey Shinkevich

Re: [PATCH v2 1/7] block/block-copy: specialcase first copy_range request

2020-01-28 Thread Andrey Shinkevich
LOCK_COPY_MAX_BUFFER. Still, further requests > will > - * be properly limited, so don't care too much. > + * be properly limited, so don't care too much. Moreover the most > possible > + * case (copy_range is unsupported for the configuration, so the very > first > + * copy_range request fails) is handled by setting large copy_size only > + * after first successful copy_range. >*/ > > bounce_buffer = qemu_blockalign(s->source->bs, nbytes); > It would be good to make that clear where the large size of the first request comes from and where it is checked with failure. Reviewed-by: Andrey Shinkevich -- With the best regards, Andrey Shinkevich

[PATCH v3 3/3] qcow2: dump QCOW2 metadata

2020-01-14 Thread Andrey Shinkevich
Let QEMU-IMG CHECK command show QCOW2 structure to inform a user about metadata allocations on disk. Introduce '-M'('--dump-meta') key option. Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Andrey Shinkevich --- block/qcow2-bitmap.c | 54 +--- block

[PATCH v3 1/3] qcow2: introduce Qcow2Metadata structure

2020-01-14 Thread Andrey Shinkevich
The preliminary patch to provide an extendable structure for dumping QCOW2 metadata allocations in image. The command line optional key is introduced in the patch that follows. Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Andrey Shinkevich --- qapi/block-core.json | 209

[PATCH v3 2/3] qemu-img: sort key options alphabetically

2020-01-14 Thread Andrey Shinkevich
Put qemu-img key options in the alphabetical order in the code for a faster finding. Suggested-by: Eric Blake Signed-off-by: Andrey Shinkevich --- qemu-img.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 6233b8c

[PATCH v3 0/3] Dump QCOW2 metadata

2020-01-14 Thread Andrey Shinkevich
e": "bitmap-1" }, { "bitmap-table": { "location": { "offset": 983040, "size": 8

Re: [PATCH 2/2] qcow2: dump QCOW2 metadata

2020-01-13 Thread Andrey Shinkevich
On 13/01/2020 19:16, Eric Blake wrote: > On 1/13/20 4:30 AM, Andrey Shinkevich wrote: > >>>> -    c = getopt_long(argc, argv, ":hf:r:T:qU", >>>> +    c = getopt_long(argc, argv, ":hf:r:T:qU:M", >>> >>> We are alrea

[PATCH v2 1/2] qcow2: introduce Qcow2Metadata structure

2020-01-13 Thread Andrey Shinkevich
The preliminary patch to provide an extendable structure for dumping QCOW2 metadata allocations in image. The command line optional key is introduced in the patch that follows. Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Andrey Shinkevich --- qapi/block-core.json | 209

[PATCH v2 2/2] qcow2: dump QCOW2 metadata

2020-01-13 Thread Andrey Shinkevich
Let QEMU-IMG CHECK command show QCOW2 structure to inform a user about metadata allocations on disk. Introduce '-M'('--dump-meta') key option. Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Andrey Shinkevich --- block/qcow2-bitmap.c | 54 +--- block

[PATCH v2 0/2] Dump QCOW2 metadata

2020-01-13 Thread Andrey Shinkevich
"bitmap-table": { "location": { "offset": 983040, "size": 8 }, "table-entries": [

Re: [PATCH 2/2] qcow2: dump QCOW2 metadata

2020-01-13 Thread Andrey Shinkevich
On 08/01/2020 01:11, Eric Blake wrote: > On 12/27/19 5:43 AM, Andrey Shinkevich wrote: >> Let QEMU-IMG CHECK command show QCOW2 structure to inform a user about >> metadata allocations on disk. Introduce '-M'('--dump-meta') key option. >> >> Suggested-by: Vladimir Sem

Re: [PATCH 1/2] qcow2: introduce Qcow2Metadata structure

2020-01-13 Thread Andrey Shinkevich
On 08/01/2020 01:07, Eric Blake wrote: > On 12/27/19 5:43 AM, Andrey Shinkevich wrote: >> The preliminary patch to provide an extendable structure for dumping >> QCOW2 metadata allocations in image. >> >> Suggested-by: Vladimir Sementsov-Ogievskiy >>

[PATCH 2/2] qcow2: dump QCOW2 metadata

2019-12-27 Thread Andrey Shinkevich
Let QEMU-IMG CHECK command show QCOW2 structure to inform a user about metadata allocations on disk. Introduce '-M'('--dump-meta') key option. Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Andrey Shinkevich --- block/qcow2-bitmap.c | 53 --- block

[PATCH 1/2] qcow2: introduce Qcow2Metadata structure

2019-12-27 Thread Andrey Shinkevich
The preliminary patch to provide an extendable structure for dumping QCOW2 metadata allocations in image. Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Andrey Shinkevich --- qapi/block-core.json | 208 ++- 1 file changed, 207

[PATCH 0/2] Dump QCOW2 metadata

2019-12-27 Thread Andrey Shinkevich
;: "bitmap-1" }, { "bitmap-table": { "location": { "offset": 983040, "size": 8 },

Re: [PATCH v12 1/3] block: introduce compress filter driver

2019-12-20 Thread Andrey Shinkevich
On 20/12/2019 17:52, Max Reitz wrote: > On 02.12.19 13:15, Andrey Shinkevich wrote: >> Allow writing all the data compressed through the filter driver. >> The written data will be aligned by the cluster size. >> Based on the QEMU current implementation, tha

Re: [PATCH v12 0/3] qcow2: advanced compression options

2019-12-18 Thread Andrey Shinkevich
Pinging... (please) On 02/12/2019 15:15, Andrey Shinkevich wrote: > The compression filter driver is introduced as suggested by Max. > A sample usage of the filter can be found in the test #214. > Now, multiple clusters can be written compressed. > It is useful for the backup j

[PATCH v12 0/3] qcow2: advanced compression options

2019-12-02 Thread Andrey Shinkevich
_status_from_backing to _status_from_file (noticed by Vladimir). Andrey Shinkevich (3): block: introduce compress filter driver qcow2: Allow writing compressed data of multiple clusters tests/qemu-iotests: add case to write compressed data of multiple clusters block/Makefile.objs

[PATCH v12 3/3] tests/qemu-iotests: add case to write compressed data of multiple clusters

2019-12-02 Thread Andrey Shinkevich
Add the case to the iotest #214 that checks possibility of writing compressed data of more than one cluster size. The test case involves the compress filter driver showing a sample usage of that. Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz

[PATCH v12 2/3] qcow2: Allow writing compressed data of multiple clusters

2019-12-02 Thread Andrey Shinkevich
Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/qcow2.c | 102 ++ 1 file changed, 75 insertions(+), 27 deletions(-) diff --git a/block/qcow2

[PATCH v12 1/3] block: introduce compress filter driver

2019-12-02 Thread Andrey Shinkevich
Allow writing all the data compressed through the filter driver. The written data will be aligned by the cluster size. Based on the QEMU current implementation, that data can be written to unallocated clusters only. May be used for a backup job. Suggested-by: Max Reitz Signed-off-by: Andrey

[PATCH v11 1/3] block: introduce compress filter driver

2019-12-02 Thread Andrey Shinkevich
/block/filter-compress.c new file mode 100644 index 000..3e89249 --- /dev/null +++ b/block/filter-compress.c @@ -0,0 +1,168 @@ +/* + * Compress filter block driver + * + * Copyright (c) 2019 Virtuozzo International GmbH + * + * Author: + * Andrey Shinkevich + * (based on block/copy-on-read.c

[PATCH v11 3/3] tests/qemu-iotests: add case to write compressed data of multiple clusters

2019-12-02 Thread Andrey Shinkevich
Add the case to the iotest #214 that checks possibility of writing compressed data of more than one cluster size. The test case involves the compress filter driver showing a sample usage of that. Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz

[PATCH v11 2/3] qcow2: Allow writing compressed data of multiple clusters

2019-12-02 Thread Andrey Shinkevich
Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/qcow2.c | 102 ++ 1 file changed, 75 insertions(+), 27 deletions(-) diff --git a/block/qcow2

[PATCH v11 0/3] qcow2: advanced compression options

2019-12-02 Thread Andrey Shinkevich
in the error message on failure of opening the compression driver as suggested by Vladimir. Andrey Shinkevich (3): block: introduce compress filter driver qcow2: Allow writing compressed data of multiple clusters tests/qemu-iotests: add case to write compressed data of multiple clusters

Re: [PATCH v10 1/3] block: introduce compress filter driver

2019-12-02 Thread Andrey Shinkevich
On 28/11/2019 17:37, Vladimir Sementsov-Ogievskiy wrote: > 28.11.2019 12:36, Andrey Shinkevich wrote: >> Allow writing all the data compressed through the filter driver. >> The written data will be aligned by the cluster size. >> Based on the QEMU current implementation, tha

[PATCH v10 2/3] qcow2: Allow writing compressed data of multiple clusters

2019-11-28 Thread Andrey Shinkevich
Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/qcow2.c | 102 ++ 1 file changed, 75 insertions(+), 27 deletions(-) diff --git a/block/qcow2

[PATCH v10 1/3] block: introduce compress filter driver

2019-11-28 Thread Andrey Shinkevich
/block/filter-compress.c new file mode 100644 index 000..4aa189b --- /dev/null +++ b/block/filter-compress.c @@ -0,0 +1,166 @@ +/* + * Compress filter block driver + * + * Copyright (c) 2019 Virtuozzo International GmbH + * + * Author: + * Andrey Shinkevich + * (based on block/copy-on-read.c

[PATCH v10 3/3] tests/qemu-iotests: add case to write compressed data of multiple clusters

2019-11-28 Thread Andrey Shinkevich
Add the case to the iotest #214 that checks possibility of writing compressed data of more than one cluster size. The test case involves the compress filter driver showing a sample usage of that. Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz

[PATCH v10 0/3] qcow2: advanced compression options

2019-11-28 Thread Andrey Shinkevich
kev...@virtuozzo.com> Andrey Shinkevich (3): block: introduce compress filter driver qcow2: Allow writing compressed data of multiple clusters tests/qemu-iotests: add case to write compressed data of multiple clusters block/Makefile.objs| 1 + block/filter-compress.c

[PATCH v9 2/3] qcow2: Allow writing compressed data of multiple clusters

2019-11-26 Thread Andrey Shinkevich
Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/qcow2.c | 102 ++ 1 file changed, 75 insertions(+), 27 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index

[PATCH v9 3/3] tests/qemu-iotests: add case to write compressed data of multiple clusters

2019-11-26 Thread Andrey Shinkevich
Add the case to the iotest #214 that checks possibility of writing compressed data of more than one cluster size. The test case involves the compress filter driver showing a sample usage of that. Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests

[PATCH v9 0/3] qcow2: advanced compression options

2019-11-26 Thread Andrey Shinkevich
for compression support in bs->file is checked in the compress_open(). Discussed in the email thread with the message ID <1574056144-625164-1-git-send-email-andrey.shinkev...@virtuozzo.com> Andrey Shinkevich (3): block: introduce compress filter driver qcow2: Allow writing compre

[PATCH v9 1/3] block: introduce compress filter driver

2019-11-26 Thread Andrey Shinkevich
/block/filter-compress.c new file mode 100644 index 000..ef4b12b --- /dev/null +++ b/block/filter-compress.c @@ -0,0 +1,190 @@ +/* + * Compress filter block driver + * + * Copyright (c) 2019 Virtuozzo International GmbH + * + * Author: + * Andrey Shinkevich + * (based on block/copy-on-read.c

[PATCH v8 1/3] block: introduce compress filter driver

2019-11-17 Thread Andrey Shinkevich
/block/filter-compress.c new file mode 100644 index 000..522d6c3 --- /dev/null +++ b/block/filter-compress.c @@ -0,0 +1,201 @@ +/* + * Compress filter block driver + * + * Copyright (c) 2019 Virtuozzo International GmbH + * + * Author: + * Andrey Shinkevich + * (based on block/copy-on-read.c

[PATCH v8 0/3] qcow2: advanced compression options

2019-11-17 Thread Andrey Shinkevich
in the email thread with the message ID <1573670589-229357-1-git-send-email-andrey.shinkev...@virtuozzo.com> Andrey Shinkevich (3): block: introduce compress filter driver qcow2: Allow writing compressed data of multiple clusters tests/qemu-iotests: add case to write compressed data of mu

[PATCH v8 3/3] tests/qemu-iotests: add case to write compressed data of multiple clusters

2019-11-17 Thread Andrey Shinkevich
Add the case to the iotest #214 that checks possibility of writing compressed data of more than one cluster size. The test case involves the compress filter driver showing a sample usage of that. Signed-off-by: Andrey Shinkevich --- tests/qemu-iotests/214 | 43

[PATCH v8 2/3] qcow2: Allow writing compressed data of multiple clusters

2019-11-17 Thread Andrey Shinkevich
Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/qcow2.c | 102 ++ 1 file changed, 75 insertions(+), 27 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index

Re: [PATCH v7 1/3] block: introduce compress filter driver

2019-11-15 Thread Andrey Shinkevich
On 15/11/2019 12:32, Max Reitz wrote: > On 14.11.19 12:59, Vladimir Sementsov-Ogievskiy wrote: >> 14.11.2019 14:27, Max Reitz wrote: >>> On 13.11.19 19:43, Andrey Shinkevich wrote: >>>> Allow writing all the data compressed through the filter driver. >>

Re: [PATCH v5] iotests: Test NBD client reconnection

2019-11-14 Thread Andrey Shinkevich
On 14/11/2019 18:09, Eric Blake wrote: > On 11/11/19 9:39 PM, Andrey Shinkevich wrote: >> The test for an NBD client. The NBD server is disconnected after the >> client write request. The NBD client should reconnect and complete >> the write operation. >> >

[PATCH v7 0/3] qcow2: advanced compression options

2019-11-13 Thread Andrey Shinkevich
ail-andrey.shinkev...@virtuozzo.com> Andrey Shinkevich (3): block: introduce compress filter driver qcow2: Allow writing compressed data of multiple clusters tests/qemu-iotests: add case to write compressed data of multiple clusters block/Makefile.objs| 1 + block/filter-comp

[PATCH v7 3/3] tests/qemu-iotests: add case to write compressed data of multiple clusters

2019-11-13 Thread Andrey Shinkevich
Add the case to the iotest #214 that checks possibility of writing compressed data of more than one cluster size. The test case involves the compress filter driver showing a sample usage of that. Signed-off-by: Andrey Shinkevich --- tests/qemu-iotests/214 | 43

[PATCH v7 1/3] block: introduce compress filter driver

2019-11-13 Thread Andrey Shinkevich
/block/filter-compress.c new file mode 100644 index 000..64b1ee5 --- /dev/null +++ b/block/filter-compress.c @@ -0,0 +1,201 @@ +/* + * Compress filter block driver + * + * Copyright (c) 2019 Virtuozzo International GmbH + * + * Author: + * Andrey Shinkevich + * (based on block/copy-on-read.c

[PATCH v7 2/3] qcow2: Allow writing compressed data of multiple clusters

2019-11-13 Thread Andrey Shinkevich
Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/qcow2.c | 102 ++ 1 file changed, 75 insertions(+), 27 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 7c18721..0e03a1a 100644 --- a/block

Re: [PATCH v6 1/3] block: introduce compress filter driver

2019-11-12 Thread Andrey Shinkevich
On 12/11/2019 12:39, Kevin Wolf wrote: > Am 11.11.2019 um 17:04 hat Andrey Shinkevich geschrieben: >> Allow writing all the data compressed through the filter driver. >> The written data will be aligned by the cluster size. >> Based on the QEMU current implementation, tha

Re: [PATCH v4] iotests: Test NBD client reconnection

2019-11-11 Thread Andrey Shinkevich
On 11/11/2019 20:53, Eric Blake wrote: > On 11/11/19 4:04 AM, Andrey Shinkevich wrote: >> The test for an NBD client. The NBD server is disconnected after the >> client write request. The NBD client should reconnect and complete >> the write operation. >> >

[PATCH v5] iotests: Test NBD client reconnection

2019-11-11 Thread Andrey Shinkevich
The test for an NBD client. The NBD server is disconnected after the client write request. The NBD client should reconnect and complete the write operation. Suggested-by: Denis V. Lunev Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Andrey Shinkevich Reviewed-by: Eric Blake Tested

[PATCH v6 3/3] tests/qemu-iotests: add case to write compressed data of multiple clusters

2019-11-11 Thread Andrey Shinkevich
Add the case to the iotest #214 that checks possibility of writing compressed data of more than one cluster size. The test case involves the compress filter driver showing a sample usage of that. Signed-off-by: Andrey Shinkevich --- tests/qemu-iotests/214 | 43

[PATCH v6 0/3] qcow2: advanced compression options

2019-11-11 Thread Andrey Shinkevich
with the block-stream compress test case was removed from the series. Discussed in the email thread with the message ID <1571603828-185910-1-git-send-email-andrey.shinkev...@virtuozzo.com> Andrey Shinkevich (3): block: introduce compress filter driver qcow2: Allow writing compresse

[PATCH v6 2/3] qcow2: Allow writing compressed data of multiple clusters

2019-11-11 Thread Andrey Shinkevich
Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/qcow2.c | 102 ++ 1 file changed, 75 insertions(+), 27 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 7c18721..0e03a1a 100644 --- a/block

[PATCH v6 1/3] block: introduce compress filter driver

2019-11-11 Thread Andrey Shinkevich
/block/filter-compress.c new file mode 100644 index 000..a7b0337 --- /dev/null +++ b/block/filter-compress.c @@ -0,0 +1,212 @@ +/* + * Compress filter block driver + * + * Copyright (c) 2019 Virtuozzo International GmbH + * + * Author: + * Andrey Shinkevich + * (based on block/copy-on-read.c

[PATCH v4] iotests: Test NBD client reconnection

2019-11-11 Thread Andrey Shinkevich
The test for an NBD client. The NBD server is disconnected after the client write request. The NBD client should reconnect and complete the write operation. Suggested-by: Denis V. Lunev Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Andrey Shinkevich --- v3 was discussed

<    1   2   3   4   5   6   7   8   9   >