new clusters are allocated, the file size increases by 128 Mb. Call
parallels_check_leak() to fix this leak.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 144 ++
1 file changed, 144 insertions(+)
diff --git a/block/parallels.c b/block
In the on of the next patches we need to repair leaks without changing
leaks and leaks_fixed info in res. Also we don't want to print any warning
about leaks. Add "explicit" argument to skip info changing if the argument
is false.
Signed-off-by: Alexander Ivanov
---
block/parall
bdrv_co_getlength() should be used in coroutine context. Replace
bdrv_getlength() by bdrv_co_getlength() in parallels_check_outside_image().
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/parallels.c b/block
r 6): Fixed comments. Added O_INACTIVE check in the condition.
Replaced inuse detection by header_unclean checking.
Replaced playing with corutines by bdrv_check() usage.
Alexander Ivanov (8):
parallels: Incorrect data end calculation in parallels_open()
parallels:
Write a pattern to the first cluster. Corrupt the data_off field and check
if the field was repaired on image opening and the pattern has not changed.
Signed-off-by: Alexander Ivanov
---
tests/qemu-iotests/tests/parallels-checks | 15 +++
tests/qemu-iotests/tests/parallels
Images repairing in parallels_open() was added, thus parallels tests fail.
Access to an image leads to repairing the image. Further image check don't
detect any corruption. Remove reads after image creation in test 131.
Signed-off-by: Alexander Ivanov
---
tests/qemu-iotests/131 | 6
In this test cluster size is 64k, but modern tools generate images with
cluster size 1M. Calculate cluster size using track field from image header.
Signed-off-by: Alexander Ivanov
---
tests/qemu-iotests/131 | 5 -
tests/qemu-iotests/131.out | 44
Replace hardcoded numbers by variables.
Signed-off-by: Alexander Ivanov
---
tests/qemu-iotests/131 | 29 -
1 file changed, 16 insertions(+), 13 deletions(-)
diff --git a/tests/qemu-iotests/131 b/tests/qemu-iotests/131
index a847692b4c..601546c84c 100755
--- a/tests
Write a pattern to the last cluster, extend the image by 1 claster, repair
and check that the last cluster still has the same pattern.
Signed-off-by: Alexander Ivanov
---
tests/qemu-iotests/tests/parallels-checks | 27 +++
tests/qemu-iotests/tests/parallels-checks.out | 22
Fill the image with a pattern to generate entries in the BAT, set the first
BAT entry outside the image, try to read the corrupted image. At the image
opening it should be repaired, check for zeroes in the first cluster.
Signed-off-by: Alexander Ivanov
---
tests/qemu-iotests/tests/parallels
Fill a parallels image with a pattern and write another pattern to the
second cluster. Corrupt the image and check if the pattern changes. Repair
the image and check the patterns on guest and host sides.
Signed-off-by: Alexander Ivanov
---
tests/qemu-iotests/tests/parallels-checks | 32
to parallels_open().
v2:
5: Fix a typo.
7: Add a test for data_off check.
Alexander Ivanov (7):
iotests: Add out-of-image check test for parallels format
iotests: Add leak check test for parallels format
iotests: Add test for BAT entries duplication check
iotests: Refactor tests of parallels images
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
---
block/parallels.c | 98
In the next patch we will need the offset of the data area for host cluster
index calculation. Add this field and setting up code.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 7 ---
block/parallels.h | 1 +
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/block
t data_end contains the offset in bytes.
Replace the alignment to sector size by division by sector size and fix
the comparision with s->header_size.
Signed-off-by: Alexander Ivanov
Reviewed-by: Denis V. Lunev
Reviewed-by: Hanna Czenczek
---
block/parallels.c | 4 ++--
1 file changed, 2 ins
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 | 70 +--
1 file changed, 38 insertions(+), 32 deletions(-)
diff --git a/block/parallels.c b/block
Could you check this case?
Regards,
Mike.
On Thu, Apr 27, 2023 at 3:29 PM Alexander Ivanov
wrote:
Good point. Thank you.
Best regards,
Alexander Ivanov
On 4/26/23 23:56, Mike Maslenkin wrote:
On Mon, Apr 24, 2023 at 12:44 PM Alexander Ivanov
wrote:
Cluster offsets must be unique among all the BA
On 1/18/24 14:27, Denis V. Lunev wrote:
On 12/28/23 11:12, Alexander Ivanov wrote:
Now dirty bitmaps can be loaded but there is no their saving. Add
code for
dirty bitmap storage.
Signed-off-by: Alexander Ivanov
---
block/parallels-ext.c | 168
Could you please review the patch?
On 1/30/24 10:14, Alexander Ivanov wrote:
If a blockcommit is aborted the base image remains in RW mode, that leads
to a fail of subsequent live migration.
How to reproduce:
$ virsh snapshot-create-as vm snp1 --disk-only
*** write something to the disk
Ping. Could someone please review the code?
On 11/30/23 11:11, Alexander Ivanov wrote:
If a blockcommit is aborted the base image remains in RW mode, that leads
to a fail of subsequent live migration.
How to reproduce:
$ virsh snapshot-create-as vm snp1 --disk-only
*** write something
base image in RO mode in mirror_exit_common() if the blockjob
is aborted and the base image was opened in RO mode before the blockcommit.
Signed-off-by: Alexander Ivanov
---
block/mirror.c | 11 +--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/block/mirror.c b/block/mir
After used bitmap freeng s->used_bmap points to the freed memory. If we try
to free used bitmap one more time it leads to double free error.
Set s->used_bmap to NULL to exclude double free error.
Signed-off-by: Alexander Ivanov
Reviewed-by: Denis V. Lunev
---
block/parallels.c | 1 +
We will need this function and a function for marking unused clusters (will
be added in the next patch) in parallels-ext.c too. Let it be a global
function parallels_mark_used().
Signed-off-by: Alexander Ivanov
Reviewed-by: Denis V. Lunev
---
block/parallels.c | 14 --
block
orrect leaks
check.
Alexander Ivanov (21):
parallels: Set s->used_bmap to NULL in parallels_free_used_bitmap()
parallels: Move inactivation code to a separate function
parallels: Make mark_used() a global function
parallels: Limit search in parallels_mark_used to the last marked
In parallels_check_leak() we change file size but don't correct data_end
field of BDRVParallelsState structure. Fix it.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/block/parallels.c b/block/parallels.c
index 658902ae51..8a6e2ba7ee
.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 128 --
block/parallels.h | 3 ++
2 files changed, 71 insertions(+), 60 deletions(-)
diff --git a/block/parallels.c b/block/parallels.c
index 13726fb3d5..658902ae51 100644
--- a/block/parallels.c
In parallels_check_leak() file can be truncated. In this case the used
bitmap would not comply to the file. Recreate the bitmap after file
truncation.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 8
1 file changed, 8 insertions(+)
diff --git a/block/parallels.c b/block
On an image closing there can be unused clusters in the end of the image.
Truncate these clusters and update data_end field.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 20 ++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/block/parallels.c b/block
Since we have used bitmap, field data_end in BDRVParallelsState is
redundant and can be removed.
Add parallels_data_end() helper and remove data_end handling.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 33 +
block/parallels.h | 1 -
2 files changed
Let the function return a success code if a file size is not bigger than
image_end_offset. Thus we can decrease indents in the next code block.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 72 +++
1 file changed, 36 insertions(+), 36
Now dirty bitmaps can be loaded but there is no their saving. Add code for
dirty bitmap storage.
Signed-off-by: Alexander Ivanov
---
block/parallels-ext.c | 168 ++
block/parallels.c | 16 +++-
block/parallels.h | 5 ++
3 files changed, 187
Use a different bitmap name for parallels images because their has own ID
format, and can't contain an arbitrary string.
Replace image reopen by shutdown/launch VM because parallels images doesn't
support reopen.
Signed-off-by: Alexander Ivanov
---
tests/qemu-iotests/165 | 40
Use a different bitmap name for parallels images because their has own ID
format, and can't contain an arbitrary string.
Replace hardcoded 'qcow2' format to iotests.imgfmt.
Add 'parallels' to supported formats.
Signed-off-by: Alexander Ivanov
---
tests/qemu-iotests/tests/image-fleecing | 13
There is no necessity to search to the end of the bitmap. Limit the search
area as cluster_index + count.
Add cluster_end variable to avoid its calculation in a few places.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 9 +
1 file changed, 5 insertions(+), 4 deletions
Add a helper to set unused areas in the used bitmap.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 18 ++
block/parallels.h | 2 ++
2 files changed, 20 insertions(+)
diff --git a/block/parallels.c b/block/parallels.c
index 4470519656..13726fb3d5 100644
--- a/block
In parallels_check_duplicate() We use a bitmap for duplication detection.
This bitmap is not related to used_bmap field in BDRVParallelsState. Add
a comment about it to avoid confusion.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 5 -
1 file changed, 4 insertions(+), 1 deletion
We are going to add parallels image extensions storage and need a separate
function for inactivation code.
Signed-off-by: Alexander Ivanov
Reviewed-by: Denis V. Lunev
---
block/parallels.c | 22 --
1 file changed, 16 insertions(+), 6 deletions(-)
diff --git a/block
These tests pass with parallels format. Add parallels to supporting
formats for these tests.
Signed-off-by: Alexander Ivanov
---
tests/qemu-iotests/256 | 2 +-
tests/qemu-iotests/299 | 2 +-
tests/qemu-iotests/304 | 2 +-
tests/qemu
Since we have used bitmap, leak check is useless. Transform
parallels_truncate_unused_clusters() to parallels_check_unused_clusters()
helper and use it in leak check.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 121 +-
1 file changed, 67
Now we support extensions saving and can let to work with them in
read-write mode.
Signed-off-by: Alexander Ivanov
---
block/parallels-ext.c | 4
block/parallels.c | 17 -
2 files changed, 4 insertions(+), 17 deletions(-)
diff --git a/block/parallels-ext.c b/block
After bitmap loading the bitmap is not persistent and is removed on image
saving. Set bitmap persistence to true.
Signed-off-by: Alexander Ivanov
---
block/parallels-ext.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/block/parallels-ext.c b/block/parallels-ext.c
index 033ca3ec3a
All the checks were fixed to work with used bitmap. Create used bitmap in
parallels_open() even if need_check is true.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 10 --
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/block/parallels.c b/block/parallels.c
index
If all the bits in a dirty bitmap cluster are ones, the cluster shouldn't
be written. Instead the corresponding L1 entry should be set to 1.
Check if all bits in a memory region are ones and set 1 to L1 entries
corresponding clusters filled with ones.
Signed-off-by: Alexander Ivanov
---
block
Since we have used bitmap, field data_end in BDRVParallelsState is
redundant and can be removed.
Add parallels_data_end() helper and remove data_end handling.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 33 +
block/parallels.h | 1 -
2 files changed
.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 128 --
block/parallels.h | 3 ++
2 files changed, 71 insertions(+), 60 deletions(-)
diff --git a/block/parallels.c b/block/parallels.c
index 13726fb3d5..658902ae51 100644
--- a/block/parallels.c
Add a helper to set unused areas in the used bitmap.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 18 ++
block/parallels.h | 2 ++
2 files changed, 20 insertions(+)
diff --git a/block/parallels.c b/block/parallels.c
index 4470519656..13726fb3d5 100644
--- a/block
All the checks were fixed to work with used bitmap. Create used bitmap in
parallels_open() even if need_check is true.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 10 --
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/block/parallels.c b/block/parallels.c
index
Sorry, incorrect patch set, please ignore.
On 12/28/23 10:41, Alexander Ivanov wrote:
After used bitmap freeng s->used_bmap points to the freed memory. If we try
to free used bitmap one more time it leads to double free error.
Set s->used_bmap to NULL to exclude double free error.
Sign
Let the function return a success code if a file size is not bigger than
image_end_offset. Thus we can decrease indents in the next code block.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 72 +++
1 file changed, 36 insertions(+), 36
In parallels_check_duplicate() We use a bitmap for duplication detection.
This bitmap is not related to used_bmap field in BDRVParallelsState. Add
a comment about it to avoid confusion.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 5 -
1 file changed, 4 insertions(+), 1 deletion
There is no necessity to search to the end of the bitmap. Limit the search
area as cluster_index + count.
Add cluster_end variable to avoid its calculation in a few places.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 9 +
1 file changed, 5 insertions(+), 4 deletions
If all the bits in a dirty bitmap cluster are ones, the cluster shouldn't
be written. Instead the corresponding L1 entry should be set to 1.
Check if all bits in a memory region are ones and set 1 to L1 entries
corresponding clusters filled with ones.
Signed-off-by: Alexander Ivanov
---
block
These tests pass with parallels format. Add parallels to supporting
formats for these tests.
Signed-off-by: Alexander Ivanov
---
tests/qemu-iotests/256 | 2 +-
tests/qemu-iotests/299 | 2 +-
tests/qemu-iotests/304 | 2 +-
tests/qemu
After bitmap loading the bitmap is not persistent and is removed on image
saving. Set bitmap persistence to true.
Signed-off-by: Alexander Ivanov
---
block/parallels-ext.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/block/parallels-ext.c b/block/parallels-ext.c
index 033ca3ec3a
In parallels_check_leak() file can be truncated. In this case the used
bitmap would not comply to the file. Recreate the bitmap after file
truncation.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 8
1 file changed, 8 insertions(+)
diff --git a/block/parallels.c b/block
Now we support extensions saving and can let to work with them in
read-write mode.
Signed-off-by: Alexander Ivanov
---
block/parallels-ext.c | 4
block/parallels.c | 17 -
2 files changed, 4 insertions(+), 17 deletions(-)
diff --git a/block/parallels-ext.c b/block
We will need this function and a function for marking unused clusters (will
be added in the next patch) in parallels-ext.c too. Let it be a global
function parallels_mark_used().
Signed-off-by: Alexander Ivanov
Reviewed-by: Denis V. Lunev
---
block/parallels.c | 14 --
block
On an image closing there can be unused clusters in the end of the image.
Truncate these clusters and update data_end field.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 20 ++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/block/parallels.c b/block
Since we have used bitmap, leak check is useless. Transform
parallels_truncate_unused_clusters() to parallels_check_unused_clusters()
helper and use it in leak check.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 121 +-
1 file changed, 67
Now dirty bitmaps can be loaded but there is no their saving. Add code for
dirty bitmap storage.
Signed-off-by: Alexander Ivanov
---
block/parallels-ext.c | 168 ++
block/parallels.c | 16 +++-
block/parallels.h | 5 ++
3 files changed, 187
After used bitmap freeng s->used_bmap points to the freed memory. If we try
to free used bitmap one more time it leads to double free error.
Set s->used_bmap to NULL to exclude double free error.
Signed-off-by: Alexander Ivanov
Reviewed-by: Denis V. Lunev
---
block/parallels.c | 1 +
Use a different bitmap name for parallels images because their has own ID
format, and can't contain an arbitrary string.
Replace image reopen by shutdown/launch VM because parallels images doesn't
support reopen.
Signed-off-by: Alexander Ivanov
---
tests/qemu-iotests/165 | 40
Use a different bitmap name for parallels images because their has own ID
format, and can't contain an arbitrary string.
Replace hardcoded 'qcow2' format to iotests.imgfmt.
Add 'parallels' to supported formats.
Signed-off-by: Alexander Ivanov
---
tests/qemu-iotests/tests/image-fleecing | 13
We are going to add parallels image extensions storage and need a separate
function for inactivation code.
Signed-off-by: Alexander Ivanov
Reviewed-by: Denis V. Lunev
---
block/parallels.c | 22 --
1 file changed, 16 insertions(+), 6 deletions(-)
diff --git a/block
In parallels_check_leak() we change file size but don't correct data_end
field of BDRVParallelsState structure. Fix it.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/block/parallels.c b/block/parallels.c
index 658902ae51..8a6e2ba7ee
blockjob
is aborted.
Signed-off-by: Alexander Ivanov
---
block/mirror.c | 4
1 file changed, 4 insertions(+)
diff --git a/block/mirror.c b/block/mirror.c
index dcd88de2e3..50a2825b1c 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -789,6 +789,10 @@ static int mirror_exit_common(
base BDS in RO in this case.
Signed-off-by: Alexander Ivanov
---
block/mirror.c | 38 --
1 file changed, 36 insertions(+), 2 deletions(-)
diff --git a/block/mirror.c b/block/mirror.c
index 5145eb53e1..52a7fee75e 100644
--- a/block/mirror.c
+++ b/block/mirror.c
On 10/30/23 10:09, Denis V. Lunev wrote:
On 10/30/23 10:06, Denis V. Lunev wrote:
On 10/27/23 09:46, Alexander Ivanov wrote:
Add a helper to set unused areas in the used bitmap.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 17 +
block/parallels.h | 2 ++
2
On 1/18/24 14:31, Denis V. Lunev wrote:
On 1/16/24 15:45, Denis V. Lunev wrote:
On 12/28/23 11:12, Alexander Ivanov wrote:
Now we support extensions saving and can let to work with them in
read-write mode.
Signed-off-by: Alexander Ivanov
---
block/parallels-ext.c | 4
block
On 1/18/24 14:37, Denis V. Lunev wrote:
On 12/28/23 11:12, Alexander Ivanov wrote:
If all the bits in a dirty bitmap cluster are ones, the cluster
shouldn't
be written. Instead the corresponding L1 entry should be set to 1.
Check if all bits in a memory region are ones and set 1 to L1
There could be non-transient extensions that require presence of the
extensions cluster during work. Mark extensions cluster as used at
extensions loading end nullify l1 tables of dirty bitmaps.
Use this cluster at dirty bitmap saving if it exists.
Signed-off-by: Alexander Ivanov
---
block
15: Fixed (end_off != s->used_bmap_size) handling in
parallels_truncate_unused_clusters().
16,17: Changed the sequence of the patches - in this way we have correct leaks
check.
Alexander Ivanov (21):
parallels: Set s->used_bmap to NULL in parallels_free_used_bitmap()
parallels: Move ina
Add a helper to set unused areas in the used bitmap.
Signed-off-by: Alexander Ivanov
Reviewed-by: Denis V. Lunev
---
block/parallels.c | 18 ++
block/parallels.h | 2 ++
2 files changed, 20 insertions(+)
diff --git a/block/parallels.c b/block/parallels.c
index 4470519656
Let the function return a success code if a file size is not bigger than
image_end_offset. Thus we can decrease indents in the next code block.
Signed-off-by: Alexander Ivanov
Reviewed-by: Denis V. Lunev
---
block/parallels.c | 72 +++
1 file changed
In parallels_check_duplicate() We use a bitmap for duplication detection.
This bitmap is not related to used_bmap field in BDRVParallelsState. Add
a comment about it to avoid confusion.
Signed-off-by: Alexander Ivanov
Reviewed-by: Denis V. Lunev
---
block/parallels.c | 5 -
1 file changed
These tests pass with parallels format. Add parallels to supporting
formats for these tests.
Signed-off-by: Alexander Ivanov
---
tests/qemu-iotests/256 | 2 +-
tests/qemu-iotests/299 | 2 +-
tests/qemu-iotests/304 | 2 +-
tests/qemu
Use a different bitmap name for parallels images because their has own ID
format, and can't contain an arbitrary string.
Replace hardcoded 'qcow2' format to iotests.imgfmt.
Add 'parallels' to supported formats.
Signed-off-by: Alexander Ivanov
---
tests/qemu-iotests/tests/image-fleecing | 13
Use a different bitmap name for parallels images because their has own ID
format, and can't contain an arbitrary string.
Replace image reopen by shutdown/launch VM because parallels images doesn't
support reopen.
Signed-off-by: Alexander Ivanov
---
tests/qemu-iotests/165 | 40
In parallels_check_leak() file can be truncated. In this case the used
bitmap would not comply to the file. Recreate the bitmap after file
truncation.
Signed-off-by: Alexander Ivanov
Reviewed-by: Denis V. Lunev
---
block/parallels.c | 8
1 file changed, 8 insertions(+)
diff --git
There is no necessity to search to the end of the bitmap. Limit the search
area as cluster_index + count.
Add cluster_end variable to avoid its calculation in a few places.
Signed-off-by: Alexander Ivanov
Reviewed-by: Denis V. Lunev
---
block/parallels.c | 9 +
1 file changed, 5
We are going to add parallels image extensions storage and need a separate
function for inactivation code.
Signed-off-by: Alexander Ivanov
Reviewed-by: Denis V. Lunev
---
block/parallels.c | 22 --
1 file changed, 16 insertions(+), 6 deletions(-)
diff --git a/block
Now we support extensions saving and can let to work with them in
read-write mode.
Place dirty bitmap loading after used bitmap initialization - in the next
patch we will work with used bitmap during dirty bitmap loading.
Signed-off-by: Alexander Ivanov
---
block/parallels-ext.c | 4
In parallels_check_leak() we change file size but don't correct data_end
field of BDRVParallelsState structure. Fix it.
Signed-off-by: Alexander Ivanov
Reviewed-by: Denis V. Lunev
---
block/parallels.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/block/parallels.c b/block/parallels.c
After bitmap loading the bitmap is not persistent and is removed on image
saving. Set bitmap persistence to true.
Signed-off-by: Alexander Ivanov
Reviewed-by: Denis V. Lunev
---
block/parallels-ext.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/block/parallels-ext.c b/block/parallels
called for all
such clusters.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 45 +
block/parallels.h | 1 -
2 files changed, 13 insertions(+), 33 deletions(-)
diff --git a/block/parallels.c b/block/parallels.c
index fd80179642..11b6f97454
If all the bits in a dirty bitmap cluster are ones, the cluster shouldn't
be written. Instead the corresponding L1 entry should be set to 1.
Check if all bits in a memory region are ones and set 1 to L1 entries
corresponding clusters filled with ones.
Signed-off-by: Alexander Ivanov
---
block
From: "Denis V. Lunev"
This data is obsolete.
The approach is exactly the same like we use with QCOW2.
Signed-off-by: Denis V. Lunev
---
block/parallels-ext.c | 8
1 file changed, 8 insertions(+)
diff --git a/block/parallels-ext.c b/block/parallels-ext.c
index
.
Signed-off-by: Alexander Ivanov
Reviewed-by: Denis V. Lunev
---
block/parallels.c | 123 +-
block/parallels.h | 3 ++
2 files changed, 71 insertions(+), 55 deletions(-)
diff --git a/block/parallels.c b/block/parallels.c
index 13726fb3d5..c6d82961c9
After used bitmap freeng s->used_bmap points to the freed memory. If we try
to free used bitmap one more time it leads to double free error.
Set s->used_bmap to NULL to exclude double free error.
Signed-off-by: Alexander Ivanov
Reviewed-by: Denis V. Lunev
---
block/parallels.c | 1 +
because it will be used
during work. At image inactivation we can skip it.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 106 +-
1 file changed, 68 insertions(+), 38 deletions(-)
diff --git a/block/parallels.c b/block/parallels.c
index 5155b8ac48
All the checks were fixed to work with used bitmap. Create used bitmap in
parallels_open() even if need_check is true.
In some checks (like duplication check) we need to work with used bitmap
so it have to be created before checks are running.
Signed-off-by: Alexander Ivanov
---
block
Now dirty bitmaps can be loaded but there is no their saving. Add code for
dirty bitmap storage.
Signed-off-by: Alexander Ivanov
---
block/parallels-ext.c | 187 ++
block/parallels.c | 16 +++-
block/parallels.h | 5 ++
3 files changed, 206
We will need this function and a function for marking unused clusters (will
be added in the next patch) in parallels-ext.c too. Let it be a global
function parallels_mark_used().
Signed-off-by: Alexander Ivanov
Reviewed-by: Denis V. Lunev
---
block/parallels.c | 14 --
block
If a block device is an LVM logical volume we can resize it using
standard LVM tools.
Add a helper to detect if a device is a DM device. In raw_co_truncate()
check if the block device is DM and resize it executing lvresize.
Signed-off-by: Alexander Ivanov
---
block/file-posix.c | 61
If a block device is an LVM logical volume we can resize it using
standard LVM tools.
Add a helper to detect if a device is a DM device. In raw_co_truncate()
check if the block device is DM and resize it executing lvresize.
Signed-off-by: Alexander Ivanov
---
block/file-posix.c | 61
On 3/14/24 13:44, Daniel P. Berrangé wrote:
On Wed, Mar 13, 2024 at 11:43:27AM +0100, Alexander Ivanov wrote:
If a block device is an LVM logical volume we can resize it using
standard LVM tools.
Add a helper to detect if a device is a DM device. In raw_co_truncate()
check if the block
On 2/28/24 17:48, Vladimir Sementsov-Ogievskiy wrote:
On 09.02.24 15:29, Alexander Ivanov wrote:
Could you please review the patch?
Sorry for long delay.
Honestly, I don't like refcnt in block-driver. It violate
incapsulation, refcnt is interal thing of common block layer. And
actually
If a block device is an LVM logical volume we can resize it using
standard LVM tools.
In raw_co_truncate() check if the block device is a LV using lvdisplay
and resize it executing lvresize.
Signed-off-by: Alexander Ivanov
---
block/file-posix.c | 27 +++
1 file changed
Thank you for the review.
On 3/11/24 19:24, Daniel P. Berrangé wrote:
On Mon, Mar 11, 2024 at 06:40:44PM +0100, Alexander Ivanov wrote:
If a block device is an LVM logical volume we can resize it using
standard LVM tools.
In raw_co_truncate() check if the block device is a LV using lvdisplay
base image is in RW mode at the end of blockcommit and was in RO
mode before blockcommit, reopen the base BDS in RO.
Signed-off-by: Alexander Ivanov
---
block/mirror.c | 11 +--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/block/mirror.c b/block/mirror.c
index 1bdce3b657.
401 - 500 of 514 matches
Mail list logo