On 30/01/15 18:42, Max Reitz wrote:
On 2015-01-30 at 10:41, Denis V. Lunev wrote:
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
On 29/01/15 16:49, Denis V. Lunev wrote:
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, 4
On 30/01/15 22:48, Kevin Wolf wrote:
Am 30.01.2015 um 19:39 hat Denis V. Lunev geschrieben:
On 29/01/15 16:49, Denis V. Lunev wrote:
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
09:42 hat Denis V. Lunev geschrieben:
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.
The patch changes
02.02.2015 um 14:23 schrieb Kevin Wolf:
Am 30.01.2015 um 09:42 hat Denis V. Lunev geschrieben:
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
Wolf
Suggested-by: Denis V. Lunev
Signed-off-by: Peter Lieven
Thanks, applied to the block branch (and removed 'block/raw-posix: set
max_write_zeroes to INT_MAX for regular files' from the queue).
Kevin
double checked the code.
There are 2 things to patch for discard, write_zeroes
be discarded, in bytes
} QEMU_PACKED;
Thus we should limit bl_max_discard to INT_MAX >> BDRV_SECTOR_BITS to avoid
overflow.
Signed-off-by: Denis V. Lunev
CC: Kevin Wolf
CC: Peter Lieven
---
block/nbd.c | 8
1 file changed, 8 insertions(+)
diff --git a/block/nbd.c b/block/nb
size_t lent,
glfs_io_cbk fn, void *data) __THROW
This is problematic on i686 as sizeof(size_t) == 4.
Set bl_max_discard to INT_MAX >> BDRV_SECTOR_BITS to avoid overflow.
Signed-off-by: Denis V. Lunev
CC: Kevin Wolf
CC: Peter Lieven
---
block/gluster.c | 9
in_mem_alignment to check buffers coming from guest.
Changes from v1:
- enforces 4096 alignment in qemu_(try_)blockalign, 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
d
On 02/02/15 19:47, Paolo Bonzini wrote:
On 02/02/2015 17:44, Denis V. Lunev wrote:
+++ b/block/raw-posix.c
@@ -667,7 +667,8 @@ static void raw_refresh_limits(BlockDriverState *bs, Error
**errp)
BDRVRawState *s = bs->opaque;
raw_probe_alignment(bs, s->fd, errp);
-
rce bounce
buffering if guest request is aligned to 512 bytes. This patch
forces page alignment when we are really forced to perform bounce
buffering.
Signed-off-by: Denis V. Lunev
CC: Paolo Bonzini
CC: Kevin Wolf
CC: Stefan Hajnoczi
---
block.c | 19 +--
bl
On 02/02/15 19:45, Kevin Wolf wrote:
Am 02.02.2015 um 17:25 hat Denis V. Lunev geschrieben:
On 02/02/15 19:13, Kevin Wolf wrote:
Am 02.02.2015 um 15:48 hat Peter Lieven geschrieben:
do not trim requests if the driver does not supply a limit
through BlockLimits. For write zeroes we still keep
On 02/02/15 20:34, Paolo Bonzini wrote:
On 02/02/2015 18:00, Denis V. Lunev wrote:
You are absolutely correct for NBD case but I do not get the
point about SIZE_MAX for gluster. There is no such definition
in their git at git://github.com/gluster/glusterfs nor in
public API headers in
be discarded, in bytes
} QEMU_PACKED;
Thus we should limit bl_max_discard to UINT32_MAX >> BDRV_SECTOR_BITS to
avoid overflow.
Signed-off-by: Denis V. Lunev
CC: Kevin Wolf
CC: Peter Lieven
---
block/nbd.c | 8
1 file changed, 8 insertions(+)
diff --git a/block/nbd.c b/block/nb
size_t lent,
glfs_io_cbk fn, void *data) __THROW
This is problematic on i686 as sizeof(size_t) == 4.
Set bl_max_discard to SIZE_MAX >> BDRV_SECTOR_BITS to avoid overflow
on i386.
Signed-off-by: Denis V. Lunev
CC: Kevin Wolf
CC: Peter Lieven
---
block/g
Changes from v1:
- switched to UINT32_MAX for NBD
- limited max_discard for gluster to SIZE_MAX on i686 only
Signed-off-by: Denis V. Lunev
CC: Kevin Wolf
CC: Peter Lieven
be discarded, in bytes
} QEMU_PACKED;
Thus we should limit bl_max_discard to UINT32_MAX >> BDRV_SECTOR_BITS to
avoid overflow.
Signed-off-by: Denis V. Lunev
Reviewed-by: Peter Lieven
CC: Kevin Wolf
---
block/nbd.c | 8
1 file changed, 8 insertions(+)
diff --git a/block/nbd.
size_t lent,
glfs_io_cbk fn, void *data) __THROW
This is problematic on i686 as sizeof(size_t) == 4.
Set bl_max_discard to SIZE_MAX >> BDRV_SECTOR_BITS to avoid overflow
on i386.
Signed-off-by: Denis V. Lunev
CC: Kevin Wolf
CC: Peter Lieven
---
block/gluster.c | 9
Changes from v2:
- dropped conditional in patch gluster code
Changes from v1:
- switched to UINT32_MAX for NBD
- limited max_discard for gluster to SIZE_MAX on i686 only
Signed-off-by: Denis V. Lunev
CC: Kevin Wolf
CC: Peter Lieven
On 02/02/15 22:58, Peter Lieven wrote:
Am 02.02.2015 um 19:29 schrieb Denis V. Lunev:
qemu_gluster_co_discard calculates size to discard as follows
size_t size = nb_sectors * BDRV_SECTOR_SIZE;
ret = glfs_discard_async(s->fd, offset, size, &gluster_finish_aio
On 02/02/15 23:40, Peter Lieven wrote:
Am 02.02.2015 um 21:09 schrieb Denis V. Lunev:
qemu_gluster_co_discard calculates size to discard as follows
size_t size = nb_sectors * BDRV_SECTOR_SIZE;
ret = glfs_discard_async(s->fd, offset, size, &gluster_finish_aio
On 02/02/15 23:46, Denis V. Lunev wrote:
On 02/02/15 23:40, Peter Lieven wrote:
Am 02.02.2015 um 21:09 schrieb Denis V. Lunev:
qemu_gluster_co_discard calculates size to discard as follows
size_t size = nb_sectors * BDRV_SECTOR_SIZE;
ret = glfs_discard_async(s->fd, offset, s
On 03/02/15 14:47, Peter Lieven wrote:
Am 03.02.2015 um 12:37 schrieb Kevin Wolf:
Am 03.02.2015 um 12:30 hat Peter Lieven geschrieben:
Am 03.02.2015 um 08:31 schrieb Denis V. Lunev:
On 02/02/15 23:46, Denis V. Lunev wrote:
On 02/02/15 23:40, Peter Lieven wrote:
Am 02.02.2015 um 21:09
num {
#define BDRV_SECTOR_SIZE (1ULL << BDRV_SECTOR_BITS)
#define BDRV_SECTOR_MASK ~(BDRV_SECTOR_SIZE - 1)
+#define BDRV_REQUEST_MAX_SECTORS MIN(SIZE_MAX >> BDRV_SECTOR_BITS, \
+ INT_MAX >> BDRV_SECTOR_BITS)
+
/*
* Allocation status flags
On 03/02/15 17:30, Peter Lieven wrote:
Am 03.02.2015 um 14:29 schrieb Denis V. Lunev:
On 03/02/15 15:12, Peter Lieven wrote:
we check and adjust request sizes at several places with
sometimes inconsistent checks or default values:
INT_MAX
INT_MAX >> BDRV_SECTOR_BITS
UI
On 03/02/15 22:09, Gabriel L. Somlo wrote:
Hi,
I'm interested in adding a way for a host to pass environment variables
into a qemu guest VM -- analogous to setting environment variables for
a process to access via getenv() and friends.
The QEMU Guest Agent (QGA) does not appear to quite fit the
On 03/02/15 23:14, Gabriel L. Somlo wrote:
Hi Denis,
On Tue, Feb 03, 2015 at 10:14:03PM +0300, Denis V. Lunev wrote:
On 03/02/15 22:09, Gabriel L. Somlo wrote:
I'm interested in adding a way for a host to pass environment variables
into a qemu guest VM -- analogous to setting enviro
On 03/02/15 23:24, Michael Roth wrote:
Quoting Denis V. Lunev (2015-01-13 04:13:03)
On 09/01/15 22:29, Michael Roth wrote:
Quoting Denis V. Lunev (2015-01-09 12:09:10)
On 09/01/15 20:06, Michael Roth wrote:
Quoting Denis V. Lunev (2014-12-31 07:06:46)
hese patches for guest-agent add the
On 04/02/15 00:38, Gabriel L. Somlo wrote:
On Tue, Feb 03, 2015 at 02:11:12PM -0600, Michael Roth wrote:
This does seem like useful functionality, but I think I'd like to know
more about the actual use-cases being looked at.
The proposed functionality is mostly equivalent to that offered by
"
On 06/02/15 11:49, Peter Lieven wrote:
Am 03.02.2015 um 16:33 schrieb Denis V. Lunev:
On 03/02/15 17:30, Peter Lieven wrote:
Am 03.02.2015 um 14:29 schrieb Denis V. Lunev:
On 03/02/15 15:12, Peter Lieven wrote:
we check and adjust request sizes at several places with
sometimes inconsistent
be discarded, in bytes
} QEMU_PACKED;
Thus we should limit bl_max_discard to UINT32_MAX >> BDRV_SECTOR_BITS to
avoid overflow.
NBD read/write code uses the same structure for transfers. Fix
max_transfer_length accordingly.
Signed-off-by: Denis V. Lunev
CC: Peter Lieven
CC: Kevin Wolf
-
block.h
@@ -83,6 +83,9 @@ typedef enum {
#define BDRV_SECTOR_SIZE (1ULL << BDRV_SECTOR_BITS)
#define BDRV_SECTOR_MASK ~(BDRV_SECTOR_SIZE - 1)
+#define BDRV_REQUEST_MAX_SECTORS MIN(SIZE_MAX >> BDRV_SECTOR_BITS, \
+ INT_MAX >> BDRV_SECTOR_BITS)
+
/*
* Allocation status flags
* BDRV_BLOCK_DATA: data is read from bs->file or another file
Reviewed-by: Denis V. Lunev
On 06/02/15 14:53, Kevin Wolf wrote:
Am 06.02.2015 um 12:24 hat Denis V. Lunev geschrieben:
nbd_co_discard calls nbd_client_session_co_discard which uses uint32_t
as the length in bytes of the data to discard due to the following
definition:
struct nbd_request {
uint32_t magic
On 06/02/15 15:07, Kevin Wolf wrote:
Am 06.02.2015 um 12:59 hat Denis V. Lunev geschrieben:
On 06/02/15 14:53, Kevin Wolf wrote:
Am 06.02.2015 um 12:24 hat Denis V. Lunev geschrieben:
nbd_co_discard calls nbd_client_session_co_discard which uses uint32_t
as the length in bytes of the data to
On 06/02/15 15:22, Peter Lieven wrote:
Am 06.02.2015 um 13:17 schrieb Denis V. Lunev:
On 06/02/15 15:07, Kevin Wolf wrote:
Am 06.02.2015 um 12:59 hat Denis V. Lunev geschrieben:
On 06/02/15 14:53, Kevin Wolf wrote:
Am 06.02.2015 um 12:24 hat Denis V. Lunev geschrieben:
nbd_co_discard calls
force 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
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(-)
diff --git a/block.c b/block.c
index d45e4dd..e98d651 100644
--- a/block.c
+++ b/block.c
@@ -225,8
driver which should change this default at the moment.
Signed-off-by: Denis V. Lunev
CC: Paolo Bonzini
CC: Kevin Wolf
---
block.c | 20 ++--
block/raw-posix.c | 2 +-
include/block/block.h | 2 ++
include/block/block_int.h | 3 +++
4 files changed,
previous version:
- compilation is fixed by gropping strtok_r at all
- error_setg_win32 is used for error decoding
Signed-off-by: Olga Krishtal
Signed-off-by: Denis V. Lunev
CC: Michael Roth
mpiler version check here is not a good idea. Though fortunately
strtok_r is used only once in the code and we could simply rewrite
the code without it.
Signed-off-by: Olga Krishtal
Signed-off-by: Denis V. Lunev
CC: Eric Blake
CC: Michael Roth
---
include/sysemu/os-win32.h | 1 -
util/envli
is a prerequisite for
Windows guest-exec command support.
Signed-off-by: Olga Krishtal
Signed-off-by: Denis V. Lunev
CC: Michael Roth
---
qga/commands-win32.c | 271 +++
1 file changed, 250 insertions(+), 21 deletions(-)
diff --git a/qga/commands
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
---
qga/commands-posix.c | 31 +++
1 file changed, 23
On 07/04/15 16:18, Paolo Bonzini wrote:
On 07/04/2015 13:57, Andreas Färber wrote:
If this is some issue with sync'ing state back and forth before QEMU and
KVM then the real issue has not been explained.
Hm, hw/intc/apic_common.c:apic_reset_common() has:
bsp = cpu_is_bsp(s->cpu);
s
On 07/04/15 16:29, Paolo Bonzini wrote:
On 07/04/2015 15:26, Denis V. Lunev wrote:
On 07/04/15 16:18, Paolo Bonzini wrote:
On 07/04/2015 13:57, Andreas Färber wrote:
If this is some issue with sync'ing state back and forth before
QEMU and
KVM then the real issue has not been expl
Replace call of cpu_is_bsp(s->cpu) which really returns
!!(s->apicbase & MSR_IA32_APICBASE_BSP)
with directly collected value. Due to this the tracepoint
trace_cpu_get_apic_base((uint64_t)s->apicbase);
will not be hit anymore in apic_reset_common.
Signed-off-by: Denis V. Lunev
so too.
Signed-off-by: Roman Kagan
Signed-off-by: Denis V. Lunev
CC: Jeff Cody
CC: Kevin Wolf
CC: Stefan Hajnoczi
---
block/parallels.c | 20 +++-
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/block/parallels.c b/block/parallels.c
index dca0df6..baefd3e
simple purification..
Signed-off-by: Denis V. Lunev
Acked-by: Roman Kagan
CC: Jeff Cody
CC: Kevin Wolf
CC: Stefan Hajnoczi
---
block/parallels.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/block/parallels.c b/block/parallels.c
index 64b169b..306f2e3 100644
suggested by Jeff Cody
Signed-off-by: Denis V. Lunev
Acked-by: Roman Kagan
CC: Jeff Cody
CC: Kevin Wolf
CC: Stefan Hajnoczi
---
tests/qemu-iotests/076 | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/tests/qemu-iotests/076 b/tests/qemu-iotests/076
index ed2be35
Support write on Parallels images. The code is almost the same as one
in the previous patch implemented scatter-gather IO for read.
Signed-off-by: Denis V. Lunev
Acked-by: Roman Kagan
CC: Jeff Cody
CC: Kevin Wolf
CC: Stefan Hajnoczi
---
block/parallels.c | 77
From: Roman Kagan
Teach parallels_read() to do reads in coarser granularity than just a
single sector: if requested, read up to the cluster end in one go.
Signed-off-by: Roman Kagan
Signed-off-by: Denis V. Lunev
CC: Jeff Cody
CC: Kevin Wolf
CC: Stefan Hajnoczi
---
block/parallels.c | 18
From: Roman Kagan
Implement VFS method for get_block_status to Parallels format driver.
Signed-off-by: Roman Kagan
Signed-off-by: Denis V. Lunev
CC: Jeff Cody
CC: Kevin Wolf
CC: Stefan Hajnoczi
---
block/parallels.c | 21 +
1 file changed, 21 insertions(+)
diff --git
Do not even care to create WithoutFreeSpace image, it is obsolete.
Always create WithouFreSpacExt one.
The code also does not spend a lot of efforts to fill cylinders and
heads fields, they are not used actually in a real life neither in
QEMU nor in Parallels products.
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/115 | 68 ++
tests/qemu-iotests/115.out | 24
tests/qemu-iotests/group | 1 +
3 files changed, 93
Signed-off-by: Denis V. Lunev
Acked-by: Roman Kagan
---
block/parallels.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/block/parallels.c b/block/parallels.c
index bea1217..e3abf4e 100644
--- a/block/parallels.c
+++ b/block/parallels.c
@@ -2,8 +2,12 @@
* Block
On 22/12/14 12:06, Denis V. Lunev wrote:
From: Simon Zolin
Creates a FIFO pair that can be used with existing file read/write
interfaces to communicate with processes spawned via the forthcoming
guest-file-exec interface.
Signed-off-by: Simon Zolin
Acked-by: Roman Kagan
Signed-off-by: Denis
These patches eliminate data writes completely on Linux if fallocate
FALLOC_FL_ZERO_RANGE or FALLOC_FL_PUNCH_HOLE are supported on
underlying filesystem. This should seriously increase performance in
some cases.
Signed-off-by: Denis V. Lunev
CC: Kevin Wolf
CC: Stefan Hajnoczi
performance a bit for not-so-modern kernels or for
filesystems which do not support FALLOC_FL_ZERO_RANGE.
Signed-off-by: Denis V. Lunev
CC: Kevin Wolf
CC: Stefan Hajnoczi
---
block/raw-posix.c | 12
1 file changed, 12 insertions(+)
diff --git a/block/raw-posix.c b/block/raw-posix.c
index
this efficiently writes zeroes in the middle of the file on Linux
systems if the kernel is capable enough.
Signed-off-by: Denis V. Lunev
CC: Kevin Wolf
CC: Stefan Hajnoczi
---
block/raw-posix.c | 11 +++
configure | 19 +++
2 files changed, 30 insertions
igned-off-by: Simon Zolin
Signed-off-by: Denis V. Lunev
CC: Michael Roth
---
qga/commands-posix.c | 16
qga/main.c | 6 ++
2 files changed, 22 insertions(+)
diff --git a/qga/commands-posix.c b/qga/commands-posix.c
index 5872196..93aed2e 100644
--- a/qga/com
On 26/12/14 13:00, Peter Maydell wrote:
On 26 December 2014 at 08:05, Tiejun Chen wrote:
We should avoid to set irqfd{} unconditionally.
Signed-off-by: Tiejun Chen
Is there a hot path that we use this on such that the difference
in code order matters at all?
thanks
-- PMM
IMHO the patch
The pattern
do {
if (fallocate(s->fd, mode, offset, len) == 0) {
return 0;
}
} while (errno == EINTR);
is used twice at the moment and I am going to add more usages. Move it
to the helper function.
Signed-off-by: Denis V. Lunev
CC: Kevin Wolf
CC: Ste
ast and slow)
- MAX_WRITE_ZEROES_DEFAULT should be applied for slow path only
Signed-off-by: Denis V. Lunev
CC: Eric Blake
CC: Peter Lieven
CC: Kevin Wolf
CC: Stefan Hajnoczi
---
block.c | 21 +++--
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/block.c b/bloc
).
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
---
block/raw-posix.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/block/raw
These patches eliminate data writes completely on Linux if fallocate
FALLOC_FL_ZERO_RANGE or FALLOC_FL_PUNCH_HOLE are supported on
underlying filesystem.
This should seriously increase performance in some special cases.
Signed-off-by: Denis V. Lunev
CC: Kevin Wolf
CC: Stefan Hajnoczi
data on this offset. Therefore to make the situation consistent
we should drop the data beforehand. This is done using FALLOC_FL_PUNCH_HOLE
This should increase the performance a bit for not-so-modern kernels or for
filesystems which do not support FALLOC_FL_ZERO_RANGE.
Signed-off-by: Denis V
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. Place it into do_fallocate() for further convinience.
Signed-off-by: Denis V
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
---
block/raw-posix.c | 13 -
configure
ore consistent.
Signed-off-by: Denis V. Lunev
CC: Kevin Wolf
CC: Stefan Hajnoczi
---
block/raw-posix.c | 60 +++
1 file changed, 38 insertions(+), 22 deletions(-)
diff --git a/block/raw-posix.c b/block/raw-posix.c
index 25a6947..7866d31 100
On 26/12/14 16:13, Peter Lieven wrote:
Am 26.12.2014 um 13:35 schrieb Denis V. Lunev:
The check for maximum length was added by
commit c31cb70728d2c0c8900b35a66784baa446fd5147
Author: Peter Lieven
Date: Thu Oct 24 12:06:58 2013 +0200
block: honour BlockLimits in
On 26/12/14 16:32, Denis V. Lunev wrote:
On 26/12/14 16:13, Peter Lieven wrote:
Am 26.12.2014 um 13:35 schrieb Denis V. Lunev:
The check for maximum length was added by
commit c31cb70728d2c0c8900b35a66784baa446fd5147
Author: Peter Lieven
Date: Thu Oct 24 12:06:58 2013 +0200
On 27/12/14 17:52, Peter Lieven wrote:
Am 26.12.2014 um 20:15 schrieb Denis V. Lunev:
On 26/12/14 16:32, Denis V. Lunev wrote:
On 26/12/14 16:13, Peter Lieven wrote:
Am 26.12.2014 um 13:35 schrieb Denis V. Lunev:
The check for maximum length was added by
commit
On 27/12/14 23:01, Peter Lieven wrote:
Am 27.12.2014 um 18:42 schrieb Denis V. Lunev:
On 27/12/14 17:52, Peter Lieven wrote:
Am 26.12.2014 um 20:15 schrieb Denis V. Lunev:
On 26/12/14 16:32, Denis V. Lunev wrote:
On 26/12/14 16:13, Peter Lieven wrote:
Am 26.12.2014 um 13:35 schrieb Denis V
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 the size, the better is 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
---
block/raw-posix.c | 60 +++
1 file changed, 38 insertions(+), 22 deletions(-)
diff --git a/block/raw-posix.c b/block/raw-posix.c
index 25a6
could simply allocate 1 MiB buffer and create iovec, which will
point to the same memory.
Signed-off-by: Denis V. Lunev
CC: Kevin Wolf
CC: Stefan Hajnoczi
CC: Peter Lieven
---
block.c | 35 ---
1 file changed, 24 insertions(+), 11 deletions(-)
diff --git a
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: Kevin Wolf
CC: Stefan Hajnoczi
CC: Peter Lieven
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. Place it into do_fallocate() for further convinience.
Signed-off-by: Denis V
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
---
block/raw-posix.c | 13
).
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
---
block/raw-posix.c | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff
The pattern
do {
if (fallocate(s->fd, mode, offset, len) == 0) {
return 0;
}
} while (errno == EINTR);
is used twice at the moment and I am going to add more usages. Move it
to the helper function.
Signed-off-by: Denis V. Lunev
CC: Kevin Wolf
CC: Ste
data on this offset. Therefore to make the situation consistent
we should drop the data beforehand. This is done using FALLOC_FL_PUNCH_HOLE
This should increase the performance a bit for not-so-modern kernels or for
filesystems which do not support FALLOC_FL_ZERO_RANGE.
Signed-off-by: Denis V
this follows QEMU coding convention
Signed-off-by: Denis V. Lunev
Acked-by: Roman Kagan
CC: Kevin Wolf
CC: Stefan Hajnoczi
---
block/parallels.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/block/parallels.c b/block/parallels.c
index 4f9cd8d..dca0df6 100644
] block/parallels: new concept for DiskDescriptor.xml
to validate that approach for DiskDescriptor.xml problem.
Changes from v1:
- patches 13-19 added, which boosts performance from 800 KiB/sec to
near native performance
Signed-off-by: Denis V. Lunev
CC: Roman Kagan
CC: Jeff Cody
CC: Kevin Wolf
simple purification..
Signed-off-by: Denis V. Lunev
Acked-by: Roman Kagan
CC: Kevin Wolf
CC: Stefan Hajnoczi
---
block/parallels.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/block/parallels.c b/block/parallels.c
index 64b169b..306f2e3 100644
--- a/block
From: Roman Kagan
Implement VFS method for get_block_status to Parallels format driver.
Signed-off-by: Roman Kagan
Signed-off-by: Denis V. Lunev
CC: Kevin Wolf
CC: Stefan Hajnoczi
---
block/parallels.c | 21 +
1 file changed, 21 insertions(+)
diff --git a/block
so too.
Signed-off-by: Roman Kagan
Signed-off-by: Denis V. Lunev
CC: Kevin Wolf
CC: Stefan Hajnoczi
---
block/parallels.c | 20 +++-
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/block/parallels.c b/block/parallels.c
index dca0df6..baefd3e 100644
--- a/block
suggested by Jeff Cody
Signed-off-by: Denis V. Lunev
Acked-by: Roman Kagan
CC: Kevin Wolf
CC: Stefan Hajnoczi
---
tests/qemu-iotests/076 | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/tests/qemu-iotests/076 b/tests/qemu-iotests/076
index ed2be35..0139976
From: Roman Kagan
Teach parallels_read() to do reads in coarser granularity than just a
single sector: if requested, read up to the cluster end in one go.
Signed-off-by: Roman Kagan
Signed-off-by: Denis V. Lunev
CC: Kevin Wolf
CC: Stefan Hajnoczi
---
block/parallels.c | 18
Main approach is taken from qcow2_co_readv.
The patch drops coroutine lock for the duration of IO operation and
peforms normal scatter-gather IO using standard QEMU backend.
Signed-off-by: Denis V. Lunev
Acked-by: Roman Kagan
CC: Kevin Wolf
CC: Stefan Hajnoczi
---
block/parallels.c | 46
Support write on Parallels images. The code is almost the same as one
in the previous patch implemented scatter-gather IO for read.
Signed-off-by: Denis V. Lunev
Acked-by: Roman Kagan
CC: Kevin Wolf
CC: Stefan Hajnoczi
---
block/parallels.c | 77
Signed-off-by: Denis V. Lunev
Acked-by: Roman Kagan
CC: Kevin Wolf
CC: Stefan Hajnoczi
---
tests/qemu-iotests/076 | 5 +
tests/qemu-iotests/076.out | 10 ++
2 files changed, 15 insertions(+)
diff --git a/tests/qemu-iotests/076 b/tests/qemu-iotests/076
index 0139976..c9b55a9
should keep the header somethere to obtain first sector
of the image properly. BDRVParallelsState would be a good place for that.
Signed-off-by: Denis V. Lunev
CC: Kevin Wolf
CC: Stefan Hajnoczi
---
block/parallels.c | 19 ++-
1 file changed, 10 insertions(+), 9 deletions
BAT means 'block allocation table'. Thus this name is clean and shorter
on writing.
Signed-off-by: Denis V. Lunev
CC: Kevin Wolf
CC: Stefan Hajnoczi
---
block/parallels.c | 48
1 file changed, 24 insertions(+), 24 deletions(-)
di
Do not even care to create WithoutFreeSpace image, it is obsolete.
Always create WithouFreSpacExt one.
The code also does not spend a lot of efforts to fill cylinders and
heads fields, they are not used actually in a real life neither in
QEMU nor in Parallels products.
Signed-off-by: Denis V
benefit is around 15%.
This patch is final in this series. Block driver has near native
performance now.
Signed-off-by: Denis V. Lunev
CC: Kevin Wolf
CC: Stefan Hajnoczi
---
block/parallels.c | 35 +--
1 file changed, 33 insertions(+), 2 deletions(-)
diff --g
Signed-off-by: Denis V. Lunev
Acked-by: Roman Kagan
CC: Kevin Wolf
CC: Stefan Hajnoczi
---
tests/qemu-iotests/115 | 68 ++
tests/qemu-iotests/115.out | 24
tests/qemu-iotests/group | 1 +
3 files changed, 93 insertions
parallels -o cluster_size=64k ./1.hds 64G
qemu-io -f parallels -c "write -P 0x11 0 1024k" 1.hds
from 45 Mb/sec to 160 Mb/sec on my SSD disk. The gain on rotational media
is much more sufficient, from 800 Kb/sec to 45 Mb/sec.
Signed-off-by: Denis V. Lunev
CC: Kevin Wolf
CC: Stef
to calculate entry offset inside catalog bitmap in parallels image.
This is a matter of convinience.
Signed-off-by: Denis V. Lunev
CC: Kevin Wolf
CC: Stefan Hajnoczi
---
block/parallels.c | 12
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/block/parallels.c b
Signed-off-by: Denis V. Lunev
Acked-by: Roman Kagan
CC: Kevin Wolf
CC: Stefan Hajnoczi
---
block/parallels.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/block/parallels.c b/block/parallels.c
index bea1217..e3abf4e 100644
--- a/block/parallels.c
+++ b/block
-f parallels -o cluster_size=64k ./1.hds 64G
qemu-io -f parallels -c "write -P 0x11 0 1024k" 1.hds
writing from 50-60 Mb/sec to 80-90 Mb/sec on rotational media and
from 160 Mb/sec to 190 Mb/sec on SSD disk.
Signed-off-by: Denis V. Lunev
CC: Kevin Wolf
CC: Stefan Hajnoczi
---
block/par
101 - 200 of 2549 matches
Mail list logo