On Thu, 07/05 14:44, Kevin Wolf wrote:
> Am 05.07.2018 um 09:36 hat Fam Zheng geschrieben:
> > Reuse the new bdrv_co_write_req_prepare/finish helpers. The variation
> > here is that discard requests don't affect bs->wr_highest_offset.
> >
> > Signed-off-by: Fam Zheng
> > ---
> > block/io.c | 21
On Thu, 07/05 13:08, Kevin Wolf wrote:
> Am 05.07.2018 um 09:36 hat Fam Zheng geschrieben:
> > A few trace points that can help reveal what is happening in a copy
> > offloading I/O path.
> >
> > Signed-off-by: Fam Zheng
> > ---
> > block/file-posix.c | 2 ++
> > block/io.c | 2 ++
> > b
On 07/03/2018 06:53 AM, Vladimir Sementsov-Ogievskiy wrote:
> Signed-off-by: Vladimir Sementsov-Ogievskiy
> ---
> qapi/transaction.json | 2 ++
> blockdev.c| 53
> ++-
> 2 files changed, 54 insertions(+), 1 deletion(-)
>
> diff --g
> Am 05.07.2018 um 17:15 schrieb Kevin Wolf :
>
> Am 05.07.2018 um 12:52 hat Peter Lieven geschrieben:
>> We currently don't enforce that the sparse segments we detect during convert
>> are
>> aligned. This leads to unnecessary and costly read-modify-write cycles either
>> internally in Qemu or
On 07/05/2018 02:55 PM, Eric Blake wrote:
> On 07/05/2018 01:51 PM, John Snow wrote:
>
>>
>>> - assert(!bdrv_dirty_bitmap_readonly(dest));
>>> -
>>> - if (!hbitmap_merge(dest->bitmap, src->bitmap)) {
>>> - error_setg(errp, "Bitmaps are incompatible and can't be
>>> merged");
>>> +
On 07/05/2018 01:51 PM, John Snow wrote:
-assert(!bdrv_dirty_bitmap_readonly(dest));
-
-if (!hbitmap_merge(dest->bitmap, src->bitmap)) {
-error_setg(errp, "Bitmaps are incompatible and can't be merged");
+if (bdrv_can_merge_dirty_bitmap(dest, src, errp)) {
+bool ret
On 07/03/2018 06:53 AM, Vladimir Sementsov-Ogievskiy wrote:
> Separate can_merge, to reuse it for transaction support for merge
> command.
>
> Also, switch some asserts to errors.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy
> ---
> include/block/dirty-bitmap.h | 3 +++
> include/qemu/hb
05.07.2018 18:59, Eric Blake wrote:
On 07/04/2018 06:23 AM, Vladimir Sementsov-Ogievskiy wrote:
This is necessary for efficient block-status export, for clients which
support it.
qemu as client doesn't currently process additional information when
querying block status. Should it?
Are ther
On 07/05/2018 07:20 AM, Kevin Wolf wrote:
> Am 04.07.2018 um 17:02 hat Philippe Mathieu-Daudé geschrieben:
>> After 1ec4f4160a1 Coverity reported:
>>
>> Variable cryptoopts going out of scope leaks the storage it points to.
>>
>> Fixes: Coverity CID 1393782 (Resource leak)
>> Signed-off-by: Phili
Am 05.07.2018 um 18:04 hat Philippe Mathieu-Daudé geschrieben:
> On 07/05/2018 07:20 AM, Kevin Wolf wrote:
> > Am 04.07.2018 um 17:02 hat Philippe Mathieu-Daudé geschrieben:
> >> After 1ec4f4160a1 Coverity reported:
> >>
> >> Variable cryptoopts going out of scope leaks the storage it points to.
On 07/05/2018 05:26 AM, Kevin Wolf wrote:
From: Ari Sundholm
Suggested by Kevin Wolf. May be useful when testing multiple batches
of writes or doing long-term testing involving restarts of the VM.
Signed-off-by: Ari Sundholm
Signed-off-by: Kevin Wolf
---
qapi/block-core.json | 3 +-
blo
On 07/04/2018 06:23 AM, Vladimir Sementsov-Ogievskiy wrote:
This is necessary for efficient block-status export, for clients which
support it.
qemu as client doesn't currently process additional information when
querying block status. Should it?
Are there other clients which DO make use of
Patch created mechanically by rerunning:
$ spatch --sp-file scripts/coccinelle/qobject.cocci \
--macro-file scripts/cocci-macro-file.h \
--dir . --in-place
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Markus Armbruster
Acked-by: Michael S. Tsirkin
---
qobject/
Am 05.07.2018 um 09:36 hat Fam Zheng geschrieben:
> Qcow2 allocates new clusters after the end of the file. If it is the
> destinaton
> of copy offloading, we must adjust dst->bs->total_sectors. Otherwise, further
> reads will drop to the "beyond EOF" code path and return zeroes, which problem
> i
On 5 July 2018 at 11:25, Kevin Wolf wrote:
> The following changes since commit fe8d2d5737ab20ed0118863f5eb888cae37122ab:
>
> Merge remote-tracking branch
> 'remotes/vivier2/tags/linux-user-for-3.0-pull-request' into staging
> (2018-07-04 22:38:10 +0100)
>
> are available in the git repository
On 07/04/2018 06:23 AM, Vladimir Sementsov-Ogievskiy wrote:
Call nbd_co_send_extents() with correct length parameter
(extent.length may be smaller than original length).
Only matters for tracing purposes, but indeed worth an accurate trace.
Also, switch length parameter type to uint32_t, to
Am 05.07.2018 um 12:52 hat Peter Lieven geschrieben:
> We currently don't enforce that the sparse segments we detect during convert
> are
> aligned. This leads to unnecessary and costly read-modify-write cycles either
> internally in Qemu or in the background on the storage device as nearly all
>
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
If it appropriate for 3.0, let's push it. If not - then for 3.1
with fixed "since". Should I cc stable?
v4: - fix indentation
v3: - update Qcow2OverlapCheckFlags in qapi/block-core.json [Max]
v2: - squash 02 (indentation fix) to 01
- drop com
05.07.2018 13:46, Kevin Wolf wrote:
Am 05.07.2018 um 11:21 hat Vladimir Sementsov-Ogievskiy geschrieben:
If it appropriate for 3.0, let's push it. If not - then for 3.1
with fixed "since". Should I cc stable?
v3: - update Qcow2OverlapCheckFlags in qapi/block-core.json [Max]
v2: - squash 02 (in
On Wed, Jul 04, 2018 at 12:39:11PM -0300, Philippe Mathieu-Daudé wrote:
> Nothing exciting here, patches created mechanically
> (common after soft freeze).
Acked-by: Michael S. Tsirkin
> Philippe Mathieu-Daudé (8):
> qobject: Catch another straggler for use of qdict_put_str()
> error: Remove
Am 05.07.2018 um 09:36 hat Fam Zheng geschrieben:
> Reuse the new bdrv_co_write_req_prepare/finish helpers. The variation
> here is that discard requests don't affect bs->wr_highest_offset.
>
> Signed-off-by: Fam Zheng
> ---
> block/io.c | 21 ++---
> 1 file changed, 14 insertion
Am 05.07.2018 um 09:36 hat Fam Zheng geschrieben:
> Two problems exist when a write request that enlarges the image (i.e.
> write beyond EOF) finishes:
>
> 1) parent is not notified about size change;
> 2) dirty bitmap is not resized although we try to set the dirty bits;
>
> Fix them just like h
Am 05.07.2018 um 09:36 hat Fam Zheng geschrieben:
> As a mechanical refactoring patch, this is the first step towards
> unified and more correct write code paths. This is helpful because
> multiple BlockDriverState fields need to be updated after modifying
> image data, and it's hard to maintain in
Am 05.07.2018 um 09:36 hat Fam Zheng geschrieben:
> This matches the types used for bytes in the rest parts of block layer.
> In the case of bdrv_co_truncate, new_bytes can be the image size which
> probably doesn't fit in a 32 bit int.
>
> Signed-off-by: Fam Zheng
mark_request_serialising() has
Am 05.07.2018 um 09:36 hat Fam Zheng geschrieben:
> A few trace points that can help reveal what is happening in a copy
> offloading I/O path.
>
> Signed-off-by: Fam Zheng
> ---
> block/file-posix.c | 2 ++
> block/io.c | 2 ++
> block/iscsi.c | 3 +++
> block/trace-events | 6 +
Am 05.07.2018 um 09:36 hat Fam Zheng geschrieben:
> Other I/O functions are already using a BdrvChild pointer in the API, so
> make discard do the same. It makes it possible to initiate the same
> permission checks before doing I/O, and much easier to share the
> helper functions for this, which wi
We currently don't enforce that the sparse segments we detect during convert are
aligned. This leads to unnecessary and costly read-modify-write cycles either
internally in Qemu or in the background on the storage device as nearly all
modern filesystems or hardware have a 4k alignment internally.
Am 05.07.2018 um 11:21 hat Vladimir Sementsov-Ogievskiy geschrieben:
> If it appropriate for 3.0, let's push it. If not - then for 3.1
> with fixed "since". Should I cc stable?
>
> v3: - update Qcow2OverlapCheckFlags in qapi/block-core.json [Max]
>
> v2: - squash 02 (indentation fix) to 01
>
From: Max Reitz
raw_apply_lock_bytes() takes a bit mask of "permissions that are NOT
shared".
Also, make the "perm" and "shared" variables uint64_t, because I do not
particularly like using ~ on signed integers (and other permission masks
are usually uint64_t, too).
Reported-by: Kevin Wolf
Sig
From: Ari Sundholm
This was a simple oversight when working on intermediate versions
of the original patch which introduced blklogwrites.
Signed-off-by: Ari Sundholm
Signed-off-by: Kevin Wolf
---
block/blklogwrites.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/
If the user passes a too long node name string, we silently truncate it
to fit into BlockDriverState.node_name, i.e. to 31 characters. Apart
from surprising the user when the node has a different name than
requested, this also bypasses the check for duplicate names, so that the
same name can be ass
From: Ari Sundholm
This is a way to ensure that the log superblock is periodically
updated. Before, this was only done on flush requests, which may
not be enough if the VM exits abnormally, omitting the final flush.
The default interval is 4096 write requests.
Signed-off-by: Ari Sundholm
Signe
From: Aapo Vienamo
Implements a block device write logging system, similar to Linux kernel
device mapper dm-log-writes. The write operations that are performed
on a block device are logged to a file or another block device. The
write log format is identical to the dm-log-writes format. Currently,
From: Ari Sundholm
Suggested by Kevin Wolf. May be useful when testing multiple batches
of writes or doing long-term testing involving restarts of the VM.
Signed-off-by: Ari Sundholm
Signed-off-by: Kevin Wolf
---
qapi/block-core.json | 3 +-
block/blklogwrites.c | 147 ++
Fixes: Coverity CID 1393782
Signed-off-by: Kevin Wolf
Reviewed-by: Daniel P. Berrangé
---
block/crypto.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/crypto.c b/block/crypto.c
index 994172a3de..146d81c90a 100644
--- a/block/crypto.c
+++ b/block/crypto.c
@@ -551,7 +55
From: Max Reitz
Closing the FD does not necessarily mean that it is unlocked. Fix this
by relinquishing all permission locks before qemu_close().
Reported-by: Kevin Wolf
Signed-off-by: Max Reitz
Signed-off-by: Kevin Wolf
---
block/file-posix.c | 17 ++---
1 file changed, 14 inse
From: Vladimir Sementsov-Ogievskiy
Do data compression in separate threads. This significantly improve
performance for qemu-img convert with -W (allow async writes) and -c
(compressed) options.
Signed-off-by: Vladimir Sementsov-Ogievskiy
Signed-off-by: Kevin Wolf
---
block/qcow2.h | 3 +++
b
From: Ari Sundholm
This allows using the two constants outside of block.c, which will
happen in a subsequent patch.
Signed-off-by: Ari Sundholm
Signed-off-by: Kevin Wolf
---
include/block/block.h | 7 +++
block.c | 6 --
2 files changed, 7 insertions(+), 6 deletions(-)
From: Vladimir Sementsov-Ogievskiy
Make a separate function for compression to be parallelized later.
- use .avail_out field instead of .next_out to calculate size of
compressed data. It looks more natural and it allows to keep dest to
be void pointer
- set avail_out to be at least one by
From: Vladimir Sementsov-Ogievskiy
No reason to forbid them, and they are needed to improve performance
with compress-threads in further patches.
Signed-off-by: Vladimir Sementsov-Ogievskiy
Signed-off-by: Kevin Wolf
---
qemu-img.c | 5 -
1 file changed, 5 deletions(-)
diff --git a/qemu-i
The following changes since commit fe8d2d5737ab20ed0118863f5eb888cae37122ab:
Merge remote-tracking branch
'remotes/vivier2/tags/linux-user-for-3.0-pull-request' into staging (2018-07-04
22:38:10 +0100)
are available in the git repository at:
git://repo.or.cz/qemu/kevin.git tags/for-upstrea
Am 04.07.2018 um 17:02 hat Philippe Mathieu-Daudé geschrieben:
> After 1ec4f4160a1 Coverity reported:
>
> Variable cryptoopts going out of scope leaks the storage it points to.
>
> Fixes: Coverity CID 1393782 (Resource leak)
> Signed-off-by: Philippe Mathieu-Daudé
I already sent a much simple
If it appropriate for 3.0, let's push it. If not - then for 3.1
with fixed "since". Should I cc stable?
v3: - update Qcow2OverlapCheckFlags in qapi/block-core.json [Max]
v2: - squash 02 (indentation fix) to 01
- drop comment from qcow2_check_metadata_overlap()
- set @ign to QCOW2_OL_BITMA
Am 04.07.2018 um 16:47 hat Max Reitz geschrieben:
> This series fixes two bugs Kevin spotted in file-posix's creation
> locking.
Thanks, applied to the block branch.
Kevin
Am 04.07.2018 um 16:59 hat Ari Sundholm geschrieben:
> This patch set contains a trivial printf format fix, followed by two
> new features for the blklogwrites driver.
>
> The first feature is an option to append to an existing log, adopting
> its sector size and other metadata in its superblock.
Am 04.07.2018 um 19:06 hat Vladimir Sementsov-Ogievskiy geschrieben:
> 04.07.2018 19:36, Vladimir Sementsov-Ogievskiy wrote:
> > 04.07.2018 19:20, Kevin Wolf wrote:
> > > Am 04.07.2018 um 18:11 hat Vladimir Sementsov-Ogievskiy geschrieben:
> > > > 04.07.2018 18:08, Kevin Wolf wrote:
> > > > > Am 04
Philippe Mathieu-Daudé writes:
> Nothing exciting here, patches created mechanically
> (common after soft freeze).
Cc: qemu-trivial
Am 04.07.2018 um 20:30 hat Peter Maydell geschrieben:
> On 3 July 2018 at 15:59, Kevin Wolf wrote:
> > The following changes since commit a395717cbd26e7593d3c3fe81faca121ec6d13e8:
> >
> > Merge remote-tracking branch 'remotes/cody/tags/block-pull-request' into
> > staging (2018-07-03 11:49:51 +
Fleecing scheme works as follows: we want a kind of temporary snapshot
of active drive A. We create temporary image B, with B->backing = A.
Then we start backup(sync=none) from A to B. From this point, B reads
as point-in-time snapshot of A (A continues to be active drive,
accepting guest IO).
Thi
Serialized writes should be used in copy-on-write of backup(sync=none)
for image fleecing scheme.
We need to change an assert in bdrv_aligned_pwritev, added in
28de2dcd88de. The assert may fail now, because call to
wait_serialising_requests here may become first call to it for this
request with se
Before commit 9ded4a01149 "backup: Use copy offloading",
BDRV_REQ_NO_SERIALISING was used for only one case: read in
copy-on-write operation during backup. Also, the flag was handled only
on read path (in bdrv_co_preadv and bdrv_aligned_preadv).
After 9ded4a01149, flag is used for not waiting seri
Pass read flags and write flags separately. This is needed to handle
coming BDRV_REQ_NO_SERIALISING clearly in following patches.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
include/block/block.h | 3 ++-
include/block/block_int.h | 14 ++
include/sysemu/block-back
Hi all.
This fixes image fleecing scheme for 3.0, details are in 04 patch.
v3:
02: fix typo in assert, to fix build
v2:
01,02: new patches
03: - improve comment
- fix assert in bdrv_aligned_pwritev
- add asserts to not use the flag on read requests
- support copy_range
04: - expand
If we are growing the image and potentially using preallocation for the
new area, we need to make sure that no write requests are made to the
"preallocated" area which [@old_size, @offset), not [@offset, offset * 2
- @old_size).
Signed-off-by: Fam Zheng
---
block/io.c | 3 ++-
1 file changed, 2
Truncation is the last to convert from open coded req handling to
reusing helpers. This time the permission check in prepare has to adapt
to the new caller: it checks a different permission bit, and don't
trigger the before write notifier.
Also, truncation should always trigger a bs->total_sectors
Two problems exist when a write request that enlarges the image (i.e.
write beyond EOF) finishes:
1) parent is not notified about size change;
2) dirty bitmap is not resized although we try to set the dirty bits;
Fix them just like how bdrv_co_truncate works.
Reported-by: Kevin Wolf
Signed-off-
This matches the types used for bytes in the rest parts of block layer.
In the case of bdrv_co_truncate, new_bytes can be the image size which
probably doesn't fit in a 32 bit int.
Signed-off-by: Fam Zheng
---
block/io.c| 2 +-
include/block/block_int.h | 4 ++--
2 files changed,
This brings the request handling logic inline with write and discard,
fixing write_gen, resize_cb, dirty bitmaps and image size refreshing.
The last of these issues broke iotest case 222, which is now fixed.
Signed-off-by: Fam Zheng
---
block/io.c | 8 +++-
1 file changed, 7 insertions(+), 1
Reuse the new bdrv_co_write_req_prepare/finish helpers. The variation
here is that discard requests don't affect bs->wr_highest_offset.
Signed-off-by: Fam Zheng
---
block/io.c | 21 ++---
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/block/io.c b/block/io.c
index
A few trace points that can help reveal what is happening in a copy
offloading I/O path.
Signed-off-by: Fam Zheng
---
block/file-posix.c | 2 ++
block/io.c | 2 ++
block/iscsi.c | 3 +++
block/trace-events | 6 ++
4 files changed, 13 insertions(+)
diff --git a/block/file-posix.
Other I/O functions are already using a BdrvChild pointer in the API, so
make discard do the same. It makes it possible to initiate the same
permission checks before doing I/O, and much easier to share the
helper functions for this, which will be added and used by write,
truncate and copy range pat
As a mechanical refactoring patch, this is the first step towards
unified and more correct write code paths. This is helpful because
multiple BlockDriverState fields need to be updated after modifying
image data, and it's hard to maintain in multiple places such as copy
offload, discard and truncat
Qcow2 allocates new clusters after the end of the file. If it is the destinaton
of copy offloading, we must adjust dst->bs->total_sectors. Otherwise, further
reads will drop to the "beyond EOF" code path and return zeroes, which problem
is caught by iotests 222.
Follow the logic in the normal writ
63 matches
Mail list logo