st FYI.
As a workaround I reduced the virtio-blk queue-size to 16
and it seems to work again. I am only keeping this configuration to test
that it boots thus performance is not an issue.
Option to override the coroutine pool size would be ideal in this case IMHO
though.
Best regards,
Maxim Levitsky
emu-iotests/122
> +++ b/tests/qemu-iotests/122
> @@ -67,7 +67,7 @@ echo
> _make_test_img -b "$TEST_IMG".base -F $IMGFMT
>
> $QEMU_IO -c "write -P 0 0 3M" "$TEST_IMG" 2>&1 | _filter_qemu_io |
> _filter_testdir
> -$QEMU_IMG convert -O $IMGFMT -B "$TEST_IMG".base -o backing_fmt=$IMGFMT \
> +$QEMU_IMG convert -O $IMGFMT -B "$TEST_IMG".base -F $IMGFMT \
> "$TEST_IMG" "$TEST_IMG".orig
> $QEMU_IO -c "read -P 0 0 3M" "$TEST_IMG".orig 2>&1 | _filter_qemu_io |
> _filter_testdir
> $QEMU_IMG convert -O $IMGFMT -c -B "$TEST_IMG".base -o backing_fmt=$IMGFMT \
I have seen that warning few times already in my scripts, so good to have this
option.
Reviewed-by: Maxim Levitsky
Best regards,
Maxim Levitsky
OMEM and -ENOSPC
and recycle the mappings in both cases?
I think that would work on both old and new kernels.
What do you think?
Best regards,
Maxim Levitsky
>
> Should I check uname(2)'s utsname.release[]? Is it reliable?
>
> > The block driver started to mis
the max iovec number.
https://www.mail-archive.com/qemu-devel@nongnu.org/msg768264.html
Best regards,
Maxim Levitsky
> }
> }
>
> diff --git a/hw/scsi/scsi-generic.c b/hw/scsi/scsi-generic.c
> index 98c30c5d5c..82e1e2ee79 100644
> --- a/hw/scsi/scsi-g
l.max_iov = ret;
> }
Roughly speaking this looks correct, but I might have missed something as well.
This is roughly the same as patches from Tom Yan which I carried in my series
https://www.mail-archive.com/qemu-devel@nongnu.org/msg768258.html
https://www.mail-archive.com/qemu-devel@nongnu.org/msg768262.html
I like a bit more how he created separate functions for /dev/sg and for all
other block devices.
Please take a look.
Also not related to this patch, you are missing my fix I did to the VPD limit
emulation, please consider taking
it into the series:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg768260.html
Best regards,
Maxim Levitsky
something
as I haven't touched this area for a long time.
Reviewed-by: Maxim Levitsky
Best regards,
Maxim Levitsky
> ---
> block/block-backend.c | 12
> block/file-posix.c | 2 +-
> block/io.c | 1 +
> hw
_strdup_printf("/sys/dev/block/%u:%u/queue/max_segments",
> > major(st.st_rdev), minor(st.st_rdev));
> > sysfd = open(sysfspath, O_RDONLY);
> >
>
>
Other than that, this is the same as the patch from Tom Yan:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg768262.html
In this version he does check if the SG_GET_SG_TABLESIZE is defined, so
you might want to do this as well.
Best regards,
Maxim Levitsky
which I think is similar to this patch series.
Sorry that I kind of forgot about it for too much time.
https://www.mail-archive.com/qemu-devel@nongnu.org/msg768261.html
I'll need some time to swap-in this area so that I could compare our
patches to see if we missed something.
Best regards,
Maxim Levitsky
On Thu, 2020-11-12 at 17:04 +0200, Maxim Levitsky wrote:
> On Thu, 2020-11-12 at 07:45 -0600, Eric Blake wrote:
> > On 11/12/20 6:40 AM, Peter Lieven wrote:
> >
> > > > /*
> > > > - * Avoid that s->sector_next_statu
On Mon, 2020-11-16 at 15:48 +0100, Kevin Wolf wrote:
> Am 11.11.2020 um 16:39 hat Maxim Levitsky geschrieben:
> > On Linux, fallocate(fd, FALLOC_FL_PUNCH_HOLE) when it is used on a block
> > device,
> > without O_DIRECT can return -EBUSY if it races with another write
On Thu, 2020-12-17 at 18:56 +0200, Maxim Levitsky wrote:
> This patch series attempts to provide a solution to the problem of the
> transfer
> limits of the raw file driver (host_device/file-posix), some of which I
> already tried to fix in the past.
>
> I included 2 patches
On Thu, 2020-12-17 at 19:09 +0200, Maxim Levitsky wrote:
> Use the bdrv_co_delete_file interface to delete the underlying
> file if qcow2 initialization fails (e.g due to bad encryption secret)
>
> This makes the qcow2 driver behave the same way as the luks driver behaves.
>
&
If the qcow initialization fails, we should remove the file if it was
already created, to avoid leaving stale files around.
We already do this for luks raw images.
Signed-off-by: Maxim Levitsky
Reviewed-by: Alberto Garcia
---
block/qcow2.c | 8 +---
1 file changed, 5 insertions(+), 3
,
Maxim Levitsky
Maxim Levitsky (3):
crypto: luks: Fix tiny memory leak
block: add bdrv_co_delete_file_noerr
block: qcow2: remove the created file on initialization error
block.c | 22 ++
block/crypto.c| 13 ++---
block/qcow2.c
This function wraps bdrv_co_delete_file for the common case of removing a file,
which was just created by format driver, on an error condition.
It hides the -ENOTSUPP error, and reports all other errors otherwise.
Use it in luks driver
Signed-off-by: Maxim Levitsky
Reviewed-by: Alberto Garcia
When the underlying block device doesn't support the
bdrv_co_delete_file interface, an 'Error' object was leaked.
Signed-off-by: Maxim Levitsky
Reviewed-by: Alberto Garcia
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
block/crypto.c | 2 ++
1 file changed, 2 insertions(+)
dif
, and simultaneously, the block devices
that implement scsi passthrough will switch to 'blk_get_max_ioctl_transfer' to
query and to pass it to the guest.
Signed-off-by: Maxim Levitsky
---
block/block-backend.c | 12
block/io.c | 2 ++
include/bl
From: Tom Yan
We can and should get max transfer length and max segments for all host
devices / cdroms (on Linux).
Also use MIN_NON_ZERO instead when we clamp max transfer length against
max segments.
Signed-off-by: Tom Yan
Signed-off-by: Maxim Levitsky
---
block/file-posix.c | 57
copied to the guest, thus the guest never sees the VPD block
limits page as supported.
Bump the transfer size by 1 in this case.
Signed-off-by: Maxim Levitsky
---
hw/scsi/scsi-generic.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/hw/scsi/scsi-generic.c b/hw/scsi/
Signed-off-by: Maxim Levitsky
---
block/file-posix.c | 22 +-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/block/file-posix.c b/block/file-posix.c
index cbf1271773..2bf4d095a7 100644
--- a/block/file-posix.c
+++ b/block/file-posix.c
@@ -1179,6 +1179,26 @@ static
blk_get_max_ioctl_transfer interface.
Fixes: 867eccfed8 ("file-posix: Use max transfer length/segment count only for
SCSI passthrough")
Signed-off-by: Maxim Levitsky
---
block/file-posix.c | 7 ---
block/iscsi.c | 1 +
hw/scsi/scsi-generic.c | 4 ++--
3 files
an open question if this should be solved.
V2: fixed an issue in a patch from Tom Yan (thanks), and removed
refactoring from last patch according to Paulo's request.
V3: few cosmitic changes due to the review feedback.
Maxim Levitsky (3):
block: add max_ioctl_transf
On Thu, 2020-12-10 at 18:36 +0800, Tom Yan wrote:
> On Wed, 9 Dec 2020 at 21:54, Maxim Levitsky wrote:
> > From: Tom Yan
> >
> > We can and should get max transfer length and max segments for all host
> > devices / cdroms (on Linux).
> >
> > Also use
On Thu, 2020-12-10 at 13:54 +0300, Vladimir Sementsov-Ogievskiy wrote:
> 09.12.2020 23:33, Maxim Levitsky wrote:
> > This function wraps bdrv_co_delete_file for the common case of removing a
> > file,
> > which was just created by format driver, on an error condition.
On Thu, 2020-12-10 at 14:00 +0300, Vladimir Sementsov-Ogievskiy wrote:
> 09.12.2020 23:33, Maxim Levitsky wrote:
> > If the qcow initialization fails, we should remove the file if it was
> > already created, to avoid leaving stale files around.
> >
> > We already
t; > === OUTPUT END ===
> >
> > Test command exited with code: 1
> >
> >
> > The full log is available at
> > http://patchew.org/logs/20201209135355.561745-1-mlevi...@redhat.com/testing.checkpatch/?type=message.
> > ---
> > Email generated automatically by Patchew [https://patchew.org/].
> > Please send your feedback to patchew-de...@redhat.com
> >
>
> Time for v3?
I am waiting a bit to see if anything else pops up,
to avoid doing too much noise.
Best regards,
Maxim Levitsky
>
> Paolo
>
This function wraps bdrv_co_delete_file for the common case of removing a file,
which was just created by format driver, on an error condition.
It hides the -ENOTSUPP error, and reports all other errors otherwise.
Signed-off-by: Maxim Levitsky
Reviewed-by: Alberto Garcia
---
block.c
When the underlying block device doesn't support the
bdrv_co_delete_file interface, an 'Error' object was leaked.
Signed-off-by: Maxim Levitsky
Reviewed-by: Alberto Garcia
---
block/crypto.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/block/crypto.c b/block/crypto.c
i
feedback and reworked commit messages
V4: got rid of code duplication by adding bdrv_co_delete_file_noerr
and made the qcow2 driver use this function to delete
both the main and the data file.
V5: addresssed review feedback on reworked version.
Best regards,
Maxim Levitsky
Maxim Levitsky (4
This refactoring is now possible thanks to this function.
Signed-off-by: Maxim Levitsky
Reviewed-by: Alberto Garcia
---
block/crypto.c | 15 ++-
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/block/crypto.c b/block/crypto.c
index b3a5275132..1d30fde38e 100644
--- a
If the qcow initialization fails, we should remove the file if it was
already created, to avoid leaving stale files around.
We already do this for luks raw images.
Signed-off-by: Maxim Levitsky
Reviewed-by: Alberto Garcia
---
block/qcow2.c | 6 --
1 file changed, 4 insertions(+), 2
On Wed, 2020-12-09 at 18:41 +0100, Alberto Garcia wrote:
> On Wed 09 Dec 2020 05:44:41 PM CET, Maxim Levitsky wrote:
> > @@ -3847,12 +3847,13 @@ static int coroutine_fn
> > qcow2_co_create_opts(BlockDriver *drv,
> >
> > /* Create the qcow2 image (fo
On Wed, 2020-12-09 at 18:34 +0100, Alberto Garcia wrote:
> On Wed 09 Dec 2020 05:44:39 PM CET, Maxim Levitsky wrote:
> > +void coroutine_fn bdrv_co_delete_file_noerr(BlockDriverState *bs)
> > +{
> > +Error *local_err = NULL;
> > +
> > +
When the underlying block device doesn't support the
bdrv_co_delete_file interface, an 'Error' object was leaked.
Signed-off-by: Maxim Levitsky
Reviewed-by: Alberto Garcia
---
block/crypto.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/block/crypto.c b/block/crypto.c
i
This function wraps bdrv_co_delete_file for the common case of removing a file,
which was just created by format driver, on an error condition.
It hides the -ENOTSUPP error, and reports all other errors otherwise.
Signed-off-by: Maxim Levitsky
---
block.c | 23
If the qcow initialization fails, we should remove the file if it was
already created, to avoid leaving stale files around.
We already do this for luks raw images.
Signed-off-by: Maxim Levitsky
---
block/qcow2.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/block
This refactoring is now possible thanks to this function.
Signed-off-by: Maxim Levitsky
---
block/crypto.c | 15 ++-
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/block/crypto.c b/block/crypto.c
index b3a5275132..1d30fde38e 100644
--- a/block/crypto.c
+++ b/block
feedback and reworked commit messages
V4: got rid of code duplication by adding bdrv_co_delete_file_noerr
and made the qcow2 driver use this function to delete
both the main and the data file.
Best regards,
Maxim Levitsky
Maxim Levitsky (4):
crypto: luks: Fix tiny memory leak
block: add
block: use blk_get_max_ioctl_transfer for
> SCSI passthrough)
> 5/5 Checking commit 77c9000b7c30 (block/scsi: correctly emulate the VPD block
> limits page)
> ERROR: braces {} are necessary for all arms of this statement
> #39: FILE: hw/scsi/scsi-generic.c:204:
> +
copied to the guest, thus the guest never sees the VPD block
limits page as supported.
Bump the transfer size by 1 in this case.
Signed-off-by: Maxim Levitsky
---
hw/scsi/scsi-generic.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/hw/scsi/scsi-generic.c b/hw/scsi/
blk_get_max_ioctl_transfer interface.
Fixes: 867eccfed8 ("file-posix: Use max transfer length/segment count only for
SCSI passthrough")
Signed-off-by: Maxim Levitsky
---
block/file-posix.c | 4 ++--
block/iscsi.c | 1 +
hw/scsi/scsi-generic.c | 4 ++--
3 files changed, 5
Signed-off-by: Maxim Levitsky
---
block/file-posix.c | 22 +-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/block/file-posix.c b/block/file-posix.c
index 226ddbbdad..10ebc4c5b7 100644
--- a/block/file-posix.c
+++ b/block/file-posix.c
@@ -1181,6 +1181,26 @@ static
, and simultaneously, the block devices
that implement scsi passthrough will switch to 'blk_get_max_ioctl_transfer' to
query and to pass it to the guest.
Signed-off-by: Maxim Levitsky
---
block/block-backend.c | 12
block/io.c | 2 ++
include/bl
From: Tom Yan
We can and should get max transfer length and max segments for all host
devices / cdroms (on Linux).
Also use MIN_NON_ZERO instead when we clamp max transfer length against
max segments.
Signed-off-by: Tom Yan
Signed-off-by: Maxim Levitsky
---
block/file-posix.c | 59
an open question if this should be solved.
V2: fixed an issue in a patch from Tom Yan (thanks), and removed
refactoring from last patch according to Paulo's request.
Maxim Levitsky (3):
block: add max_ioctl_transfer to BlockLimits
block: use blk_get_max_ioctl_transfer for SCSI passt
On Tue, 2020-12-08 at 19:54 +0300, Vladimir Sementsov-Ogievskiy wrote:
> 08.12.2020 19:27, Maxim Levitsky wrote:
> > On Tue, 2020-12-08 at 18:47 +0300, Vladimir Sementsov-Ogievskiy wrote:
> > > 08.12.2020 17:21, Maxim Levitsky wrote:
> > > > If the qcow initializati
On Tue, 2020-12-08 at 18:47 +0300, Vladimir Sementsov-Ogievskiy wrote:
> 08.12.2020 17:21, Maxim Levitsky wrote:
> > If the qcow initialization fails, we should remove the file if it was
> > already created, to avoid leaving stale files around.
> >
> > We already
On Tue, 2020-12-08 at 16:26 +0100, Alberto Garcia wrote:
> On Tue 08 Dec 2020 03:21:59 PM CET, Maxim Levitsky wrote:
> > If the qcow initialization fails, we should remove the file if it was
> > already created, to avoid leaving stale files around.
> >
> > We already
If the qcow initialization fails, we should remove the file if it was
already created, to avoid leaving stale files around.
We already do this for luks raw images.
Signed-off-by: Maxim Levitsky
---
block/qcow2.c | 13 +
1 file changed, 13 insertions(+)
diff --git a/block/qcow2.c b
When the underlying block device doesn't support the
bdrv_co_delete_file interface, an 'Error' object was leaked.
Signed-off-by: Maxim Levitsky
---
block/crypto.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/block/crypto.c b/block/crypto.c
index aef5a5721a..b3a52751
feedback and reworked commit messages
Best regards,
Maxim Levitsky
Maxim Levitsky (2):
crypto: luks: Fix tiny memory leak
block: qcow2: remove the created file on initialization error
block/crypto.c | 2 ++
block/qcow2.c | 13 +
2 files changed, 15 insertions(+)
--
2.26.2
On Thu, 2020-11-12 at 14:08 -0800, Darrick J. Wong wrote:
> On Thu, Nov 12, 2020 at 01:00:56PM +0100, Jan Kara wrote:
> > On Thu 12-11-20 12:19:51, Jan Kara wrote:
> > > [added some relevant people and lists to CC]
> > >
> > > On Wed 11-11-20 17:44:05, Maxim
On Wed, 2020-11-04 at 19:32 +0200, Maxim Levitsky wrote:
> This patch series attempts to provide a solution to the problem of the
> transfer
> limits of the raw file driver (host_device/file-posix), some of which I
> already tried to fix in the past.
>
> I included 2 patches
On Wed, 2020-11-25 at 19:55 +0100, Alberto Garcia wrote:
> Signed-off-by: Alberto Garcia
> Suggested-by: Maxim Levitsky
> ---
> tests/qemu-iotests/313 | 103 +
> tests/qemu-iotests/313.out | 29 +++
> tests/qemu-iotests/group
On Tue, 2020-11-24 at 20:59 +0200, Maxim Levitsky wrote:
> On Tue, 2020-11-24 at 19:59 +0100, Alberto Garcia wrote:
> > On Tue 24 Nov 2020 10:17:23 AM CET, Kevin Wolf wrote:
> > > We can then continue work to find a minimal reproducer and merge the
> > > test
oblem yet, do you have any
> findings?
>
> Berto
>
I have a working reproducer script. I'll send it in a hour or so.
Best regards,
Maxim Levitsky
t; set_l2_entry(s, l2_slice, l2_index + i, new_l2_entry);
> > > +qcow2_cache_entry_mark_dirty(s->l2_table_cache, l2_slice);
> >
> > Good catch, but I think your order is wrong, too. We need the original
> > order from before 205fa50750:
> >
> > 1. qcow2_cache_entry_mark_dirty()
> >set_l2_entry() + set_l2_bitmap()
> >
> > 2. qcow2_free_any_cluster()
>
> I agree with Kevin on this.
I also agree, I haven't thought about this.
Best regards,
Maxim Levitsky
>
> Berto
>
On Mon, 2020-11-23 at 18:38 +0100, Kevin Wolf wrote:
> Am 23.11.2020 um 16:49 hat Maxim Levitsky geschrieben:
> > Commit 205fa50750 ("qcow2: Add subcluster support to zero_in_l2_slice()")
> > introduced a subtle change to code in zero_in_l2_slice:
> >
> &g
e to reproduce this on small test case so far.
Best regards,
Maxim Levitsky
(*)https://lists.gnu.org/archive/html/qemu-devel/2017-08/msg02760.html
(**)
https://patchwork.kernel.org/project/qemu-devel/patch/20180328133845.20632-1-be...@igalia.com/
(***)
https://patchwork.kernel.org/project/qemu-d
subcluster support to zero_in_l2_slice()")
Signed-off-by: Maxim Levitsky
---
block/qcow2-cluster.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c
index 485b4cb92e..267b46a4ca 100644
--- a/block/qcow2-cluster.c
+++ b/block/qcow2-clus
On Thu, 2020-11-12 at 12:19 +0100, Jan Kara wrote:
> [added some relevant people and lists to CC]
>
> On Wed 11-11-20 17:44:05, Maxim Levitsky wrote:
> > On Wed, 2020-11-11 at 17:39 +0200, Maxim Levitsky wrote:
> > > clone of "starship_production"
> >
won't have
write and discard sharing the same page.
Another thing that can be discussed is why is_allocated_sectors was patched
to convert short discards to writes. Probably because underlying hardware
ignores them or something? In theory we should detect this and fail
back to regular zeroin
On Wed, 2020-11-11 at 17:39 +0200, Maxim Levitsky wrote:
> clone of "starship_production"
The git-publish destroyed the cover letter:
For the reference this is for bz #1872633
The issue is that current kernel code that implements 'fallocate'
on kernel block devices roug
This helps avoid unneeded writes and discards.
Signed-off-by: Maxim Levitsky
---
qemu-img.c | 13 -
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/qemu-img.c b/qemu-img.c
index c2c56fc797..7e9b0f659f 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -1722,7 +1722,7
On Linux, fallocate(fd, FALLOC_FL_PUNCH_HOLE) when it is used on a block device,
without O_DIRECT can return -EBUSY if it races with another write to the same
page.
Since this is rare and discard is not a critical operation, ignore this error
Signed-off-by: Maxim Levitsky
---
block/file
clone of "starship_production"
Maxim Levitsky (2):
file-posix: allow -EBUSY errors during write zeros on raw block
devices
qemu-img: align next status sector on destination alignment.
block/file-posix.c | 1 +
qemu-img.c | 13 -
2 files changed, 9 insert
; 9).
> See logical_to_sectors() in sd.h of the kernel.
I see it now. I'll respin the patches in a few days I guess after the rest
of the patches are reviewed.
Best regards,
Maxim Levitsky
>
> On Thu, 5 Nov 2020 at 01:32, Maxim Levitsky wrote:
> > From: Tom Yan
On Tue, 2020-11-03 at 13:53 +0100, Max Reitz wrote:
> On 01.11.20 17:15, Maxim Levitsky wrote:
> > The recent changes that brought RCU delayed device deletion,
> > broke few tests and this test breakage went unnoticed.
> >
> > Fix this test by rewriting it in python
&g
The recent changes that brought RCU delayed device deletion,
broke few tests and this test breakage went unnoticed.
Fix this test by rewriting it in python
(which allows to wait for DEVICE_DELETED events before continuing).
Signed-off-by: Maxim Levitsky
Tested-by: Christian Borntraeger
filter_qmp_virtio_scsi can be used to filter virtio-scsi-pci/ccw differences.
Note that this patch was only tested on x86.
Suggested-by: Paolo Bonzini
Signed-off-by: Maxim Levitsky
Tested-by: Christian Borntraeger
Reviewed-by: Paolo Bonzini
---
tests/qemu-iotests/iotests.py | 10
essed review feedback
Best regards,
Maxim Levitsky
Maxim Levitsky (2):
iotests: add filter_qmp_virtio_scsi function
iotests: rewrite iotest 240 in python
tests/qemu-iotests/240| 219 ++
tests/qemu-iotests/240.out| 76 ++--
tests
block/scsi: correctly emulate the VPD block
> limits page)
> ERROR: braces {} are necessary for all arms of this statement
> #51: FILE: hw/scsi/scsi-generic.c:196:
> + if (page_idx >= r->buflen)
Sorry about that. Triple checked this code for correctness,
but didn't
blk_get_max_ioctl_transfer interface.
Fixes: 867eccfed8 ("file-posix: Use max transfer length/segment count only for
SCSI passthrough")
Signed-off-by: Maxim Levitsky
---
block/file-posix.c | 4 ++--
block/iscsi.c | 1 +
hw/scsi/scsi-generic.c | 4 ++--
3 files changed, 5
From: Tom Yan
We can and should get max transfer length and max segments for all host
devices / cdroms (on Linux).
Also use MIN_NON_ZERO instead when we clamp max transfer length against
max segments.
Signed-off-by: Tom Yan
Signed-off-by: Maxim Levitsky
---
block/file-posix.c | 61
copied to the guest, thus the guest never sees the VPD block
limits page as supported.
Bump the transfer size by 1 in this case.
I also refactored the code a bit, and I hopefully didn't introduce
another buffer overflow to this code...
Signed-off-by: Maxim Levitsky
---
hw
Signed-off-by: Maxim Levitsky
---
block/file-posix.c | 22 +-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/block/file-posix.c b/block/file-posix.c
index 6581f41b2b..c4df757504 100644
--- a/block/file-posix.c
+++ b/block/file-posix.c
@@ -1181,6 +1181,26 @@ static
, and simultaneously, the block devices
that implement scsi passthrough will switch to 'blk_get_max_ioctl_transfer' to
query and to pass it to the guest.
Signed-off-by: Maxim Levitsky
---
block/block-backend.c | 12
block/io.c | 2 ++
include/bl
an open question if this should be solved.
Maxim Levitsky (3):
block: add max_ioctl_transfer to BlockLimits
block: use blk_get_max_ioctl_transfer for SCSI passthrough
block/scsi: correctly emulate the VPD block limits page
Tom Yan (2):
file-posix: split hdev_refresh_limits from raw_re
The recent changes that brought RCU delayed device deletion,
broke few tests and this test breakage went unnoticed.
Fix this test by rewriting it in python
(which allows to wait for DEVICE_DELETED events before continuing).
Signed-off-by: Maxim Levitsky
---
tests/qemu-iotests/240 | 228
filter_qmp_virtio_scsi can be used to filter virtio-scsi-pci/ccw differences.
Note that this patch was only tested on x86.
Suggested-by: Paolo Bonzini
Signed-off-by: Maxim Levitsky
---
tests/qemu-iotests/iotests.py | 10 ++
1 file changed, 10 insertions(+)
diff --git a/tests/qemu
gards,
Maxim Levitsky
Maxim Levitsky (2):
iotests: add filter_qmp_virtio_scsi function
iotests: rewrite iotest 240 in python
tests/qemu-iotests/240| 228 +++---
tests/qemu-iotests/240.out| 76 +++-
tests/qemu-iotests/iotests.py | 10 ++
3
The recent changes that brought RCU delayed device deletion,
broke few tests and this test breakage went unnoticed.
Fix this test by rewriting it in python
(which allows to wait for DEVICE_DELETED events before continuing).
Signed-off-by: Maxim Levitsky
---
tests/qemu-iotests/240 | 228
The g_list_remove_link doesn't free the link element,
opposed to what I thought.
Switch to g_list_delete_link that does free it.
Also refactor the code a bit.
Thanks for Max Reitz for helping me with this.
Signed-off-by: Maxim Levitsky
---
tests/qtest/libqtest.c | 11 ---
1
Signed-off-by: Maxim Levitsky
---
include/hw/qdev-core.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
index 868973319e..3761186804 100644
--- a/include/hw/qdev-core.h
+++ b/include/hw/qdev-core.h
@@ -163,8 +163,8
By a mistake I added the pending events in a wrong order.
Fix this by using g_list_append.
Signed-off-by: Maxim Levitsky
---
tests/qtest/libqtest.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c
index 08929f5ff6..bd96cb6fdd
Just few fixes, for some stuff that slipped thorough.
Tested with make check, and qcow2/raw/nbd iotests.
Best regards,
Maxim Levitsky
Maxim Levitsky (4):
qdev: Fix two typos
libqtest: fix the order of buffered events
libqtest: fix memory leak in the qtest_qmp_event_ref
iotests
On Tue, 2020-10-13 at 14:26 +0200, Alberto Garcia wrote:
> On Sun 11 Oct 2020 12:21:35 PM CEST, Maxim Levitsky wrote:
> > In the case when underlying block device doesn't support the
> > bdrv_co_delete_file interface, an 'Error' wasn't freed.
>
If the qcow initialization fails after we created the storage file,
we should remove it to avoid leaving stale files around.
We already do this for luks raw images.
Signed-off-by: Maxim Levitsky
---
block/qcow2.c | 12
1 file changed, 12 insertions(+)
diff --git a/block/qcow2.c b
Use the bdrv_co_delete_file interface to delete the underlying
file if qcow2 initilization fails (e.g due to bad encryption secret)
This gives the qcow2 the same treatment as to luks.
V2: added a patch to fix a memory leak.
Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1845353
Maxim
In the case when underlying block device doesn't support the
bdrv_co_delete_file interface, an 'Error' wasn't freed.
Signed-off-by: Maxim Levitsky
---
block/crypto.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/block/crypto.c b/block/crypto.c
index 0807557763..9b6
On Tue, 2020-09-01 at 15:30 +0200, Alberto Garcia wrote:
> On Thu 16 Jul 2020 01:33:59 PM CEST, Maxim Levitsky wrote:
> > if (ret < 0) {
> > +
> > +Error *local_delete_err = NULL;
> > +int r_del = bdrv_co_del
On Tue, 2020-10-06 at 14:56 +0200, Paolo Bonzini wrote:
> On 06/10/20 14:38, Maxim Levitsky wrote:
> > The only remaining users of qtest_qmp_receive_dict are tests
> > that fuzz the QMP protocol.
> >
> > Tested with 'make check-qtest'.
>
> Probably the
can
avoid iterating twice, and therefore we avoid this race.
Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1866707
Signed-off-by: Maxim Levitsky
Reviewed-by: Stefan Hajnoczi
Message-Id: <20200913160259.32145-10-mlevi...@redhat.com>
Signed-off-by: Paolo Bonzini
---
hw/scsi/scsi-bus.
Add scsi_device_get which finds the scsi device
and takes a reference to it.
Suggested-by: Stefan Hajnoczi
Signed-off-by: Maxim Levitsky
Message-Id: <20200913160259.32145-8-mlevi...@redhat.com>
Signed-off-by: Paolo Bonzini
---
hw/scsi/scsi-bus.c | 11 +++
include/hw/scsi/
From: Paolo Bonzini
Check if an address is free on the bus before plugging in the
device. This makes it possible to do the check without any
side effects, and to detect the problem early without having
to do it in the realize callback.
Signed-off-by: Paolo Bonzini
---
hw/core/qdev.c |
From: Paolo Bonzini
Signed-off-by: Paolo Bonzini
---
hw/scsi/scsi-bus.c | 122 -
1 file changed, 75 insertions(+), 47 deletions(-)
diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c
index 3284a5d1fb..94921c04b1 100644
--- a/hw/scsi/scsi-bus.c
+++ b
Bonzini
Signed-off-by: Maxim Levitsky
Reviewed-by: Stefan Hajnoczi
Message-Id: <20200913160259.32145-7-mlevi...@redhat.com>
Signed-off-by: Paolo Bonzini
---
hw/scsi/scsi-bus.c | 83 +-
1 file changed, 53 insertions(+), 30 deletions(-)
diff --gi
This will help us to avoid the scsi device disappearing
after we took a reference to it.
It doesn't by itself forbid case when we try to access
an unrealized device
Suggested-by: Stefan Hajnoczi
Signed-off-by: Maxim Levitsky
Reviewed-by: Stefan Hajnoczi
Message-Id: <20200913160259
The only remaining users of qtest_qmp_receive_dict are tests
that fuzz the QMP protocol.
Tested with 'make check-qtest'.
Signed-off-by: Maxim Levitsky
---
tests/qtest/ahci-test.c | 4 +-
tests/qtest/device-plug-test.c | 2 +-
tests/qtest/drive_del-test.c| 9 ++---
t
qtest_qmp_event_ref a function which only scans
the buffer that qtest_qmp_receive stores the events to.
This is intended for callers that are only interested in events that were
received during the last call to the qtest_qmp_receive.
Suggested-by: Paolo Bonzini
Signed-off-by: Maxim Levitsky
---
tests/qtest
1 - 100 of 959 matches
Mail list logo