Re: Which qemu change corresponds to RedHat bug 1655408

2020-10-12 Thread Max Reitz
On 10.10.20 00:54, Jakob Bohm wrote: [...] > Theoretically, locking on a raw file needs to be protocol-compatible > with loop-mounting the same raw file, so if the loop driver doesn't > probe those magic byte offsets to prevent out-of-order block writes, > then there is little point for the qemu

[PATCH v2 0/3] hw/ssi: Rename SSI 'slave' as 'peripheral'

2020-10-12 Thread Philippe Mathieu-Daudé
Since v1: - Fixed patch #1 subject (Kevin) In order to use inclusive terminology, rename SSI 'slave' as 'peripheral', following the resolution Paolo pointed in [*]: https://www.oshwa.org/a-resolution-to-redefine-spi-signal-names/ Candidate to be merged via the ARM or Trivial trees. [*]

[PATCH v2 1/3] hw/ssi/aspeed_smc: Rename 'max_slaves' variable as 'max_peripherals'

2020-10-12 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé In order to use inclusive terminology, rename max_slaves as max_peripherals. Patch generated using: $ sed -i s/slave/peripheral/ \ hw/ssi/aspeed_smc.c include/hw/ssi/aspeed_smc.h One line in aspeed_smc_read() has been manually tweaked to pass checkpatch.

[PATCH v2 3/3] hw/ssi: Rename SSI 'slave' as 'peripheral'

2020-10-12 Thread Philippe Mathieu-Daudé
In order to use inclusive terminology, rename SSI 'slave' as 'peripheral', following the specification resolution: https://www.oshwa.org/a-resolution-to-redefine-spi-signal-names/ Patch created mechanically using: $ sed -i s/SSISlave/SSIPeripheral/ $(git grep -l SSISlave) $ sed -i

[PATCH v2 2/3] hw/ssi: Update coding style to make checkpatch.pl happy

2020-10-12 Thread Philippe Mathieu-Daudé
To make the next commit easier to review, clean this code first. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/ssi/ssi.h | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/include/hw/ssi/ssi.h b/include/hw/ssi/ssi.h index fe3028c39dc..c15548425a3 100644

[PATCH] hw/scsi: remove dead code

2020-10-12 Thread Elena Afanasova
Since MEGASAS_MAX_SGE is defined to be 128 the following if statement can be removed. Spotted by PVS-Studio. Signed-off-by: Elena Afanasova --- hw/scsi/megasas.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c index e24c12d7ee..6dcaad55fa 100644 ---

[PATCH v2 1/3] block: push error reporting into bdrv_all_*_snapshot functions

2020-10-12 Thread Philippe Mathieu-Daudé
From: Daniel P. Berrangé The bdrv_all_*_snapshot functions return a BlockDriverState pointer for the invalid backend, which the callers then use to report an error message. In some cases multiple callers are reporting the same error message, but with slightly different text. In the future there

[PATCH v2 0/3] migration: Make save/load_snapshot() return boolean

2020-10-12 Thread Philippe Mathieu-Daudé
Since v1: - Initialize variables in first patch (Max) - Added Pavel's A-b tag I had a pair of patches making save_snapshot/load_snapshot() return a boolean (like Markus recent qdev/QOM cleanup), then realized Daniel already has series changing migration/, so I rebased my patches in the first part

[PATCH v2 3/3] migration: stop returning errno from load_snapshot()

2020-10-12 Thread Philippe Mathieu-Daudé
From: Daniel P. Berrangé None of the callers care about the errno value since there is a full Error object populated. This gives consistency with save_snapshot() which already just returns a boolean value. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. Berrangé [PMD: Return

[PATCH v2 2/3] migration: Make save_snapshot() return bool, not 0/-1

2020-10-12 Thread Philippe Mathieu-Daudé
Just for consistency, following the example documented since commit e3fe3988d7 ("error: Document Error API usage rules"), return a boolean value indicating an error is set or not. Acked-by: Pavel Dovgalyuk Signed-off-by: Philippe Mathieu-Daudé --- include/migration/snapshot.h | 9 -

Re: [PATCH v4 0/7] qemu-storage-daemon: Remove QemuOpts from --object

2020-10-12 Thread Kevin Wolf
Am 11.10.2020 um 09:34 hat Markus Armbruster geschrieben: > This replaces the QemuOpts-based help code for --object in the storage > daemon with code based on the keyval parser. > > Review of v3 led me to preexisting issues. Instead of posting my > fixes separately, then working with Kevin to

Re: [PATCH v2 1/3] block: push error reporting into bdrv_all_*_snapshot functions

2020-10-12 Thread Max Reitz
On 12.10.20 14:27, Philippe Mathieu-Daudé wrote: > From: Daniel P. Berrangé > > The bdrv_all_*_snapshot functions return a BlockDriverState pointer > for the invalid backend, which the callers then use to report an > error message. In some cases multiple callers are reporting the > same error

Re: [PATCH] migration/block-dirty-bitmap: fix uninitialized variable warning

2020-10-12 Thread Laurent Vivier
Le 10/10/2020 à 13:07, Chen Qun a écrit : > This if statement judgment is redundant and it will cause a warning: > > migration/block-dirty-bitmap.c:1090:13: warning: ‘bitmap_name’ may be used > uninitialized in this function [-Wmaybe-uninitialized] > g_strlcpy(s->bitmap_name,

Re: [PULL 00/30] Block patches

2020-10-12 Thread Stefan Hajnoczi
On Sun, Oct 11, 2020 at 07:32:58PM +0100, Peter Maydell wrote: > On Fri, 9 Oct 2020 at 20:35, Stefan Hajnoczi wrote: > > > > The following changes since commit 497d415d76b9f59fcae27f22df1ca2c3fa4df64e: > > > > Merge remote-tracking branch > > 'remotes/pmaydell/tags/pull-target-arm-20201008-1'

Re: [PATCH v4 4/7] keyval: Parse help options

2020-10-12 Thread Kevin Wolf
Am 11.10.2020 um 09:35 hat Markus Armbruster geschrieben: > From: Kevin Wolf > > This adds a special meaning for 'help' and '?' as options to the keyval > parser. Instead of being an error (because of a missing value) or a > value for an implied key, they now request help, which is a new boolean

Re: [PATCH v7 02/13] qtest: Reintroduce qtest_qmp_receive

2020-10-12 Thread Paolo Bonzini
On 12/10/20 13:14, Thomas Huth wrote: >> +/** >> + * qtest_qmp_receive: >> + * @s: #QTestState instance to operate on. >> + * >> + * Reads a QMP message from QEMU and returns the response. >> + * Buffers all the events received meanwhile, until a >> + * call to qtest_qmp_eventwait >> + */ >>

Re: [PATCH 1/4] vmdk: fix maybe uninitialized warnings

2020-10-12 Thread Laurent Vivier
Le 05/10/2020 à 08:26, Christian Borntraeger a écrit : > On 30.09.20 18:36, Fam Zheng wrote: >> On Wed, 2020-09-30 at 17:58 +0200, Christian Borntraeger wrote: >>> Fedora 32 gcc 10 seems to give false positives: >>> >>> Compiling C object libblock.fa.p/block_vmdk.c.o >>> ../block/vmdk.c: In

Re: [PATCH 10/10] hw/isa: Add the ISA_IRQ_IDE_DEFAULT definition

2020-10-12 Thread John Snow
On 10/11/20 3:32 PM, Philippe Mathieu-Daudé wrote: The IDE controller uses IRQ #14 by default. Add this default definition to the IsaIrqNumber enum. Avoid magic values in the code, replace them by the newly introduced definition. Signed-off-by: Philippe Mathieu-Daudé ---

Re: [PATCH] hw/scsi: remove dead code

2020-10-12 Thread Philippe Mathieu-Daudé
Hi Elena, On 10/12/20 3:32 PM, Elena Afanasova wrote: Since MEGASAS_MAX_SGE is defined to be 128 the following if statement can be removed. Spotted by PVS-Studio. Signed-off-by: Elena Afanasova --- hw/scsi/megasas.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/scsi/megasas.c

Re: [PATCH v7 02/13] qtest: Reintroduce qtest_qmp_receive

2020-10-12 Thread Thomas Huth
On 12/10/2020 15.47, Paolo Bonzini wrote: > On 12/10/20 13:14, Thomas Huth wrote: >>> +/** >>> + * qtest_qmp_receive: >>> + * @s: #QTestState instance to operate on. >>> + * >>> + * Reads a QMP message from QEMU and returns the response. >>> + * Buffers all the events received meanwhile, until a

Re: [PATCH 05/10] hw/isa: Add the ISA_IRQ_FDC_DEFAULT definition

2020-10-12 Thread John Snow
On 10/11/20 3:32 PM, Philippe Mathieu-Daudé wrote: The floppy disk controller uses IRQ #6 by default. Add this default definition to the IsaIrqNumber enum. Avoid magic values in the code, replace them by the newly introduced definition. Signed-off-by: Philippe Mathieu-Daudé Acked-by: John

Re: [PATCH] block/blkdebug: fix memory leak

2020-10-12 Thread Laurent Vivier
Le 09/10/2020 à 21:09, Elena Afanasova a écrit : > Spotted by PVS-Studio > > Signed-off-by: Elena Afanasova > --- > block/blkdebug.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/block/blkdebug.c b/block/blkdebug.c > index eecbf3e5c4..54da719dd1 100644 > --- a/block/blkdebug.c > +++

Re: [PATCH v7 02/13] qtest: Reintroduce qtest_qmp_receive

2020-10-12 Thread Thomas Huth
On 06/10/2020 14.38, Maxim Levitsky wrote: > The new qtest_qmp_receive buffers all the received qmp events, allowing > qtest_qmp_eventwait_ref to return them. > > This is intended to solve the race in regard to ordering of qmp events > vs qmp responses, as soon as the callers start using the new

Re: [PATCH 1/3] block: push error reporting into bdrv_all_*_snapshot functions

2020-10-12 Thread Max Reitz
On 12.10.20 12:16, Philippe Mathieu-Daudé wrote: > On 10/12/20 12:07 PM, Max Reitz wrote: >> On 08.10.20 19:48, Philippe Mathieu-Daudé wrote: >>> From: Daniel P. Berrangé >>> >>> The bdrv_all_*_snapshot functions return a BlockDriverState pointer >>> for the invalid backend, which the callers

Re: [PATCH v7 01/13] qtest: rename qtest_qmp_receive to qtest_qmp_receive_dict

2020-10-12 Thread Thomas Huth
On 06/10/2020 14.38, Maxim Levitsky wrote: > In the next patch a new version of qtest_qmp_receive will be > reintroduced that will buffer received qmp events for later > consumption in qtest_qmp_eventwait_ref > > No functional change intended. > > Suggested-by: Paolo Bonzini > Signed-off-by:

Re: [PATCH 1/3] block: push error reporting into bdrv_all_*_snapshot functions

2020-10-12 Thread Philippe Mathieu-Daudé
On 10/12/20 1:09 PM, Max Reitz wrote: On 12.10.20 12:16, Philippe Mathieu-Daudé wrote: On 10/12/20 12:07 PM, Max Reitz wrote: On 08.10.20 19:48, Philippe Mathieu-Daudé wrote: From: Daniel P. Berrangé The bdrv_all_*_snapshot functions return a BlockDriverState pointer for the invalid

Re: [PATCH] hw/block/nvme: Simplify timestamp sum

2020-10-12 Thread Laurent Vivier
Le 02/10/2020 à 09:57, Philippe Mathieu-Daudé a écrit : > As the 'timestamp' variable is declared as a 48-bit bitfield, > we do not need to wrap the sum result. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/block/nvme.c | 7 +-- > 1 file changed, 1 insertion(+), 6 deletions(-) > >

Re: [PATCH 1/3] hw/ssi/aspeed_smc: Rename max_slaves as max_devices

2020-10-12 Thread Philippe Mathieu-Daudé
On 10/12/20 12:04 PM, Kevin Wolf wrote: Am 11.10.2020 um 23:05 hat Philippe Mathieu-Daudé geschrieben: From: Philippe Mathieu-Daudé In order to use inclusive terminology, rename max_slaves as max_peripherals. This is inconsistent with the subject line which talks about "max_devices". Ah

Re: [PATCH 1/3] hw/ssi/aspeed_smc: Rename max_slaves as max_devices

2020-10-12 Thread Kevin Wolf
Am 11.10.2020 um 23:05 hat Philippe Mathieu-Daudé geschrieben: > From: Philippe Mathieu-Daudé > > In order to use inclusive terminology, rename max_slaves > as max_peripherals. This is inconsistent with the subject line which talks about "max_devices". Kevin

Re: [PATCH v4 4/7] keyval: Parse help options

2020-10-12 Thread Eric Blake
On 10/11/20 2:35 AM, Markus Armbruster wrote: From: Kevin Wolf This adds a special meaning for 'help' and '?' as options to the keyval parser. Instead of being an error (because of a missing value) or a value for an implied key, they now request help, which is a new boolean output of the

Re: [PATCH 1/3] block: push error reporting into bdrv_all_*_snapshot functions

2020-10-12 Thread Max Reitz
On 08.10.20 19:48, Philippe Mathieu-Daudé wrote: > From: Daniel P. Berrangé > > The bdrv_all_*_snapshot functions return a BlockDriverState pointer > for the invalid backend, which the callers then use to report an > error message. In some cases multiple callers are reporting the > same error

Re: [PATCH 1/3] block: push error reporting into bdrv_all_*_snapshot functions

2020-10-12 Thread Philippe Mathieu-Daudé
On 10/12/20 12:07 PM, Max Reitz wrote: On 08.10.20 19:48, Philippe Mathieu-Daudé wrote: From: Daniel P. Berrangé The bdrv_all_*_snapshot functions return a BlockDriverState pointer for the invalid backend, which the callers then use to report an error message. In some cases multiple callers

Re: [PATCH v4 3/7] keyval: Fix parsing of ', ' in value of implied key

2020-10-12 Thread Eric Blake
On 10/11/20 2:35 AM, Markus Armbruster wrote: The previous commit demonstrated documentation and code disagree on parsing of ',' in the value of an implied key. Fix the code to match the documentation. This breaks uses of keyval_parse() that pass an implied key and accept a value containing

Re: Which qemu change corresponds to RedHat bug 1655408

2020-10-12 Thread Max Reitz
On 09.10.20 14:55, Jakob Bohm wrote: > On 2020-10-09 10:48, Max Reitz wrote: >> On 08.10.20 18:49, Jakob Bohm wrote: >>> (Top posting because previous reply did so): >>> >>> If the bug was closed as "can't reproduce", why was a very similar bug >>> listed as fixed in RHSA-2019:2553-01 ? >> >> Hi,

Re: [PATCH v4 2/7] test-keyval: Demonstrate misparse of ',' with implied key

2020-10-12 Thread Eric Blake
On 10/11/20 2:35 AM, Markus Armbruster wrote: Add a test for "val,,ue" with implied key. Documentation says this should parse as implied key with value "val", then fail. The code parses it as implied key with value "val,ue", then succeeds. The next commit will fix it. Signed-off-by: Markus

Re: [PATCH v4 1/7] keyval: Fix and clarify grammar

2020-10-12 Thread Eric Blake
On 10/11/20 2:34 AM, Markus Armbruster wrote: The grammar has a few issues: * key-fragment = / [^=,.]* / Prose restricts key fragments: they "must be valid QAPI names or consist only of decimal digits". Technically, '' consists only of decimal digits. The code rejects that. Fix the

[PATCH v11 08/13] copy-on-read: add support for BDRV_REQ_PREFETCH to COR-filter

2020-10-12 Thread Andrey Shinkevich via
Add support for the BDRV_REQ_PREFETCH flag to the supported_write_flags of the COR-filter. Signed-off-by: Andrey Shinkevich --- block/copy-on-read.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/copy-on-read.c b/block/copy-on-read.c index dfbd6ad..b136895 100644 ---

[PATCH v11 09/13] copy-on-read: skip non-guest reads if no copy needed

2020-10-12 Thread Andrey Shinkevich via
If the flag BDRV_REQ_PREFETCH was set, pass it further to the COR-driver to skip unneeded reading. It can be taken into account for the COR-algorithms optimization. That check is being made during the block stream job by the moment. Signed-off-by: Andrey Shinkevich --- block/copy-on-read.c | 13

[PATCH v11 10/13] stream: skip filters when writing backing file name to QCOW2 header

2020-10-12 Thread Andrey Shinkevich via
Avoid writing a filter JSON-name to QCOW2 image when the backing file is changed after the block stream job. Signed-off-by: Andrey Shinkevich --- block/stream.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/block/stream.c b/block/stream.c index e0540ee..51462bd

[PATCH v11 07/13] block: include supported_read_flags into BDS structure

2020-10-12 Thread Andrey Shinkevich via
Add the new member supported_read_flags to BlockDriverState structure. It will control the BDRV_REQ_PREFETCH flag set for copy-on-read operations. Signed-off-by: Andrey Shinkevich --- include/block/block_int.h | 4 1 file changed, 4 insertions(+) diff --git a/include/block/block_int.h

[PATCH v11 13/13] block: apply COR-filter to block-stream jobs

2020-10-12 Thread Andrey Shinkevich via
This patch completes the series with the COR-filter insertion for block-stream operations. Adding the filter makes it possible for copied regions to be discarded in backing files during the block-stream job, what will reduce the disk overuse. The COR-filter insertion incurs changes in the iotests

[PULL v2 07/30] test: new qTest case to test the vhost-user-blk-server

2020-10-12 Thread Stefan Hajnoczi
From: Coiby Xu This test case has the same tests as tests/virtio-blk-test.c except for tests have block_resize. Since vhost-user server can only server one client one time, two instances of vhost-user-blk-server are started by qemu-storage-daemon for the hotplug test. In order to not block

[PULL v2 08/30] MAINTAINERS: Add vhost-user block device backend server maintainer

2020-10-12 Thread Stefan Hajnoczi
From: Coiby Xu Suggested-by: Stefano Garzarella Signed-off-by: Coiby Xu Reviewed-by: Stefan Hajnoczi Reviewed-by: Marc-André Lureau Message-id: 20200918080912.321299-8-coiby...@gmail.com Signed-off-by: Stefan Hajnoczi --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff

[PULL v2 06/30] block/export: vhost-user block device backend server

2020-10-12 Thread Stefan Hajnoczi
From: Coiby Xu By making use of libvhost-user, block device drive can be shared to the connected vhost-user client. Only one client can connect to the server one time. Since vhost-user-server needs a block drive to be created first, delay the creation of this object. Suggested-by: Kevin Wolf

[PULL v2 09/30] util/vhost-user-server: s/fileds/fields/ typo fix

2020-10-12 Thread Stefan Hajnoczi
Signed-off-by: Stefan Hajnoczi Message-id: 20200924151549.913737-3-stefa...@redhat.com Signed-off-by: Stefan Hajnoczi --- util/vhost-user-server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/vhost-user-server.c b/util/vhost-user-server.c index 7b50a2b1fd..2cd0cf8277

[PULL v2 10/30] util/vhost-user-server: drop unnecessary QOM cast

2020-10-12 Thread Stefan Hajnoczi
We already have access to the value with the correct type (ioc and sioc are the same QIOChannel). Signed-off-by: Stefan Hajnoczi Message-id: 20200924151549.913737-4-stefa...@redhat.com Signed-off-by: Stefan Hajnoczi --- util/vhost-user-server.c | 2 +- 1 file changed, 1 insertion(+), 1

[PULL v2 05/30] block: move logical block size check function to a common utility function

2020-10-12 Thread Stefan Hajnoczi
From: Coiby Xu Move the constants from hw/core/qdev-properties.c to util/block-helpers.h so that knowledge of the min/max values is Signed-off-by: Stefan Hajnoczi Signed-off-by: Coiby Xu Reviewed-by: Stefan Hajnoczi Reviewed-by: Marc-André Lureau Acked-by: Eduardo Habkost Message-id:

[PULL v2 21/30] qemu-storage-daemon: avoid compiling blockdev_ss twice

2020-10-12 Thread Stefan Hajnoczi
Introduce libblkdev.fa to avoid recompiling blockdev_ss twice. Suggested-by: Paolo Bonzini Reviewed-by: Paolo Bonzini Signed-off-by: Stefan Hajnoczi Message-id: 20200929125516.186715-3-stefa...@redhat.com Signed-off-by: Stefan Hajnoczi --- meson.build| 12 ++--

[PULL v2 24/30] block/export: add vhost-user-blk multi-queue support

2020-10-12 Thread Stefan Hajnoczi
Allow the number of queues to be configured using --export vhost-user-blk,num-queues=N. This setting should match the QEMU --device vhost-user-blk-pci,num-queues=N setting but QEMU vhost-user-blk.c lowers its own value if the vhost-user-blk backend offers fewer queues than QEMU. The

[PULL v2 28/30] block/io: bdrv_common_block_status_above: support bs == base

2020-10-12 Thread Stefan Hajnoczi
From: Vladimir Sementsov-Ogievskiy We are going to reuse bdrv_common_block_status_above in bdrv_is_allocated_above. bdrv_is_allocated_above may be called with include_base == false and still bs == base (for ex. from img_rebase()). So, support this corner case. Signed-off-by: Vladimir

Re: [PULL v2 00/30] Block patches

2020-10-12 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20201012182800.157697-1-stefa...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20201012182800.157697-1-stefa...@redhat.com Subject: [PULL v2 00/30] Block patches ===

[PATCH v11 12/13] stream: remove unused backing-file name parameter

2020-10-12 Thread Andrey Shinkevich via
The 'backing-file' argument is not used by the block-stream job. It designates a backing file name to set in QCOW2 image header after the block-stream job finished. A backing file name of the node above base is used instead. Signed-off-by: Andrey Shinkevich --- block/stream.c| 6

[PATCH v11 11/13] stream: mark backing-file argument as deprecated

2020-10-12 Thread Andrey Shinkevich via
Whereas the block-stream job starts using a backing file name of the base node overlay after the block-stream job completes, mark the QMP 'backing-file' argument as deprecated. Signed-off-by: Andrey Shinkevich --- docs/system/deprecated.rst | 6 ++ 1 file changed, 6 insertions(+) diff

[PULL v2 04/30] util/vhost-user-server: generic vhost user server

2020-10-12 Thread Stefan Hajnoczi
From: Coiby Xu Sharing QEMU devices via vhost-user protocol. Only one vhost-user client can connect to the server one time. Suggested-by: Kevin Wolf Signed-off-by: Stefan Hajnoczi Signed-off-by: Coiby Xu Reviewed-by: Stefan Hajnoczi Reviewed-by: Marc-André Lureau Message-id:

[PULL v2 00/30] Block patches

2020-10-12 Thread Stefan Hajnoczi
The following changes since commit 2387df497b4b4bcf754eb7398edca82889e2ef54: Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2020-10-10' into staging (2020-10-12 11:29:42 +0100) are available in the Git repository at: https://gitlab.com/stefanha/qemu.git tags/block-pull-request

[PULL v2 18/30] block/export: convert vhost-user-blk server to block export API

2020-10-12 Thread Stefan Hajnoczi
Use the new QAPI block exports API instead of defining our own QOM objects. This is a large change because the lifecycle of VuBlockDev needs to follow BlockExportDriver. QOM properties are replaced by QAPI options objects. VuBlockDev is renamed VuBlkExport and contains a BlockExport field.

[PULL v2 15/30] util/vhost-user-server: check EOF when reading payload

2020-10-12 Thread Stefan Hajnoczi
Unexpected EOF is an error that must be reported. Signed-off-by: Stefan Hajnoczi Message-id: 20200924151549.913737-9-stefa...@redhat.com Signed-off-by: Stefan Hajnoczi --- util/vhost-user-server.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

[PULL v2 17/30] block/export: report flush errors

2020-10-12 Thread Stefan Hajnoczi
Propagate the flush return value since errors are possible. Signed-off-by: Stefan Hajnoczi Message-id: 20200924151549.913737-11-stefa...@redhat.com Signed-off-by: Stefan Hajnoczi --- block/export/vhost-user-blk-server.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff

[PATCH v11 01/13] copy-on-read: Support preadv/pwritev_part functions

2020-10-12 Thread Andrey Shinkevich via
Add support for the recently introduced functions bdrv_co_preadv_part() and bdrv_co_pwritev_part() to the COR-filter driver. Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/copy-on-read.c | 28 1 file changed, 16 insertions(+),

[PATCH v11 00/13] Apply COR-filter to the block-stream permanently

2020-10-12 Thread Andrey Shinkevich via
The iotest case test_stream_parallel still does not pass after the COR-filter is inserted into the backing chain. As the test case may not be initialized, it does not make a sense and was removed again. v11: 04: Base node overlay is used instead of base. 05: Base node overlay is used instead

[PULL v2 11/30] util/vhost-user-server: drop unnecessary watch deletion

2020-10-12 Thread Stefan Hajnoczi
Explicitly deleting watches is not necessary since libvhost-user calls remove_watch() during vu_deinit(). Add an assertion to check this though. Signed-off-by: Stefan Hajnoczi Message-id: 20200924151549.913737-5-stefa...@redhat.com Signed-off-by: Stefan Hajnoczi --- util/vhost-user-server.c |

[PULL v2 12/30] block/export: consolidate request structs into VuBlockReq

2020-10-12 Thread Stefan Hajnoczi
Only one struct is needed per request. Drop req_data and the separate VuBlockReq instance. Instead let vu_queue_pop() allocate everything at once. This fixes the req_data memory leak in vu_block_virtio_process_req(). Signed-off-by: Stefan Hajnoczi Message-id:

[PULL v2 16/30] util/vhost-user-server: rework vu_client_trip() coroutine lifecycle

2020-10-12 Thread Stefan Hajnoczi
The vu_client_trip() coroutine is leaked during AioContext switching. It is also unsafe to destroy the vu_dev in panic_cb() since its callers still access it in some cases. Rework the lifecycle to solve these safety issues. Signed-off-by: Stefan Hajnoczi Message-id:

[PULL v2 23/30] block/export: add iothread and fixed-iothread options

2020-10-12 Thread Stefan Hajnoczi
Make it possible to specify the iothread where the export will run. By default the block node can be moved to other AioContexts later and the export will follow. The fixed-iothread option forces strict behavior that prevents changing AioContext while the export is active. See the QAPI docs for

[PULL v2 25/30] tests/qtest: add multi-queue test case to vhost-user-blk-test

2020-10-12 Thread Stefan Hajnoczi
Signed-off-by: Stefan Hajnoczi Message-id: 20201001144604.559733-3-stefa...@redhat.com Signed-off-by: Stefan Hajnoczi --- tests/qtest/vhost-user-blk-test.c | 81 +-- 1 file changed, 76 insertions(+), 5 deletions(-) diff --git a/tests/qtest/vhost-user-blk-test.c

Overlay limit bug

2020-10-12 Thread Yoonho Park
I stumbled on a bug in qemu 4.2.0 (virsh 6.0.0) with a large number of overlays. I am using "qemu-img create" and "virsh snapshot-create-as" to create each overlay. When I run "virsh snapshot-create-as" for the 42nd overlay, I get "error: No complete monitor response found in 10485760 bytes:

[PATCH v11 06/13] block: modify the comment for BDRV_REQ_PREFETCH flag

2020-10-12 Thread Andrey Shinkevich via
Modify the comment for the flag BDRV_REQ_PREFETCH as we are going to use it alone and pass it to the COR-filter driver for further processing. Signed-off-by: Andrey Shinkevich --- include/block/block.h | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git

[PATCH v11 05/13] copy-on-read: limit COR operations to base in COR driver

2020-10-12 Thread Andrey Shinkevich via
Limit COR operations by the base node in the backing chain when the overlay base node name is given. It will be useful for a block stream job when the COR-filter is applied. The overlay base node is passed as the base itself may change due to concurrent commit jobs on the same backing chain.

[PULL v2 03/30] libvhost-user: remove watch for kick_fd when de-initialize vu-dev

2020-10-12 Thread Stefan Hajnoczi
From: Coiby Xu When the client is running in gdb and quit command is run in gdb, QEMU will still dispatch the event which will cause segment fault in the callback function. Signed-off-by: Coiby Xu Reviewed-by: Stefan Hajnoczi Reviewed-by: Marc-André Lureau Message-id:

[PULL v2 19/30] util/vhost-user-server: move header to include/

2020-10-12 Thread Stefan Hajnoczi
Headers used by other subsystems are located in include/. Also add the vhost-user-server and vhost-user-blk-server headers to MAINTAINERS. Signed-off-by: Stefan Hajnoczi Message-id: 20200924151549.913737-13-stefa...@redhat.com Signed-off-by: Stefan Hajnoczi --- MAINTAINERS

[PULL v2 29/30] block/io: fix bdrv_is_allocated_above

2020-10-12 Thread Stefan Hajnoczi
From: Vladimir Sementsov-Ogievskiy bdrv_is_allocated_above wrongly handles short backing files: it reports after-EOF space as UNALLOCATED which is wrong, as on read the data is generated on the level of short backing file (if all overlays have unallocated areas at that place). Reusing

[PULL v2 27/30] block/io: bdrv_common_block_status_above: support include_base

2020-10-12 Thread Stefan Hajnoczi
From: Vladimir Sementsov-Ogievskiy In order to reuse bdrv_common_block_status_above in bdrv_is_allocated_above, let's support include_base parameter. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia Reviewed-by: Eric Blake Message-id:

[PULL v2 20/30] util/vhost-user-server: use static library in meson.build

2020-10-12 Thread Stefan Hajnoczi
Don't compile contrib/libvhost-user/libvhost-user.c again. Instead build the static library once and then reuse it throughout QEMU. Also switch from CONFIG_LINUX to CONFIG_VHOST_USER, which is what the vhost-user tools (vhost-user-gpu, etc) do. Signed-off-by: Stefan Hajnoczi Message-id:

[PULL v2 30/30] iotests: add commit top->base cases to 274

2020-10-12 Thread Stefan Hajnoczi
From: Vladimir Sementsov-Ogievskiy These cases are fixed by previous patches around block_status and is_allocated. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Reviewed-by: Alberto Garcia Message-id: 20200924194003.22080-6-vsement...@virtuozzo.com Signed-off-by: Stefan

[PULL v2 26/30] block/io: fix bdrv_co_block_status_above

2020-10-12 Thread Stefan Hajnoczi
From: Vladimir Sementsov-Ogievskiy bdrv_co_block_status_above has several design problems with handling short backing files: 1. With want_zeros=true, it may return ret with BDRV_BLOCK_ZERO but without BDRV_BLOCK_ALLOCATED flag, when actually short backing file which produces these after-EOF

Re: [PATCH v7 02/13] qtest: Reintroduce qtest_qmp_receive

2020-10-12 Thread Paolo Bonzini
On 12/10/20 15:49, Thomas Huth wrote: >> We chose to use the same name because the new version generally is the >> one you want and, except for the handling of events, is exactly the same >> as before. In other words, I'm treating the new semantics more as a >> bugfix than a feature. >> >> The

[PATCH v11 03/13] qapi: add filter-node-name to block-stream

2020-10-12 Thread Andrey Shinkevich via
Provide the possibility to pass the 'filter-node-name' parameter to the block-stream job as it is done for the commit block job. Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/monitor/block-hmp-cmds.c | 4 ++-- block/stream.c | 4 +++-

[PATCH v11 02/13] copy-on-read: add filter append/drop functions

2020-10-12 Thread Andrey Shinkevich via
Provide API for the COR-filter insertion/removal. Also, drop the filter child permissions for an inactive state when the filter node is being removed. Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/copy-on-read.c | 88

[PATCH v11 04/13] copy-on-read: pass overlay base node name to COR driver

2020-10-12 Thread Andrey Shinkevich via
We are going to use the COR-filter for a block-stream job. To limit COR operations by the base node in the backing chain during stream job, pass the name of overlay base node to the copy-on-read driver as base node itself may change due to possible concurrent jobs. The rest of the functionality

[PULL v2 02/30] libvhost-user: Allow vu_message_read to be replaced

2020-10-12 Thread Stefan Hajnoczi
From: Coiby Xu Allow vu_message_read to be replaced by one which will make use of the QIOChannel functions. Thus reading vhost-user message won't stall the guest. For slave channel, we still use the default vu_message_read. Reviewed-by: Marc-André Lureau Signed-off-by: Coiby Xu Reviewed-by:

[PULL v2 01/30] block/nvme: Add driver statistics for access alignment and hw errors

2020-10-12 Thread Stefan Hajnoczi
From: Philippe Mathieu-Daudé Keep statistics of some hardware errors, and number of aligned/unaligned I/O accesses. QMP example booting a full RHEL 8.3 aarch64 guest: { "execute": "query-blockstats" } { "return": [ { "device": "", "node-name": "drive0",

[PULL v2 14/30] util/vhost-user-server: fix memory leak in vu_message_read()

2020-10-12 Thread Stefan Hajnoczi
fds[] is leaked when qio_channel_readv_full() fails. Use vmsg->fds[] instead of keeping a local fds[] array. Then we can reuse goto fail to clean up fds. vmsg->fd_num must be zeroed before the loop to make this safe. Signed-off-by: Stefan Hajnoczi Message-id:

[PULL v2 22/30] block: move block exports to libblockdev

2020-10-12 Thread Stefan Hajnoczi
Block exports are used by softmmu, qemu-storage-daemon, and qemu-nbd. They are not used by other programs and are not otherwise needed in libblock. Undo the recent move of blockdev-nbd.c from blockdev_ss into block_ss. Since bdrv_close_all() (libblock) calls blk_exp_close_all() (libblockdev) a

[PATCH 10/10] block: check availablity for preadv/pwritev on mac

2020-10-12 Thread Joelle van Dyne
From: osy macOS 11/iOS 14 added preadv/pwritev APIs. Due to weak linking, configure will succeed with CONFIG_PREADV even when targeting a lower OS version. We therefore need to check at run time if we can actually use these APIs. Signed-off-by: Joelle van Dyne --- block/file-posix.c | 12

[PATCH v2 1/2] block: Fixes nfs compiling error on msys2/mingw

2020-10-12 Thread Yonggang Luo
These compiling errors are fixed: ../block/nfs.c:27:10: fatal error: poll.h: No such file or directory 27 | #include | ^~~~ compilation terminated. ../block/nfs.c:63:5: error: unknown type name 'blkcnt_t' 63 | blkcnt_t st_blocks; | ^~~~ ../block/nfs.c:

Re: [PULL v2 00/30] Block patches

2020-10-12 Thread Peter Maydell
On Mon, 12 Oct 2020 at 19:28, Stefan Hajnoczi wrote: > > The following changes since commit 2387df497b4b4bcf754eb7398edca82889e2ef54: > > Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2020-10-10' > into staging (2020-10-12 11:29:42 +0100) > > are available in the Git repository

[PATCH v2 2/2] block: enable libnfs on msys2/mingw in cirrus.yml

2020-10-12 Thread Yonggang Luo
At the begging libnfs are not enabled because of compiling error, now it's fixed so enable it Signed-off-by: Yonggang Luo --- .cirrus.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.cirrus.yml b/.cirrus.yml index f42ccb956a..2c6bf45e6d 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@

[PATCH v2 0/2] Fixes building nfs on msys2/mingw

2020-10-12 Thread Yonggang Luo
V1-V2 Apply suggestion from Peter Lieven Yonggang Luo (2): block: Fixes nfs compiling error on msys2/mingw block: enable libnfs on msys2/mingw in cirrus.yml .cirrus.yml | 1 + block/nfs.c | 15 +++ 2 files changed, 16 insertions(+) -- 2.28.0.windows.1

Re: [PULL v2 00/30] Block patches

2020-10-12 Thread Eric Blake
On 10/12/20 4:48 PM, Peter Maydell wrote: Build failures, OSX and the BSDs: I'll let you find and fix those... Build failure, Windows: ../../qemu-nbd.c:158:5: error: "CONFIG_POSIX" is not defined [-Werror=undef] #if CONFIG_POSIX ^ but this one is easy. In 22/30 block: move

[PATCH 01/10] configure: option to disable host block devices

2020-10-12 Thread Joelle van Dyne
From: osy Some hosts (iOS) have a sandboxed filesystem and do not provide low-level APIs for interfacing with host block devices. Signed-off-by: Joelle van Dyne --- block/file-posix.c | 8 +++- configure | 4 meson.build| 1 + 3 files changed, 12 insertions(+), 1

[PATCH 03/10] qemu: add support for iOS host

2020-10-12 Thread Joelle van Dyne
From: osy This introduces support for building for iOS hosts. When the correct Xcode toolchain is used, iOS host will be detected automatically. block: disable features not supported by iOS sandbox slirp: disable SMB features for iOS target: disable system() calls for iOS tcg: use

Re: [PATCH] migration/block-dirty-bitmap: fix uninitialized variable warning

2020-10-12 Thread Li Qiang
Laurent Vivier 于2020年10月12日周一 下午11:33写道: > > Le 10/10/2020 à 13:07, Chen Qun a écrit : > > This if statement judgment is redundant and it will cause a warning: > > > > migration/block-dirty-bitmap.c:1090:13: warning: ‘bitmap_name’ may be used > > uninitialized in this function

Re: Which qemu change corresponds to RedHat bug 1655408

2020-10-12 Thread Jakob Bohm
On 2020-10-12 13:47, Max Reitz wrote: On 09.10.20 14:55, Jakob Bohm wrote: On 2020-10-09 10:48, Max Reitz wrote: On 08.10.20 18:49, Jakob Bohm wrote: (Top posting because previous reply did so): If the bug was closed as "can't reproduce", why was a very similar bug listed as fixed in