[Qemu-devel] [PATCH 3/3] block/parallels: fix access to not initialized memory in catalog_bitmap

2014-10-08 Thread Denis V. Lunev
s->catalog_bitmap is allocated/filled as gmalloc(s->catalog_size) thus index validity check must be inclusive, i.e. index >= s->catalog_size is invalid. Signed-off-by: Denis V. Lunev CC: Jeff Cody CC: Kevin Wolf CC: Stefan Hajnoczi --- block/parallels.c | 2 +- 1 file changed,

[Qemu-devel] [PATCH 0/3] parallels: additional iotests and a minor bugfix

2014-10-08 Thread Denis V. Lunev
Pls find here test authentic test material, i.e. parallels images with "WithoutFreeSpace" and "WithouFreSpacExt" signatures created in authentic way + a minor bug fix for access to non-initialized memory found by valgrind. Signed-off-by: Denis V. Lunev CC: Jeff Cody CC: Ke

[Qemu-devel] [PATCH 2/3] iotests: add v2 parallels sample image and simple test for it

2014-10-08 Thread Denis V. Lunev
This is simple test image for the following commit made by me. commit d25d59802021a747812472780d80a0e792078f40 Author: Denis V. Lunev Date: Mon Jul 28 20:23:55 2014 +0400 parallels: 2TB+ parallels images support Signed-off-by: Denis V. Lunev CC: Jeff Cody CC: Kevin Wolf CC

[Qemu-devel] [PATCH 1/3] iotests: replace fake parallels image with authentic one

2014-10-08 Thread Denis V. Lunev
The image was generated using http://openvz.org/Ploop utility and properly filled with the same content as original one. Signed-off-by: Denis V. Lunev CC: Jeff Cody CC: Kevin Wolf CC: Stefan Hajnoczi --- tests/qemu-iotests/076 | 10 +- tests/qemu-iotests

Re: [Qemu-devel] [PATCH 0/3] parallels: additional iotests and a minor bugfix

2014-10-20 Thread Denis V. Lunev
On 08/10/14 13:13, Denis V. Lunev wrote: Pls find here test authentic test material, i.e. parallels images with "WithoutFreeSpace" and "WithouFreSpacExt" signatures created in authentic way + a minor bug fix for access to non-initialized memory found by valgrind. Signed-of

[Qemu-devel] [PATCH 7/9] block/parallels: support padded Parallels images

2014-10-27 Thread Denis V. Lunev
-8% according to the statistics in my hands. This patch obtains proper value from XML and applies it on reading. Signed-off-by: Denis V. Lunev Acked-by: Roman Kagan CC: Jeff Cody CC: Kevin Wolf CC: Stefan Hajnoczi --- block/parallels.c | 19 +++ 1 file changed, 19 insertions(+)

[Qemu-devel] [PATCH 1/9] iotests: replace fake parallels image with authentic one

2014-10-27 Thread Denis V. Lunev
The image was generated using http://openvz.org/Ploop utility and properly filled with the same content as original one. Signed-off-by: Denis V. Lunev Reviewed-by: Paolo Bonzini CC: Jeff Cody CC: Kevin Wolf CC: Stefan Hajnoczi --- tests/qemu-iotests/076 | 10

[Qemu-devel] [PATCH 4/9] configure: add dependency from libxml2

2014-10-27 Thread Denis V. Lunev
understand libxml2 types. In the other case there is the following false positive: ERROR: need consistent spacing around '*' (ctx:WxB) #210: FILE: block/parallels.c:232: + !xmlStrcmp(root->name, (const xmlChar *)"Parallels_disk_image")) Signed-off-by: Denis V.

[Qemu-devel] [PATCH 6/9] iotests: simple parallels XML disk descriptor file test added

2014-10-27 Thread Denis V. Lunev
Signed-off-by: Denis V. Lunev Acked-by: Roman Kagan CC: Jeff Cody CC: Kevin Wolf CC: Stefan Hajnoczi --- tests/qemu-iotests/076| 6 ++ tests/qemu-iotests/076.out| 4 tests/qemu-iotests/sample_images/parallels

[Qemu-devel] [PATCH 2/9] iotests: add v2 parallels sample image and simple test for it

2014-10-27 Thread Denis V. Lunev
This is simple test image for the following commit made by me. commit d25d59802021a747812472780d80a0e792078f40 Author: Denis V. Lunev Date: Mon Jul 28 20:23:55 2014 +0400 parallels: 2TB+ parallels images support Signed-off-by: Denis V. Lunev Reviewed-by: Paolo Bonzini CC

[Qemu-devel] [PATCH 5/9] block/parallels: allow to specify DiskDescriptor.xml instead of image file

2014-10-27 Thread Denis V. Lunev
ter with more features added. Signed-off-by: Denis V. Lunev Acked-by: Roman Kagan CC: Jeff Cody CC: Kevin Wolf CC: Stefan Hajnoczi --- block/parallels.c | 231 -- 1 file changed, 226 insertions(+), 5 deletions(-) diff --git a/block/parallels.

[Qemu-devel] [PATCH 0/9] parallels format support improvements

2014-10-27 Thread Denis V. Lunev
This patchset contains my previous patchset sent originally 08.10.2014 with minor Valgrind fix and iotests update as a base. The patchset implements additional compatibility bits for Parallels format: - initial support of parsing of Parallels DiskDeskriptor.xml Typically Parallels disk bundle co

[Qemu-devel] [PATCH 3/9] block/parallels: fix access to not initialized memory in catalog_bitmap

2014-10-27 Thread Denis V. Lunev
s->catalog_bitmap is allocated/filled as gmalloc(s->catalog_size) thus index validity check must be inclusive, i.e. index >= s->catalog_size is invalid. Signed-off-by: Denis V. Lunev Reviewed-by: Paolo Bonzini CC: Jeff Cody CC: Kevin Wolf CC: Stefan Hajnoczi --- block/parallels

[Qemu-devel] [PATCH 9/9] parallels: change copyright information in the image header

2014-10-27 Thread Denis V. Lunev
Signed-off-by: Denis V. Lunev Acked-by: Roman Kagan CC: Jeff Cody CC: Kevin Wolf CC: Stefan Hajnoczi --- block/parallels.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/block/parallels.c b/block/parallels.c index d07e4f7..1491211 100644 --- a/block/parallels.c +++ b

[Qemu-devel] [PATCH 8/9] iotests: padded parallels image test

2014-10-27 Thread Denis V. Lunev
created in authentic way. Signed-off-by: Denis V. Lunev Acked-by: Roman Kagan CC: Jeff Cody CC: Kevin Wolf CC: Stefan Hajnoczi --- tests/qemu-iotests/076| 6 ++ tests/qemu-iotests/076.out| 4 tests/qemu-iotests/sam

[Qemu-devel] [PATCH 3/6] iotests: simple parallels XML disk descriptor file test added

2014-10-29 Thread Denis V. Lunev
Signed-off-by: Denis V. Lunev Acked-by: Roman Kagan CC: Jeff Cody CC: Kevin Wolf CC: Stefan Hajnoczi --- tests/qemu-iotests/076| 6 ++ tests/qemu-iotests/076.out| 4 tests/qemu-iotests/sample_images/parallels

[Qemu-devel] [PATCH 1/6] configure: add dependency from libxml2

2014-10-29 Thread Denis V. Lunev
understand libxml2 types. In the other case there is the following false positive: ERROR: need consistent spacing around '*' (ctx:WxB) #210: FILE: block/parallels.c:232: + !xmlStrcmp(root->name, (const xmlChar *)"Parallels_disk_image")) Signed-off-by: Denis V.

[Qemu-devel] [PATCH 2/6] block/parallels: allow to specify DiskDescriptor.xml instead of image file

2014-10-29 Thread Denis V. Lunev
ter with more features added. Signed-off-by: Denis V. Lunev Acked-by: Roman Kagan CC: Jeff Cody CC: Kevin Wolf CC: Stefan Hajnoczi --- block/parallels.c | 231 -- 1 file changed, 226 insertions(+), 5 deletions(-) diff --git a/block/parallels.

[Qemu-devel] [PATCH 6/6] parallels: change copyright information in the image header

2014-10-29 Thread Denis V. Lunev
Signed-off-by: Denis V. Lunev Acked-by: Roman Kagan CC: Jeff Cody CC: Kevin Wolf CC: Stefan Hajnoczi --- block/parallels.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/block/parallels.c b/block/parallels.c index d07e4f7..1491211 100644 --- a/block/parallels.c +++ b

[Qemu-devel] [PATCH 4/6] block/parallels: support padded Parallels images

2014-10-29 Thread Denis V. Lunev
-8% according to the statistics in my hands. This patch obtains proper value from XML and applies it on reading. Signed-off-by: Denis V. Lunev Acked-by: Roman Kagan CC: Jeff Cody CC: Kevin Wolf CC: Stefan Hajnoczi --- block/parallels.c | 19 +++ 1 file changed, 19 insertions(+)

[Qemu-devel] [PATCH v2 0/6] parallels format support improvements

2014-10-29 Thread Denis V. Lunev
The patchset implements additional compatibility bits for Parallels format: - initial support of parsing of Parallels DiskDeskriptor.xml Typically Parallels disk bundle consists of several images which are glued by XML disk descriptor. Also XML hides inside several important parameters which

[Qemu-devel] [PATCH 5/6] iotests: padded parallels image test

2014-10-29 Thread Denis V. Lunev
created in authentic way. Signed-off-by: Denis V. Lunev Acked-by: Roman Kagan CC: Jeff Cody CC: Kevin Wolf CC: Stefan Hajnoczi --- tests/qemu-iotests/076| 6 ++ tests/qemu-iotests/076.out| 4 tests/qemu-iotests/sam

[Qemu-devel] [PATCH 3/4] block/parallels: split check for parallels format in parallels_open

2014-07-22 Thread Denis V. Lunev
and rework error path a bit. There is no difference at the moment, but the code will be definitely shorter when additional processing will be required for WithouFreSpacExt Signed-off-by: Denis V. Lunev CC: Kevin Wolf CC: Stefan Hajnoczi --- block/parallels.c | 13 +++-- 1 file changed

[Qemu-devel] [PATCH 0/4] block/parallels: 2TB+ parallels images support

2014-07-22 Thread Denis V. Lunev
to code the virtual disk size for such images nb_sectors field is extended to 64 bits. The reader of older images with signature WithoutFreeSpace must manually zero most valuable bits of nb_sectors on open. Signed-off-by: Denis V. Lunev CC: Kevin Wolf CC: Stefan Hajnoczi

[Qemu-devel] [PATCH 2/4] block/parallels: replace tabs with spaces in block/parallels.c

2014-07-22 Thread Denis V. Lunev
Signed-off-by: Denis V. Lunev CC: Kevin Wolf CC: Stefan Hajnoczi --- block/parallels.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/block/parallels.c b/block/parallels.c index c44df87..8f9ec8a 100644 --- a/block/parallels.c +++ b/block/parallels.c @@ -61,11

[Qemu-devel] [PATCH 1/4] block/parallels: extend parallels format header with actual data values

2014-07-22 Thread Denis V. Lunev
s proper handling of nb_sectors for currently supported WithoutFreeSpace images. WithouFreSpacExt will be covered in the next patch. Signed-off-by: Denis V. Lunev CC: Kevin Wolf CC: Stefan Hajnoczi --- block/parallels.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git

[Qemu-devel] [PATCH 4/4] block/parallels: 2TB+ parallels images support

2014-07-22 Thread Denis V. Lunev
ase all 64 bits of header->nb_sectors are used for image size. This patch implements support of this for qemu-img. Signed-off-by: Denis V. Lunev CC: Kevin Wolf CC: Stefan Hajnoczi --- block/parallels.c | 20 +++- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a

Re: [Qemu-devel] [PATCH 1/4] block/parallels: extend parallels format header with actual data values

2014-07-25 Thread Denis V. Lunev
On 24/07/14 22:34, Jeff Cody wrote: On Tue, Jul 22, 2014 at 05:19:34PM +0400, Denis V. Lunev wrote: Parallels image format has several additional fields inside: - nb_sectors is actually 64 bit wide. Upper 32bits are not used for images with signature "WithoutFreeSpace" a

Re: [Qemu-devel] [PATCH 4/4] block/parallels: 2TB+ parallels images support

2014-07-25 Thread Denis V. Lunev
On 24/07/14 23:25, Jeff Cody wrote: On Tue, Jul 22, 2014 at 05:19:37PM +0400, Denis V. Lunev wrote: Parallels has released in the recent updates of Parallels Server 5/6 new addition to his image format. Images with signature WithouFreSpacExt have offsets in the catalog coded not as offsets in

Re: [Qemu-devel] [PATCH 3/4] block/parallels: split check for parallels format in parallels_open

2014-07-25 Thread Denis V. Lunev
On 24/07/14 22:50, Jeff Cody wrote: On Tue, Jul 22, 2014 at 05:19:36PM +0400, Denis V. Lunev wrote: and rework error path a bit. There is no difference at the moment, but the code will be definitely shorter when additional processing will be required for WithouFreSpacExt Signed-off-by: Denis V

Re: [Qemu-devel] [PATCH 4/4] block/parallels: 2TB+ parallels images support

2014-07-25 Thread Denis V. Lunev
On 25/07/14 17:08, Jeff Cody wrote: On Fri, Jul 25, 2014 at 07:51:47AM +0400, Denis V. Lunev wrote: On 24/07/14 23:25, Jeff Cody wrote: On Tue, Jul 22, 2014 at 05:19:37PM +0400, Denis V. Lunev wrote: Parallels has released in the recent updates of Parallels Server 5/6 new addition to his

[Qemu-devel] [PATCH v2 1/4] parallels: extend parallels format header with actual data values

2014-07-28 Thread Denis V. Lunev
this field does not matter for read-only driver This patch adds these values to struct parallels_header and adds proper handling of nb_sectors for currently supported WithoutFreeSpace images. WithouFreSpacExt will be covered in next patches. Signed-off-by: Denis V. Lunev CC: Kevin Wolf CC:

[Qemu-devel] [PATCH v2 2/4] parallels: replace tabs with spaces in block/parallels.c

2014-07-28 Thread Denis V. Lunev
Signed-off-by: Denis V. Lunev Reviewed-by: Jeff Cody CC: Kevin Wolf CC: Stefan Hajnoczi --- block/parallels.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/block/parallels.c b/block/parallels.c index e39..16d14ad 100644 --- a/block/parallels.c +++ b/block

[Qemu-devel] [PATCH v2 3/4] parallels: split check for parallels format in parallels_open

2014-07-28 Thread Denis V. Lunev
and rework error path a bit. There is no difference at the moment, but the code will be definitely shorter when additional processing will be required for WithouFreSpacExt Signed-off-by: Denis V. Lunev CC: Jeff Cody CC: Kevin Wolf CC: Stefan Hajnoczi --- block/parallels.c | 13

[Qemu-devel] [PATCH v2 0/4] block/parallels: 2TB+ parallels images support

2014-07-28 Thread Denis V. Lunev
in patches 3 & 4 - added check for ph.tracks in patch 4 to avoid offset overflow as suggested by Jeff Signed-off-by: Denis V. Lunev CC: Kevin Wolf CC: Stefan Hajnoczi CC: Jeff Cody

[Qemu-devel] [PATCH v2 4/4] parallels: 2TB+ parallels images support

2014-07-28 Thread Denis V. Lunev
s 1 Mb. Thus this limit will not hurt anyone. Signed-off-by: Denis V. Lunev CC: Jeff Cody CC: Kevin Wolf CC: Stefan Hajnoczi --- block/parallels.c | 25 - 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/block/parallels.c b/block/parallels.c index 4

Re: [Qemu-devel] [PATCH v2 0/4] block/parallels: 2TB+ parallels images support

2014-08-07 Thread Denis V. Lunev
On 28/07/14 20:23, Denis V. Lunev wrote: Parallels has released in the recent updates of Parallels Server 5/6 new addition to his image format. Images with signature WithouFreSpacExt have offsets in the catalog coded not as offsets in sectors (multiple of 512 bytes) but offsets coded in blocks

Re: [Qemu-devel] [PATCH v2 4/4] parallels: 2TB+ parallels images support

2014-08-07 Thread Denis V. Lunev
On 07/08/14 18:39, Jeff Cody wrote: On Mon, Jul 28, 2014 at 08:23:55PM +0400, Denis V. Lunev wrote: Parallels has released in the recent updates of Parallels Server 5/6 new addition to his image format. Images with signature WithouFreSpacExt have offsets in the catalog coded not as offsets in

Re: [Qemu-devel] [PATCH v2 4/4] parallels: 2TB+ parallels images support

2014-08-07 Thread Denis V. Lunev
On 07/08/14 19:14, Jeff Cody wrote: On Thu, Aug 07, 2014 at 07:03:12PM +0400, Denis V. Lunev wrote: On 07/08/14 18:39, Jeff Cody wrote: On Mon, Jul 28, 2014 at 08:23:55PM +0400, Denis V. Lunev wrote: Parallels has released in the recent updates of Parallels Server 5/6 new addition to his

Re: [Qemu-devel] [PATCH v2 4/4] parallels: 2TB+ parallels images support

2014-08-07 Thread Denis V. Lunev
On 07/08/14 19:22, Denis V. Lunev wrote: Another question - do you have any sample images? If they compress well (bzip2 does a good job with most blank images) it would be nice to have a couple of parallels images (e.g. one "WithouFreSpacExt" and one "WithoutFreeSpace

Re: [Qemu-devel] Wierd hack to sound/pci/intel8x0.c

2011-11-06 Thread Denis V. Lunev
On 11/6/11 6:51 PM, Avi Kivity wrote: The recently merged 228cf79376f1 ("ALSA: intel8x0: Improve performance in virtual environment") is hacky and somewhat wrong. First, the detection code + if (inside_vm< 0) { + /* detect KVM and Parallels virtual environments */ +

Re: [Qemu-devel] Wierd hack to sound/pci/intel8x0.c

2011-11-06 Thread Denis V. Lunev
On 11/6/11 8:31 PM, Avi Kivity wrote: On 11/06/2011 06:15 PM, Denis V. Lunev wrote: On 11/6/11 6:51 PM, Avi Kivity wrote: The recently merged 228cf79376f1 ("ALSA: intel8x0: Improve performance in virtual environment") is hacky and somewhat wrong. First, the detection code

Re: [Qemu-devel] Wierd hack to sound/pci/intel8x0.c

2011-11-06 Thread Denis V. Lunev
On 11/6/11 8:47 PM, Takashi Iwai wrote: At Sun, 06 Nov 2011 18:31:42 +0200, Avi Kivity wrote: On 11/06/2011 06:15 PM, Denis V. Lunev wrote: On 11/6/11 6:51 PM, Avi Kivity wrote: The recently merged 228cf79376f1 ("ALSA: intel8x0: Improve performance in virtual environment") is

Re: [Qemu-devel] [PULL 05/42] block/raw-posix: refactor handle_aiocb_write_zeroes a bit

2015-02-11 Thread Denis V. Lunev
On 12/02/15 05:29, Peter Maydell wrote: On 6 February 2015 at 16:40, Kevin Wolf wrote: From: "Denis V. Lunev" move code dealing with a block device to a separate function. This will allow to implement additional processing for ordinary files. +static ssize_t handle_aiocb_wr

[Qemu-devel] [PATCH 1/1] block/raw-posix: fix compilation warning on OSX

2015-02-11 Thread Denis V. Lunev
NGE. Fortunately, CONFIG_FALLOCATE_PUNCH_HOLE and CONFIG_FALLOCATE_ZERO_RANGE could be defined only along with CONFIG_FALLOCATE. Therefore checking for CONFIG_XFS or CONFIG_FALLOCATE would be enough. Signed-off-by: Denis V. Lunev CC: Peter Maydell CC: Kevin Wolf --- block/raw-posix.c | 2 ++ 1

Re: [Qemu-devel] [PATCH 0/3] qemu guest agent: support guest-file-* command for Windows

2015-02-12 Thread Denis V. Lunev
On 06/02/15 20:59, Denis V. Lunev wrote: This was a part of patchset implemented guest-exec command. It was suggested to submit it separately by Michael. The set contains small refactoring to fix mingw 4.9.1 compilation and safe part of the rework of posix file interface plus main Windows file

Re: [Qemu-devel] [PATCH v4 0/1] block: enforce minimal 4096 alignment in qemu_blockalign

2015-02-12 Thread Denis V. Lunev
On 06/02/15 20:37, Denis V. Lunev wrote: 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); iperforms 5% better if buf is aligned to 4096 bytes rather then to 512 bytes. I have used

Re: [Qemu-devel] [PATCH 1/2] block, raw-posix: replace 512/4096 constants with proper macros/values

2015-02-16 Thread Denis V. Lunev
On 16/02/15 13:32, Kevin Wolf wrote: Am 06.02.2015 um 18:37 hat Denis V. Lunev geschrieben: Signed-off-by: Denis V. Lunev CC: Paolo Bonzini CC: Kevin Wolf --- block.c | 10 +- block/raw-posix.c | 16 2 files changed, 13 insertions(+), 13 deletions

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

2015-02-16 Thread Denis V. Lunev
On 16/02/15 13:59, Kevin Wolf wrote: Am 06.02.2015 um 18:37 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 4

Re: [Qemu-devel] [PATCH 03/10] guest agent: guest-file-open: refactoring

2015-02-17 Thread Denis V. Lunev
On 17/02/15 18:27, Eric Blake wrote: On 02/16/2015 08:14 PM, Michael Roth wrote: From: Simon Zolin Moved the code that sets non-blocking flag on fd into a separate function. Signed-off-by: Simon Zolin Reviewed-by: Roman Kagan Signed-off-by: Denis V. Lunev CC: Michael Roth CC: Eric Blake

Re: [Qemu-devel] [PATCH 03/10] guest agent: guest-file-open: refactoring

2015-02-17 Thread Denis V. Lunev
On 17/02/15 20:56, Michael Roth wrote: Quoting Denis V. Lunev (2015-02-17 10:06:49) On 17/02/15 18:27, Eric Blake wrote: On 02/16/2015 08:14 PM, Michael Roth wrote: From: Simon Zolin Moved the code that sets non-blocking flag on fd into a separate function. Signed-off-by: Simon Zolin

Re: [Qemu-devel] [RESEND PATCH v3 0/2] balloon: add a feature bit to let Guest OS deflate virtio_balloon on OOM

2015-02-18 Thread Denis V. Lunev
On 29/01/15 17:24, Denis V. Lunev wrote: Excessive virtio_balloon inflation can cause invocation of OOM-killer, when Linux is under severe memory pressure. Various mechanisms are responsible for correct virtio_balloon memory management. Nevertheless it is often the case that these control tools

Re: [Qemu-devel] [RESEND PATCH 1/2] balloon: call qdev_alias_all_properties for proxy dev in balloon class init

2015-02-19 Thread Denis V. Lunev
On 19/02/15 12:25, Michael S. Tsirkin wrote: On Thu, Jan 29, 2015 at 05:24:41PM +0300, Denis V. Lunev wrote: The idea is that all other virtio devices are calling this helper to merge properties of the proxy device. This is the only difference in between this helper and code in inside

Re: [Qemu-devel] [RESEND PATCH 1/2] balloon: call qdev_alias_all_properties for proxy dev in balloon class init

2015-02-19 Thread Denis V. Lunev
On 19/02/15 12:39, Michael S. Tsirkin wrote: On Thu, Feb 19, 2015 at 12:36:37PM +0300, Denis V. Lunev wrote: On 19/02/15 12:25, Michael S. Tsirkin wrote: On Thu, Jan 29, 2015 at 05:24:41PM +0300, Denis V. Lunev wrote: The idea is that all other virtio devices are calling this helper to merge

Re: [Qemu-devel] [RESEND PATCH 1/2] balloon: call qdev_alias_all_properties for proxy dev in balloon class init

2015-02-19 Thread Denis V. Lunev
On 19/02/15 13:17, Michael S. Tsirkin wrote: On Thu, Feb 19, 2015 at 12:46:34PM +0300, Denis V. Lunev wrote: On 19/02/15 12:39, Michael S. Tsirkin wrote: On Thu, Feb 19, 2015 at 12:36:37PM +0300, Denis V. Lunev wrote: On 19/02/15 12:25, Michael S. Tsirkin wrote: On Thu, Jan 29, 2015 at 05:24

Re: [Qemu-devel] [PATCH 03/10] guest agent: guest-file-open: refactoring

2015-02-19 Thread Denis V. Lunev
On 17/02/15 20:59, Eric Blake wrote: On 02/17/2015 10:56 AM, Michael Roth wrote: In any case, since I was actually the one who re-invented it, and this code just moves it to another function, I think we can address it as a seperate patch and leave the PULL intact (unless there are other objectio

[Qemu-devel] [PATCH 1/2] balloon: call qdev_alias_all_properties for proxy dev in balloon class init

2015-02-26 Thread Denis V. Lunev
also allows to avoid some dummy errors like fixed by this commit 91ba21208839643603e7f7fa5864723c3f371ebe Author: Gonglei Date: Tue Sep 30 14:10:35 2014 +0800 virtio-balloon: fix virtio-balloon child refcount in transports Signed-off-by: Denis V. Lunev Signed-off-by: Raushaniya

[Qemu-devel] [PATCH 2/2] balloon: add a feature bit to let Guest OS deflate balloon on oom

2015-02-26 Thread Denis V. Lunev
. It introduces deflate-on-oom option for balloon device which does the trick. Signed-off-by: Denis V. Lunev CC: Raushaniya Maksudova CC: Anthony Liguori CC: Michael S. Tsirkin --- hw/virtio/virtio-balloon.c | 6 -- include/hw/virtio/virtio-balloon.h | 1 + 2 files changed, 5

Re: [Qemu-devel] [PATCH v2 0/8] qemu: guest agent: implement guest-exec command for Linux

2015-01-27 Thread Denis V. Lunev
On 31/12/14 16:06, Denis V. Lunev wrote: hese patches for guest-agent add the functionality to execute commands on a guest UNIX machine. These patches add the following interfaces: guest-pipe-open guest-exec guest-exec-status With these interfaces it's possible to: * Open an anonymous

[Qemu-devel] [PATCH 7/7] block/raw-posix: set max_write_zeroes to INT_MAX for regular files

2015-01-27 Thread Denis V. Lunev
fallocate() works fine and could handle properly with arbitrary size requests. There is no sense to reduce the amount of space to fallocate. The bigger is the size, the better is the performance as the amount of journal updates is reduced. Signed-off-by: Denis V. Lunev CC: Kevin Wolf CC: Stefan

[Qemu-devel] [PATCH 3/7] block/raw-posix: refactor handle_aiocb_write_zeroes a bit

2015-01-27 Thread Denis V. Lunev
ore consistent. Signed-off-by: Denis V. Lunev CC: Kevin Wolf CC: Stefan Hajnoczi CC: Peter Lieven CC: Fam Zheng --- block/raw-posix.c | 48 +--- 1 file changed, 29 insertions(+), 19 deletions(-) diff --git a/block/raw-posix.c b/block/raw-posix.c in

[Qemu-devel] [PATCH 1/7] block/raw-posix: create translate_err helper to merge errno values

2015-01-27 Thread Denis V. Lunev
actually the code if (ret == -ENODEV || ret == -ENOSYS || ret == -EOPNOTSUPP || ret == -ENOTTY) { ret = -ENOTSUP; } is present twice and will be added a couple more times. Create helper for this. Signed-off-by: Denis V. Lunev CC: Kevin Wolf CC: Stefan Hajnoczi CC: Peter

[Qemu-devel] [PATCH 6/7] block/raw-posix: call plain fallocate in handle_aiocb_write_zeroes

2015-01-27 Thread Denis V. Lunev
). This improves the performance of writing zeroes even on really old platforms which do not have even FALLOC_FL_PUNCH_HOLE. Signed-off-by: Denis V. Lunev CC: Kevin Wolf CC: Stefan Hajnoczi CC: Peter Lieven CC: Fam Zheng --- block/raw-posix.c | 10 -- 1 file changed, 8 insertions(+), 2

[Qemu-devel] [PATCH 4/7] block: use fallocate(FALLOC_FL_ZERO_RANGE) in handle_aiocb_write_zeroes

2015-01-27 Thread Denis V. Lunev
This efficiently writes zeroes on Linux if the kernel is capable enough. FALLOC_FL_ZERO_RANGE correctly handles all cases, including and not including file expansion. Signed-off-by: Denis V. Lunev CC: Kevin Wolf CC: Stefan Hajnoczi CC: Peter Lieven CC: Fam Zheng --- block/raw-posix.c | 16

[Qemu-devel] [PATCH v4 0/7] eliminate data write in bdrv_write_zeroes on Linux in raw-posix.c

2015-01-27 Thread Denis V. Lunev
of very large data areas in bdrv_co_write_zeroes (new patch 1) - set bl.max_write_zeroes to INT_MAX in raw-posix.c for regular files (new patch 8) Signed-off-by: Denis V. Lunev CC: Kevin Wolf CC: Stefan Hajnoczi CC: Peter Lieven CC: Fam Zheng

[Qemu-devel] [PATCH 2/7] block/raw-posix: create do_fallocate helper

2015-01-27 Thread Denis V. Lunev
The pattern do { if (fallocate(s->fd, mode, offset, len) == 0) { return 0; } } while (errno == EINTR); ret = translate_err(-errno); will be commonly useful in next patches. Create helper for it. Signed-off-by: Denis V. Lunev CC: Kevin Wolf CC: Ste

[Qemu-devel] [PATCH 5/7] block: use fallocate(FALLOC_FL_PUNCH_HOLE) & fallocate(0) to write zeroes

2015-01-27 Thread Denis V. Lunev
if called above already allocated areas of the file, i.e. the content will not be zeroed This should increase the performance a bit for not-so-modern kernels. Signed-off-by: Denis V. Lunev CC: Kevin Wolf CC: Stefan Hajnoczi CC: Peter Lieven CC: Fam Zheng --- block/raw-posix.c | 14

Re: [Qemu-devel] [PATCH 7/7] block/raw-posix: set max_write_zeroes to INT_MAX for regular files

2015-01-27 Thread Denis V. Lunev
On 27/01/15 21:05, Max Reitz wrote: On 2015-01-27 at 08:51, Denis V. Lunev wrote: fallocate() works fine and could handle properly with arbitrary size requests. Maybe "could properly handle arbitrary size requests" (or "...arbitrarily sized requests")? There is no

Re: [Qemu-devel] [PATCH 6/7] block/raw-posix: call plain fallocate in handle_aiocb_write_zeroes

2015-01-27 Thread Denis V. Lunev
On 27/01/15 20:57, Max Reitz wrote: On 2015-01-27 at 08:51, Denis V. Lunev wrote: There is a possibility that we are extending our image and thus writing zeroes beyond the end of the file. In this case we do not need to care about the hole to make sure that there is no data in the file under

Re: [Qemu-devel] [PATCH 6/7] block/raw-posix: call plain fallocate in handle_aiocb_write_zeroes

2015-01-27 Thread Denis V. Lunev
On 27/01/15 21:24, Max Reitz wrote: On 2015-01-27 at 13:19, Denis V. Lunev wrote: On 27/01/15 20:57, Max Reitz wrote: On 2015-01-27 at 08:51, Denis V. Lunev wrote: There is a possibility that we are extending our image and thus writing zeroes beyond the end of the file. In this case we do

Re: [Qemu-devel] [PATCH 7/7] block/raw-posix: set max_write_zeroes to INT_MAX for regular files

2015-01-27 Thread Denis V. Lunev
On 27/01/15 21:05, Max Reitz wrote: On 2015-01-27 at 08:51, Denis V. Lunev wrote: fallocate() works fine and could handle properly with arbitrary size requests. Maybe "could properly handle arbitrary size requests" (or "...arbitrarily sized requests")? There is no

[Qemu-devel] [PATCH 7/7] block/raw-posix: set max_write_zeroes to INT_MAX for regular files

2015-01-28 Thread Denis V. Lunev
and XFS codepaths, which are different in handle_aiocb_write_zeroes. The implementation of falocate and xfsctl(XFS_IOC_ZERO_RANGE) for XFS are exactly the same thus the change is fine for both ways. Signed-off-by: Denis V. Lunev CC: Max Reitz CC: Kevin Wolf CC: Stefan Hajnoczi CC: Peter Lieven

[Qemu-devel] [PATCH 3/7] block/raw-posix: refactor handle_aiocb_write_zeroes a bit

2015-01-28 Thread Denis V. Lunev
ore consistent. Signed-off-by: Denis V. Lunev Reviewed-by: Max Reitz CC: Kevin Wolf CC: Stefan Hajnoczi CC: Peter Lieven CC: Fam Zheng --- block/raw-posix.c | 46 +++--- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/block/raw-posix.

[Qemu-devel] [PATCH 2/7] block/raw-posix: create do_fallocate helper

2015-01-28 Thread Denis V. Lunev
The pattern do { if (fallocate(s->fd, mode, offset, len) == 0) { return 0; } } while (errno == EINTR); ret = translate_err(-errno); will be commonly useful in next patches. Create helper for it. Signed-off-by: Denis V. Lunev Reviewed-by: Max Reitz

[Qemu-devel] [PATCH v5 0/7] eliminate data write in bdrv_write_zeroes on Linux in raw-posix.c

2015-01-28 Thread Denis V. Lunev
LOCATE check to call do_fallocate in patch 7 - dropped patch 1 as NACK-ed - added processing of very large data areas in bdrv_co_write_zeroes (new patch 1) - set bl.max_write_zeroes to INT_MAX in raw-posix.c for regular files (new patch 8) Signed-off-by: Denis V. Lunev CC: Max Reitz CC: Kevin Wolf CC:

[Qemu-devel] [PATCH 5/7] block: use fallocate(FALLOC_FL_PUNCH_HOLE) & fallocate(0) to write zeroes

2015-01-28 Thread Denis V. Lunev
if called above already allocated areas of the file, i.e. the content will not be zeroed This should increase the performance a bit for not-so-modern kernels. Signed-off-by: Denis V. Lunev CC: Max Reitz CC: Kevin Wolf CC: Stefan Hajnoczi CC: Peter Lieven CC: Fam Zheng --- block/raw

[Qemu-devel] [PATCH 6/7] block/raw-posix: call plain fallocate in handle_aiocb_write_zeroes

2015-01-28 Thread Denis V. Lunev
defined when Linux fallocate is defined, posix_fallocate is completely different story (CONFIG_POSIX_FALLOCATE). CONFIG_FALLOCATE is mandatory prerequite for both CONFIG_FALLOCATE_PUNCH_HOLE and CONFIG_FALLOCATE_ZERO_RANGE thus we are on the safe side. Signed-off-by: Denis V. Lunev CC: Max Reitz CC

[Qemu-devel] [PATCH 1/7] block/raw-posix: create translate_err helper to merge errno values

2015-01-28 Thread Denis V. Lunev
actually the code if (ret == -ENODEV || ret == -ENOSYS || ret == -EOPNOTSUPP || ret == -ENOTTY) { ret = -ENOTSUP; } is present twice and will be added a couple more times. Create helper for this. Signed-off-by: Denis V. Lunev Reviewed-by: Max Reitz CC: Kevin Wolf CC

[Qemu-devel] [PATCH 4/7] block: use fallocate(FALLOC_FL_ZERO_RANGE) in handle_aiocb_write_zeroes

2015-01-28 Thread Denis V. Lunev
This efficiently writes zeroes on Linux if the kernel is capable enough. FALLOC_FL_ZERO_RANGE correctly handles all cases, including and not including file expansion. Signed-off-by: Denis V. Lunev CC: Max Reitz CC: Kevin Wolf CC: Stefan Hajnoczi CC: Peter Lieven CC: Fam Zheng --- block/raw

[Qemu-devel] [PATCH 1/1] block: change default memory alignment for block requests to 4096

2015-01-28 Thread Denis V. Lunev
nce is quite reliable. Signed-off-by: Denis V. Lunev CC: Kevin Wolf CC: Stefan Hajnoczi --- block.c | 4 ++-- block/raw-posix.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/block.c b/block.c index d45e4dd..bc5d1e7 100644 --- a/block.c +++ b/block.c @@ -54

[Qemu-devel] [PATCH 0/1] block: change default memory alignment for block requests

2015-01-28 Thread Denis V. Lunev
; } time for in in `seq 1 30` ; do a.out aa ; done The file was placed into 8 GB partition on HDD below to avoid speed change due to different offset on disk. Results are reliable: - 189 vs 180 seconds on Linux 3.16 Signed-off-by: Denis V. Lunev CC: Kevin Wolf CC: Stefan Hajnoczi hades ~/src/qe

Re: [Qemu-devel] [PATCH 1/1] block: change default memory alignment for block requests to 4096

2015-01-28 Thread Denis V. Lunev
On 28/01/15 21:49, Denis V. Lunev wrote: 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 10% better if buf is aligned to 4096 bytes rather then to 512 bytes on HDD with 512/4

Re: [Qemu-devel] [PATCH 1/1] block: change default memory alignment for block requests to 4096

2015-01-28 Thread Denis V. Lunev
On 28/01/15 23:07, Paolo Bonzini wrote: On 28/01/2015 19:49, Denis V. Lunev wrote: 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 10% better if buf is aligned to 4096 by

[Qemu-devel] [PATCH v2 0/1] block: enforce minimal 4096 alignment in qemu_blockalign

2015-01-29 Thread Denis V. Lunev
lign, 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 CC: Paolo Bonzini CC: Kevin Wolf CC: Stefan Hajnoczi hades ~/src/qemu # hdparm -I /

[Qemu-devel] [PATCH 1/1] block: enforce minimal 4096 alignment in qemu_blockalign

2015-01-29 Thread Denis V. Lunev
is quite reliable. On the other hand we do not want at the moment to enforce bounce buffering if guest request is aligned to 512 bytes. This patch forces page alignment when we really forced to perform memory allocation. Signed-off-by: Denis V. Lunev CC: Paolo Bonzini CC: Kevin Wolf CC: Ste

Re: [Qemu-devel] [PATCH 1/1] block: enforce minimal 4096 alignment in qemu_blockalign

2015-01-29 Thread Denis V. Lunev
On 29/01/15 16:18, Kevin Wolf wrote: Am 29.01.2015 um 11:50 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 4

[Qemu-devel] [RESEND PATCH 1/2] balloon: call qdev_alias_all_properties for proxy dev in balloon class init

2015-01-29 Thread Denis V. Lunev
also allows to avoid some dummy errors like fixed by this commit 91ba21208839643603e7f7fa5864723c3f371ebe Author: Gonglei Date: Tue Sep 30 14:10:35 2014 +0800 virtio-balloon: fix virtio-balloon child refcount in transports Signed-off-by: Denis V. Lunev Signed-off-by: Raushaniya

[Qemu-devel] [RESEND PATCH v3 0/2] balloon: add a feature bit to let Guest OS deflate virtio_balloon on OOM

2015-01-29 Thread Denis V. Lunev
as suggested by Michael. It could be done without additional field, but this will require to move the property level up, i.e. to PCI & CCW level. Signed-off-by: Raushaniya Maksudova Signed-off-by: Denis V. Lunev CC: Anthony Liguori CC: Michael S. Tsirkin

[Qemu-devel] [RESEND PATCH 2/2] balloon: add a feature bit to let Guest OS deflate balloon on oom

2015-01-29 Thread Denis V. Lunev
. It introduces deflate-on-oom option for baloon device which do the trick. Signed-off-by: Denis V. Lunev CC: Raushaniya Maksudova CC: Anthony Liguori CC: Michael S. Tsirkin --- hw/virtio/virtio-balloon.c | 6 -- include/hw/virtio/virtio-balloon.h | 2 ++ 2 files changed, 6

Re: [Qemu-devel] [PATCH 6/7] block/raw-posix: call plain fallocate in handle_aiocb_write_zeroes

2015-01-29 Thread Denis V. Lunev
On 30/01/15 01:50, Max Reitz wrote: On 2015-01-28 at 13:38, Denis V. Lunev wrote: There is a possibility that we are extending our image and thus writing zeroes beyond the end of the file. In this case we do not need to care about the hole to make sure that there is no data in the file under

[Qemu-devel] [PATCH 6/7] block: use fallocate(FALLOC_FL_PUNCH_HOLE) & fallocate(0) to write zeroes

2015-01-30 Thread Denis V. Lunev
if called above already allocated areas of the file, i.e. the content will not be zeroed This should increase the performance a bit for not-so-modern kernels. Signed-off-by: Denis V. Lunev CC: Max Reitz CC: Kevin Wolf CC: Stefan Hajnoczi CC: Peter Lieven CC: Fam Zheng --- block/raw

[Qemu-devel] [PATCH 4/7] block: use fallocate(FALLOC_FL_ZERO_RANGE) in handle_aiocb_write_zeroes

2015-01-30 Thread Denis V. Lunev
This efficiently writes zeroes on Linux if the kernel is capable enough. FALLOC_FL_ZERO_RANGE correctly handles all cases, including and not including file expansion. Signed-off-by: Denis V. Lunev Reviewed-by: Max Reitz CC: Kevin Wolf CC: Stefan Hajnoczi CC: Peter Lieven CC: Fam Zheng

[Qemu-devel] [PATCH 2/7] block/raw-posix: create do_fallocate helper

2015-01-30 Thread Denis V. Lunev
The pattern do { if (fallocate(s->fd, mode, offset, len) == 0) { return 0; } } while (errno == EINTR); ret = translate_err(-errno); will be commonly useful in next patches. Create helper for it. Signed-off-by: Denis V. Lunev Reviewed-by: Max Reitz

[Qemu-devel] [PATCH 5/7] block/raw-posix: call plain fallocate in handle_aiocb_write_zeroes

2015-01-30 Thread Denis V. Lunev
defined when Linux fallocate is defined, posix_fallocate is completely different story (CONFIG_POSIX_FALLOCATE). CONFIG_FALLOCATE is mandatory prerequite for both CONFIG_FALLOCATE_PUNCH_HOLE and CONFIG_FALLOCATE_ZERO_RANGE thus we are on the safe side. Signed-off-by: Denis V. Lunev CC: Max Reitz CC

[Qemu-devel] [PATCH v6 0/7] eliminate data write in bdrv_write_zeroes on Linux in raw-posix.c

2015-01-30 Thread Denis V. Lunev
G_FALLOCATE check to call do_fallocate in patch 7 - dropped patch 1 as NACK-ed - added processing of very large data areas in bdrv_co_write_zeroes (new patch 1) - set bl.max_write_zeroes to INT_MAX in raw-posix.c for regular files (new patch 8) Signed-off-by: Denis V. Lunev CC: Max Reitz CC: Ke

[Qemu-devel] [PATCH 7/7] block/raw-posix: set max_write_zeroes to INT_MAX for regular files

2015-01-30 Thread Denis V. Lunev
and XFS codepaths, which are different in handle_aiocb_write_zeroes. The implementation of fallocate and xfsctl(XFS_IOC_ZERO_RANGE) for XFS are exactly the same thus the change is fine for both ways. Signed-off-by: Denis V. Lunev Reviewed-by: Max Reitz CC: Kevin Wolf CC: Stefan Hajnoczi CC: Peter

[Qemu-devel] [PATCH 1/7] block/raw-posix: create translate_err helper to merge errno values

2015-01-30 Thread Denis V. Lunev
actually the code if (ret == -ENODEV || ret == -ENOSYS || ret == -EOPNOTSUPP || ret == -ENOTTY) { ret = -ENOTSUP; } is present twice and will be added a couple more times. Create helper for this. Signed-off-by: Denis V. Lunev Reviewed-by: Max Reitz CC: Kevin Wolf CC

[Qemu-devel] [PATCH 3/7] block/raw-posix: refactor handle_aiocb_write_zeroes a bit

2015-01-30 Thread Denis V. Lunev
ore consistent. Signed-off-by: Denis V. Lunev Reviewed-by: Max Reitz CC: Kevin Wolf CC: Stefan Hajnoczi CC: Peter Lieven CC: Fam Zheng --- block/raw-posix.c | 46 +++--- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/block/raw-posix.

Re: [Qemu-devel] [PATCH 2/7] block/raw-posix: create do_fallocate helper

2015-01-30 Thread Denis V. Lunev
On 30/01/15 11:47, Peter Lieven wrote: Am 30.01.2015 um 09:42 schrieb Denis V. Lunev: The pattern do { if (fallocate(s->fd, mode, offset, len) == 0) { return 0; } } while (errno == EINTR); ret = translate_err(-errno); will be commonly useful in n

Re: [Qemu-devel] [PATCH 5/7] block/raw-posix: call plain fallocate in handle_aiocb_write_zeroes

2015-01-30 Thread Denis V. Lunev
On 30/01/15 17:58, Max Reitz wrote: On 2015-01-30 at 03:42, Denis V. Lunev wrote: There is a possibility that we are extending our image and thus writing zeroes beyond the end of the file. In this case we do not need to care about the hole to make sure that there is no data in the file under

  1   2   3   4   5   6   7   8   9   10   >