Pass 'verbose' to nbd_client_thread() inside NbdClientOpts which looks
a little bit cleaner and make it bool as it is used as bool actually.
Signed-off-by: Denis V. Lunev
CC: Eric Blake
CC: Vladimir Sementsov-Ogievskiy
---
qemu-nbd.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions
On 7/1/23 12:07, Alexander Ivanov wrote:
data_off field of the parallels image header can be corrupted. Check if
this field greater than the header + BAT size and less than file size.
Change checking code in parallels_open() accordingly.
Signed-off-by: Alexander Ivanov
This patch requires a
>bs);
+size = bdrv_co_getlength(bs->file->bs);
if (size < 0) {
res->check_errors++;
return size;
Reviewed-by: Denis V. Lunev
:
+/*
+ * "s" object was allocated by g_malloc0 so we can safely
+ * try to free its fields even they were not allocated.
+ */
+error_free(s->migration_blocker);
+g_free(s->bat_dirty_bmap);
qemu_vfree(s->header);
return ret;
}
Reviewed-by: Denis V. Lunev
BdrvCheckMode fix)
@@ -580,6 +719,11 @@ parallels_co_check(BlockDriverState *bs, BdrvCheckResult
*res,
return ret;
}
+ret = parallels_check_duplicate(bs, res, fix);
+if (ret < 0) {
+ return ret;
+}
+
parallels_collect_statistics(bs, res, fix);
}
with old_repare_bat replaced with old_repair_bat:
Reviewed-by: Denis V. Lunev
alloc_size;
ParallelsPreallocMode prealloc_mode;
Reviewed-by: Denis V. Lunev
count;
+if (explicit) {
+res->leaks_fixed += count;
+}
}
}
@@ -570,7 +575,7 @@ parallels_co_check(BlockDriverState *bs, BdrvCheckResult *res,
return ret;
}
-ret = parallels_check_leak(bs, res, fix);
+ ret = parallels_check_leak(bs, res, fix, true);
if (ret < 0) {
return ret;
}
Reviewed-by: Denis V. Lunev
if (ret < 0) {
With comment line truncated to 74 chars:
Reviewed-by: Denis V. Lunev
We are going to pass additional flag inside next patch.
Signed-off-by: Denis V. Lunev
CC: Eric Blake
CC: Vladimir Sementsov-Ogievskiy
CC:
---
qemu-nbd.c | 19 +--
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/qemu-nbd.c b/qemu-nbd.c
index 4276163564
Fail on error, we are in trouble.
Signed-off-by: Denis V. Lunev
CC: Eric Blake
CC: Vladimir Sementsov-Ogievskiy
---
qemu-nbd.c | 14 --
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/qemu-nbd.c b/qemu-nbd.c
index f27613cb57..cd0e965705 100644
--- a/qemu-nbd.c
+++ b
We are trying to temporary redirect stderr of daemonized process to
a pipe to report a error and get failed. In that case we could not
use error_report() helper, but should write the message directly into
the problematic pipe.
Signed-off-by: Denis V. Lunev
CC: Eric Blake
CC: Vladimir Sementsov
Patches 3-5 are not necessary for stable, I believe.
Changes from v1:
* added patch 1, necessary to pass fork_process into nbd_client_thread
* tweaked comment in patch 2 a bit
* added patches 3-5 with error handling improvements
Signed-off-by: Denis V. Lunev
CC: Eric Blake
CC: Vladimir
.
This also leads to proper 'ssh' connection closing which fixes my
original problem.
Signed-off-by: Denis V. Lunev
CC: Eric Blake
CC: Vladimir Sementsov-Ogievskiy
CC: Hanna Reitz
CC:
---
qemu-nbd.c | 13 -
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/qemu-nbd.c b/qemu
errno has been overwritten by dup2() just below qemu_daemon() and thus
improperly returned to the caller. Fix accordingly.
Signed-off-by: Denis V. Lunev
CC: Eric Blake
CC: Vladimir Sementsov-Ogievskiy
---
qemu-nbd.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/qemu
On 7/14/23 17:35, Eric Blake wrote:
On Thu, Jul 06, 2023 at 09:15:45PM +0200, Denis V. Lunev wrote:
Commit e6df58a5578fee7a50bbf36f4a50a2781cff855d
Author: Hanna Reitz
Date: Wed May 8 23:18:18 2019 +0200
qemu-nbd: Do not close stderr
has introduced an interesting regression
On 7/14/23 17:35, Eric Blake wrote:
On Thu, Jul 06, 2023 at 09:15:45PM +0200, Denis V. Lunev wrote:
Commit e6df58a5578fee7a50bbf36f4a50a2781cff855d
Author: Hanna Reitz
Date: Wed May 8 23:18:18 2019 +0200
qemu-nbd: Do not close stderr
has introduced an interesting regression
On 7/6/23 21:15, Denis V. Lunev wrote:
Commit e6df58a5578fee7a50bbf36f4a50a2781cff855d
Author: Hanna Reitz
Date: Wed May 8 23:18:18 2019 +0200
qemu-nbd: Do not close stderr
has introduced an interesting regression. Original behavior of
ssh somehost qemu-nbd /home/den/tmp
On 7/6/23 18:30, Andrey Drobyshev wrote:
The previous commit adds "compressed" boolean field to JSON output of
"qemu-img map" command. Let's tweak expected tests output accordingly.
Signed-off-by: Andrey Drobyshev
---
tests/qemu-iotests/122.out| 84
if (ret < 0) {
goto out;
}
@@ -3338,7 +3348,7 @@ static int img_map(int argc, char **argv)
curr = next;
}
-ret = dump_map_entry(output_format, , NULL);
+ret = dump_map_entry(output_format, , NULL, can_compress);
if (output_format == OFORMAT_JSON) {
puts("]");
}
Reviewed-by: Denis V. Lunev
0x20
#define BDRV_BLOCK_RECURSE 0x40
+#define BDRV_BLOCK_COMPRESSED 0x80
typedef QTAILQ_HEAD(BlockReopenQueue, BlockReopenQueueEntry) BlockReopenQueue;
Reviewed-by: Denis V. Lunev
TEST_DIR/t.IMGFMT
+read 4096/4096 bytes at offset 30720
+4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+Offset Length File
+0 0x7000 TEST_DIR/t.IMGFMT
+0x7000 0x2000 TEST_DIR/t.wrap.IMGFMT
+0x9000 0x7000 TEST_DIR/t.IMGFMT
+No errors were found on the image.
*** done
Reviewed-by: Denis V. Lunev
_clusters(BlockDriverState *bs,
+void bdrv_round_to_subclusters(BlockDriverState *bs,
int64_t offset, int64_t bytes,
int64_t *cluster_offset,
int64_t *cluster_bytes);
Reviewed-by: Denis V. Lunev
* A fraction of cluster_size, if supported (currently QCOW2 only); if
+ * disabled or unsupported, set equal to cluster_size.
+ */
+int subcluster_size;
/* offset at which the VM state can be saved (0 if not possible) */
int64_t vm_state_offset;
bool is_dirty;
Reviewed-by: Denis V. Lunev
fixes my
original problem.
Signed-off-by: Denis V. Lunev
CC: Eric Blake
CC: Vladimir Sementsov-Ogievskiy
CC: Hanna Reitz
---
qemu-nbd.c | 9 +
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/qemu-nbd.c b/qemu-nbd.c
index 4276163564..e9e118dfdb 100644
--- a/qemu-nbd.c
+++ b
On 7/6/23 15:10, Andrey Drobyshev wrote:
On 6/21/23 21:12, Denis V. Lunev wrote:
On 6/7/23 17:26, Andrey Drobyshev wrote:
Right now "qemu-img map" reports compressed blocks as containing data
but having no host offset. This is not very informative. Instead,
let's add another boo
On 6/1/23 21:28, Andrey Drobyshev wrote:
This series is adding [-c | --compress] option to "qemu-img rebase"
command, which might prove useful for saving some disk space when, for
instance, manipulating chains of backup images. Along the way I had to
make a couple of minor improvements.
The
sec)
+read 16777216/16777216 bytes at offset 16777216
+16 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+read 16777216/16777216 bytes at offset 33554432
+16 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+No errors were found on the image.
+512/768 = 66.67% allocated, 100.00% fragmented, 100.00% compressed clusters
+Image end offset: 458752
+
+=== Testing compressed rebase with unaligned unmerged data ===
+
+Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=65536
+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=65536
backing_file=TEST_DIR/t.IMGFMT.base backing_fmt=IMGFMT
+wrote 32767/32767 bytes at offset 0
+31.999 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+read 32767/32767 bytes at offset 0
+31.999 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+read 32769/32769 bytes at offset 32767
+32.001 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+No errors were found on the image.
+1/1 = 100.00% allocated, 100.00% fragmented, 100.00% compressed clusters
+Image end offset: 393216
+
+*** done
Reviewed-by: Denis V. Lunev
written += pnum;
+if (offset + written >= old_backing_size) {
+old_backing_eof = true;
+ }
}
qemu_progress_print(local_progress, 100);
}
With or without minors:
Reviewed-by: Denis V. Lunev
in the same chain
+
+Verify that data is read the same before and after rebase
+
+read 262144/262144 bytes at offset 0
+256 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+read 65536/65536 bytes at offset 262144
+64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+
*** done
For the clarity:
Reviewed-by: Denis V. Lunev
* Now we will need to explicitly zero the cluster in
+ * order to preserve that state after the rebase.
+ */
+n = bytes;
+}
}
/*
for the clarity:
Reviewed-by: Denis V. Lunev
t, end - start,
- buf_old + (start - offset), 0);
+ buf_old + (start - offset),
+ write_flags);
pnum = end - (offset + written);
}
if (ret < 0) {
Anyway, for both variants,
Reviewed-by: Denis V. Lunev
ld_backing, IO_BUF_SIZE);
+buf_new = blk_blockalign(blk_new_backing, IO_BUF_SIZE);
size = blk_getlength(blk);
if (size < 0) {
Reviewed-by: Denis V. Lunev
On 6/7/23 17:26, Andrey Drobyshev wrote:
Right now "qemu-img map" reports compressed blocks as containing data
but having no host offset. This is not very informative. Instead,
let's add another boolean field named "compressed" in case JSON output
mode is specified. This is achieved by
On 6/21/23 19:08, Denis V. Lunev wrote:
On 6/7/23 17:26, Andrey Drobyshev wrote:
Functions qcow2_get_host_offset(), get_cluster_offset() explicitly
report compressed cluster types when data is compressed. However, this
information is never passed further. Let's make use of it by adding new
-317,6 +319,7 @@ typedef enum {
#define BDRV_BLOCK_ALLOCATED0x10
#define BDRV_BLOCK_EOF 0x20
#define BDRV_BLOCK_RECURSE 0x40
+#define BDRV_BLOCK_COMPRESSED 0x80
typedef QTAILQ_HEAD(BlockReopenQueue, BlockReopenQueueEntry) BlockReopenQueue;
Reviewed-by: Denis V. Lunev
On 6/21/23 10:20, Alexander Ivanov wrote:
Fix incorrect data end calculation in parallels_open().
Check if data_end greater than the file size.
Add change_info argument to parallels_check_leak().
Add checking and repairing duplicate offsets in BAT
Image repairing in parallels_open().
v6:
2:
urn 0;
fail_format:
@@ -1124,6 +1129,12 @@ fail_format:
fail_options:
ret = -EINVAL;
fail:
+/*
+ * "s" object was allocated by g_malloc0 so we can safely
+ * try to free its fields even they were not allocated.
+ */
+error_free(s->migration_blocker);
+g_free(s->bat_dirty_bmap);
qemu_vfree(s->header);
return ret;
}
Reviewed-by: Denis V. Lunev
On 6/21/23 10:20, Alexander Ivanov wrote:
Cluster offsets must be unique among all the BAT entries. Find duplicate
offsets in the BAT and fix it by copying the content of the relevant
cluster to a newly allocated cluster and set the new cluster offset to the
duplicated entry.
Add
On 6/21/23 10:20, Alexander Ivanov wrote:
Cluster offsets must be unique among all the BAT entries. Find duplicate
offsets in the BAT and fix it by copying the content of the relevant
cluster to a newly allocated cluster and set the new cluster offset to the
duplicated entry.
Add
On 6/21/23 10:20, Alexander Ivanov wrote:
Initially data_end is set to the data_off image header field and must not be
greater than the file size.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/block/parallels.c
On 6/7/23 17:14, Hanna Czenczek wrote:
On 07.06.23 08:51, Michael Tokarev wrote:
05.06.2023 18:45, Hanna Czenczek wrote:
From: Alexander Ivanov
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
in the same chain
+
+Verify that data is read the same before and after rebase
+
+read 262144/262144 bytes at offset 0
+256 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+read 65536/65536 bytes at offset 262144
+64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+
*** done
Reviewed-by: Denis V. Lunev
* Now we will need to explicitly zero the cluster in
+ * order to preserve that state after the rebase.
+ */
+n = bytes;
+}
}
/*
Revieved-by: Denis V. Lunev
On 5/23/23 18:24, Andrey Drobyshev wrote:
In case when we're rebasing within one backing chain, and when target image
is larger than old backing file, bdrv_is_allocated_above() ends up setting
*pnum = 0. As a result, target offset isn't getting incremented, and we
get stuck in an infinite for
On 5/10/23 17:21, Vladimir Sementsov-Ogievskiy wrote:
Interesting, I see two 5/6 letters, equal body, but a bit different
headers (the second has empty "Sender")..
for me all is OK
On 4/24/23 11:31, 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.
Fix incorrect
On 3/7/23 13:20, Hanna Czenczek wrote:
On 03.02.23 10:18, 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
-by: Alexander Ivanov
Reviewed-by: Denis V. Lunev
---
block/parallels.c | 17 +
1 file changed, 17 insertions(+)
diff --git a/block/parallels.c b/block/parallels.c
index bbea2f2221..4af68adc61 100644
--- a/block/parallels.c
+++ b/block/parallels.c
@@ -732,6 +732,7 @@ static int
The error generated when the option could not be changed inside
bdrv_reopen_prepare() does not give a clue about problematic
BlockDriverState as we could get very long tree of devices.
The patch adds node name to the error report in the same way as done
above.
Signed-off-by: Denis V. Lunev
CC
On 2/2/23 14:27, Fiona Ebner wrote:
Am 02.02.23 um 12:34 schrieb Kevin Wolf:
Am 02.02.2023 um 11:19 hat Fiona Ebner geschrieben:
Am 31.01.23 um 19:18 schrieb Denis V. Lunev:
Frankly speaking I would say that this switch could be considered
NOT QEMU job and we should just send a notification
On 2/2/23 11:19, Fiona Ebner wrote:
Am 31.01.23 um 19:18 schrieb Denis V. Lunev:
On 1/31/23 18:44, Vladimir Sementsov-Ogievskiy wrote:
+ Den
Den, I remember we thought about that, and probably had a solution?
Another possible approach to get benefits from both modes is to switch
to blocking
On 1/31/23 18:44, Vladimir Sementsov-Ogievskiy wrote:
+ Den
Den, I remember we thought about that, and probably had a solution?
Another possible approach to get benefits from both modes is to switch
to blocking mode after first loop of copying. [*]
Hmm. Thinking about proposed solution it
On 1/12/23 16:01, Alexander Ivanov wrote:
Repair an image at opening if the image is unclean or out-of-image
corruption was detected.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 67 +--
1 file changed, 36 insertions(+), 31 deletions(-)
On 1/12/23 16:01, Alexander Ivanov wrote:
Repair an image at opening if the image is unclean or out-of-image
corruption was detected.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 67 +--
1 file changed, 36 insertions(+), 31 deletions(-)
if (test_bit(cluster_index, bitmap)) {
/* this cluster duplicates another one */
-fprintf(stderr,
- "%s duplicate offset in BAT entry %u\n",
-*fix & BDRV_FIX_ERRORS ? "Repairing" : "ERROR", i);
+qemu_log("%s duplicate offset in BAT entry %u\n",
+ *fix & BDRV_FIX_ERRORS ? "Repairing" : "ERROR", i);
res->corruptions++;
Reviewed-by: Denis V. Lunev
On 1/12/23 16:01, Alexander Ivanov wrote:
Cluster offsets must be unique among all the BAT entries. Find duplicate
offsets in the BAT and fix it by copying the content of the relevant
cluster to a newly allocated cluster and set the new cluster offset to the
duplicated entry.
Add
_SECTOR_BITS;
-if (off > size) {
+if (off + s->cluster_size > size) {
fprintf(stderr, "%s cluster %u is outside image\n",
fix & BDRV_FIX_ERRORS ? "Repairing" : "ERROR", i);
res->corruptions++;
Reviewed-by: Denis V. Lunev
On 1/31/23 11:27, 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 | 85
On 1/31/23 11:27, Alexander Ivanov wrote:
Exclude out-of-image clusters from allocated and fragmented clusters
calculation.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/parallels.c b/block/parallels.c
index
}
+
+res->bfi.allocated_clusters++;
+
+if (prev_off != 0 && (prev_off + s->cluster_size) != off) {
+res->bfi.fragmented_clusters++;
+}
+prev_off = off;
+ }
+
if (size > res->image_end_offset) {
int64_t count;
count = DIV_ROUND_UP(size - res->image_end_offset, s->cluster_size);
Reviewed-by: Denis V. Lunev
s->data_end = res->image_end_offset >> BDRV_SECTOR_BITS;
+}
+
if (size > res->image_end_offset) {
int64_t count;
count = DIV_ROUND_UP(size - res->image_end_offset, s->cluster_size);
Reviewed-by: Denis V. Lunev
On 1/12/23 16:01, Alexander Ivanov wrote:
We need to fix leak after deduplication in the next patch. Move leak
fixing to a separate helper parallels_fix_leak() and add
parallels_get_leak_size() helper wich used in parallels_fix_leak() and
parallels_check_leak().
Signed-off-by: Alexander Ivanov
Hi Stefan!
On 1/23/23 20:38, Andrey Drobyshev wrote:
Hi Stefan,
On 1/23/23 19:28, Stefan Weil wrote:
Hi,
cross builds fail with this code. Please see details below.
Am 29.11.22 um 18:38 schrieb Andrey Drobyshev via:
This commit allows QGA to write to Windows event log using Win32 API's
On 8/10/22 13:06, danko babro wrote:
Dear QEMU dev team,
Recently a game called VRChat got a security update, implementing Easy
Anti Cheat into their game (pretty much spyware that logs everything
happening on the users PC) which made me want to install their game on
a virtual machine.
The
On 10/5/22 14:21, Stefan Hajnoczi wrote:
On Wed, 5 Oct 2022 at 00:19, Ming Lei wrote:
On Tue, Oct 04, 2022 at 09:53:32AM -0400, Stefan Hajnoczi wrote:
On Tue, 4 Oct 2022 at 05:44, Ming Lei wrote:
On Mon, Oct 03, 2022 at 03:53:41PM -0400, Stefan Hajnoczi wrote:
On Fri, Sep 30, 2022 at
On 9/29/22 09:37, Gerd Hoffmann wrote:
On Wed, Sep 28, 2022 at 05:52:44PM +0200, Denis V. Lunev wrote:
This property is needed for WHQL/inboxing of Windows drivers. We do need
to get drivers to be separated by the hypervisor vendors and that should
be done as PCI subvendor ID.
This patch adds
On 10/3/22 21:53, Stefan Hajnoczi wrote:
On Fri, Sep 30, 2022 at 05:24:11PM +0800, Ming Lei wrote:
ublk-qcow2 is available now.
Cool, thanks for sharing!
yep
So far it provides basic read/write function, and compression and snapshot
aren't supported yet. The target/backend implementation is
On 9/29/22 13:48, Markus Armbruster wrote:
"Denis V. Lunev" writes:
There are a lot of commits descriptions which are rendered in the
'git log' with line wrap. Apparently, this is looking awkward. Let us
add check into checkpatch.pl for that.
I am not very good Perl
have faced a lot of
obstacles here thus direct port from them looks beneficial.
Signed-off-by: Denis V. Lunev
CC: Alexey Kardashevskiy
CC: "Philippe Mathieu-Daudé"
CC: "Marc-André Lureau"
CC: Paolo Bonzini
CC: Eric Blake
CC: Markus Armbruster
---
roms/SLOF
have faced a lot of
obstacles here thus direct port from them looks beneficial.
Signed-off-by: Denis V. Lunev
CC: Alexey Kardashevskiy
CC: "Philippe Mathieu-Daudé"
CC: "Marc-André Lureau"
CC: Paolo Bonzini
CC: Eric Blake
CC: Markus Armbruster
---
Changes from v1:
- fixed for
been written by Denis Plotnikov
while he has been working in Virtuozzo.
Signed-off-by: Denis V. Lunev
CC: Denis Plotnikov
CC: Yan Vugenfirer
CC: Gerd Hoffmann
---
hw/display/qxl.c | 4
hw/display/qxl.h | 1 +
2 files changed, 5 insertions(+)
diff --git a/hw/display/qxl.c b/hw/display/qxl.c
On 9/26/22 12:05, Vladimir Sementsov-Ogievskiy wrote:
[+ Den]
On 9/25/22 16:53, luzhipeng wrote:
From: lu zhipeng
Prevent the NBD socket stuck all the time, So
set timeout.
Signed-off-by: lu zhipeng
---
nbd/client.c | 8
1 file changed, 8 insertions(+)
diff --git
On 9/21/22 10:36, songlinfeng wrote:
From: songlinfeng
we want to export a image with qemu-nbd as server, in client we use libnbd to
connect qemu-nbd,but when client power down,the server is still working.
qemu-nbd will exit when last client exit.so,we still want server exit when
client
On 9/15/22 15:14, Michael Labiuk wrote:
Add pci bridge setting to test hotplug.
Duplicate tests for plugging scsi and virtio devices for q35 machine type.
Signed-off-by: Michael Labiuk
---
tests/qtest/hd-geo-test.c | 148 ++
1 file changed, 148
On 9/15/22 15:14, Michael Labiuk wrote:
Configure pci bridge setting to test ivshmem on 'q35'.
< empty line here is needed
Signed-off-by: Michael Labiuk
---
tests/qtest/ivshmem-test.c | 30 ++
1 file changed, 30 insertions(+)
diff --git
On 9/15/22 15:14, Michael Labiuk wrote:
Configure pci bridge setting to plug pci device and unplug.
Move common code for device removing to function.
Signed-off-by: Michael Labiuk
---
tests/qtest/device-plug-test.c | 83 --
1 file changed, 58 insertions(+), 25
On 9/8/22 19:15, Denis V. Lunev wrote:
On 9/2/22 10:52, Alexander Ivanov wrote:
Cluster offsets must be unique among all BAT entries.
Find duplicate offsets in the BAT.
If a duplicated offset is found fix it by copying the content
of the relevant cluster to a new allocated cluster and
set
On 9/2/22 10:52, Alexander Ivanov wrote:
Cluster offsets must be unique among all BAT entries.
Find duplicate offsets in the BAT.
If a duplicated offset is found fix it by copying the content
of the relevant cluster to a new allocated cluster and
set the new cluster offset to the duplicated
On 9/2/22 10:53, Alexander Ivanov wrote:
Repair an image at opening if the image is unclean or
out-of-image corruption was detected.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 95 ---
1 file changed, 65 insertions(+), 30 deletions(-)
On 8/24/22 11:50, 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. With this procedure
On 8/17/22 10:37, Denis V. Lunev wrote:
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
On 9/2/22 10:52, Alexander Ivanov wrote:
This patchset is based on
git: https://src.openvz.org/~den/qemu.git parallels
Fix incorrect data end calculation in parallels_open().
Add parallels_handle_leak() and highest_offset() helpers.
Add checking and repairing duplicate offsets in BAT.
On 9/2/22 10:52, Alexander Ivanov wrote:
This helper will be reused in the next patch for duplications check.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 65 +++
1 file changed, 43 insertions(+), 22 deletions(-)
diff --git
On 9/2/22 10:52, Alexander Ivanov wrote:
Cluster offsets must be unique among all BAT entries.
Find duplicate offsets in the BAT.
If a duplicated offset is found fix it by copying the content
of the relevant cluster to a new allocated cluster and
set the new cluster offset to the duplicated
On 9/2/22 10:53, Alexander Ivanov wrote:
Repair an image at opening if the image is unclean or
out-of-image corruption was detected.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 95 ---
1 file changed, 65 insertions(+), 30 deletions(-)
On 9/2/22 10:52, Alexander Ivanov wrote:
Use a standard QEMU function for logging.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/block/parallels.c b/block/parallels.c
index 688aa081e2..08526196da 100644
On 9/2/22 10:52, Alexander Ivanov wrote:
Deduplicate code by using highest_offset() helper.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 11 ++-
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/block/parallels.c b/block/parallels.c
index
DRV_SECTOR_BITS)) {
/* there is not enough unused space to fit to block align between BAT
and actual data. We can't avoid read-modify-write... */
s->header_size = size;
Reviewed-by: Denis V. Lunev
Sidenote: if the image is truncated for more than BAT size and
On 29.08.2022 12:12, 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.
v7:
1,2: Fix
On 29.08.2022 19:01, Michael Labiuk wrote:
Add pci bridge setting to run hotplug tests on q35 machine type.
Hotplug tests was bounded to 'pc' machine type by commit 7b172333f1b
Michael Labiuk (4):
tests/x86: Add subtest with 'q35' machine type to device-plug-test
tests/x86: Add 'q35'
On 17.08.2022 10:37, Denis V. Lunev wrote:
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
_SECTOR_BITS;
-if (off > size) {
+if (off >= size) {
fprintf(stderr, "%s cluster %u is outside image\n",
fix & BDRV_FIX_ERRORS ? "Repairing" : "ERROR", i);
res->corruptions++;
Reviewed-by: Denis V. Lunev
On 26.08.2022 15:23, Alexander Ivanov wrote:
On 26.08.2022 15:08, Denis V. Lunev wrote:
On 25.08.2022 16:31, 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
if (off == 0) {
+prev_off = 0;
+continue;
+}
+
+res->bfi.allocated_clusters++;
+
+if (prev_off != 0 && (prev_off + s->cluster_size) != off) {
+res->bfi.fragmented_clusters++;
+}
+prev_off = off;
+}
ated_clusters++;
if (off > high_off) {
high_off = off;
@@ -519,8 +548,6 @@ static int coroutine_fn parallels_co_check(BlockDriverState
*bs,
}
}
-s->data_end = res->image_end_offset >> BDRV_SECTOR_BITS;
-
out:
qemu_co_mutex_unlock(>lock);
Reviewed-by: Denis V. Lunev
res->image_end_offset >> BDRV_SECTOR_BITS;
+
out:
qemu_co_mutex_unlock(>lock);
return ret;
Reviewed-by: Denis V. Lunev
ontinue;
}
res->bfi.allocated_clusters++;
with string length fixes in the commit message (more that 74 chars)
Reviewed-by: Denis V. Lunev
t;data_end) {
s->data_end = off + s->tracks;
}
with string length fixes in the commit message (more that 74 chars)
Reviewed-by: Denis V. Lunev
On 26.08.2022 13:41, Michael Labiuk wrote:
Add pci bridge setting to run hotplug tests on q35 machine type.
Hotplug tests was bounded to 'pc' machine type by commit 7b172333f1b
Signed-off-by: Michael Labiuk
---
tests/qtest/device-plug-test.c | 26 ++
tests/qtest/drive_del-test.c |
We would have one more place for block_acct_setup() calling, which should
not corrupt original value.
Signed-off-by: Denis V. Lunev
Reviewed-by: Vladimir Sementsov-Ogievskiy
CC: Peter Krempa
CC: Markus Armbruster
CC: John Snow
CC: Kevin Wolf
CC: Hanna Reitz
---
block/accounting.c
201 - 300 of 2500 matches
Mail list logo