On 5/4/21 10:20 AM, Vladimir Sementsov-Ogievskiy wrote:
> Split checking for reserved bits out of aligned offset check.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy
> ---
> block/qcow2.h | 1 +
> block/qcow2-refcount.c | 10 +-
> 2 files changed, 10 insertions(+), 1
On 5/4/21 10:20 AM, Vladimir Sementsov-Ogievskiy wrote:
> Signed-off-by: Vladimir Sementsov-Ogievskiy
> ---
> block/qcow2.h | 1 +
> block/qcow2-refcount.c | 6 ++
> 2 files changed, 7 insertions(+)
>
Reviewed-by: Eric Blake
--
Eric Blake, Principal Software Engineer
Red Hat,
On 5/4/21 10:20 AM, Vladimir Sementsov-Ogievskiy wrote:
> - use g_autofree for l1_table
> - better name for size in bytes variable
> - reduce code blocks nesting
> - whitespaces, braces, newlines
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy
> ---
> block/qcow2-refcount.c | 97
On 5/4/21 10:20 AM, Vladimir Sementsov-Ogievskiy wrote:
> Signed-off-by: Vladimir Sementsov-Ogievskiy
> ---
> block/qcow2.h | 1 +
> block/qcow2-refcount.c | 12 +++-
> 2 files changed, 12 insertions(+), 1 deletion(-)
>
Reviewed-by: Eric Blake
--
Eric Blake, Principal
On 5/4/21 10:20 AM, Vladimir Sementsov-Ogievskiy wrote:
> Check subcluster bitmap of the l2 entry for different types of
> clusters:
>
> - for compressed it must be zero
> - for allocated check consistency of two parts of the bitmap
> - for unallocated all subclusters should be unallocated
>
On 5/4/21 10:20 AM, Vladimir Sementsov-Ogievskiy wrote:
> We'll reuse the function to fix wrong L2 entry bitmap. Support it now.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy
> ---
> block/qcow2-refcount.c | 18 +++---
> 1 file changed, 15 insertions(+), 3 deletions(-)
>
> diff
On 5/4/21 10:20 AM, Vladimir Sementsov-Ogievskiy wrote:
> Split fix_l2_entry_by_zero() out of check_refcounts_l2() to be
> reused in further patch.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy
> ---
> block/qcow2-refcount.c | 87 +-
> 1 file changed,
On 5/4/21 10:20 AM, Vladimir Sementsov-Ogievskiy wrote:
> Add helper to parse compressed l2_entry and use it everywhere instead
> of opencoding.
open-coding
>
> Note, that in most places we move to precise coffset/csize instead of
> sector-aligned. Still it should work good enough for updating
On 5/4/21 10:20 AM, Vladimir Sementsov-Ogievskiy wrote:
> Let's pass the whole L2 entry and not bother with
> L2E_COMPRESSED_OFFSET_SIZE_MASK.
>
> It also helps further refactoring that adds generic
> qcow2_parse_compressed_l2_entry() helper.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy
>
On 5/4/21 10:20 AM, Vladimir Sementsov-Ogievskiy wrote:
> - don't use same name for size in bytes and in entries
> - use g_autofree for l2_table
> - add whitespace
> - fix block comment style
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy
> ---
> block/qcow2-refcount.c | 47
On 04.05.2021 19:06, Vladimir Sementsov-Ogievskiy wrote:
> Set bdi->is_dirty, so that qemu-img info could show dirty flag.
>
> After this commit the following check will show '"dirty-flag": true':
>
> ./build/qemu-img create -f qcow2 -o lazy_refcounts=on x 1M
> ./build/qemu-io x
> qemu-io> write
On 5/4/21 11:06 AM, Vladimir Sementsov-Ogievskiy wrote:
> Set bdi->is_dirty, so that qemu-img info could show dirty flag.
>
> After this commit the following check will show '"dirty-flag": true':
>
> ./build/qemu-img create -f qcow2 -o lazy_refcounts=on x 1M
> ./build/qemu-io x
> qemu-io> write
Set bdi->is_dirty, so that qemu-img info could show dirty flag.
After this commit the following check will show '"dirty-flag": true':
./build/qemu-img create -f qcow2 -o lazy_refcounts=on x 1M
./build/qemu-io x
qemu-io> write 0 1M
After "write" command success, kill the qemu-io process:
kill
On Tue, May 04, 2021 at 03:32:55PM +0100, Stefan Hajnoczi wrote:
> On Thu, Apr 29, 2021 at 02:03:52PM -0400, Eduardo Habkost wrote:
> > On Thu, Apr 29, 2021 at 04:52:21PM +0100, Stefan Hajnoczi wrote:
> > > Live migrating old guests from an old QEMU with the SCSI feature bit
> > > enabled will
Let's pass the whole L2 entry and not bother with
L2E_COMPRESSED_OFFSET_SIZE_MASK.
It also helps further refactoring that adds generic
qcow2_parse_compressed_l2_entry() helper.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block/qcow2.h | 1 -
block/qcow2-cluster.c | 5 ++---
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block/qcow2.h | 1 +
block/qcow2-refcount.c | 6 ++
2 files changed, 7 insertions(+)
diff --git a/block/qcow2.h b/block/qcow2.h
index b8b1093b61..58fd7f1678 100644
--- a/block/qcow2.h
+++ b/block/qcow2.h
@@ -586,6 +586,7 @@ typedef
- use g_autofree for l1_table
- better name for size in bytes variable
- reduce code blocks nesting
- whitespaces, braces, newlines
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block/qcow2-refcount.c | 97 +-
1 file changed, 49 insertions(+), 48
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block/qcow2.h | 1 +
block/qcow2-refcount.c | 12 +++-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/block/qcow2.h b/block/qcow2.h
index c0e1e83796..b8b1093b61 100644
--- a/block/qcow2.h
+++ b/block/qcow2.h
@@
We'll reuse the function to fix wrong L2 entry bitmap. Support it now.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block/qcow2-refcount.c | 18 +++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c
index
Check subcluster bitmap of the l2 entry for different types of
clusters:
- for compressed it must be zero
- for allocated check consistency of two parts of the bitmap
- for unallocated all subclusters should be unallocated
(or zero-plain)
For unallocated clusters we can safely fix the
Split checking for reserved bits out of aligned offset check.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block/qcow2.h | 1 +
block/qcow2-refcount.c | 10 +-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/block/qcow2.h b/block/qcow2.h
index
- don't use same name for size in bytes and in entries
- use g_autofree for l2_table
- add whitespace
- fix block comment style
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block/qcow2-refcount.c | 47 +-
1 file changed, 24 insertions(+), 23
Split fix_l2_entry_by_zero() out of check_refcounts_l2() to be
reused in further patch.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block/qcow2-refcount.c | 87 +-
1 file changed, 60 insertions(+), 27 deletions(-)
diff --git a/block/qcow2-refcount.c
Hi all!
Here are some good refactorings and new (qemu-img check) checks for
qcow2.
Vladimir Sementsov-Ogievskiy (10):
qcow2-refcount: improve style of check_refcounts_l2()
qcow2: compressed read: simplify cluster descriptor passing
qcow2: introduce qcow2_parse_compressed_l2_entry() helper
Add helper to parse compressed l2_entry and use it everywhere instead
of opencoding.
Note, that in most places we move to precise coffset/csize instead of
sector-aligned. Still it should work good enough for updating
refcounts.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block/qcow2.h
On Sun, May 02, 2021 at 10:36:17AM +0300, Or Ozeri wrote:
> Starting from ceph Pacific, RBD has built-in support for image-level
> encryption.
> Currently supported formats are LUKS version 1 and 2.
>
> There are 2 new relevant librbd APIs for controlling encryption, both expect
> an
> open
On Thu, Apr 29, 2021 at 02:03:52PM -0400, Eduardo Habkost wrote:
> On Thu, Apr 29, 2021 at 04:52:21PM +0100, Stefan Hajnoczi wrote:
> > Live migrating old guests from an old QEMU with the SCSI feature bit
> > enabled will fail with "Features 0x... unsupported. Allowed features:
> > 0x...". We've
On Thu, Apr 29, 2021 at 06:16:28PM +0200, Peter Krempa wrote:
> On Thu, Apr 29, 2021 at 16:52:21 +0100, Stefan Hajnoczi wrote:
> > The scsi=on|off property was deprecated in QEMU 5.0 and can be removed
> > completely at this point.
> >
> > Drop the scsi=on|off option. It was only available on
On Thu, Apr 29, 2021 at 02:03:52PM -0400, Eduardo Habkost wrote:
> On Thu, Apr 29, 2021 at 04:52:21PM +0100, Stefan Hajnoczi wrote:
> > The scsi=on|off property was deprecated in QEMU 5.0 and can be removed
> > completely at this point.
> >
> > Drop the scsi=on|off option. It was only available
Am 30.04.2021 um 17:49 hat Stefan Hajnoczi geschrieben:
> On Thu, Apr 29, 2021 at 05:51:16PM +0200, Kevin Wolf wrote:
> > Am 29.04.2021 um 16:05 hat Stefan Hajnoczi geschrieben:
> > > Hi,
> > > A preview release of libblkio, a library for high-performance block I/O,
> > > is now available:
> > >
On 5/3/21 4:45 PM, Eric Blake wrote:
> On 5/3/21 4:36 PM, Eric Blake wrote:
>> Back in commit d9f059aa6c (qemu-img: Deprecate use of -b without -F),
>> we deprecated the ability to create a file with a backing image that
>> requires qemu to perform format probing. Qemu can still probe older
>>
On Tue, May 04, 2021 at 12:57:29PM +0200, Kevin Wolf wrote:
> Am 04.05.2021 um 11:44 hat Michael S. Tsirkin geschrieben:
> > On Tue, May 04, 2021 at 11:27:12AM +0200, Kevin Wolf wrote:
> > > Am 04.05.2021 um 10:59 hat Michael S. Tsirkin geschrieben:
> > > > On Thu, Apr 29, 2021 at 07:13:12PM
Am 04.05.2021 um 11:44 hat Michael S. Tsirkin geschrieben:
> On Tue, May 04, 2021 at 11:27:12AM +0200, Kevin Wolf wrote:
> > Am 04.05.2021 um 10:59 hat Michael S. Tsirkin geschrieben:
> > > On Thu, Apr 29, 2021 at 07:13:12PM +0200, Kevin Wolf wrote:
> > > > This is a partial revert of commits
* Peter Krempa (pkre...@redhat.com) wrote:
> On Fri, Apr 30, 2021 at 09:42:05 +0200, Markus Armbruster wrote:
> > Eduardo Habkost writes:
> >
> > > On Thu, Apr 29, 2021 at 04:52:21PM +0100, Stefan Hajnoczi wrote:
> > >> The scsi=on|off property was deprecated in QEMU 5.0 and can be removed
> >
v2: rebased on Kevin's "[PATCH 0/2] block: Fix Transaction leaks"
1: add assertions and drop extra declaration
2: add Alberto's r-b
3: improve commit message
Based-on: <20210503110555.24001-1-kw...@redhat.com>
Vladimir Sementsov-Ogievskiy (5):
block: document child argument of
We have different types of parents: block nodes, block backends and
jobs. So, it makes sense to specify type together with name.
While being here also use g_autofree.
iotest 307 output is updated.
Signed-off-by: Vladimir Sementsov-Ogievskiy
Reviewed-by: Alberto Garcia
---
The logic around **child is not obvious: this reference is used not
only to return resulting child, but also to rollback NULL value on
transaction abort.
So, let's add documentation and some assertions.
While being here, drop extra declaration of bdrv_attach_child_noperm().
Signed-off-by:
Now permissions are updated as follows:
1. do graph modifications ignoring permissions
2. do permission update
(of course, we rollback [1] if [2] fails)
So, on stage [2] we can't say which users are "old" and which are
"new" and exist only since [1]. And current error message is a bit
All existing parent types (block nodes, block devices, jobs) has the
realization. So, drop unreachable code.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/block.c b/block.c
index 54a3da9311..2f73523285 100644
---
We have different types of parents: block nodes, block backends and
jobs. So, it makes sense to specify type together with name.
Next, this handler us used to compose an error message about permission
conflict. And permission conflict occurs in a specific place of block
graph. We shouldn't report
On Tue, May 04, 2021 at 11:27:12AM +0200, Kevin Wolf wrote:
> Am 04.05.2021 um 10:59 hat Michael S. Tsirkin geschrieben:
> > On Thu, Apr 29, 2021 at 07:13:12PM +0200, Kevin Wolf wrote:
> > > This is a partial revert of commits 77542d43149 and bc79c87bcde.
> > >
> > > Usually, an error during
Am 04.05.2021 um 10:59 hat Michael S. Tsirkin geschrieben:
> On Thu, Apr 29, 2021 at 07:13:12PM +0200, Kevin Wolf wrote:
> > This is a partial revert of commits 77542d43149 and bc79c87bcde.
> >
> > Usually, an error during initialisation means that the configuration was
> > wrong. Reconnecting
Allow bench compressed backup.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
scripts/simplebench/bench-backup.py| 55 ++
scripts/simplebench/bench_block_job.py | 23 +++
2 files changed, 62 insertions(+), 16 deletions(-)
diff --git
Add arguments to set number of test runs per table cell and to disable
initial run that is not counted in results.
It's convenient to set --count 1 --no-initial-run to fast run test
onece, and to set --count to some large enough number for good
precision of the results.
Signed-off-by: Vladimir
Am 03.05.2021 um 19:01 hat Raphael Norwitz geschrieben:
> So we're not going with the suggestion to retry once or a fixed number
> of times? Any reason why not?
I thought we agreed that we'd add reconnection back in a follow-up
series that also addresses the different kinds of errors and retries
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
MAINTAINERS | 1 +
1 file changed, 1 insertion(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 4c05ff8bba..f9f2acea8f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2531,6 +2531,7 @@ Benchmark util
M: Vladimir Sementsov-Ogievskiy
S: Maintained
Add an option to drop caches before each test run. It may probably
improve reliability of results when testing in cached mode.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
scripts/simplebench/bench-backup.py | 6 +-
scripts/simplebench/simplebench.py | 11 ++-
2 files changed,
statistics.stdev raises if sequence length is less than two. Support
that case by hand.
Signed-off-by: Vladimir Sementsov-Ogievskiy
Reviewed-by: John Snow
---
scripts/simplebench/simplebench.py | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git
Add support for qcow2 source. New option says to use test-source.qcow2
instead of test-source. Of course, test-source.qcow2 should be
precreated.
Signed-off-by: Vladimir Sementsov-Ogievskiy
Reviewed-by: John Snow
---
scripts/simplebench/bench-backup.py| 5 +
We should not report success if there is an error in final event.
Signed-off-by: Vladimir Sementsov-Ogievskiy
Reviewed-by: John Snow
---
scripts/simplebench/bench_block_job.py | 4
1 file changed, 4 insertions(+)
diff --git a/scripts/simplebench/bench_block_job.py
Sometimes one of cells in a testing table runs too slow. And we really
don't want to wait so long. Limit number of runs in this case.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
scripts/simplebench/simplebench.py | 14 +-
1 file changed, 13 insertions(+), 1 deletion(-)
diff
On Thu, Apr 29, 2021 at 07:13:12PM +0200, Kevin Wolf wrote:
> This is a partial revert of commits 77542d43149 and bc79c87bcde.
>
> Usually, an error during initialisation means that the configuration was
> wrong. Reconnecting won't make the error go away, but just turn the
> error condition into
Allow benchmark with different kinds of target cache.
Signed-off-by: Vladimir Sementsov-Ogievskiy
Reviewed-by: John Snow
---
scripts/simplebench/bench-backup.py| 33 --
scripts/simplebench/bench_block_job.py | 10 +---
2 files changed, 33 insertions(+), 10
The following changes since commit 53c5433e84e8935abed8e91d4a2eb813168a0ecf:
Merge remote-tracking branch 'remotes/rth-gitlab/tags/pull-tcg-20210501' into
staging (2021-05-02 12:02:46 +0100)
are available in the Git repository at:
https://src.openvz.org/scm/~vsementsov/qemu.git
23.03.2021 16:47, Vladimir Sementsov-Ogievskiy wrote:
Hi all!
Here are some improvements to simplebench lib, to support my
"qcow2: compressed write cache" series.
v3:
01: use simpler logic
02,04-06: add John's r-b
07: use BooleanOptionalAction and
initial_run=args.initial_run
08: rewrite
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
tests/unit/test-write-threshold.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/tests/unit/test-write-threshold.c
b/tests/unit/test-write-threshold.c
index 49b1ef7a20..761054eab2 100644
--- a/tests/unit/test-write-threshold.c
+++
Instead of relying on aio context lock, let's make use of atomic
operations.
The tricky place is bdrv_write_threshold_check_write(): we want
atomically unset bs->write_threshold_offset iff
offset + bytes > bs->write_threshold_offset
We don't have such atomic operation, so let's go in a loop:
bdrv_write_threshold_exceeded() is unused at all.
bdrv_write_threshold_is_set() is used only to double check the value of
bs->write_threshold_offset in tests. No real sense in it (both tests do
check real value with help of bdrv_write_threshold_get())
Signed-off-by: Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block/write-threshold.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/block/write-threshold.c b/block/write-threshold.c
index fbf4e6f5c4..db271c5537 100644
--- a/block/write-threshold.c
+++ b/block/write-threshold.c
@@ -12,10 +12,7 @@
*/
We don't need this extra logic: it doesn't make code simpler.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
tests/unit/test-write-threshold.c | 20 +++-
1 file changed, 3 insertions(+), 17 deletions(-)
diff --git a/tests/unit/test-write-threshold.c
Testing set/get of one 64bit variable doesn't seem necessary. We have a
lot of such variables. Also remaining tests do test set/get anyway.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
tests/unit/test-write-threshold.c | 43 ---
1 file changed, 43 deletions(-)
They are unused now.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
include/block/block_int.h | 12
block.c | 1 -
block/io.c| 6 --
3 files changed, 19 deletions(-)
diff --git a/include/block/block_int.h b/include/block/block_int.h
index
write-notifiers are used only for write-threshold. New code for such
purpose should create filters.
Let's better special-case write-threshold and drop write notifiers at
all. (Actually, write-threshold is special-cased anyway, as the only
user of write-notifiers)
Signed-off-by: Vladimir
These tests use bdrv_write_threshold_exceeded() API, which is used only
for test. Better is testing real API, which is used in block.c as well.
So, let's call bdrv_write_threshold_check_write(), and check is
bs->write_threshold_offset cleared or not (it's cleared iff threshold
triggered).
Also
Hi all!
This is a v2 for
"[PATCH] block: simplify write-threshold and drop write notifiers"
Supersedes: <20210421220950.105017-1-vsement...@virtuozzo.com>
v2: split into several patches, improve thread-safety, more refactoring
Vladimir Sementsov-Ogievskiy (9):
block/write-threshold: don't use
On 04.05.21 01:15, Connor Kuehl wrote:
On 4/30/21 9:45 AM, Max Reitz wrote:
+ ``data_file_raw``
+If this option is set to ``on``, QEMU will always keep the external
+data file consistent as a standalone read-only raw image. It does
+this by forwarding updates through to the raw
03.05.2021 18:51, Alberto Garcia wrote:
On Mon 03 May 2021 01:33:57 PM CEST, Vladimir Sementsov-Ogievskiy
wrote:
@@ -2918,12 +2918,18 @@ BdrvChild *bdrv_root_attach_child(BlockDriverState
*child_bs,
child_role, perm, shared_perm, opaque,
03.05.2021 14:05, Kevin Wolf wrote:
Like other error paths, this one needs to call tran_finalize() and clean
up the BlockReopenQueue, too.
Fixes: CID 1452772
Fixes: 72373e40fbc7e4218061a8211384db362d3e7348
Signed-off-by: Kevin Wolf
---
block.c | 2 +-
1 file changed, 1 insertion(+), 1
03.05.2021 19:05, Alberto Garcia wrote:
On Mon 03 May 2021 01:34:01 PM CEST, Vladimir Sementsov-Ogievskiy
wrote:
All existing parent types (block nodes, block devices, jobs) has the
realization. So, drop unreachable code.
Signed-off-by: Vladimir Sementsov-Ogievskiy
With the updated
03.05.2021 18:52, Alberto Garcia wrote:
On Mon 03 May 2021 01:33:58 PM CEST, Vladimir Sementsov-Ogievskiy
wrote:
We have one path, where tran object is created, but we don't touch and
don't free it in any way: "goto cleanup" in first loop with calls to
bdrv_flush().
Fix it simply moving
03.05.2021 14:05, Kevin Wolf wrote:
These are two follow-up fixes for Vladimir's "block: update graph
permissions update". The bugs were reported by Coverity.
Kevin Wolf (2):
block: Fix Transaction leak in bdrv_root_attach_child()
block: Fix Transaction leak in bdrv_reopen_multiple()
03.05.2021 17:33, Kevin Wolf wrote:
Am 03.05.2021 um 15:09 hat Vladimir Sementsov-Ogievskiy geschrieben:
03.05.2021 15:41, Kevin Wolf wrote:
Am 03.05.2021 um 13:40 hat Vladimir Sementsov-Ogievskiy geschrieben:
03.05.2021 14:05, Kevin Wolf wrote:
Like other error paths, this one needs to call
72 matches
Mail list logo