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,
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
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
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
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
-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(+)
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
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.
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
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
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.
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
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
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
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
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
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.
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.
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
-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(+)
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
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
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
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
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
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
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
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
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
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
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
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:
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
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
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
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
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
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
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
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
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 */
+
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
. 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
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
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
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
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
).
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
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
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
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
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
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
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
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
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
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
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.
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
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:
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
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
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
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
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
;
}
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
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
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
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 /
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
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
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
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
. 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
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
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
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
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
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
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
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
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
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.
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
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 - 100 of 2539 matches
Mail list logo