RE: [PATCH] hw/scsi/megasas:Clean up some redundant code fix Clang warnings

2020-03-10 Thread Chenqun (kuhn)
>-Original Message- >From: Peter Maydell [mailto:peter.mayd...@linaro.org] >Sent: Tuesday, March 10, 2020 9:47 PM >To: Chenqun (kuhn) >Cc: QEMU Developers ; QEMU Trivial triv...@nongnu.org>; Fam Zheng ; Hannes Reinecke >; Zhanghailiang ; >Qemu-block ; Euler Robot >; Paolo Bonzini

Re: [PATCH v4 1/4] ide/via: Get rid of via_init_ide()

2020-03-10 Thread BALATON Zoltan
On Tue, 10 Mar 2020, BALATON Zoltan wrote: Follow example of CMD646 and remove via_init_ide function and do it directly in board code instead. There's a typo in the title and commit message, it should read via_ide_init in both. If a v5 is needed I'll fix that otherwise maybe it could be

Re: [PATCH v4 0/4] Implement "non 100% native mode" in via-ide

2020-03-10 Thread no-reply
Patchew URL: https://patchew.org/QEMU/cover.1583867210.git.bala...@eik.bme.hu/ Hi, This series failed the asan build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!/bin/bash export

Re: [PATCH v4 3/4] pci: Honour wmask when resetting PCI_INTERRUPT_LINE

2020-03-10 Thread Michael S. Tsirkin
On Tue, Mar 10, 2020 at 08:06:50PM +0100, BALATON Zoltan wrote: > The pci_do_device_reset() function (called from pci_device_reset) > clears the PCI_INTERRUPT_LINE config reg of devices on the bus but did > this without taking wmask into account. We'll have a device model now > that needs to set a

Re: [PATCH RESEND v2] block/nvme: introduce PMR support from NVMe 1.4 spec

2020-03-10 Thread Andrzej Jakowski
On 3/10/20 2:51 AM, Stefan Hajnoczi wrote: > On Fri, Mar 06, 2020 at 03:38:53PM -0700, Andrzej Jakowski wrote: >> diff --git a/hw/block/nvme.c b/hw/block/nvme.c >> index d28335cbf3..ff7e74d765 100644 >> --- a/hw/block/nvme.c >> +++ b/hw/block/nvme.c >> @@ -19,10 +19,14 @@ >> * -drive

Re: [PATCH v2 2/2] via-ide: Also emulate non 100% native mode

2020-03-10 Thread BALATON Zoltan
On Tue, 10 Mar 2020, BALATON Zoltan wrote: On Tue, 10 Mar 2020, Mark Cave-Ayland wrote: On 09/03/2020 20:17, BALATON Zoltan wrote: On Mon, 9 Mar 2020, Mark Cave-Ayland wrote: On 09/03/2020 00:42, BALATON Zoltan wrote: Some machines operate in "non 100% native mode" where interrupts are fixed

[PATCH v4 2/4] ide: Make room for flags in PCIIDEState and add one for legacy IRQ routing

2020-03-10 Thread BALATON Zoltan
We'll need a flag for implementing some device specific behaviour in via-ide but we already have a currently CMD646 specific field that can be repurposed for this and leave room for furhter flags if needed in the future. This patch changes the "secondary" field to "flags" and define the flags for

[PATCH v4 3/4] pci: Honour wmask when resetting PCI_INTERRUPT_LINE

2020-03-10 Thread BALATON Zoltan
The pci_do_device_reset() function (called from pci_device_reset) clears the PCI_INTERRUPT_LINE config reg of devices on the bus but did this without taking wmask into account. We'll have a device model now that needs to set a constant value for this reg and this patch allows to do that without

[PATCH v4 4/4] via-ide: Also emulate non 100% native mode

2020-03-10 Thread BALATON Zoltan
Some machines operate in "non 100% native mode" where interrupts are fixed at legacy IDE interrupts and some guests expect this behaviour without checking based on knowledge about hardware. Even Linux has arch specific workarounds for this that are activated on such boards so this needs to be

[PATCH v4 0/4] Implement "non 100% native mode" in via-ide

2020-03-10 Thread BALATON Zoltan
This (started to be small but getting bigger) series implements "non-100% native mode" of via-ide found at least on pegasos2 where io addresses come from PCI BARs but interrupts are hard coded to legacy IRQ14 and 15. This is needed for guests that expect it and activate work arounds on that

[PATCH v4 1/4] ide/via: Get rid of via_init_ide()

2020-03-10 Thread BALATON Zoltan
Follow example of CMD646 and remove via_init_ide function and do it directly in board code instead. Signed-off-by: BALATON Zoltan --- hw/ide/via.c| 8 hw/mips/mips_fulong2e.c | 5 - include/hw/ide.h| 1 - 3 files changed, 4 insertions(+), 10 deletions(-) diff

Re: [PATCH v3 0/3] Implement "non 100% native mode" in via-ide

2020-03-10 Thread BALATON Zoltan
On Tue, 10 Mar 2020, Mark Cave-Ayland wrote: On 09/03/2020 19:18, BALATON Zoltan wrote: This small series implements "non-100% native mode" of via-ide found at least on pegasos2 where io addresses come from PCI BARs but interrupts are hard coded to legacy IRQ14 and 15. This is needed for guests

Re: [PATCH v2 2/2] via-ide: Also emulate non 100% native mode

2020-03-10 Thread BALATON Zoltan
On Tue, 10 Mar 2020, Mark Cave-Ayland wrote: On 09/03/2020 20:17, BALATON Zoltan wrote: On Mon, 9 Mar 2020, Mark Cave-Ayland wrote: On 09/03/2020 00:42, BALATON Zoltan wrote: Some machines operate in "non 100% native mode" where interrupts are fixed at legacy IDE interrupts and some guests

Re: [PATCH v3 0/3] Implement "non 100% native mode" in via-ide

2020-03-10 Thread Mark Cave-Ayland
On 09/03/2020 19:18, BALATON Zoltan wrote: > This small series implements "non-100% native mode" of via-ide found > at least on pegasos2 where io addresses come from PCI BARs but > interrupts are hard coded to legacy IRQ14 and 15. This is needed for > guests that expect it and activate work

Re: [PATCH v3 2/3] pci: Honour wmask when resetting PCI_INTERRUPT_LINE

2020-03-10 Thread BALATON Zoltan
On Tue, 10 Mar 2020, Mark Cave-Ayland wrote: On 09/03/2020 20:54, BALATON Zoltan wrote: On Mon, 9 Mar 2020, Michael S. Tsirkin wrote: On Mon, Mar 09, 2020 at 08:18:13PM +0100, BALATON Zoltan wrote: The pci_do_device_reset() function (called from pci_device_reset) clears the PCI_INTERRUPT_LINE

Re: [PATCH v3 2/3] pci: Honour wmask when resetting PCI_INTERRUPT_LINE

2020-03-10 Thread Mark Cave-Ayland
On 09/03/2020 20:54, BALATON Zoltan wrote: > On Mon, 9 Mar 2020, Michael S. Tsirkin wrote: >> On Mon, Mar 09, 2020 at 08:18:13PM +0100, BALATON Zoltan wrote: >>> The pci_do_device_reset() function (called from pci_device_reset) >>> clears the PCI_INTERRUPT_LINE config reg of devices on the bus

Re: [PATCH v2 2/2] via-ide: Also emulate non 100% native mode

2020-03-10 Thread Mark Cave-Ayland
On 09/03/2020 20:17, BALATON Zoltan wrote: > On Mon, 9 Mar 2020, Mark Cave-Ayland wrote: >> On 09/03/2020 00:42, BALATON Zoltan wrote: >>> Some machines operate in "non 100% native mode" where interrupts are >>> fixed at legacy IDE interrupts and some guests expect this behaviour >>> without

Re: [PATCH v2 0/7] block: Relax restrictions for blockdev-snapshot

2020-03-10 Thread Kevin Wolf
Am 10.03.2020 um 12:38 hat Kevin Wolf geschrieben: > This series allows libvirt to fix a regression that its switch from > drive-mirror to blockdev-mirror caused: It currently requires that the > backing chain of the target image is already available when the mirror > operation is started. > > In

Re: [PATCH 3/3] iotests/138: Test leaks/corruptions fixed report

2020-03-10 Thread Max Reitz
On 27.02.20 19:56, Eric Blake wrote: > On 2/27/20 11:02 AM, Max Reitz wrote: >> Test that qemu-img check reports the number of leaks and corruptions >> fixed in its JSON report (after a successful run). >> >> Signed-off-by: Max Reitz >> --- >>   tests/qemu-iotests/138 | 41

Re: [PATCH v9 0/4] delete created files when block_crypto_co_create_opts_luks fails

2020-03-10 Thread Kevin Wolf
Am 30.01.2020 um 22:39 hat Daniel Henrique Barboza geschrieben: > The version 8 of this patch series got buried and it's now > conflicting with master. Rebase and re-sending it. > > Also, I contemplated the idea of moving/copying the password > verification in qcrypto_block_luks_create() all the

Re: [PATCH 2/3] iotests: Add poke_file_[bl]e functions

2020-03-10 Thread Max Reitz
On 27.02.20 19:46, Eric Blake wrote: > On 2/27/20 11:02 AM, Max Reitz wrote: >> Similarly to peek_file_[bl]e, we may want to write binary integers into >> a file.  Currently, this often means messing around with poke_file and >> raw binary strings.  I hope these functions make it a bit more >>

Re: [PATCH v4 00/10] Further bitmaps improvements

2020-03-10 Thread Max Reitz
On 06.03.20 08:45, Vladimir Sementsov-Ogievskiy wrote: > 26.02.2020 16:13, Max Reitz wrote: >> On 05.02.20 12:20, Vladimir Sementsov-Ogievskiy wrote: >>> Hi! >>> >>> The main feature here is improvement of _next_dirty_area API, which I'm >>> going to use then for backup / block-copy. >>> >>>

Re: [PATCH] tests/qemu-iotests: Fix socket_scm_helper build path

2020-03-10 Thread Kevin Wolf
Am 06.03.2020 um 17:57 hat Philippe Mathieu-Daudé geschrieben: > The socket_scm_helper path got corrupted during the mechanical > refactor moving the qtests files into their own sub-directory. > > Fixes: 1e8a1fae7 ("test: Move qtests to a separate directory") > Signed-off-by: Philippe

Re: [PATCH v3 7/9] block/block-copy: rename start to offset in interfaces

2020-03-10 Thread Andrey Shinkevich
On 10/03/2020 18:14, Max Reitz wrote: On 10.03.20 15:55, Andrey Shinkevich wrote: On 10/03/2020 17:50, Max Reitz wrote: On 06.03.20 08:38, Vladimir Sementsov-Ogievskiy wrote: offset/bytes pair is more usual naming in block layer, let's use it. Signed-off-by: Vladimir Sementsov-Ogievskiy

Re: [PATCH v8 02/10] scripts: add coccinelle script to use auto propagated errp

2020-03-10 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > 09.03.2020 12:56, Markus Armbruster wrote: >> Suggest >> >> scripts: Coccinelle script to use auto-propagated errp >> >> or >> >> scripts: Coccinelle script to use ERRP_AUTO_PROPAGATE() >> >> Vladimir Sementsov-Ogievskiy writes: >> >>> Script

Re: [PATCH v3 9/9] block/block-copy: hide structure definitions

2020-03-10 Thread Max Reitz
On 06.03.20 08:38, Vladimir Sementsov-Ogievskiy wrote: > Hide structure definitions and add explicit API instead, to keep an > eye on the scope of the shared fields. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > include/block/block-copy.h | 52 +++ >

Re: [PATCH v3 8/9] block/block-copy: reduce intersecting request lock

2020-03-10 Thread Max Reitz
On 06.03.20 08:38, Vladimir Sementsov-Ogievskiy wrote: > Currently, block_copy operation lock the whole requested region. But > there is no reason to lock clusters, which are already copied, it will > disturb other parallel block_copy requests for no reason. > > Let's instead do the following: >

Re: [PATCH] qcow2: remove QCowL2Meta parameter from handle_copied

2020-03-10 Thread John Snow
On 3/10/20 7:19 AM, Alberto Garcia wrote: > On Tue 10 Mar 2020 03:04:47 AM CET, John Snow wrote: >>> static int handle_copied(BlockDriverState *bs, uint64_t guest_offset, >>> -uint64_t *host_offset, uint64_t *bytes, QCowL2Meta **m) >>> +uint64_t *host_offset, uint64_t *bytes) >>> {

Re: [PATCH v3 7/9] block/block-copy: rename start to offset in interfaces

2020-03-10 Thread Max Reitz
On 10.03.20 15:55, Andrey Shinkevich wrote: > > > On 10/03/2020 17:50, Max Reitz wrote: >> On 06.03.20 08:38, Vladimir Sementsov-Ogievskiy wrote: >>> offset/bytes pair is more usual naming in block layer, let's use it. >>> >>> Signed-off-by: Vladimir Sementsov-Ogievskiy >>> Reviewed-by: Andrey

Re: [PATCH] hw/scsi/megasas:Clean up some redundant code fix Clang warnings

2020-03-10 Thread Laurent Vivier
Le 10/03/2020 à 14:46, Peter Maydell a écrit : > On Tue, 10 Mar 2020 at 13:10, Chen Qun wrote: >> >> Here are some redundant statements, we can clean them up. >> Clang static code analyzer show warning: >> hw/scsi/megasas.c:1175:32: warning: Value stored to 'max_ld_disks' during >> its

Re: [PATCH] hw/scsi/megasas:Clean up some redundant code fix Clang warnings

2020-03-10 Thread Laurent Vivier
Le 10/03/2020 à 14:08, Chen Qun a écrit : > Here are some redundant statements, we can clean them up. > Clang static code analyzer show warning: > hw/scsi/megasas.c:1175:32: warning: Value stored to 'max_ld_disks' during its > initialization is never read > uint32_t num_ld_disks = 0,

Re: [PATCH v3 7/9] block/block-copy: rename start to offset in interfaces

2020-03-10 Thread Andrey Shinkevich
On 10/03/2020 17:50, Max Reitz wrote: On 06.03.20 08:38, Vladimir Sementsov-Ogievskiy wrote: offset/bytes pair is more usual naming in block layer, let's use it. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Andrey Shinkevich Reviewed-by: Max Reitz ---

Re: [PATCH v3 9/9] block/block-copy: hide structure definitions

2020-03-10 Thread Andrey Shinkevich
On 06/03/2020 10:38, Vladimir Sementsov-Ogievskiy wrote: Hide structure definitions and add explicit API instead, to keep an eye on the scope of the shared fields. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block-copy.h | 52 +++

Re: [PATCH v3 4/4] qemu-img: Deprecate use of -b without -F

2020-03-10 Thread Kashyap Chamarthy
On Tue, Mar 10, 2020 at 07:15:29AM -0500, Eric Blake wrote: > On 3/10/20 4:47 AM, Kashyap Chamarthy wrote: [...] > > > > > > Ah, didn't realize the inconsistency of 'convert' lacking the '-F' > > shorthand ... which reminds me, there are at least _three_ ways that I > > know of, to specify

Re: [PATCH v3 4/4] qemu-img: Deprecate use of -b without -F

2020-03-10 Thread Kashyap Chamarthy
On Tue, Mar 10, 2020 at 07:19:25AM -0500, Eric Blake wrote: > On 3/10/20 5:57 AM, Kashyap Chamarthy wrote: (Slightly long e-mail, as it contains a bunch of tests and their results; please bear with me.) [...] > > $> ~/build/qemu/qemu-img amend -o compat=v3 overlay1.qcow2 > > This

Re: [PATCH v3 7/9] block/block-copy: rename start to offset in interfaces

2020-03-10 Thread Max Reitz
On 06.03.20 08:38, Vladimir Sementsov-Ogievskiy wrote: > offset/bytes pair is more usual naming in block layer, let's use it. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > Reviewed-by: Andrey Shinkevich > Reviewed-by: Max Reitz > --- > include/block/block-copy.h | 4 +- >

Re: [PATCH v3 6/9] block/block-copy: refactor interfaces to use bytes instead of end

2020-03-10 Thread Max Reitz
On 06.03.20 08:38, Vladimir Sementsov-Ogievskiy wrote: > We have a lot of "chunk_end - start" invocations, let's switch to > bytes/cur_bytes scheme instead. > > While being here, improve check on block_copy_do_copy parameters to not > overflow when calculating nbytes and use int64_t for bytes in

Re: [PATCH v3 5/9] block/block-copy: factor out find_conflicting_inflight_req

2020-03-10 Thread Max Reitz
On 06.03.20 08:38, Vladimir Sementsov-Ogievskiy wrote: > Split find_conflicting_inflight_req to be used separately. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > Reviewed-by: Andrey Shinkevich > --- > block/block-copy.c | 31 +++ > 1 file changed, 19

Re: [PATCH v3 4/9] block/block-copy: use block_status

2020-03-10 Thread Max Reitz
On 06.03.20 08:38, Vladimir Sementsov-Ogievskiy wrote: > Use bdrv_block_status_above to chose effective chunk size and to handle > zeroes effectively. > > This substitutes checking for just being allocated or not, and drops > old code path for it. Assistance by backup job is dropped too, as >

Re: [PATCH] hw/scsi/megasas:Clean up some redundant code fix Clang warnings

2020-03-10 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200310130844.30076-1-kuhn.chen...@huawei.com/ Hi, This series failed the asan build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN ===

Re: [Question] About GET LBA STATUS(16) support in qemu scsi emulation layer

2020-03-10 Thread Lin Ma
Due to no users complain about it so far, It seems not many people need it. I'll spend some time reading some code of qemu block and diving into SCSI command manual, then try to implement it. If anyone's willing to implement it before this, it will be appreciated. Thanks for your valuable

Re: [PATCH v3 3/9] block/block-copy: specialcase first copy_range request

2020-03-10 Thread Max Reitz
On 06.03.20 08:38, Vladimir Sementsov-Ogievskiy wrote: > In block_copy_do_copy we fallback to read+write if copy_range failed. > In this case copy_size is larger than defined for buffered IO, and > there is corresponding commit. Still, backup copies data cluster by > cluster, and most of requests

Re: [PATCH] hw/scsi/megasas:Clean up some redundant code fix Clang warnings

2020-03-10 Thread Peter Maydell
On Tue, 10 Mar 2020 at 13:10, Chen Qun wrote: > > Here are some redundant statements, we can clean them up. > Clang static code analyzer show warning: > hw/scsi/megasas.c:1175:32: warning: Value stored to 'max_ld_disks' during its > initialization is never read > uint32_t num_ld_disks = 0,

Re: [PATCH v3 2/9] block/block-copy: fix progress calculation

2020-03-10 Thread Max Reitz
On 06.03.20 08:38, Vladimir Sementsov-Ogievskiy wrote: > Assume we have two regions, A and B, and region B is in-flight now, > region A is not yet touched, but it is unallocated and should be > skipped. > > Correspondingly, as progress we have > > total = A + B > current = 0 > > If we reset

Re: [PATCH v2 6/7] iotests: Add iothread cases to 155

2020-03-10 Thread Peter Krempa
On Tue, Mar 10, 2020 at 12:38:30 +0100, Kevin Wolf wrote: > This patch adds test cases for attaching the backing chain to a mirror > job target right before finalising the job, where the image is in a > non-mainloop AioContext (i.e. the backing chain needs to be moved to the > AioContext of the

Re: [PATCH v2 5/7] block: Fix cross-AioContext blockdev-snapshot

2020-03-10 Thread Peter Krempa
On Tue, Mar 10, 2020 at 12:38:29 +0100, Kevin Wolf wrote: > external_snapshot_prepare() tries to move the overlay to the AioContext > of the backing file (the snapshotted node). However, it's possible that > this doesn't work, but the backing file can instead be moved to the > overlay's AioContext

Re: [PATCH v2 2/7] block: Relax restrictions for blockdev-snapshot

2020-03-10 Thread Kevin Wolf
Am 10.03.2020 um 14:15 hat Peter Krempa geschrieben: > On Tue, Mar 10, 2020 at 12:38:26 +0100, Kevin Wolf wrote: > > blockdev-snapshot returned an error if the overlay was already in use, > > which it defined as having any BlockBackend parent. This is in fact both > > too strict (some parents can

Re: [PATCH v2 4/7] iotests: Test mirror with temporarily disabled target backing file

2020-03-10 Thread Peter Krempa
On Tue, Mar 10, 2020 at 12:38:28 +0100, Kevin Wolf wrote: > The newly tested scenario is a common live storage migration scenario: > The target node is opened without a backing file so that the active > layer is mirrored while its backing chain can be copied in the > background. > > The backing

Re: [PATCH v2 3/7] iotests: Fix run_job() with use_log=False

2020-03-10 Thread Peter Krempa
On Tue, Mar 10, 2020 at 12:38:27 +0100, Kevin Wolf wrote: > The 'job-complete' QMP command should be run with qmp() rather than > qmp_log() if use_log=False is passed. > > Signed-off-by: Kevin Wolf > --- > tests/qemu-iotests/iotests.py | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-)

Re: [PATCH v2 2/7] block: Relax restrictions for blockdev-snapshot

2020-03-10 Thread Peter Krempa
On Tue, Mar 10, 2020 at 12:38:26 +0100, Kevin Wolf wrote: > blockdev-snapshot returned an error if the overlay was already in use, > which it defined as having any BlockBackend parent. This is in fact both > too strict (some parents can tolerate the change of visible data caused > by attaching a

Re: [PATCH v2 1/7] block: Make bdrv_get_cumulative_perm() public

2020-03-10 Thread Peter Krempa
On Tue, Mar 10, 2020 at 12:38:25 +0100, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > include/block/block_int.h | 3 +++ > block.c | 6 ++ > 2 files changed, 5 insertions(+), 4 deletions(-) Reviewed-by: Peter Krempa

[PATCH] hw/scsi/megasas:Clean up some redundant code fix Clang warnings

2020-03-10 Thread Chen Qun
Here are some redundant statements, we can clean them up. Clang static code analyzer show warning: hw/scsi/megasas.c:1175:32: warning: Value stored to 'max_ld_disks' during its initialization is never read uint32_t num_ld_disks = 0, max_ld_disks = s->fw_luns;

Re: [PATCH v3 1/9] job: refactor progress to separate object

2020-03-10 Thread Max Reitz
On 06.03.20 08:38, Vladimir Sementsov-Ogievskiy wrote: > We need it in separate to pass to the block-copy object in the next > commit. > > Cc: qemu-sta...@nongnu.org > Signed-off-by: Vladimir Sementsov-Ogievskiy > Reviewed-by: Andrey Shinkevich > --- > include/qemu/job.h| 11

Re: [PULL 00/33] Trivial branch patches

2020-03-10 Thread Laurent Vivier
Le 10/03/2020 à 13:13, Kevin Wolf a écrit : > Am 10.03.2020 um 13:00 hat Philippe Mathieu-Daudé geschrieben: >> On 3/10/20 12:45 PM, Kevin Wolf wrote: >>> Am 10.03.2020 um 09:02 hat Laurent Vivier geschrieben: Le 09/03/2020 à 20:30, Philippe Mathieu-Daudé a écrit : > On 3/9/20 8:17 PM,

Re: [PULL 00/33] Trivial branch patches

2020-03-10 Thread Philippe Mathieu-Daudé
On 3/10/20 1:13 PM, Kevin Wolf wrote: Am 10.03.2020 um 13:00 hat Philippe Mathieu-Daudé geschrieben: On 3/10/20 12:45 PM, Kevin Wolf wrote: Am 10.03.2020 um 09:02 hat Laurent Vivier geschrieben: Le 09/03/2020 à 20:30, Philippe Mathieu-Daudé a écrit : On 3/9/20 8:17 PM, Michael S. Tsirkin

Re: [PATCH v3 1/9] job: refactor progress to separate object

2020-03-10 Thread Andrey Shinkevich
On 06/03/2020 10:38, Vladimir Sementsov-Ogievskiy wrote: We need it in separate to pass to the block-copy object in the next commit. Cc: qemu-sta...@nongnu.org Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Andrey Shinkevich --- include/qemu/job.h| 11 ++-

Re: [PATCH v3 4/4] qemu-img: Deprecate use of -b without -F

2020-03-10 Thread Eric Blake
On 3/10/20 5:57 AM, Kashyap Chamarthy wrote: On Mon, Mar 09, 2020 at 10:42:25AM -0500, Eric Blake wrote: [...] +qemu-img backing file without format (since 5.0.0) +'' + +The use of ``qemu-img create``, ``qemu-img rebase``, ``qemu-img +convert``,

Re: [PATCH v3 4/4] qemu-img: Deprecate use of -b without -F

2020-03-10 Thread Eric Blake
On 3/10/20 5:57 AM, Kashyap Chamarthy wrote: On Mon, Mar 09, 2020 at 10:42:25AM -0500, Eric Blake wrote: [...] +qemu-img backing file without format (since 5.0.0) +'' + +The use of ``qemu-img create``, ``qemu-img rebase``, ``qemu-img +convert``,

Re: [PATCH v3 4/4] qemu-img: Deprecate use of -b without -F

2020-03-10 Thread Eric Blake
On 3/10/20 4:47 AM, Kashyap Chamarthy wrote: To provoke the warning during convert, you'll have to also pass -B (or -o backing_file), without -o backing_fmt (since convert lacks the -F shorthand). Hmm, I tried the following way, but it doesn't provoke the warning: $>

Re: [PULL 00/33] Trivial branch patches

2020-03-10 Thread Kevin Wolf
Am 10.03.2020 um 13:00 hat Philippe Mathieu-Daudé geschrieben: > On 3/10/20 12:45 PM, Kevin Wolf wrote: > > Am 10.03.2020 um 09:02 hat Laurent Vivier geschrieben: > > > Le 09/03/2020 à 20:30, Philippe Mathieu-Daudé a écrit : > > > > On 3/9/20 8:17 PM, Michael S. Tsirkin wrote: > > > > > On Mon,

Re: [PULL 00/33] Trivial branch patches

2020-03-10 Thread Daniel P . Berrangé
On Tue, Mar 10, 2020 at 01:00:12PM +0100, Philippe Mathieu-Daudé wrote: > On 3/10/20 12:45 PM, Kevin Wolf wrote: > > Am 10.03.2020 um 09:02 hat Laurent Vivier geschrieben: > > > Le 09/03/2020 à 20:30, Philippe Mathieu-Daudé a écrit : > > > > On 3/9/20 8:17 PM, Michael S. Tsirkin wrote: > > > > >

Re: [PATCH v2 02/14] qcrypto/luks: implement encryption key management

2020-03-10 Thread Maxim Levitsky
On Tue, 2020-03-10 at 12:59 +0100, Kevin Wolf wrote: > Am 10.03.2020 um 12:05 hat Maxim Levitsky geschrieben: > > On Tue, 2020-03-10 at 11:58 +0100, Max Reitz wrote: > > > On 08.03.20 16:18, Maxim Levitsky wrote: > > > > Next few patches will expose that functionality > > > > to the user. > > > >

Re: [PULL 00/33] Trivial branch patches

2020-03-10 Thread Philippe Mathieu-Daudé
On 3/10/20 12:45 PM, Kevin Wolf wrote: Am 10.03.2020 um 09:02 hat Laurent Vivier geschrieben: Le 09/03/2020 à 20:30, Philippe Mathieu-Daudé a écrit : On 3/9/20 8:17 PM, Michael S. Tsirkin wrote: On Mon, Mar 09, 2020 at 04:08:04PM +0100, Laurent Vivier wrote: The following changes since

Re: [PATCH v2 02/14] qcrypto/luks: implement encryption key management

2020-03-10 Thread Kevin Wolf
Am 10.03.2020 um 12:05 hat Maxim Levitsky geschrieben: > On Tue, 2020-03-10 at 11:58 +0100, Max Reitz wrote: > > On 08.03.20 16:18, Maxim Levitsky wrote: > > > Next few patches will expose that functionality > > > to the user. > > > > > > Signed-off-by: Maxim Levitsky > > > --- > > >

Re: [PULL 00/33] Trivial branch patches

2020-03-10 Thread Kevin Wolf
Am 10.03.2020 um 09:02 hat Laurent Vivier geschrieben: > Le 09/03/2020 à 20:30, Philippe Mathieu-Daudé a écrit : > > On 3/9/20 8:17 PM, Michael S. Tsirkin wrote: > >> On Mon, Mar 09, 2020 at 04:08:04PM +0100, Laurent Vivier wrote: > >>> The following changes since commit > >>>

[PATCH v2 6/7] iotests: Add iothread cases to 155

2020-03-10 Thread Kevin Wolf
This patch adds test cases for attaching the backing chain to a mirror job target right before finalising the job, where the image is in a non-mainloop AioContext (i.e. the backing chain needs to be moved to the AioContext of the mirror target). This requires switching the test case from

[PATCH v2 4/7] iotests: Test mirror with temporarily disabled target backing file

2020-03-10 Thread Kevin Wolf
The newly tested scenario is a common live storage migration scenario: The target node is opened without a backing file so that the active layer is mirrored while its backing chain can be copied in the background. The backing chain should be attached to the mirror target node when finalising the

[PATCH v2 5/7] block: Fix cross-AioContext blockdev-snapshot

2020-03-10 Thread Kevin Wolf
external_snapshot_prepare() tries to move the overlay to the AioContext of the backing file (the snapshotted node). However, it's possible that this doesn't work, but the backing file can instead be moved to the overlay's AioContext (e.g. opening the backing chain for a mirror target).

[PATCH v2 2/7] block: Relax restrictions for blockdev-snapshot

2020-03-10 Thread Kevin Wolf
blockdev-snapshot returned an error if the overlay was already in use, which it defined as having any BlockBackend parent. This is in fact both too strict (some parents can tolerate the change of visible data caused by attaching a backing file) and too loose (some non-BlockBackend parents may not

[PATCH v2 7/7] qapi: Add '@allow-write-only-overlay' feature for 'blockdev-snapshot'

2020-03-10 Thread Kevin Wolf
From: Peter Krempa Anounce that 'blockdev-snapshot' command's permissions allow changing of the backing file if the 'consistent_read' permission is not required. This is useful for libvirt to allow late opening of the backing chain during a blockdev-mirror. Signed-off-by: Peter Krempa

[PATCH v2 1/7] block: Make bdrv_get_cumulative_perm() public

2020-03-10 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- include/block/block_int.h | 3 +++ block.c | 6 ++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/block/block_int.h b/include/block/block_int.h index f422c0bff0..71164c4ee1 100644 --- a/include/block/block_int.h +++

[PATCH v2 3/7] iotests: Fix run_job() with use_log=False

2020-03-10 Thread Kevin Wolf
The 'job-complete' QMP command should be run with qmp() rather than qmp_log() if use_log=False is passed. Signed-off-by: Kevin Wolf --- tests/qemu-iotests/iotests.py | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/iotests.py

Re: [PATCH] qcow2: remove QCowL2Meta parameter from handle_copied

2020-03-10 Thread Alberto Garcia
On Tue 10 Mar 2020 03:04:47 AM CET, John Snow wrote: >> static int handle_copied(BlockDriverState *bs, uint64_t guest_offset, >> -uint64_t *host_offset, uint64_t *bytes, QCowL2Meta **m) >> +uint64_t *host_offset, uint64_t *bytes) >> { >> BDRVQcow2State *s = bs->opaque; >> int

Re: [PATCH v2 02/14] qcrypto/luks: implement encryption key management

2020-03-10 Thread Maxim Levitsky
On Tue, 2020-03-10 at 11:58 +0100, Max Reitz wrote: > On 08.03.20 16:18, Maxim Levitsky wrote: > > Next few patches will expose that functionality > > to the user. > > > > Signed-off-by: Maxim Levitsky > > --- > > crypto/block-luks.c | 398 +++- > >

Re: [PATCH v2 02/14] qcrypto/luks: implement encryption key management

2020-03-10 Thread Max Reitz
On 08.03.20 16:18, Maxim Levitsky wrote: > Next few patches will expose that functionality > to the user. > > Signed-off-by: Maxim Levitsky > --- > crypto/block-luks.c | 398 +++- > qapi/crypto.json| 61 ++- > 2 files changed, 455 insertions(+),

Re: [PATCH v3 4/4] qemu-img: Deprecate use of -b without -F

2020-03-10 Thread Kashyap Chamarthy
On Mon, Mar 09, 2020 at 10:42:25AM -0500, Eric Blake wrote: [...] > > > +qemu-img backing file without format (since 5.0.0) > > > +'' > > > + > > > +The use of ``qemu-img create``, ``qemu-img rebase``, ``qemu-img > > > +convert``, or ``qemu-img

Re: [PATCH RESEND v2] block/nvme: introduce PMR support from NVMe 1.4 spec

2020-03-10 Thread Stefan Hajnoczi
On Fri, Mar 06, 2020 at 03:38:53PM -0700, Andrzej Jakowski wrote: > diff --git a/hw/block/nvme.c b/hw/block/nvme.c > index d28335cbf3..ff7e74d765 100644 > --- a/hw/block/nvme.c > +++ b/hw/block/nvme.c > @@ -19,10 +19,14 @@ > * -drive file=,if=none,id= > * -device

Re: [PATCH v3 4/4] qemu-img: Deprecate use of -b without -F

2020-03-10 Thread Kashyap Chamarthy
On Mon, Mar 09, 2020 at 10:42:25AM -0500, Eric Blake wrote: > On 3/9/20 10:31 AM, Kashyap Chamarthy wrote: > > > After (with the patch series applied to QEMU Git): > > > > $> git describe > > v4.2.0-2204-gd6c7830114 > > > > # Create; *without* specifying "-F raw" > > $>

Re: [Question] About GET LBA STATUS(16) support in qemu scsi emulation layer

2020-03-10 Thread Stefan Hajnoczi
On Tue, Mar 10, 2020 at 06:18:00AM +, Lin Ma wrote: > First of all, Thanks for your reply, Stefan. > > We know that the GET LBA STATUS works well under scsi lun passthrough due to > the vm directly talks to the scsi target. > I'm curious that if I use file backend image(say qcow2) + qemu

Re: [PULL 00/33] Trivial branch patches

2020-03-10 Thread Laurent Vivier
Le 09/03/2020 à 20:30, Philippe Mathieu-Daudé a écrit : > On 3/9/20 8:17 PM, Michael S. Tsirkin wrote: >> On Mon, Mar 09, 2020 at 04:08:04PM +0100, Laurent Vivier wrote: >>> The following changes since commit >>> 7a5853cec479a448edae0fb2aaf4e2f78c9c774d: >>> >>>    Merge remote-tracking branch

Re: [PATCH v8 02/10] scripts: add coccinelle script to use auto propagated errp

2020-03-10 Thread Vladimir Sementsov-Ogievskiy
09.03.2020 12:56, Markus Armbruster wrote: Suggest scripts: Coccinelle script to use auto-propagated errp or scripts: Coccinelle script to use ERRP_AUTO_PROPAGATE() Vladimir Sementsov-Ogievskiy writes: Script adds ERRP_AUTO_PROPAGATE macro invocation where appropriate and does

Re: [PATCH v8 02/10] scripts: add coccinelle script to use auto propagated errp

2020-03-10 Thread Vladimir Sementsov-Ogievskiy
08.03.2020 22:09, Christian Schoenebeck wrote: On Freitag, 6. März 2020 06:15:28 CET Vladimir Sementsov-Ogievskiy wrote: diff --git a/scripts/coccinelle/auto-propagated-errp.cocci b/scripts/coccinelle/auto-propagated-errp.cocci new file mode 100644 index 00..bff274bd6d --- /dev/null +++