. There are the following
constraints:
* new default value in block_acct_init() is set to true
* block_acct_setup() inside blockdev_init() is called before
blkconf_apply_backend_options()
* thus newly created option in block device properties has precedence if
specified
Signed-off-by: Denis V. Lunev
patch 2
Changes from v1:
* set account_invalid/account_failed to true by default
* pass OnOffAuto to block_acct_init() to handle double initialization (patch 1)
* changed properties on BLK device to OnOffAuto
Signed-off-by: Denis V. Lunev
CC: Peter Krempa
CC: Markus Armbruster
CC: John Snow
CC
On 23.08.2022 11:58, Vladimir Sementsov-Ogievskiy wrote:
On 8/23/22 12:20, Denis V. Lunev wrote:
On 23.08.2022 09:23, Alexander Ivanov wrote:
On 23.08.2022 08:58, Vladimir Sementsov-Ogievskiy wrote:
On 8/22/22 12:05, Alexander Ivanov wrote:
data_end field in BDRVParallelsState is set
On 23.08.2022 11:47, Vladimir Sementsov-Ogievskiy wrote:
On 8/23/22 12:34, Denis V. Lunev wrote:
On 23.08.2022 08:58, Vladimir Sementsov-Ogievskiy wrote:
On 8/22/22 12:05, Alexander Ivanov wrote:
data_end field in BDRVParallelsState is set to the biggest offset
present
in BAT. If this offset
We would have one more place for block_acct_setup() calling, which should
not corrupt original value.
Signed-off-by: Denis V. Lunev
CC: Peter Krempa
CC: Markus Armbruster
CC: John Snow
CC: Kevin Wolf
CC: Hanna Reitz
CC: Vladimir Sementsov-Ogievskiy
---
block/accounting.c | 22
. There are the following
constraints:
* new default value in block_acct_init() is set to true
* block_acct_setup() inside blockdev_init() is called before
blkconf_apply_backend_options()
* thus newly created option in block device properties has precedence if
specified
Signed-off-by: Denis V. Lunev
CC
to block_acct_init() to handle double initialization (patch 1)
* changed properties on BLK device to OnOffAuto
Signed-off-by: Denis V. Lunev
CC: Peter Krempa
CC: Markus Armbruster
CC: John Snow
CC: Kevin Wolf
CC: Hanna Reitz
CC: Vladimir Sementsov-Ogievskiy
On 23.08.2022 11:42, Vladimir Sementsov-Ogievskiy wrote:
On 8/23/22 11:40, Denis V. Lunev wrote:
Parallels driver changes are driving by me for now. At least we need to
get functionally complete check and repair procedure for now. This
would be a good educational task for new people from
fail;
+}
+
if (le32_to_cpu(ph.inuse) == HEADER_INUSE_MAGIC) {
/* Image was not closed correctly. The check is mandatory */
s->header_unclean = true;
Reviewed-by: Denis V. Lunev
On 22.08.2022 11:05, Alexander Ivanov wrote:
We will add more and more checks so we need a better code structure
in parallels_co_check. Let each check performs in a separate loop
in a separate helper.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 87
check(BlockDriverState *bs,
s->data_end = size >> BDRV_SECTOR_BITS;
out:
qemu_co_mutex_unlock(>lock);
+
+if (ret == 0) {
+ret = bdrv_co_flush(bs);
+if (ret < 0) {
+res->check_errors++;
+ }
+}
+
return ret;
}
Reviewed-by: Denis V. Lunev
On 23.08.2022 08:58, Vladimir Sementsov-Ogievskiy wrote:
On 8/22/22 12:05, Alexander Ivanov wrote:
data_end field in BDRVParallelsState is set to the biggest offset
present
in BAT. If this offset is outside of the image, any further write
will create
the cluster at this offset and/or the
On 22.08.2022 11:05, Alexander Ivanov wrote:
Make data_end pointing to the end of the last cluster if a leak was fixed.
Otherwise set the file size to data_end.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git
On 23.08.2022 09:23, Alexander Ivanov wrote:
On 23.08.2022 08:58, Vladimir Sementsov-Ogievskiy wrote:
On 8/22/22 12:05, Alexander Ivanov wrote:
data_end field in BDRVParallelsState is set to the biggest offset
present
in BAT. If this offset is outside of the image, any further write
will
Parallels driver changes are driving by me for now. At least we need to
get functionally complete check and repair procedure for now. This
would be a good educational task for new people from Virtuozzo.
Signed-off-by: Denis V. Lunev
CC: Vladimir Sementsov-Ogievskiy
CC: Stefan Hajnoczi
On 22.08.2022 12:31, Denis V. Lunev wrote:
Commit 5f76a7aac156ca75680dad5df4a385fd0b58f6b1 is looking harmless from
the first glance, but it has changed things a lot. 'libvirt' uses it to
detect that it should follow new initialization way and this changes
things considerably
From: Helge Deller
The proberi assembler instruction checks the read/write access rights
for the page of a given address and shall return a value of 1 if the
test succeeds and a value of 0 on failure in the target register.
But when run in linux-user mode, qemu currently simply returns the
We would have one more place for block_acct_setup() calling, which should
not corrupt original value.
Signed-off-by: Denis V. Lunev
CC: Peter Krempa
CC: Markus Armbruster
CC: John Snow
CC: Kevin Wolf
CC: Hanna Reitz
CC: Vladimir Sementsov-Ogievskiy
---
block/accounting.c | 26
Signed-off-by: Denis V. Lunev
CC: Peter Krempa
CC: Markus Armbruster
CC: John Snow
CC: Kevin Wolf
CC: Hanna Reitz
CC: Vladimir Sementsov-Ogievskiy
On 18.08.2022 17:14, Alexander Ivanov wrote:
When an image is opened for check there is no error if an offset in the BAT
points outside the image. In such a way we can repair the image.
Out-of-image offsets are repaired in the check, but data_end field
still points outside. Fix this field by
On 18.08.2022 17:14, Alexander Ivanov wrote:
We will add more and more checks so we need a better code structure
in parallels_co_check. Let each check performs in a separate loop
in a separate helper.
s->data_end fix relates to out-of-image check so move it
to the helper too.
Signed-off-by:
On 18.08.2022 17:14, Alexander Ivanov wrote:
Replace the way we use mutex in parallels_co_check() for simplier
and less error prone code.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 26 --
1 file changed, 12 insertions(+), 14 deletions(-)
diff --git
On 18.08.2022 17:14, Alexander Ivanov wrote:
Fix image inflation when offset in BAT is out of image.
Replace whole BAT syncing by flushing only dirty blocks.
Move all the checks outside the main check function in
separate functions
Use WITH_QEMU_LOCK_GUARD for simplier code.
v4 changes:
On 17.08.2022 21:48, Vladimir Sementsov-Ogievskiy wrote:
On 8/15/22 12:02, Alexander Ivanov wrote:
BAT is written in the context of conventional operations over
the image inside bdrv_co_flush() when it calls
parallels_co_flush_to_os() callback. Thus we should not
modify BAT array directly, but
On 17.08.2022 21:43, Vladimir Sementsov-Ogievskiy wrote:
On 8/17/22 22:27, Denis V. Lunev wrote:
On 17.08.2022 21:13, Vladimir Sementsov-Ogievskiy wrote:
On 8/15/22 12:02, Alexander Ivanov wrote:
data_end field in BDRVParallelsState is set to the biggest offset
present
in BAT. If this offset
On 17.08.2022 21:13, Vladimir Sementsov-Ogievskiy wrote:
On 8/15/22 12:02, Alexander Ivanov wrote:
data_end field in BDRVParallelsState is set to the biggest offset
present
in BAT. If this offset is outside of the image, any further write
will create
the cluster at this offset and/or the
. There are the following
constraints:
* new default value in block_acct_init() is set to true
* block_acct_setup() inside blockdev_init() is called before
blkconf_apply_backend_options()
* thus newly created option in block device properties has precedence if
specified
Signed-off-by: Denis V. Lunev
CC
We would have one more place for block_acct_setup() calling, which should
not corrupt original value.
Signed-off-by: Denis V. Lunev
CC: Peter Krempa
CC: Markus Armbruster
CC: John Snow
CC: Kevin Wolf
CC: Hanna Reitz
CC: Vladimir Sementsov-Ogievskiy
---
block/accounting.c | 24
account_invalid/account_failed to true by default
* pass OnOffAuto to block_acct_init() to handle double initialization (patch 1)
* changed properties on BLK device to OnOffAuto
Signed-off-by: Denis V. Lunev
CC: Peter Krempa
CC: Markus Armbruster
CC: John Snow
CC: Kevin Wolf
CC: Hanna Reitz
CC: Vladimir
I believe that if the helper exists, it must be used always for reading
of the value. It breaks expectations in the other case.
Signed-off-by: Denis V. Lunev
CC: Kevin Wolf
CC: Hanna Reitz
CC: Stefan Hajnoczi
CC: Fam Zheng
CC: Ronnie Sahlberg
CC: Paolo Bonzini
CC: Peter Lieven
CC
Return codes of the following functions are never used in the code:
* bdrv_wait_serialising_requests_locked
* bdrv_wait_serialising_requests
* bdrv_make_request_serialising
Signed-off-by: Denis V. Lunev
CC: Kevin Wolf
CC: Hanna Reitz
CC: Stefan Hajnoczi
CC: Fam Zheng
CC: Ronnie Sahlberg
CC
These 2 patches are just minor improvements to make code a bit better.
Signed-off-by: Denis V. Lunev
CC: Kevin Wolf
CC: Hanna Reitz
CC: Stefan Hajnoczi
CC: Fam Zheng
CC: Ronnie Sahlberg
CC: Paolo Bonzini
CC: Peter Lieven
CC: Vladimir Sementsov-Ogievskiy
--
1 file changed, 132 insertions(+), 56 deletions(-)
Reviewed-by: Denis V. Lunev
I am happy with this code now.
Stefan, Vova,
can we take this to block-next via one of your trees?
Den
On 11.08.2022 17:00, Alexander Ivanov wrote:
Fix image inflation when offset in BAT is out of image.
Replace whole BAT syncing by flushing only dirty blocks.
Move all the checks outside the main check function in
separate functions
Use WITH_QEMU_LOCK_GUARD for more clean code.
Alexander
On 11.08.2022 17:00, Alexander Ivanov wrote:
Replace the way we use mutex in parallels_co_check() for more clean code.
I think that "cleaness" is the same, but new code would be just shorter ;)
or less error prone.
v2: Fix an incorrect usage of WITH_QEMU_LOCK_GUARD.
Signed-off-by: Alexander
On 11.08.2022 17:00, Alexander Ivanov wrote:
v2: Move fragmentation counting code to this function too.
same note here about ChnageLog and motivation
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 54 +++
1 file changed, 31
On 11.08.2022 17:00, Alexander Ivanov wrote:
v2: No changes.
same notes about motivation, changelog as before
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 85 +--
1 file changed, 52 insertions(+), 33 deletions(-)
diff --git
On 11.08.2022 17:00, Alexander Ivanov wrote:
v2: Move unrelated helper parallels_set_bat_entry creation to
a separate patch.
same notes as for previous patch
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 48 ++-
1 file changed,
On 11.08.2022 17:00, Alexander Ivanov wrote:
v2: Revert the condition with s->header_unclean.
same comment about change log as previously
And commit message misses motivation part, why we are
doing this rework. What is the goal of this change?
The code part is clean.
Signed-off-by:
-by: Denis V. Lunev
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 19 +++
1 file changed, 7 insertions(+), 12 deletions(-)
diff --git a/block/parallels.c b/block/parallels.c
index 7f68f3cbc9..6879ea4597 100644
--- a/block/parallels.c
+++ b/block/parallels.c
@@ -42
h - a part of a splitted patch.
Same note about version tracking
With above taken into account:
Reviewed-by: Denis V. Lunev
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 12 +---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/block/parallels.c b/block/paralle
itely not correct and should be fixed."
With this change:
Reviewed-by: Denis V. Lunev
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 17 +
1 file changed, 17 insertions(+)
diff --git a/block/parallels.c b/block/parallels.c
index a229c06f25..a76cf9d993 100644
-
On 08.08.2022 14:07, Alexander Ivanov wrote:
When an image is opened, data_end field in BDRVParallelsState
is setted as the biggest offset in the BAT plus cluster size.
If there is a corrupted offset pointing outside the image,
the image size increase accordingly. It potentially leads
to
On 08.08.2022 14:07, Alexander Ivanov wrote:
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 29 +++--
1 file changed, 19 insertions(+), 10 deletions(-)
diff --git a/block/parallels.c b/block/parallels.c
index a229c06f25..108aa907b8 100644
---
On 08.08.2022 14:07, Alexander Ivanov wrote:
It's too costly to write all the BAT to the disk. Let the flush function
write only dirty blocks.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/parallels.c
On 08.08.2022 14:19, Denis V. Lunev wrote:
On 08.08.2022 14:07, Alexander Ivanov wrote:
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 76 +--
1 file changed, 53 insertions(+), 23 deletions(-)
diff --git a/block/parallels.c b/block
On 08.08.2022 14:07, Alexander Ivanov wrote:
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 25 ++---
1 file changed, 18 insertions(+), 7 deletions(-)
diff --git a/block/parallels.c b/block/parallels.c
index 0edbb812dd..b0982d60d0 100644
--- a/block/parallels.c
On 08.08.2022 14:07, Alexander Ivanov wrote:
Frgamentation is a part of statistics so it is better to count the statistics
in one function.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 31 ---
1 file changed, 8 insertions(+), 23 deletions(-)
diff
On 08.08.2022 14:07, Alexander Ivanov wrote:
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 76 +--
1 file changed, 53 insertions(+), 23 deletions(-)
diff --git a/block/parallels.c b/block/parallels.c
index 108aa907b8..7b400ecdcc 100644
On 06.08.2022 22:45, Vladimir Sementsov-Ogievskiy wrote:
On 8/5/22 18:47, alexander.iva...@virtuozzo.com wrote:
From: Alexander Ivanov
There could be corruptions in the image file:
two guest memory areas refer to the same host cluster.
Is that written in parallels spec
On 04.08.2022 17:01, Denis V. Lunev wrote:
On 04.08.2022 16:51, alexander.iva...@virtuozzo.com wrote:
From: Alexander Ivanov
Parallels image file can be corrupted this way: two guest memory areas
refer to the same host memory area (duplicated offsets in BAT).
qemu-img check copies data from
On 04.08.2022 16:52, alexander.iva...@virtuozzo.com wrote:
From: Alexander Ivanov
Check if original and duplicated offsets refer to the same cluster.
Repair the image and check that writing to a referred cluster
doesn't affects another referred cluster.
Signed-off-by: Natalia Kuzmina
On 04.08.2022 16:51, alexander.iva...@virtuozzo.com wrote:
From: Alexander Ivanov
When duplicates are repaired a new space area is allocated
and further leak check considers it as a leak.
Let fix it without printing any messages.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 19
On 04.08.2022 16:51, alexander.iva...@virtuozzo.com wrote:
From: Alexander Ivanov
There could be corruptions in the image file:
two quest memory areas refer to the same host cluster.
If a duplicate offset is found fix it by copying the content
of the referred cluster to a new allocated
all, pls run
iris ~/src/qemu $ ./scripts/get_maintainer.pl
0001-parallels-Add-checking-and-repairing-duplicate-offse.patch
Stefan Hajnoczi (supporter:parallels)
"Denis V. Lunev" (supporter:parallels)
Vladimir Sementsov-Ogievskiy
(supporter:parallels)
Kevin Wolf (supporter:Blo
On 29.07.2022 11:13, Kevin Wolf wrote:
Am 28.07.2022 um 21:27 hat Denis V. Lunev geschrieben:
On 28.07.2022 16:42, Vladimir Sementsov-Ogievskiy wrote:
On 7/11/22 14:07, Denis V. Lunev wrote:
Commit 5f76a7aac156ca75680dad5df4a385fd0b58f6b1 is looking harmless from
the first glance, but it has
On 28.07.2022 16:42, Vladimir Sementsov-Ogievskiy wrote:
On 7/11/22 14:07, Denis V. Lunev wrote:
Commit 5f76a7aac156ca75680dad5df4a385fd0b58f6b1 is looking harmless from
the first glance, but it has changed things a lot. 'libvirt' uses it to
detect that it should follow new initialization way
On 26.07.2022 15:51, Michael S. Tsirkin wrote:
On Mon, Jul 25, 2022 at 11:55:26PM +0300, Andrey Zhadchenko wrote:
Although QEMU virtio-blk is quite fast, there is still some room for
improvements. Disk latency can be reduced if we handle virito-blk requests
in host kernel so we avoid a lot of
On 11.07.2022 13:07, Denis V. Lunev wrote:
Commit 5f76a7aac156ca75680dad5df4a385fd0b58f6b1 is looking harmless from
the first glance, but it has changed things a lot. 'libvirt' uses it to
detect that it should follow new initialization way and this changes
things considerably
On 11.07.2022 13:07, Denis V. Lunev wrote:
Commit 5f76a7aac156ca75680dad5df4a385fd0b58f6b1 is looking harmless from
the first glance, but it has changed things a lot. 'libvirt' uses it to
detect that it should follow new initialization way and this changes
things considerably
X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+read 65472/65472 bytes at offset 64
+63.938 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+read 67043328/67043328 bytes at offset 65536
+63.938 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
*** done
Reviewed-by: Denis V. Lunev
end * BDRV_SECTOR_SIZE,
+ nb_cow_bytes, buf, 0);
qemu_vfree(buf);
if (ret < 0) {
return ret;
Reviewed-by: Denis V. Lunev
account_invalid/account_failed properties to BlockConf and setups them
accordingly.
Signed-off-by: Denis V. Lunev
CC: Peter Krempa
CC: Markus Armbruster
CC: John Snow
CC: Kevin Wolf
CC: Hanna Reitz
---
hw/block/block.c | 2 +
include/hw/block/block.h | 7 +++-
tests/qemu-iotests
On 30.05.2022 12:39, Denis V. Lunev wrote:
At the moment there are 2 sources of lengthy operations if configured:
* open connection, which could retry inside and
* reconnect of already opened connection
These operations could be quite lengthy and cumbersome to catch thus
it would be quite
On 30.05.2022 12:39, Denis V. Lunev wrote:
This patch makes in_flight field 'unsigned' for BDRVNBDState and
MirrorBlockJob. This matches the definition of this field on BDS
and is generically correct - we should never get negative value here.
Signed-off-by: Denis V. Lunev
CC: John Snow
CC
On 30.05.2022 12:39, Denis V. Lunev wrote:
This patch makes in_flight field 'unsigned' for BDRVNBDState and
MirrorBlockJob. This matches the definition of this field on BDS
and is generically correct - we should never get negative value here.
Signed-off-by: Denis V. Lunev
CC: John Snow
CC
On 30.05.2022 12:39, Denis V. Lunev wrote:
At the moment there are 2 sources of lengthy operations if configured:
* open connection, which could retry inside and
* reconnect of already opened connection
These operations could be quite lengthy and cumbersome to catch thus
it would be quite
This patch makes in_flight field 'unsigned' for BDRVNBDState and
MirrorBlockJob. This matches the definition of this field on BDS
and is generically correct - we should never get negative value here.
Signed-off-by: Denis V. Lunev
CC: John Snow
CC: Vladimir Sementsov-Ogievskiy
CC: Kevin Wolf
is based on the original downstream work made by Vladimir.
Signed-off-by: Denis V. Lunev
CC: Eric Blake
CC: Vladimir Sementsov-Ogievskiy
CC: Kevin Wolf
CC: Hanna Reitz
CC: Paolo Bonzini
---
block/nbd.c | 6 +-
block/trace-events | 2 ++
nbd/client-connection.c | 2 ++
nbd
On 27.05.2022 11:36, Vladimir Sementsov-Ogievskiy wrote:
On 5/27/22 11:43, Denis V. Lunev wrote:
+++ b/nbd/client-connection.c
@@ -23,6 +23,7 @@
*/
#include "qemu/osdep.h"
+#include "trace.h"
#include "block/nbd.h"
@@ -210,6 +211,7 @@ static void *co
On 27.05.2022 11:33, Vladimir Sementsov-Ogievskiy wrote:
On 5/27/22 11:43, Denis V. Lunev wrote:
At the moment there are 2 sources of lengthy operations if configured:
* open connection, which could retry inside and
* reconnect of already opened connection
These operations could be quite
is based on the original downstream work made by Vladimir.
Signed-off-by: Denis V. Lunev
CC: Eric Blake
CC: Vladimir Sementsov-Ogievskiy
CC: Kevin Wolf
CC: Hanna Reitz
CC: Paolo Bonzini
---
block/nbd.c | 11 ---
block/trace-events | 2 ++
nbd/client-connection.c | 2
On 18.04.2022 14:04, Natalia Kuzmina wrote:
Let qemu-img check fix corruption in the image file: two
guest memory areas refer to the same host memory area
(duplicated offsets in BAT).
The code below requires big fat comment, what is reversed BAT,
why it is needed and how it helps us to detect
On 18.04.2022 14:04, Natalia Kuzmina wrote:
Add parallels to list of formats that support consistency
checks by qemu-img check.
Signed-off-by: Natalia Kuzmina
---
docs/tools/qemu-img.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/tools/qemu-img.rst
' by passing
flag 'force' inside. Thus is seems reasonable to add the same
capability for 'blockdev-change-medium' too.
Signed-off-by: Denis V. Lunev
Reviewed-by: Vladimir Sementsov-Ogievskiy
Acked-by: "Dr. David Alan Gilbert"
CC: Kevin Wolf
CC: Hanna Reitz
CC: Eric Blake
CC: Markus
On 12.04.2022 16:17, Vladimir Sementsov-Ogievskiy wrote:
12.04.2022 12:50, Denis V. Lunev wrote:
'blockdev-change-medium' is a convinient wrapper for the following
sequence of commands:
* blockdev-open-tray
* blockdev-remove-medium
* blockdev-insert-medium
* blockdev-close-tray
' by passing
flag 'force' inside. Thus is seems reasonable to add the same
capability for 'blockdev-change-medium' too.
Signed-off-by: Denis V. Lunev
CC: Kevin Wolf
CC: Hanna Reitz
CC: "Dr. David Alan Gilbert"
CC: Eric Blake
CC: Markus Armbruster
CC: Vladimir Sementsov-Ogievskiy
---
On 08.04.2022 00:51, 'Vladimir Sementsov-Ogievskiy' via den wrote:
07.04.2022 23:48, Denis V. Lunev wrote:
'blockdev-change-medium' is a convinient wrapper for the following
sequence of commands:
* blockdev-open-tray
* blockdev-remove-medium
* blockdev-insert-medium
* blockdev-close
' by passing
flag 'force' inside. Thus is seems reasonable to add the same
capability for 'blockdev-change-medium' too.
Signed-off-by: Denis V. Lunev
CC: Kevin Wolf
CC: Hanna Reitz
CC: "Dr. David Alan Gilbert"
CC: Eric Blake
CC: Markus Armbruster
---
block/qapi-sysemu.c | 3 ++-
monitor/
V. Lunev
CC: Kevin Wolf
CC: Hanna Reitz
---
docs/tools/qemu-img.rst | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/tools/qemu-img.rst b/docs/tools/qemu-img.rst
index 8885ea11cf..85a6e05b35 100644
--- a/docs/tools/qemu-img.rst
+++ b/docs/tools/qemu-img.rst
@@ -332,8
xtension(BlockDriverState *bs,
break;
default:
-error_setg(errp, "Unknown feature: 0x%" PRIu64, fh.magic);
+error_setg(errp, "Unknown feature: 0x%" PRIx64, fh.magic);
goto fail;
}
Reviewed-by: Denis V. Lunev
On 1/19/22 12:35 PM, Daniel P. Berrangé wrote:
> Copying the maintainers for block/parallels.c
>
> On Wed, Jan 19, 2022 at 12:04:23PM +0300, Michael Tokarev wrote:
>> [This is a trivial patch, but due to the number of files it touches
>> I'm not using qemu-trivial@ route.]
>>
>> For a long time,
,
>> offset += size;
>> length -= size;
>> } while (ret == 0 && length > 0);
>> - } else if (!mode) {
>> +}
>> +#endif /* CONFIG_FALLOCATE_ZERO_RANGE */
>> +else if (!mode) {
>> /* We can only fallocate at the EOF with a truncate */
>> if (offset < blk_len) {
>> fuse_reply_err(req, EOPNOTSUPP);
>>
> Reviewed-by: Philippe Mathieu-Daudé
>
Reviewed-by: Denis V. Lunev
On 7/5/21 10:55 AM, Vladimir Sementsov-Ogievskiy wrote:
> 03.07.2021 17:50, Nir Soffer wrote:
>> On Sat, Jul 3, 2021 at 4:51 PM Vladimir Sementsov-Ogievskiy
>> wrote:
>>>
>>> Let's document how we use file locks in file-posix driver, to allow
>>> external programs to "communicate" in this way
b_sectors are used for image size.
This patch implements support of this for qemu-img and also adds
specific
check for an incorrect image. Images with block size greater than
INT_MAX/513 are not supported. The biggest available Parallels image
cluster size in the field is 1 Mb.
ile changed, 2 insertions(+)
>>
>> diff --git a/MAINTAINERS b/MAINTAINERS
>> index 9b2aa18e1f..92ba1fce5e 100644
>> --- a/MAINTAINERS
>> +++ b/MAINTAINERS
>> @@ -3117,9 +3117,11 @@ F: block/dmg.c
>> parallels
>> M: Stefan Hajnoczi
>>
ndex 9b2aa18e1f..92ba1fce5e 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -3117,9 +3117,11 @@ F: block/dmg.c
> parallels
> M: Stefan Hajnoczi
> M: Denis V. Lunev
> +M: Vladimir Sementsov-Ogievskiy
> L: qemu-bl...@nongnu.org
> S: Supported
> F: block/p
On 3/2/21 6:25 PM, Vladimir Sementsov-Ogievskiy wrote:
> 02.03.2021 16:53, Markus Armbruster wrote:
>> Andrey Shinkevich via writes:
>>
>>> When CHR_EVENT_CLOSED comes, the QMP requests queue may still contain
>>> unprocessed commands. It can happen with QMP capability OOB enabled.
>>> Let the
block_int.h"
> #include "block/qdict.h"
> @@ -843,6 +844,23 @@ static int parallels_open(BlockDriverState *bs, QDict
> *options, int flags,
> goto fail_options;
> }
>
> +if (ph.ext_off) {
> +if (flags & BDRV_O_RDWR) {
> +/*
> + * It's unsafe to open image RW if there is an extension (as we
> + * don't support it). But parallels driver in QEMU historically
> + * ignores the extension, so print warning and don't care.
> + */
> +warn_report("Format Extension ignored in RW mode");
> +} else {
> +ret = parallels_read_format_extension(
> +bs, le64_to_cpu(ph.ext_off) << BDRV_SECTOR_BITS, errp);
> +if (ret < 0) {
> +goto fail;
> +}
> +}
> +}
> +
> if ((flags & BDRV_O_RDWR) && !(flags & BDRV_O_INACTIVE)) {
> s->header->inuse = cpu_to_le32(HEADER_INUSE_MAGIC);
> ret = parallels_update_header(bs);
> diff --git a/block/meson.build b/block/meson.build
> index eeaefe5809..d21990ec95 100644
> --- a/block/meson.build
> +++ b/block/meson.build
> @@ -57,7 +57,8 @@ block_ss.add(when: 'CONFIG_QED', if_true: files(
>'qed-table.c',
>'qed.c',
> ))
> -block_ss.add(when: [libxml2, 'CONFIG_PARALLELS'], if_true:
> files('parallels.c'))
> +block_ss.add(when: [libxml2, 'CONFIG_PARALLELS'],
> + if_true: files('parallels.c', 'parallels-ext.c'))
> block_ss.add(when: 'CONFIG_WIN32', if_true: files('file-win32.c',
> 'win32-aio.c'))
> block_ss.add(when: 'CONFIG_POSIX', if_true: [files('file-posix.c'), coref,
> iokit])
> block_ss.add(when: libiscsi, if_true: files('iscsi-opts.c'))
Reviewed-by: Denis V. Lunev
assert c['start'] % cluster == 0
> +assert c['length'] % cluster == 0
> +if c['data']:
> +continue
> +
> +a = c['start'] // cluster
> +b = (c['start'] + c['length']) // cluster
> +if b - a > 1:
> +log(f'{a}-{b-1}')
> +else:
> +log(a)
> diff --git a/tests/qemu-iotests/tests/parallels-read-bitmap.out
> b/tests/qemu-iotests/tests/parallels-read-bitmap.out
> new file mode 100644
> index 00..e8f6bc9e96
> --- /dev/null
> +++ b/tests/qemu-iotests/tests/parallels-read-bitmap.out
> @@ -0,0 +1,6 @@
> +Start NBD server
> +dirty clusters (cluster size is 64K):
> +5-6
> +10-12
> +30
> +Kill NBD server
Reviewed-by: Denis V. Lunev
it contains corresponding cluster offset
> +(in 512b sectors). Given an offset in bytes into the bitmap data the offset
> in
> +bytes into the image file can be obtained as follows:
> +
> +offset = l1_table[offset / cluster_size] * 512 + (offset % cluster_size)
Reviewed-by: Denis V. Lunev
shutil.copyfileobj(f_in, f_out)
> +
>
> def qemu_tool_pipe_and_status(tool: str, args: Sequence[str],
>connect_stderr: bool = True) -> Tuple[str,
> int]:
Reviewed-by: Denis V. Lunev
quot; : "ERROR",
> size - res->image_end_offset);
> @@ -771,6 +770,7 @@ static int parallels_open(BlockDriverState *bs, QDict
> *options, int flags,
> ret = -EFBIG;
> goto fail;
> }
> +s->cluster_size = s->tracks << BDRV_SECTOR_BITS;
>
> s->bat_size = le32_to_cpu(ph.bat_entries);
> if (s->bat_size > INT_MAX / sizeof(uint32_t)) {
Reviewed-by: Denis V. Lunev
On 2/16/21 7:45 PM, Vladimir Sementsov-Ogievskiy wrote:
> Test support for reading bitmap from parallels image format.
> parallels-with-bitmap.bz2 is generated on Virtuozzo by
> parallels-with-bitmap.sh
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy
> ---
>
On 2/16/21 7:45 PM, Vladimir Sementsov-Ogievskiy wrote:
> Signed-off-by: Vladimir Sementsov-Ogievskiy
> ---
> block/parallels.h | 6 +-
> block/parallels-ext.c | 286 ++
> block/parallels.c | 18 +++
> block/meson.build | 3 +-
> 4 files
On 2/16/21 7:45 PM, Vladimir Sementsov-Ogievskiy wrote:
> Actually L1 table entry offset is in 512 bytes sectors. Fix the spec.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy
> ---
> docs/interop/parallels.txt | 15 +--
> 1 file changed, 9 insertions(+), 6 deletions(-)
>
> diff
);
> for (i = 0, offset = 0; i < tab_size; ++i, offset += limit) {
> uint64_t count = MIN(bm_size - offset, limit);
> uint64_t entry = bitmap_table[i];
> @@ -1303,7 +1291,7 @@ static uint64_t *store_bitmap_data(BlockDriverState *bs,
> }
>
> buf = g_malloc(s->cluster_size);
> -limit = bytes_covered_by_bitmap_cluster(s, bitmap);
> +limit = bdrv_dirty_bitmap_serialization_coverage(s->cluster_size,
> bitmap);
> assert(DIV_ROUND_UP(bm_size, limit) == tb_size);
>
> offset = 0;
Reviewed-by: Denis V. Lunev
On 2/9/21 9:36 PM, Vladimir Sementsov-Ogievskiy wrote:
> 09.02.2021 19:39, Vladimir Sementsov-Ogievskiy wrote:
>> 09.02.2021 17:47, Max Reitz wrote:
>>> On 09.02.21 15:10, Vladimir Sementsov-Ogievskiy wrote:
09.02.2021 16:25, Max Reitz wrote:
> On 29.01.21 17:50, Vladimir
On 2/9/21 5:47 PM, Max Reitz wrote:
> On 09.02.21 15:10, Vladimir Sementsov-Ogievskiy wrote:
>> 09.02.2021 16:25, Max Reitz wrote:
>>> On 29.01.21 17:50, Vladimir Sementsov-Ogievskiy wrote:
Hi all!
I know, I have several series waiting for a resend, but I had to
switch
to
On 2/3/21 2:08 AM, Eric Blake wrote:
> On 2/2/21 4:50 PM, Denis V. Lunev wrote:
>> On 2/3/21 1:15 AM, Eric Blake wrote:
>>> On 1/28/21 11:21 AM, Vladimir Sementsov-Ogievskiy wrote:
>>>> 28.01.2021 20:13, Denis V. Lunev wrote:
>>>>> Original specific
301 - 400 of 2500 matches
Mail list logo