[Qemu-block] [PATCH v5 0/2] block: enforce minimal 4096 alignment in qemu_blockalign

2015-05-04 Thread Denis V. Lunev
189 difference Signed-off-by: Denis V. Lunev d...@openvz.org CC: Paolo Bonzini pbonz...@redhat.com CC: Kevin Wolf kw...@redhat.com CC: Stefan Hajnoczi stefa...@redhat.com

[Qemu-block] [PATCH 2/2] block: align bounce buffers to page

2015-05-04 Thread Denis V. Lunev
bounce buffering if guest request is aligned to 512 bytes. The patch changes default bounce buffer optimal alignment to MAX(page size, 4k). 4k is chosen as maximal known sector size on real HDD. Signed-off-by: Denis V. Lunev d...@openvz.org CC: Paolo Bonzini pbonz...@redhat.com CC: Kevin Wolf kw

[Qemu-block] [PATCH 1/2] block: minimal bounce buffer alignment

2015-05-04 Thread Denis V. Lunev
point of view, it would be better if bounce buffer or IOVec allocated by QEMU will be aligned stricter. The patch does not change any alignment value yet. Signed-off-by: Denis V. Lunev d...@openvz.org CC: Paolo Bonzini pbonz...@redhat.com CC: Kevin Wolf kw...@redhat.com CC: Stefan Hajnoczi stefa

[Qemu-block] [PATCH 2/2] block: align bounce buffers to page

2015-05-11 Thread Denis V. Lunev
and real requests comes properly aligned (to page). Signed-off-by: Denis V. Lunev d...@openvz.org CC: Paolo Bonzini pbonz...@redhat.com CC: Kevin Wolf kw...@redhat.com CC: Stefan Hajnoczi stefa...@redhat.com --- block.c | 8 block/io.c| 2 +- block/raw-posix.c | 14

[Qemu-block] [PATCH 1/2] block: minimal bounce buffer alignment

2015-05-11 Thread Denis V. Lunev
point of view, it would be better if bounce buffer or IOVec allocated by QEMU will be aligned stricter. The patch does not change any alignment value yet. Signed-off-by: Denis V. Lunev d...@openvz.org CC: Paolo Bonzini pbonz...@redhat.com CC: Kevin Wolf kw...@redhat.com CC: Stefan Hajnoczi stefa

[Qemu-block] [PATCH v6 0/2] block: enforce minimal 4096 alignment in qemu_blockalign

2015-05-11 Thread Denis V. Lunev
difference Signed-off-by: Denis V. Lunev d...@openvz.org CC: Paolo Bonzini pbonz...@redhat.com CC: Kevin Wolf kw...@redhat.com CC: Stefan Hajnoczi stefa...@redhat.com

Re: [Qemu-block] [PATCH v5 0/2] block: enforce minimal 4096 alignment in qemu_blockalign

2015-05-11 Thread Denis V. Lunev
On 11/05/15 18:08, Stefan Hajnoczi wrote: On Mon, May 04, 2015 at 04:42:22PM +0300, Denis V. Lunev wrote: The difference is quite reliable and the same 5%. qemu-io -n -c 'write -P 0xaa 0 1G' 1.img for image in qcow2 format is 1% faster. I looked a little at the qemu-io invocation but am

Re: [Qemu-block] [PATCH v5 0/2] block: enforce minimal 4096 alignment in qemu_blockalign

2015-05-11 Thread Denis V. Lunev
On 11/05/15 19:07, Denis V. Lunev wrote: On 11/05/15 18:08, Stefan Hajnoczi wrote: On Mon, May 04, 2015 at 04:42:22PM +0300, Denis V. Lunev wrote: The difference is quite reliable and the same 5%. qemu-io -n -c 'write -P 0xaa 0 1G' 1.img for image in qcow2 format is 1% faster. I looked

Re: [Qemu-block] [PATCH v5 0/2] block: enforce minimal 4096 alignment in qemu_blockalign

2015-05-12 Thread Denis V. Lunev
On 12/05/15 13:01, Stefan Hajnoczi wrote: On Mon, May 11, 2015 at 07:47:41PM +0300, Denis V. Lunev wrote: On 11/05/15 19:07, Denis V. Lunev wrote: On 11/05/15 18:08, Stefan Hajnoczi wrote: On Mon, May 04, 2015 at 04:42:22PM +0300, Denis V. Lunev wrote: The difference is quite reliable

Re: [Qemu-block] [PATCH 2/2] block: align bounce buffers to page

2015-05-12 Thread Denis V. Lunev
On 12/05/15 13:27, Kevin Wolf wrote: Am 12.05.2015 um 07:47 hat Denis V. Lunev geschrieben: The following sequence int fd = open(argv[1], O_RDWR | O_CREAT | O_DIRECT, 0644); for (i = 0; i 10; i++) write(fd, buf, 4096); performs 5% better if buf is aligned to 4096

Re: [Qemu-block] [PATCH v5 0/2] block: enforce minimal 4096 alignment in qemu_blockalign

2015-05-13 Thread Denis V. Lunev
On 13/05/15 18:43, Stefan Hajnoczi wrote: On Tue, May 12, 2015 at 12:46:57PM +0200, Paolo Bonzini wrote: On 12/05/2015 12:19, Denis V. Lunev wrote: hades /vol $ strace -f -e pwrite -e raw=write,pwrite qemu-io -n -c write -P 0x11 0 64M ./1.img Process 19326 attached [pid 19326] pwrite(0x6

Re: [Qemu-block] [PATCH 2/2] block: align bounce buffers to page

2015-05-12 Thread Denis V. Lunev
On 12/05/15 17:08, Kevin Wolf wrote: Am 12.05.2015 um 15:41 hat Denis V. Lunev geschrieben: The following sequence int fd = open(argv[1], O_RDWR | O_CREAT | O_DIRECT, 0644); for (i = 0; i 10; i++) write(fd, buf, 4096); performs 5% better if buf is aligned to 4096

[Qemu-block] [PATCH v8 0/2] block: enforce minimal 4096 alignment in qemu_blockalign

2015-05-12 Thread Denis V. Lunev
, avoid touching of bdrv_qiov_is_aligned path not to enforce additional bounce buffering as suggested by Paolo - reduces 10% to 5% in patch description to better fit 180 vs 189 difference Signed-off-by: Denis V. Lunev d...@openvz.org CC: Paolo Bonzini pbonz...@redhat.com CC: Kevin Wolf kw

Re: [Qemu-block] [PATCH 2/2] block: align bounce buffers to page

2015-05-12 Thread Denis V. Lunev
On 12/05/15 17:26, Kevin Wolf wrote: Am 12.05.2015 um 16:20 hat Denis V. Lunev geschrieben: On 12/05/15 17:08, Kevin Wolf wrote: Am 12.05.2015 um 15:41 hat Denis V. Lunev geschrieben: The following sequence int fd = open(argv[1], O_RDWR | O_CREAT | O_DIRECT, 0644); for (i = 0; i

[Qemu-block] [PATCH 2/2] block: align bounce buffers to page

2015-05-12 Thread Denis V. Lunev
and real requests comes properly aligned (to page). Signed-off-by: Denis V. Lunev d...@openvz.org CC: Paolo Bonzini pbonz...@redhat.com CC: Kevin Wolf kw...@redhat.com CC: Stefan Hajnoczi stefa...@redhat.com --- block.c | 8 block/io.c| 2 +- block/raw-posix.c | 15

[Qemu-block] [PATCH v7 0/2] block: enforce minimal 4096 alignment in qemu_blockalign

2015-05-12 Thread Denis V. Lunev
additional bounce buffering as suggested by Paolo - reduces 10% to 5% in patch description to better fit 180 vs 189 difference Signed-off-by: Denis V. Lunev d...@openvz.org CC: Paolo Bonzini pbonz...@redhat.com CC: Kevin Wolf kw...@redhat.com CC: Stefan Hajnoczi stefa...@redhat.com

[Qemu-block] [PATCH 1/2] block: minimal bounce buffer alignment

2015-05-12 Thread Denis V. Lunev
point of view, it would be better if bounce buffer or IOVec allocated by QEMU will be aligned stricter. The patch does not change any alignment value yet. Signed-off-by: Denis V. Lunev d...@openvz.org CC: Paolo Bonzini pbonz...@redhat.com Reviewed-by: Kevin Wolf kw...@redhat.com CC: Stefan Hajnoczi

Re: [Qemu-block] [Qemu-devel] [PATCH v2 1/2] raw-posix: warn about BDRV_O_NATIVE_AIO if libaio is unavailable

2015-07-23 Thread Denis V. Lunev
On 07/23/2015 01:09 PM, Christian Borntraeger wrote: Am 17.07.2015 um 16:23 schrieb Stefan Hajnoczi: raw-posix.c silently ignores BDRV_O_NATIVE_AIO if libaio is unavailable. It is confusing when aio=native performance is identical to aio=threads because the binary was accidentally built without

Re: [Qemu-block] [PATCH] blockdev: acquire AioContext in hmp_commit()

2015-11-01 Thread Denis V. Lunev
On 10/30/2015 06:57 PM, Stefan Hajnoczi wrote: This one slipped through. Although we acquire AioContext when committing all devices we don't for just a single device. AioContext must be acquired before calling bdrv_*() functions to synchronize access with other threads that may be using the

Re: [Qemu-block] [Qemu-devel] [PATCH 03/17] spec: add qcow2-dirty-bitmaps specification

2015-10-08 Thread Denis V. Lunev
On 10/08/2015 11:28 PM, John Snow wrote: On 10/07/2015 03:05 PM, Denis V. Lunev wrote: On 10/07/2015 07:47 PM, Max Reitz wrote: On 05.09.2015 18:43, Vladimir Sementsov-Ogievskiy wrote: Persistent dirty bitmaps will be saved into qcow2 files. It may be used as 'internal' bitmaps (for qcow2

Re: [Qemu-block] [Qemu-devel] [PATCH 03/17] spec: add qcow2-dirty-bitmaps specification

2015-10-07 Thread Denis V. Lunev
On 10/07/2015 07:47 PM, Max Reitz wrote: On 05.09.2015 18:43, Vladimir Sementsov-Ogievskiy wrote: Persistent dirty bitmaps will be saved into qcow2 files. It may be used as 'internal' bitmaps (for qcow2 drives) or as 'external' bitmaps for other drives (there may be qcow2 file with zero disk

Re: [Qemu-block] [Qemu-devel] [PATCH 4/5] disk_deadlines: add control of requests time expiration

2015-09-08 Thread Denis V. Lunev
On 09/08/2015 12:35 PM, Fam Zheng wrote: On Tue, 09/08 11:00, Denis V. Lunev wrote: typedef struct DiskDeadlines { bool enabled; +bool expired_tree; +pthread_mutex_t mtx_tree; This won't compile on win32, probably use QemuMutex instead? In file included from /tmp/qemu-build

Re: [Qemu-block] [Qemu-devel] [PATCH for-2.5?] qcow2: always initialize specific image info

2015-12-07 Thread Denis V. Lunev
On 12/07/2015 08:54 PM, Eric Blake wrote: On 12/07/2015 10:51 AM, Eric Blake wrote: [adding qemu-devel - ALL patches should go to qemu-devel, even if they are also going to a sub-list like qemu-block] On 12/07/2015 10:07 AM, Roman Kagan wrote: qcow2_get_specific_info() used to have a code

Re: [Qemu-block] [Qemu-devel] [PATCH v5 4/6] expose floppy drive geometry and CMOS type

2016-01-06 Thread Denis V. Lunev
On 01/04/2016 11:44 PM, John Snow wrote: On 12/30/2015 03:11 PM, Roman Kagan wrote: Make it possible to query the geometry and the CMOS type of a floppy drive outside of the respective source files. It will be useful, in particular, when dynamically building ACPI tables, and will allow to

Re: [Qemu-block] [PATCH] qcow2: always initialize specific image info

2015-12-21 Thread Denis V. Lunev
On 12/21/2015 04:18 PM, Denis V. Lunev wrote: On 12/07/2015 08:07 PM, Roman Kagan wrote: qcow2_get_specific_info() used to have a code path which would leave pointer to ImageInfoSpecificQCow2 uninitialized. We guess that it caused sporadic crashes on freeing an invalid pointer in response

Re: [Qemu-block] [PATCH] qcow2: always initialize specific image info

2015-12-22 Thread Denis V. Lunev
On 12/22/2015 11:28 PM, Eric Blake wrote: On 12/21/2015 04:05 PM, Max Reitz wrote: The situation is even worse than I have feared. Thanks for finding this! Well, if qcow2_get_specific_info() is the only place that can actually cause issues in that case (i.e. calling some QMP function which

Re: [Qemu-block] [Qemu-devel] [PATCH 00/10] qcow2: Implement image locking

2015-12-23 Thread Denis V. Lunev
On 12/23/2015 05:57 PM, Vasiliy Tolstov wrote: 2015-12-22 19:46 GMT+03:00 Kevin Wolf : Enough innocent images have died because users called 'qemu-img snapshot' while the VM was still running. Educating the users doesn't seem to be a working strategy, so this series adds

Re: [Qemu-block] [Qemu-devel] [PATCH 00/10] qcow2: Implement image locking

2015-12-23 Thread Denis V. Lunev
On 12/23/2015 05:57 PM, Vasiliy Tolstov wrote: 2015-12-22 19:46 GMT+03:00 Kevin Wolf : Enough innocent images have died because users called 'qemu-img snapshot' while the VM was still running. Educating the users doesn't seem to be a working strategy, so this series adds

Re: [Qemu-block] [PATCH] qcow2: always initialize specific image info

2015-12-21 Thread Denis V. Lunev
On 12/07/2015 08:07 PM, Roman Kagan wrote: qcow2_get_specific_info() used to have a code path which would leave pointer to ImageInfoSpecificQCow2 uninitialized. We guess that it caused sporadic crashes on freeing an invalid pointer in response to "query-block" QMP command in

Re: [Qemu-block] [Qemu-devel] [PATCH 00/10] qcow2: Implement image locking

2015-12-23 Thread Denis V. Lunev
On 12/24/2015 08:41 AM, Denis V. Lunev wrote: On 12/24/2015 02:19 AM, Max Reitz wrote: On 23.12.2015 04:14, Fam Zheng wrote: On Tue, 12/22 17:46, Kevin Wolf wrote: Enough innocent images have died because users called 'qemu-img snapshot' while the VM was still running. Educating the users

Re: [Qemu-block] [Qemu-devel] [PATCH 00/10] qcow2: Implement image locking

2015-12-23 Thread Denis V. Lunev
On 12/24/2015 02:19 AM, Max Reitz wrote: On 23.12.2015 04:14, Fam Zheng wrote: On Tue, 12/22 17:46, Kevin Wolf wrote: Enough innocent images have died because users called 'qemu-img snapshot' while the VM was still running. Educating the users doesn't seem to be a working strategy, so this

Re: [Qemu-block] [PATCH 00/10] qcow2: Implement image locking

2015-12-23 Thread Denis V. Lunev
On 12/22/2015 07:46 PM, Kevin Wolf wrote: Enough innocent images have died because users called 'qemu-img snapshot' while the VM was still running. Educating the users doesn't seem to be a working strategy, so this series adds locking to qcow2 that refuses to access the image read-write from two

Re: [Qemu-block] [Qemu-devel] [PATCH 00/10] qcow2: Implement image locking

2015-12-23 Thread Denis V. Lunev
On 12/23/2015 03:29 PM, Daniel P. Berrange wrote: On Wed, Dec 23, 2015 at 03:15:50PM +0300, Roman Kagan wrote: On Wed, Dec 23, 2015 at 10:47:22AM +, Daniel P. Berrange wrote: On Wed, Dec 23, 2015 at 11:14:12AM +0800, Fam Zheng wrote: As an alternative, can we introduce .bdrv_flock() in

Re: [Qemu-block] [Qemu-devel] [PATCH 00/10] qcow2: Implement image locking

2015-12-23 Thread Denis V. Lunev
On 12/23/2015 03:34 PM, Daniel P. Berrange wrote: On Wed, Dec 23, 2015 at 03:15:50PM +0300, Roman Kagan wrote: On Wed, Dec 23, 2015 at 10:47:22AM +, Daniel P. Berrange wrote: On Wed, Dec 23, 2015 at 11:14:12AM +0800, Fam Zheng wrote: As an alternative, can we introduce .bdrv_flock() in

Re: [Qemu-block] [Qemu-devel] [PATCH 00/10] qcow2: Implement image locking

2015-12-22 Thread Denis V. Lunev
On 12/23/2015 06:14 AM, Fam Zheng wrote: On Tue, 12/22 17:46, Kevin Wolf wrote: Enough innocent images have died because users called 'qemu-img snapshot' while the VM was still running. Educating the users doesn't seem to be a working strategy, so this series adds locking to qcow2 that refuses

Re: [Qemu-block] [PATCH 1/1] blk: do not select PFLASH device for internal snapshot

2016-01-13 Thread Denis V. Lunev
On 01/13/2016 01:37 PM, Laszlo Ersek wrote: meta comment here: On 01/12/16 16:47, Denis V. Lunev wrote: P.S. Here is a summary that my colleague has receiver from libvirt list. Forwarded Message Subject: Re: Snapshotting OVMF guests Date: Mon, 11 Jan 2016 13:56:29

Re: [Qemu-block] [Qemu-devel] [PATCH 00/10] qcow2: Implement image locking

2016-01-13 Thread Denis V. Lunev
On 01/13/2016 11:56 AM, Markus Armbruster wrote: Kevin Wolf writes: Am 23.12.2015 um 11:47 hat Daniel P. Berrange geschrieben: On Wed, Dec 23, 2015 at 11:14:12AM +0800, Fam Zheng wrote: On Tue, 12/22 17:46, Kevin Wolf wrote: Enough innocent images have died because users

Re: [Qemu-block] [PATCH] block: Fix .bdrv_open flags

2016-01-11 Thread Denis V. Lunev
!drv->bdrv_needs_filename || filename != NULL); @@ -1660,7 +1661,7 @@ static int bdrv_open_inherit(BlockDriverState **pbs, const char *filename, assert(!(flags & BDRV_O_PROTOCOL) || !file); /* Open the image */ -ret = bdrv_open_common(bs, file, options, flags, _err); + re

[Qemu-block] [PATCH 1/1] blk: do not select PFLASH device for internal snapshot

2016-01-11 Thread Denis V. Lunev
n of "pflash" drives for VM state saving. For now "pflash" is read-write raw image as it configured by libvirt. Thus there are no such images in the field and we could safely disable ability to save state to those images inside QEMU. Signed-off-by: Denis V. Lunev <d...@openvz.

Re: [Qemu-block] [Qemu-devel] [PATCH 1/1] blk: do not select PFLASH device for internal snapshot

2016-01-12 Thread Denis V. Lunev
On 01/12/2016 08:40 PM, Markus Armbruster wrote: Kevin Wolf <kw...@redhat.com> writes: Am 12.01.2016 um 17:35 hat Denis V. Lunev geschrieben: On 01/12/2016 06:47 PM, Denis V. Lunev wrote: On 01/12/2016 06:20 PM, Kevin Wolf wrote: Am 12.01.2016 um 15:59 hat Paolo Bonzini geschrieben:

Re: [Qemu-block] [PATCH 1/1] blk: do not select PFLASH device for internal snapshot

2016-01-12 Thread Denis V. Lunev
On 01/12/2016 05:59 PM, Paolo Bonzini wrote: On 12/01/2016 15:16, Kevin Wolf wrote: Thus we should avoid selection of "pflash" drives for VM state saving. For now "pflash" is read-write raw image as it configured by libvirt. Thus there are no such images in the field and we could safely

Re: [Qemu-block] [PATCH 1/1] blk: do not select PFLASH device for internal snapshot

2016-01-12 Thread Denis V. Lunev
On 01/12/2016 05:16 PM, Kevin Wolf wrote: Am 12.01.2016 um 07:03 hat Denis V. Lunev geschrieben: There is a long-long story. OVMF VMs can not be snapsotted using 'virsh snapshot' as they have "pflash" device which is configured as "raw" image. There was a discussi

Re: [Qemu-block] [PATCH 1/1] blk: do not select PFLASH device for internal snapshot

2016-01-12 Thread Denis V. Lunev
On 01/12/2016 06:20 PM, Kevin Wolf wrote: Am 12.01.2016 um 15:59 hat Paolo Bonzini geschrieben: On 12/01/2016 15:16, Kevin Wolf wrote: Thus we should avoid selection of "pflash" drives for VM state saving. For now "pflash" is read-write raw image as it configured by libvirt. Thus there are

Re: [Qemu-block] [Qemu-devel] [PATCH 1/1] blk: do not select PFLASH device for internal snapshot

2016-01-12 Thread Denis V. Lunev
On 01/12/2016 08:50 PM, Kevin Wolf wrote: Am 12.01.2016 um 18:40 hat Markus Armbruster geschrieben: Kevin Wolf <kw...@redhat.com> writes: Am 12.01.2016 um 17:35 hat Denis V. Lunev geschrieben: On 01/12/2016 06:47 PM, Denis V. Lunev wrote: On 01/12/2016 06:20 PM, Kevin Wolf wrot

Re: [Qemu-block] [PATCH 1/1] blk: do not select PFLASH device for internal snapshot

2016-01-12 Thread Denis V. Lunev
On 01/12/2016 07:52 PM, Kevin Wolf wrote: Am 12.01.2016 um 17:35 hat Denis V. Lunev geschrieben: On 01/12/2016 06:47 PM, Denis V. Lunev wrote: On 01/12/2016 06:20 PM, Kevin Wolf wrote: Am 12.01.2016 um 15:59 hat Paolo Bonzini geschrieben: On 12/01/2016 15:16, Kevin Wolf wrote: Thus we

Re: [Qemu-block] [PATCH 1/1] blk: do not select PFLASH device for internal snapshot

2016-01-12 Thread Denis V. Lunev
On 01/12/2016 06:47 PM, Denis V. Lunev wrote: On 01/12/2016 06:20 PM, Kevin Wolf wrote: Am 12.01.2016 um 15:59 hat Paolo Bonzini geschrieben: On 12/01/2016 15:16, Kevin Wolf wrote: Thus we should avoid selection of "pflash" drives for VM state saving. For now "pflash&quo

Re: [Qemu-block] [PATCH 5/5] qemu-img bench: Add --flush-interval

2016-06-03 Thread Denis V. Lunev
On 06/03/2016 03:30 PM, Kevin Wolf wrote: This options allows to flush the image periodically during write tests. Signed-off-by: Kevin Wolf This pattern could be a bit different - you wait requests to finish and after that start flush. In this case there is no gain with my

Re: [Qemu-block] [PATCH 2/5] qemu-img bench: Sequential writes

2016-06-03 Thread Denis V. Lunev
On 06/03/2016 03:30 PM, Kevin Wolf wrote: This extends qemu-img bench with an option that makes it use sequential writes instead of reads for the test run. Signed-off-by: Kevin Wolf --- qemu-img-cmds.hx | 4 ++-- qemu-img.c | 24 +++-

Re: [Qemu-block] [PATCH] mirror: add target-zeroed flag

2016-06-03 Thread Denis V. Lunev
On 06/03/2016 06:06 PM, Eric Blake wrote: On 06/03/2016 08:05 AM, Vladimir Sementsov-Ogievskiy wrote: Add target-zeroed flag to allow user specify that target is already zeroed. With this flag set zeroes which was in source before mirror start will not be copyed. With this flag set, any runs

Re: [Qemu-block] [PATCH 3/5] trace: enable tracing in qemu-nbd

2016-06-03 Thread Denis V. Lunev
On 06/03/2016 05:46 PM, Eric Blake wrote: On 06/02/2016 12:35 PM, Denis V. Lunev wrote: Please note, trace_init_backends() must be called in the final process, i.e. after daemonization. This is necessary to keep tracing thread in the proper process. Signed-off-by: Denis V. Lunev &l

Re: [Qemu-block] [PATCH 5/5] trace: enable tracing in qemu-img

2016-06-03 Thread Denis V. Lunev
On 06/03/2016 05:55 PM, Eric Blake wrote: On 06/02/2016 12:35 PM, Denis V. Lunev wrote: The command will work this way: qemu-img --trace qcow2* create -f qcow2 1.img 64G Signed-off-by: Denis V. Lunev <d...@openvz.org> Suggested by: Daniel P. Berrange <berra...@redhat.com> CC

Re: [Qemu-block] [PATCH 4/5] qemu-img bench: Implement -S (step size)

2016-06-06 Thread Denis V. Lunev
en by @var{offset}, each following request increases +the current position by @var{step_size}. If @var{step_size} is not given, +@var{buffer_size} is used for its value. If @code{-n} is specified, the native AIO backend is used if possible. On Linux, this option only works if @code{-t none} or @code{-t directsync} is Reviewed-by: Denis V. Lunev <d...@openvz.org>

Re: [Qemu-block] [PATCH 3/5] qemu-img bench: Make start offset configurable

2016-06-06 Thread Denis V. Lunev
nd with @var{depth} requests in parallel. The first request +starts at the position given by @var{offset}. If @code{-n} is specified, the native AIO backend is used if possible. On Linux, this option only works if @code{-t none} or @code{-t directsync} is Reviewed-by: Denis V. Lunev <d...@openvz.org>

Re: [Qemu-block] [PATCH 1/5] qemu-img bench

2016-06-06 Thread Denis V. Lunev
allel. + +If @code{-n} is specified, the native AIO backend is used if possible. On +Linux, this option only works if @code{-t none} or @code{-t directsync} is +specified as well. + @item check [-f @var{fmt}] [--output=@var{ofmt}] [-r [leaks | all]] [-T @var{src_cache}] @var{filename} Perform a consistency check on the disk image @var{filename}. The command can Reviewed-by: Denis V. Lunev <d...@openvz.org>

[Qemu-block] [PATCH 1/1] mirror: add target-zeroed flag

2016-06-03 Thread Denis V. Lunev
th new flag on, migration of 16Tb empty disk takes about a minute. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> Signed-off-by: Denis V. Lunev <d...@openvz.org> CC: Jeff Cody <jc...@redhat.com> CC: Markus Armbruster <arm...@redhat.com> CC: Eric Blake

Re: [Qemu-block] [PATCH] mirror: add target-zeroed flag

2016-06-11 Thread Denis V. Lunev
On 06/10/2016 07:59 PM, Stefan Hajnoczi wrote: On Tue, Jun 07, 2016 at 07:30:19PM +0300, Vladimir Sementsov-Ogievskiy wrote: On 03.06.2016 18:45, Denis V. Lunev wrote: On 06/03/2016 06:06 PM, Eric Blake wrote: On 06/03/2016 08:05 AM, Vladimir Sementsov-Ogievskiy wrote: Add target-zeroed flag

[Qemu-block] [PATCH 4/6] trace: enable tracing in qemu-nbd

2016-06-13 Thread Denis V. Lunev
Please note, trace_init_backends() must be called in the final process, i.e. after daemonization. This is necessary to keep tracing thread in the proper process. Signed-off-by: Denis V. Lunev <d...@openvz.org> CC: Eric Blake <ebl...@redhat.com> CC: Paolo Bonzini <pbonz...@redhat.

[Qemu-block] [PATCH v4 0/6] trace: enable tracing in qemu-io/qemu-nbd/qemu-img

2016-06-13 Thread Denis V. Lunev
happened when invoked as './qemu-img -K' Changes from v2: - tweaked man-pages of qemu-nbd/qemu-img - added support for qemu-img (patches 4-5 as suggested) Changes from v1: - fixed nits found by Eric Signed-off-by: Denis V. Lunev <d...@openvz.org> CC: Eric Blake <ebl...@redhat.com> CC: P

[Qemu-block] [PATCH 6/6] trace: enable tracing in qemu-img

2016-06-13 Thread Denis V. Lunev
The command will work this way: qemu-img --trace qcow2* create -f qcow2 1.img 64G Signed-off-by: Denis V. Lunev <d...@openvz.org> Suggested by: Daniel P. Berrange <berra...@redhat.com> CC: Eric Blake <ebl...@redhat.com> CC: Paolo Bonzini <pbonz...@redhat.com> CC

[Qemu-block] [PATCH 2/6] trace: move qemu_trace_opts to trace/control.c

2016-06-13 Thread Denis V. Lunev
The patch also creates trace_opt_parse() helper in trace/control.c to reuse this code in next patches for qemu-nbd and qemu-io. The patch also makes trace_init_events() static, as this call is not used outside the module anymore. Signed-off-by: Denis V. Lunev <d...@openvz.org> Reviewed-by

[Qemu-block] [PATCH 3/6] trace: enable tracing in qemu-io

2016-06-13 Thread Denis V. Lunev
Moving trace_init_backends() into trace_opt_parse() is not possible. This should be called after daemonize() in vl.c. Signed-off-by: Denis V. Lunev <d...@openvz.org> Reviewed-by: Eric Blake <ebl...@redhat.com> CC: Paolo Bonzini <pbonz...@redhat.com> CC: Stefan Hajnoczi <st

[Qemu-block] [PATCH 5/6] qemu-img: move common options parsing before commands processing

2016-06-13 Thread Denis V. Lunev
This is necessary to enable creation of common qemu-img options which will be specified before command. The patch also enables '-V' alias to '--version' (exactly like in other block utilities) and documents this change. Signed-off-by: Denis V. Lunev <d...@openvz.org> CC: Eric Blak

[Qemu-block] [PATCH 1/6] doc: move text describing --trace to specific .texi file

2016-06-13 Thread Denis V. Lunev
This text will be included to qemu-nbd/qemu-img mans in the next patches. Signed-off-by: Denis V. Lunev <d...@openvz.org> CC: Eric Blake <ebl...@redhat.com> CC: Paolo Bonzini <pbonz...@redhat.com> CC: Stefan Hajnoczi <stefa...@redhat.com> CC: Kevin Wolf <kw..

[Qemu-block] [PATCH 4/7] trace: enable tracing in qemu-io

2016-06-14 Thread Denis V. Lunev
Moving trace_init_backends() into trace_opt_parse() is not possible. This should be called after daemonize() in vl.c. Signed-off-by: Denis V. Lunev <d...@openvz.org> Reviewed-by: Eric Blake <ebl...@redhat.com> CC: Paolo Bonzini <pbonz...@redhat.com> CC: Stefan Hajnoczi <st

[Qemu-block] [PATCH 6/7] qemu-img: move common options parsing before commands processing

2016-06-14 Thread Denis V. Lunev
This is necessary to enable creation of common qemu-img options which will be specified before command. The patch also enables '-V' alias to '--version' (exactly like in other block utilities) and documents this change. Signed-off-by: Denis V. Lunev <d...@openvz.org> Reviewed-by: Eric Blak

[Qemu-block] [PATCH 6/7] qemu-img: move common options parsing before commands processing

2016-06-14 Thread Denis V. Lunev
This is necessary to enable creation of common qemu-img options which will be specified before command. The patch also enables '-V' alias to '--version' (exactly like in other block utilities) and documents this change. Signed-off-by: Denis V. Lunev <d...@openvz.org> Reviewed-by: Eric Blak

[Qemu-block] [PATCH 5/7] trace: enable tracing in qemu-nbd

2016-06-14 Thread Denis V. Lunev
Please note, trace_init_backends() must be called in the final process, i.e. after daemonization. This is necessary to keep tracing thread in the proper process. Signed-off-by: Denis V. Lunev <d...@openvz.org> CC: Eric Blake <ebl...@redhat.com> CC: Paolo Bonzini <pbonz...@redhat.

[Qemu-block] [PATCH v6 0/7] trace: enable tracing in qemu-io/qemu-nbd/qemu-img

2016-06-14 Thread Denis V. Lunev
support for qemu-img (patches 4-5 as suggested) Changes from v1: - fixed nits found by Eric Signed-off-by: Denis V. Lunev <d...@openvz.org> CC: Eric Blake <ebl...@redhat.com> CC: Paolo Bonzini <pbonz...@redhat.com> CC: Stefan Hajnoczi <stefa...@redhat.com> CC: Kevin Wolf <

[Qemu-block] [PATCH 2/7] doc: sync help descriprion for --trace with man for qemu.1

2016-06-14 Thread Denis V. Lunev
Signed-off-by: Denis V. Lunev <d...@openvz.org> CC: Eric Blake <ebl...@redhat.com> CC: Paolo Bonzini <pbonz...@redhat.com> CC: Stefan Hajnoczi <stefa...@redhat.com> CC: Kevin Wolf <kw...@redhat.com> --- qemu-options.hx | 2 +- 1 file changed, 1 insertion(+), 1

[Qemu-block] [PATCH 5/7] trace: enable tracing in qemu-nbd

2016-06-14 Thread Denis V. Lunev
Please note, trace_init_backends() must be called in the final process, i.e. after daemonization. This is necessary to keep tracing thread in the proper process. Signed-off-by: Denis V. Lunev <d...@openvz.org> CC: Eric Blake <ebl...@redhat.com> CC: Paolo Bonzini <pbonz...@redhat.

[Qemu-block] [PATCH 3/7] trace: move qemu_trace_opts to trace/control.c

2016-06-14 Thread Denis V. Lunev
The patch also creates trace_opt_parse() helper in trace/control.c to reuse this code in next patches for qemu-nbd and qemu-io. The patch also makes trace_init_events() static, as this call is not used outside the module anymore. Signed-off-by: Denis V. Lunev <d...@openvz.org> Reviewed-by

[Qemu-block] [PATCH 7/7] trace: enable tracing in qemu-img

2016-06-14 Thread Denis V. Lunev
The command will work this way: qemu-img --trace qcow2* create -f qcow2 1.img 64G Signed-off-by: Denis V. Lunev <d...@openvz.org> Suggested by: Daniel P. Berrange <berra...@redhat.com> CC: Eric Blake <ebl...@redhat.com> CC: Paolo Bonzini <pbonz...@redhat.com> CC

[Qemu-block] [PATCH 2/7] doc: sync help descriprion for --trace with man for qemu.1

2016-06-14 Thread Denis V. Lunev
Signed-off-by: Denis V. Lunev <d...@openvz.org> CC: Eric Blake <ebl...@redhat.com> CC: Paolo Bonzini <pbonz...@redhat.com> CC: Stefan Hajnoczi <stefa...@redhat.com> CC: Kevin Wolf <kw...@redhat.com> --- qemu-options.hx | 2 +- 1 file changed, 1 insertion(+), 1

[Qemu-block] [PATCH 7/7] trace: enable tracing in qemu-img

2016-06-14 Thread Denis V. Lunev
The command will work this way: qemu-img --trace qcow2* create -f qcow2 1.img 64G Signed-off-by: Denis V. Lunev <d...@openvz.org> Suggested by: Daniel P. Berrange <berra...@redhat.com> CC: Eric Blake <ebl...@redhat.com> CC: Paolo Bonzini <pbonz...@redhat.com> CC

[Qemu-block] [PATCH 4/7] trace: enable tracing in qemu-io

2016-06-14 Thread Denis V. Lunev
Moving trace_init_backends() into trace_opt_parse() is not possible. This should be called after daemonize() in vl.c. Signed-off-by: Denis V. Lunev <d...@openvz.org> Reviewed-by: Eric Blake <ebl...@redhat.com> CC: Paolo Bonzini <pbonz...@redhat.com> CC: Stefan Hajnoczi <st

[Qemu-block] [PATCH v5 0/7] trace: enable tracing in qemu-io/qemu-nbd/qemu-img

2016-06-14 Thread Denis V. Lunev
from v1: - fixed nits found by Eric Signed-off-by: Denis V. Lunev <d...@openvz.org> CC: Eric Blake <ebl...@redhat.com> CC: Paolo Bonzini <pbonz...@redhat.com> CC: Stefan Hajnoczi <stefa...@redhat.com> CC: Kevin Wolf <kw...@redhat.com> Denis V. Lunev (7): doc

[Qemu-block] [PATCH 3/7] trace: move qemu_trace_opts to trace/control.c

2016-06-14 Thread Denis V. Lunev
The patch also creates trace_opt_parse() helper in trace/control.c to reuse this code in next patches for qemu-nbd and qemu-io. The patch also makes trace_init_events() static, as this call is not used outside the module anymore. Signed-off-by: Denis V. Lunev <d...@openvz.org> Reviewed-by

[Qemu-block] [PATCH 1/7] doc: move text describing --trace to specific .texi file

2016-06-14 Thread Denis V. Lunev
This text will be included to qemu-nbd/qemu-img mans in the next patches. Signed-off-by: Denis V. Lunev <d...@openvz.org> CC: Eric Blake <ebl...@redhat.com> CC: Paolo Bonzini <pbonz...@redhat.com> CC: Stefan Hajnoczi <stefa...@redhat.com> CC: Kevin Wolf <kw..

[Qemu-block] [PATCH 1/7] doc: move text describing --trace to specific .texi file

2016-06-14 Thread Denis V. Lunev
This text will be included to qemu-nbd/qemu-img mans in the next patches. Signed-off-by: Denis V. Lunev <d...@openvz.org> CC: Eric Blake <ebl...@redhat.com> CC: Paolo Bonzini <pbonz...@redhat.com> CC: Stefan Hajnoczi <stefa...@redhat.com> CC: Kevin Wolf <kw..

Re: [Qemu-block] [PATCH v5 0/7] trace: enable tracing in qemu-io/qemu-nbd/qemu-img

2016-06-14 Thread Denis V. Lunev
On 06/14/2016 12:16 PM, Denis V. Lunev wrote: Changes from v4: - synced help descriprion for --trace with man for qemu.1/qemu-img.1/qemu-nbd.8 - moved @findex from qemu-option-trace.texi Changes from v3: - fixed difference in help/man for qemu-img/qemu-nbd - created separate .texi to contain

[Qemu-block] [PATCH 5/9] mirror: improve performance of mirroring of empty disk

2016-06-14 Thread Denis V. Lunev
We should not take into account zero blocks for delay calculations. They are not read and thus IO throttling is not required. In the other case VM migration with 16 Tb QCOW2 disk with 4 Gb of data takes days. Signed-off-by: Denis V. Lunev <d...@openvz.org> Reviewed-by: Vladimir Sem

[Qemu-block] [PATCH 9/9] mirror: replace bdrv_dirty_bitmap with plain hbitmap

2016-06-14 Thread Denis V. Lunev
We have replaced the mechanics of syncing new writes in the previous patch and thus do not need to track dirty changes anymore. Signed-off-by: Denis V. Lunev <d...@openvz.org> Reviewed-by: Vladimir Sementsov-Ogievskiy<vsement...@virtuozzo.com> CC: Stefan Hajnoczi <stefa...@redh

[Qemu-block] [PATCH 1/9] mirror: fix calling of blk_aio_pwritev/blk_aio_preadv

2016-06-14 Thread Denis V. Lunev
4th argument is flags rather than size. Fortunately flags occupies 5 less significant bits and they are always zero due to alignment. Signed-off-by: Denis V. Lunev <d...@openvz.org> Reviewed-by: Vladimir Sementsov-Ogievskiy<vsement...@virtuozzo.com> CC: Stefan Hajnoczi <stefa...

[Qemu-block] [PATCH 4/9] mirror: efficiently zero out target

2016-06-14 Thread Denis V. Lunev
supports write_zeroes. Signed-off-by: Denis V. Lunev <d...@openvz.org> Reviewed-by: Vladimir Sementsov-Ogievskiy<vsement...@virtuozzo.com> CC: Stefan Hajnoczi <stefa...@redhat.com> CC: Fam Zheng <f...@redhat.com> CC: Kevin Wolf <kw...@redhat.com> CC: Max Reitz <mre

[Qemu-block] [PATCH 0/9] major rework of drive-mirror

2016-06-14 Thread Denis V. Lunev
hing more intelligent and switch to sync mirroring just after the first pass over the bitmap. Though this could be done relatively easily during discussion. The most difficult things are here. The set also adds some performance improvements dealing with known-to-be-zero areas. Signed-off-by: Deni

[Qemu-block] [PATCH 6/9] block: pass qiov into before_write notifier

2016-06-14 Thread Denis V. Lunev
Signed-off-by: Denis V. Lunev <d...@openvz.org> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> CC: Stefan Hajnoczi <stefa...@redhat.com> CC: Fam Zheng <f...@redhat.com> CC: Kevin Wolf <kw...@redhat.com> CC: Max Reitz <mre...@redhat.com>

[Qemu-block] [PATCH 7/9] mirror: allow to save buffer for QEMUIOVector in MirrorOp

2016-06-14 Thread Denis V. Lunev
Properly cook MirrorOp initialization/deinitialization. The field is not yet used actually. Signed-off-by: Denis V. Lunev <d...@openvz.org> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsement...@virtuozzo.com> CC: Stefan Hajnoczi <stefa...@redhat.com> CC: Fam Zheng <f...@redha

[Qemu-block] [PATCH 2/9] mirror: create mirror_dirty_init helper for mirror_run

2016-06-14 Thread Denis V. Lunev
The code inside the helper will be extended in the next patch. mirror_run itself is overbloated at the moment. Signed-off-by: Denis V. Lunev <d...@openvz.org> Reviewed-by: Vladimir Sementsov-Ogievskiy<vsement...@virtuozzo.com> CC: Stefan Hajnoczi <stefa...@redhat.com>

[Qemu-block] [PATCH 3/9] mirror: optimize dirty bitmap filling in mirror_run a bit

2016-06-14 Thread Denis V. Lunev
There is no need to scan allocation tables if we have mark_all_dirty flag set. Just mark it all dirty. Signed-off-by: Denis V. Lunev <d...@openvz.org> Reviewed-by: Vladimir Sementsov-Ogievskiy<vsement...@virtuozzo.com> CC: Stefan Hajnoczi <stefa...@redhat.com> CC: Fam Zheng &l

[Qemu-block] [PATCH 8/9] mirror: use synch scheme for drive mirror

2016-06-14 Thread Denis V. Lunev
back. In this case all data written from the guest is synchnonously written to the mirror target. Though the problem is solved partially. We should switch from bdrv_dirty_bitmap to simple hbitmap. This will be done in the next patch. Signed-off-by: Denis V. Lunev <d...@openvz.org> Reviewed-by: V

Re: [Qemu-block] [Qemu-devel] [PATCH 5/9] mirror: improve performance of mirroring of empty disk

2016-06-15 Thread Denis V. Lunev
On 06/15/2016 12:19 PM, Stefan Hajnoczi wrote: On Tue, Jun 14, 2016 at 09:20:47PM -0600, Eric Blake wrote: On 06/14/2016 09:25 AM, Denis V. Lunev wrote: We should not take into account zero blocks for delay calculations. They are not read and thus IO throttling is not required. In the other

Re: [Qemu-block] [PATCH 8/9] mirror: use synch scheme for drive mirror

2016-06-15 Thread Denis V. Lunev
On 06/15/2016 07:18 AM, Eric Blake wrote: On 06/14/2016 09:25 AM, Denis V. Lunev wrote: Block commit of the active image to the backing store on a slow disk could never end. For example with the guest with the following loop inside while true; do dd bs=1k count=1 if=/dev/zero of=x

Re: [Qemu-block] [PATCH 0/9] major rework of drive-mirror

2016-06-15 Thread Denis V. Lunev
On 06/15/2016 12:06 PM, Kevin Wolf wrote: Am 14.06.2016 um 17:25 hat Denis V. Lunev geschrieben: Block commit of the active image to the backing store on a slow disk could never end. For example with the guest with the following loop inside while true; do dd bs=1k count=1 if=/dev

Re: [Qemu-block] [PATCH 0/9] major rework of drive-mirror

2016-06-15 Thread Denis V. Lunev
On 06/15/2016 01:25 PM, Kevin Wolf wrote: Am 15.06.2016 um 11:34 hat Denis V. Lunev geschrieben: On 06/15/2016 12:06 PM, Kevin Wolf wrote: The second big thing is that I don't want to see new users of the notifiers in I/O functions. Let's try if we can't add a filter BlockDriver instead

Re: [Qemu-block] [PATCH 3/9] mirror: optimize dirty bitmap filling in mirror_run a bit

2016-06-15 Thread Denis V. Lunev
On 06/15/2016 05:36 AM, Eric Blake wrote: On 06/14/2016 09:25 AM, Denis V. Lunev wrote: There is no need to scan allocation tables if we have mark_all_dirty flag set. Just mark it all dirty. Signed-off-by: Denis V. Lunev <d...@openvz.org> Reviewed-by: Vladimir Sementsov-Ogievskiy&l

Re: [Qemu-block] [PATCH 4/9] mirror: efficiently zero out target

2016-06-15 Thread Denis V. Lunev
On 06/15/2016 06:00 AM, Eric Blake wrote: On 06/14/2016 09:25 AM, Denis V. Lunev wrote: With a bdrv_co_write_zeroes method on a target BDS zeroes will not be placed into the wire. Thus the target could be very efficiently zeroed out. This is should be done with the largest chunk possible

Re: [Qemu-block] [PATCH 4/9] mirror: efficiently zero out target

2016-06-15 Thread Denis V. Lunev
On 06/15/2016 03:34 PM, Eric Blake wrote: On 06/15/2016 02:46 AM, Denis V. Lunev wrote: On 06/15/2016 06:00 AM, Eric Blake wrote: On 06/14/2016 09:25 AM, Denis V. Lunev wrote: With a bdrv_co_write_zeroes method on a target BDS zeroes will not be placed into the wire. Thus the target could

[Qemu-block] [PATCH 1/1] qcow2: avoid extra flushes in qcow2

2016-06-02 Thread Denis V. Lunev
in the current code base as this ordering is ensured through the flush in qcow2_cache_flush_dependency(). Signed-off-by: Denis V. Lunev <d...@openvz.org> CC: Pavel Borzenkov <pborzen...@virtuozzo.com> CC: Kevin Wolf <kw...@redhat.com> CC: Max Reitz <mre...@redhat.com> --- Ch

[Qemu-block] [PATCH 2/5] trace: enable tracing in qemu-io

2016-06-02 Thread Denis V. Lunev
Moving trace_init_backends() into trace_opt_parse() is not possible. This should be called after daemonize() in vl.c. Signed-off-by: Denis V. Lunev <d...@openvz.org> Reviewed-by: Eric Blake <ebl...@redhat.com> CC: Paolo Bonzini <pbonz...@redhat.com> CC: Stefan Hajnoczi <st

[Qemu-block] [PATCH v3 0/5] trace: enable tracing in qemu-io/qemu-nbd/qemu-img

2016-06-02 Thread Denis V. Lunev
Changes from v2: - tweaked man-pages of qemu-nbd/qemu-img - added support for qemu-img (patches 4-5 as suggested) Changes from v1: - fixed nits found by Eric Signed-off-by: Denis V. Lunev <d...@openvz.org> CC: Eric Blake <ebl...@redhat.com> CC: Paolo Bonzini <pbonz...@redhat.

  1   2   3   4   5   6   7   8   9   10   >