Test zero write in byte range 512~1024 for 4k alignment.
Signed-off-by: Fam Zheng
---
tests/qemu-iotests/033 | 13 +
tests/qemu-iotests/033.out | 30 ++
2 files changed, 43 insertions(+)
diff --git a/tests/qemu-iotests/033 b/tests/qemu-iotests/033
ind
For zero write, qiov passed by callers (qemu-io "write -z" and scsi-disk
"write same") is NULL.
Commit fc3959e466 fixed bdrv_co_write_zeroes which is the common case
for this bug, but it still exists in bdrv_aio_write_zeroes. A simpler
fix would be in bdrv_co_do_pwritev which is the NULL dereferen
This reverts commit fc3959e4669a1c2149b91ccb05101cfc7ae1fc05.
The core write code already handles the case, so remove this
duplication.
Because commit 61007b316 moved the touched code from block.c to
block/io.c, the change is manually reverted.
Signed-off-by: Fam Zheng
---
block/io.c | 45
An unaligned zero write causes NULL deferencing in bdrv_co_do_pwritev. That
path is reachable from bdrv_co_write_zeroes and bdrv_aio_write_zeroes.
You can easily trigger through the former with qemu-io, as the test case added
by 61815d6e0aa. For bdrv_aio_write_zeroes, in common cases there's alway
On Thu, 04/30 15:34, Kevin Wolf wrote:
> Am 27.04.2015 um 15:18 hat Fam Zheng geschrieben:
> > An unaligned zero write causes NULL deferencing in bdrv_co_do_pwritev. That
> > path is reachable from bdrv_co_write_zeroes and bdrv_aio_write_zeroes.
> >
> > You can easily trigger through the former wi
On 05/04/2015 01:15 PM, Max Reitz wrote:
> Expose the two new options for controlling the memory usage of the
> overlap check implementation via QAPI.
>
> Signed-off-by: Max Reitz
> ---
> qapi/block-core.json | 37 +
> 1 file changed, 37 insertions(+)
>
> dif
On 05/04/2015 01:15 PM, Max Reitz wrote:
> Later, a mechanism to set a limit on how much memory may be used for the
> overlap prevention structures will be introduced. If that limit is about
> to be exceeded, a QMP event should be emitted. This very event is
> specified by this patch.
>
> Signed-o
Expose the two new options for controlling the memory usage of the
overlap check implementation via QAPI.
Signed-off-by: Max Reitz
---
qapi/block-core.json | 37 +
1 file changed, 37 insertions(+)
diff --git a/qapi/block-core.json b/qapi/block-core.json
index
This patch adds some test cases for the memory limit concerning the
in-memory structures used to detect and prevent accidental metadata
overlaps.
Signed-off-by: Max Reitz
---
tests/qemu-iotests/060 | 222 +
tests/qemu-iotests/060.out | 47
This adds an adjustable limit for the total memory usage of the overlap
prevention structures.
Signed-off-by: Max Reitz
---
block/qcow2-overlap.c | 145 +++---
block/qcow2.c | 2 +-
block/qcow2.h | 2 +-
3 files changed, 139 inserti
Make the static new overlap check function global and drop the old
function.
Signed-off-by: Max Reitz
---
block/qcow2-overlap.c | 8 +---
block/qcow2-refcount.c | 120 -
2 files changed, 2 insertions(+), 126 deletions(-)
diff --git a/block/qcow
Keep track of the refcount blocks in the metadata list to protect them
against accidental modifications.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
block/qcow2-refcount.c | 38 +-
1 file changed, 37 insertions(+), 1 deletion(-)
diff --git a/block/q
Keep track of the active L1 table in the metadata list to protect it
against accidental modifications.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
block/qcow2-cluster.c | 11 +++
block/qcow2-snapshot.c | 10 ++
block/qcow2.c | 4
3 files changed, 25 inse
Later, a mechanism to set a limit on how much memory may be used for the
overlap prevention structures will be introduced. If that limit is about
to be exceeded, a QMP event should be emitted. This very event is
specified by this patch.
Signed-off-by: Max Reitz
---
docs/qmp/qmp-events.txt | 28 +
Keep track of the snapshot table in the metadata list to protect it
against accidental modifications.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
block/qcow2-snapshot.c | 10 ++
block/qcow2.c | 6 ++
2 files changed, 16 insertions(+)
diff --git a/block/qcow2-snap
Add runtime options to qcow2 to control the size of the structures used
for metadata overlap prevention (one option to control the size of the
bitmap cache, another one to control the total memory size limit).
Signed-off-by: Max Reitz
---
block/qcow2.c | 35 +--
b
Keep track of the inactive L2 tables in the metadata list to protect
them against accidental modifications.
Signed-off-by: Max Reitz
---
block/qcow2-refcount.c | 20
block/qcow2-snapshot.c | 43 ---
2 files changed, 60 insertions(+), 3
Keep track of the active L2 tables in the metadata list to protect them
against accidental modifications.
Signed-off-by: Max Reitz
---
block/qcow2-cluster.c | 2 ++
block/qcow2-refcount.c | 6 ++
block/qcow2-snapshot.c | 21 +
block/qcow2.c | 8 +++-
4 fi
Keep track of the refcount table in the metadata list to protect it
against accidental modifications.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
block/qcow2-refcount.c | 18 ++
block/qcow2.c | 4
2 files changed, 22 insertions(+)
diff --git a/block/qcow
Keep track of the inactive L1 tables in the metadata list to protect
them against accidental modifications.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
block/qcow2-snapshot.c | 25 +
1 file changed, 25 insertions(+)
diff --git a/block/qcow2-snapshot.c b/block/q
Enter the image header into the metadata list to protect it against
accidental modifications.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
block/qcow2.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/block/qcow2.c b/block/qcow2.c
index b15a612..fc53b34 100644
--- a/block/qcow2.c
Pull up the absorption of the qcow2-relevant command line options and
the evaluation of the overlap check options in qcow2_open().
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
block/qcow2.c | 96 +--
1 file changed, 48 insertions(+
Create and destroy the metadata list on creation and destruction of a
qcow2 BDS, respectively. Skip creation if no overlap checks should be
performed.
Signed-off-by: Max Reitz
---
block/qcow2.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/block/qcow2.c b/block/qcow2.c
index c
This is a continuation of previous versions of this series. v2's cover
letter was the most elaborate, which you can find here (includes
benchmarks):
http://lists.nongnu.org/archive/html/qemu-devel/2014-11/msg03430.html
See patch 1 for an explanation of why this series exists and what it
does. Patc
The existing qcow2 metadata overlap detection function used existing
structures to determine the location of the image metadata, from plain
fields such as l1_table_offset and l1_size in the BDRVQcowState, over
image structures in memory such as the L1 table for the L2 tables'
positions, or it even
On 05/04/2015 08:07 AM, Kevin Wolf wrote:
Am 30.04.2015 um 20:07 hat John Snow geschrieben:
libqos.c:
-set_context for addressing which commands go where
-migrate performs the actual migration
malloc.c:
- Structure of the allocator is adjusted slightly with
a second-tier
On 05/04/2015 08:29 AM, Kevin Wolf wrote:
Am 30.04.2015 um 20:07 hat John Snow geschrieben:
The day we all feared is here, and I am proposing we allow the migration
of the AHCI device tentatively for the 2.4 development window.
There are some more NCQ migration tests are needed, but I felt th
Am 04.05.2015 um 15:39 hat Markus Armbruster geschrieben:
> Kevin Wolf writes:
>
> > Am 01.05.2015 um 01:28 hat Don Slutz geschrieben:
> [...]
> >> So do you want a more complex patch that allows the format to be
> >> specified?
> >>
> >> Only for 'disk_image'?
> >>
> >> Include -hd* ?
> >
> >
The following sequence
int fd = open(argv[1], O_RDWR | O_CREAT | O_DIRECT, 0644);
for (i = 0; i < 10; i++)
write(fd, buf, 4096);
performs 5% better if buf is aligned to 4096 bytes.
The difference is quite reliable.
On the other hand we do not want at the moment to enforce
The patch introduces new concept: minimal memory alignment for bounce
buffers. Original so called "optimal" value is actually minimal required
value for aligment. It should be used for validation that the IOVec
is properly aligned and bounce buffer is not required.
Though, from the performance poi
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 the following program to test
#define _GNU_SOURCE
#inc
Kevin Wolf writes:
> Am 01.05.2015 um 01:28 hat Don Slutz geschrieben:
[...]
>> So do you want a more complex patch that allows the format to be
>> specified?
>>
>> Only for 'disk_image'?
>>
>> Include -hd* ?
>
> I'm afraid that there is no nice way to improve the plain 'disk_image'
> case. You
Am 30.04.2015 um 20:07 hat John Snow geschrieben:
> The day we all feared is here, and I am proposing we allow the migration
> of the AHCI device tentatively for the 2.4 development window.
>
> There are some more NCQ migration tests are needed, but I felt that it was
> important to get migration
Am 30.04.2015 um 20:07 hat John Snow geschrieben:
> libqos.c:
> -set_context for addressing which commands go where
> -migrate performs the actual migration
>
> malloc.c:
> - Structure of the allocator is adjusted slightly with
> a second-tier malloc to make swapping around the a
Am 01.05.2015 um 01:28 hat Don Slutz geschrieben:
> On 04/30/15 16:15, Kevin Wolf wrote:
> > Am 30.04.2015 um 21:15 hat Eric Blake geschrieben:
> >> [adding qemu-block]
> >>
> >> On 04/30/2015 12:23 PM, Don Slutz wrote:
> >>> ~/qemu/out/master/x86_64-softmmu/qemu-system-x86_64 -h | head
> >>> QEM
Am 01.05.2015 um 16:23 hat Stefan Hajnoczi geschrieben:
> On Thu, Apr 30, 2015 at 01:11:40PM +0300, Alberto Garcia wrote:
> > Qcow2Cache *qcow2_cache_create(BlockDriverState *bs, int num_tables)
> > {
> > BDRVQcowState *s = bs->opaque;
> > Qcow2Cache *c;
> > -int i;
> >
> > c
36 matches
Mail list logo