Am 08.08.2022 um 08:26 hat Markus Armbruster geschrieben:
> Daniel P. Berrangé writes:
>
> > On Thu, Aug 04, 2022 at 05:30:40PM +0200, Markus Armbruster wrote:
> >> Daniel P. Berrangé writes:
> >>
> >> > On Thu, Aug 04, 2022 at 04:56:15PM +0200, Markus Armbruster wrote:
> >> >> Daniel P. Berran
The way the dataplane stages at startup and stop are monitored is unnecessary
complicated. In virtio-scsi we have dataplane_started, dataplane_starting and
dataplane_stopping in VirtIOSCSI.
In virtio-blk we have dataplene_started in VirtIOBlock, and starting and
stopping
in VirtIOBlockDataPlane.
Simplify the various dataplane stages in dataplane_start/stop by using
a single enum instead of having multiple flags.
Read/write the enum atomically, as it can be read also by iothread
callbacks.
Signed-off-by: Emanuele Giuseppe Esposito
---
hw/scsi/virtio-scsi-dataplane.c | 21 +--
Virtio-blk uses VirtIOBlockDataPlane and VirtIOBlock to keep track of
the dataplane flags. This is completely unnecessary, as both structures
are always accessed together and we can simplify the sages with an enum.
Read/write the enum atomically, as it can be read also by iothread
callbacks.
Sign
Adding Paolo and Eduardo since we're wandering into QOM-land.
Kevin Wolf writes:
> Am 08.08.2022 um 08:26 hat Markus Armbruster geschrieben:
>> Daniel P. Berrangé writes:
>>
>> > On Thu, Aug 04, 2022 at 05:30:40PM +0200, Markus Armbruster wrote:
>> >> Daniel P. Berrangé writes:
>> >>
>> >> >
We will add more and more checks of images so we need to reorganize the code.
Put each check to a separate helper function with a separate loop.
Replace qemu_co_mutex_lock by WITH_QEMU_LOCK_GUARD for more clean code.
Fix a bug when out of image offset in BAT leads to image inflation.
Replace bdr
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 96 ---
1 file changed, 58 insertions(+), 38 deletions(-)
diff --git a/block/parallels.c b/block/parallels.c
index 7b400ecdcc..6d4cfb738b 100644
--- a/block/parallels.c
+++ b/block/parallels.c
@@
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
--- a/block/parallels.c
+++ b/block/parallels.c
@@ -413,6 +413,23 @@
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 38 +-
1 file changed, 25 insertions(+), 13 deletions(-)
diff --git a/block/parallels.c b/block/parallels.c
index 6d4cfb738b..0edbb812dd 100644
--- a/block/parallels.c
+++ b/block/parallels.c
@@ -530,12 +
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 attempts to create a file size of petabytes.
Set the d
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
+++ b/block/parallels.c
@@ -553,13 +553,29 @@ stat
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 --git a/block/parallels.c b/block/parallels.c
index 38
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
--- a/block/parallels.c
+++ b/block/parallels.c
@@
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 b/block/parallels.c
index 72cf7499c1..38b1482e81 100644
--
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
--
Replace the way that we use mutex in parallels_co_check() for more clean code.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 11 ---
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/block/parallels.c b/block/parallels.c
index b0982d60d0..3cb5452613 100644
--- a/blo
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 --git
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:
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 b/block/p
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 attempts
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/parall
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
--- a/block/parallel
On Fri, Aug 05, 2022 at 03:57:51PM +0800, Sam Li wrote:
> Add the documentation about the zoned device support to virtio-blk
> emulation.
>
> Signed-off-by: Sam Li
> ---
> docs/devel/zoned-storage.rst | 41 ++
> docs/system/qemu-block-drivers.rst.inc | 6
>
On Fri, Aug 05, 2022 at 03:57:46PM +0800, Sam Li wrote:
> Use sysfs attribute files to get the string value of device
> zoned model. Then get_sysfs_zoned_model can convert it to
> BlockZoneModel type in QEMU.
>
> Signed-off-by: Sam Li
> Reviewed-by: Hannes Reinecke
> ---
> block/file-posix.c
On Fri, Aug 05, 2022 at 03:57:45PM +0800, Sam Li wrote:
> Use sysfs attribute files to get the long value of zoned device
> information.
>
> Signed-off-by: Sam Li
> Reviewed-by: Hannes Reinecke
> ---
> block/file-posix.c | 37 +++--
> 1 file changed, 23 insertion
On Fri, Aug 05, 2022 at 03:57:49PM +0800, Sam Li wrote:
> Putting zoned/non-zoned BlockDrivers on top of each other is not
> allowed.
>
> Signed-off-by: Sam Li
> Reviewed-by: Stefan Hajnoczi
> ---
> block.c | 13 +
> block/file-posix.c | 1 +
>
On Fri, Aug 05, 2022 at 03:57:47PM +0800, Sam Li wrote:
> By adding zone management operations in BlockDriver, storage controller
> emulation can use the new block layer APIs including Report Zone and
> four zone management operations (open, close, finish, reset).
>
> Add zoned storage commands of
Stefan Hajnoczi 于2022年8月8日周一 21:52写道:
>
> On Fri, Aug 05, 2022 at 03:57:46PM +0800, Sam Li wrote:
> > Use sysfs attribute files to get the string value of device
> > zoned model. Then get_sysfs_zoned_model can convert it to
> > BlockZoneModel type in QEMU.
> >
> > Signed-off-by: Sam Li
> > Review
Stefan Hajnoczi 于2022年8月8日周一 21:52写道:
>
> On Fri, Aug 05, 2022 at 03:57:45PM +0800, Sam Li wrote:
> > Use sysfs attribute files to get the long value of zoned device
> > information.
> >
> > Signed-off-by: Sam Li
> > Reviewed-by: Hannes Reinecke
> > ---
> > block/file-posix.c | 37 +
On Mon, Aug 08, 2022 at 05:41:46AM -0400, Emanuele Giuseppe Esposito wrote:
> Simplify the various dataplane stages in dataplane_start/stop by using
> a single enum instead of having multiple flags.
>
> Read/write the enum atomically, as it can be read also by iothread
> callbacks.
What guarantee
On Mon, Aug 08, 2022 at 05:41:47AM -0400, Emanuele Giuseppe Esposito wrote:
> Virtio-blk uses VirtIOBlockDataPlane and VirtIOBlock to keep track of
> the dataplane flags. This is completely unnecessary, as both structures
> are always accessed together and we can simplify the sages with an enum.
s
On Mon, Aug 08, 2022 at 05:41:45AM -0400, Emanuele Giuseppe Esposito wrote:
> The way the dataplane stages at startup and stop are monitored is unnecessary
> complicated. In virtio-scsi we have dataplane_started, dataplane_starting and
> dataplane_stopping in VirtIOSCSI.
> In virtio-blk we have dat
As soon as virtio_scsi_data_plane_start() attaches host notifiers the
IOThread may start virtqueue processing. There is a race between
IOThread virtqueue processing and virtio_scsi_data_plane_start() because
it only assigns s->dataplane_started after attaching host notifiers.
When a virtqueue hand
On Mon, Aug 08, 2022 at 05:41:45AM -0400, Emanuele Giuseppe Esposito wrote:
> The way the dataplane stages at startup and stop are monitored is unnecessary
> complicated. In virtio-scsi we have dataplane_started, dataplane_starting and
> dataplane_stopping in VirtIOSCSI.
> In virtio-blk we have dat
On Mon, Aug 08, 2022 at 12:21:34PM -0400, Stefan Hajnoczi wrote:
> As soon as virtio_scsi_data_plane_start() attaches host notifiers the
> IOThread may start virtqueue processing. There is a race between
> IOThread virtqueue processing and virtio_scsi_data_plane_start() because
> it only assigns s-
On 8/2/22 08:35, Kevin Wolf wrote:
Am 24.07.2022 um 23:41 hat Liang Yan geschrieben:
Hello All,
I am facing a lock situation between main-loop thread 1 and vcpu thread 4
when doing a qmp snapshot. QEMU is running on 6.0.x, checked the upstream
code and did not see any big change since between.
36 matches
Mail list logo