Re: [PATCH v2 0/2] fdmon-poll: reset npfd when upgrading to fdmon-epoll

2020-09-23 Thread Stefan Hajnoczi
On Tue, Sep 15, 2020 at 01:03:37PM +0100, Stefan Hajnoczi wrote: > v2: > * Rebased onto qemu.git/master for meson > > Fix an assertion failure when aio_poll() is called in a aio_disable_external() > region. The failure happens when fdmon-poll is first upgraded to fdmon-epoll > and then

Re: [PATCH 3/7] hw/ide/core: Replace magic '512' value by BDRV_SECTOR_SIZE

2020-09-23 Thread John Snow
On 8/17/20 7:17 AM, Kevin Wolf wrote: Am 14.08.2020 um 10:28 hat Philippe Mathieu-Daudé geschrieben: Use self-explicit definitions instead of magic '512' value. Signed-off-by: Philippe Mathieu-Daudé BDRV_SECTOR_SIZE is the arbitrary unit in which some block layer functions and variables

Re: [PATCH 1/4] block/nbd: fix drain dead-lock because of nbd reconnect-delay

2020-09-23 Thread Eric Blake
On 9/3/20 2:02 PM, Vladimir Sementsov-Ogievskiy wrote: We pause reconnect process during drained section. So, if we have some requests, waiting for reconnect we should cancel them, otherwise they deadlock the drained section. How to reproduce: Now Qemu is trying to reconnect, and

Re: [PATCH v2 0/3] docs: add qemu-storage-daemon documentation

2020-09-23 Thread Stefan Hajnoczi
On Thu, Sep 10, 2020 at 03:43:57PM +0100, Stefan Hajnoczi wrote: > v2: > * Drop block-core.json h2 header removal, add an h1 header to >storage-daemon/qapi/qapi-schema.json instead [Kevin] > * Add Examples section to man page [Kevin] Ping > Add documentation for the qemu-storage-daemon

Re: [PATCH 4/4] block/nbd: nbd_co_reconnect_loop(): don't connect if drained

2020-09-23 Thread Eric Blake
On 9/3/20 2:03 PM, Vladimir Sementsov-Ogievskiy wrote: In a recent commit 12c75e20a269ac we've improved nbd_co_reconnect_loop() to not make drain wait for additional sleep. Similarly, we shouldn't try to connect, if previous sleep was interrupted by drain begin, otherwise drain_begin will have

Re: [PATCH v3] qemu/atomic.h: rename atomic_ to qatomic_

2020-09-23 Thread Stefan Hajnoczi
On Wed, Sep 23, 2020 at 11:56:46AM +0100, Stefan Hajnoczi wrote: > clang's C11 atomic_fetch_*() functions only take a C11 atomic type > pointer argument. QEMU uses direct types (int, etc) and this causes a > compiler error when a QEMU code calls these functions in a source file > that also

[PULL 05/13] virtio-blk: undo destructive iov_discard_*() operations

2020-09-23 Thread Stefan Hajnoczi
Fuzzing discovered that virtqueue_unmap_sg() is being called on modified req->in/out_sg iovecs. This means dma_memory_map() and dma_memory_unmap() calls do not have matching memory addresses. Fuzzing discovered that non-RAM addresses trigger a bug: void address_space_unmap(AddressSpace *as,

[PULL 12/13] tests: add test-fdmon-epoll

2020-09-23 Thread Stefan Hajnoczi
Test aio_disable_external(), which switches from fdmon-epoll back to fdmon-poll. This resulted in an assertion failure that was fixed in the previous patch. Signed-off-by: Stefan Hajnoczi Message-Id: <20200915120339.702938-3-stefa...@redhat.com> --- MAINTAINERS | 1 +

[PULL 11/13] fdmon-poll: reset npfd when upgrading to fdmon-epoll

2020-09-23 Thread Stefan Hajnoczi
npfd keeps track of how many pollfds are currently being monitored. It must be reset to 0 when fdmon_poll_wait() returns. When npfd reaches a treshold we switch to fdmon-epoll because it scales better. This patch resets npfd in the case where we switch to fdmon-epoll. Forgetting to do so results

Re: [PATCH v3] qemu/atomic.h: rename atomic_ to qatomic_

2020-09-23 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200923105646.47864-1-stefa...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20200923105646.47864-1-stefa...@redhat.com Subject: [PATCH v3] qemu/atomic.h: rename

[PULL 09/13] gitmodules: switch to qemu.org meson mirror

2020-09-23 Thread Stefan Hajnoczi
QEMU now hosts a mirror of meson.git. QEMU mirrors third-party code to ensure that users can always build QEMU even if the dependency goes offline and so QEMU meets its responsibilities to provide full source code under software licenses. Suggested-by: Peter Maydell Signed-off-by: Stefan

[PULL 06/13] virtio-crypto: don't modify elem->in/out_sg

2020-09-23 Thread Stefan Hajnoczi
A number of iov_discard_front/back() operations are made by virtio-crypto. The elem->in/out_sg iovec arrays are modified by these operations, resulting virtqueue_unmap_sg() calls on different addresses than were originally mapped. This is problematic because dirty memory may not be logged

[PULL 08/13] gitmodules: switch to qemu.org qboot mirror

2020-09-23 Thread Stefan Hajnoczi
QEMU now hosts a mirror of qboot.git. QEMU mirrors third-party code to ensure that users can always build QEMU even if the dependency goes offline and so QEMU meets its responsibilities to provide full source code under software licenses. Suggested-by: Peter Maydell Signed-off-by: Stefan

Re: [PATCH 11/11] block/export: convert vhost-user-blk server to block export API

2020-09-23 Thread Markus Armbruster
Stefan Hajnoczi writes: > 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

Re: [PATCH] block/mirror: fix core when using iothreads

2020-09-23 Thread John Snow
On 8/26/20 9:19 AM, Peng Liang wrote: We found an issue when doing block-commit with iothreads, which tries to dereference a NULL pointer. I'm clearing out my patch backlog. I am a bit out of the loop on block issues at the moment, did this issue get addressed in a later patch that I am not

[PULL 02/13] libvhost-user: handle endianness as mandated by the spec

2020-09-23 Thread Stefan Hajnoczi
From: Marc Hartmayer Since virtio existed even before it got standardized, the virtio standard defines the following types of virtio devices: + legacy device (pre-virtio 1.0) + non-legacy or VIRTIO 1.0 device + transitional device (which can act both as legacy and non-legacy) Virtio 1.0

[PULL 03/13] virtio: add vhost-user-fs-ccw device

2020-09-23 Thread Stefan Hajnoczi
From: Halil Pasic Wire up the CCW device for vhost-user-fs. Reviewed-by: Cornelia Huck Signed-off-by: Halil Pasic Message-id: 20200901150019.29229-2-mhart...@linux.ibm.com Signed-off-by: Stefan Hajnoczi --- hw/s390x/vhost-user-fs-ccw.c | 75

[PULL 07/13] docs/system: clarify deprecation schedule

2020-09-23 Thread Stefan Hajnoczi
The sentence explaining the deprecation schedule is ambiguous. Make it clear that a feature deprecated in the Nth release is guaranteed to remain available in the N+1th release. Removal can occur in the N+2nd release or later. As an example of this in action, see commit

[PULL 01/13] MAINTAINERS: add Stefan Hajnoczi as block/nvme.c maintainer

2020-09-23 Thread Stefan Hajnoczi
Development of the userspace NVMe block driver picked up again recently. After talking with Fam I am stepping up as block/nvme.c maintainer. Patches will be merged through my 'block' tree. Cc: Kevin Wolf Cc: Klaus Jensen Cc: Fam Zheng Signed-off-by: Stefan Hajnoczi Acked-by: Kevin Wolf

Re: [PATCH v2 2/2] block: deprecate the sheepdog block driver

2020-09-23 Thread Markus Armbruster
Daniel P. Berrangé writes: > This thread from a little over a year ago: > > http://lists.wpkg.org/pipermail/sheepdog/2019-March/thread.html > > states that sheepdog is no longer actively developed. The only mentioned > users are some companies who are said to have it for legacy reasons with >

Re: [PATCH v2] tests/check-block: Do not run the iotests with old versions of bash

2020-09-23 Thread Kevin Wolf
Am 18.09.2020 um 17:35 hat Thomas Huth geschrieben: > macOS is shipped with a very old version of the bash (3.2), which > is currently not suitable for running the iotests anymore (e.g. > it is missing support for "readarray" which is used in the file > tests/qemu-iotests/common.filter). Add a

Re: [PATCH] docs: Document the throttle block filter

2020-09-23 Thread Alberto Garcia
On Wed 23 Sep 2020 05:55:22 PM CEST, Kevin Wolf wrote: >> +A throttle-group can also be created with the -object command line >> +option but at the moment there is no way to pass a 'limits' parameter >> +that contains a ThrottleLimits structure. The solution is to set the >> +individual values

Re: [PATCH] block/sheepdog: Replace magic val by NANOSECONDS_PER_SECOND definition

2020-09-23 Thread Kevin Wolf
Am 21.09.2020 um 13:01 hat Philippe Mathieu-Daudé geschrieben: > Use self-explicit NANOSECONDS_PER_SECOND definition instead > of magic value. > > Signed-off-by: Philippe Mathieu-Daudé Thanks, applied to the block branch. Kevin

Re: [PATCH 3/4] block/nbd: fix reconnect-delay

2020-09-23 Thread Eric Blake
On 9/3/20 2:03 PM, Vladimir Sementsov-Ogievskiy wrote: reconnect-delay has a design flaw: we handle it in the same loop where we do connection attempt. So, reconnect-delay may be exceeded by unpredictable time of connection attempt. Let's instead use separate timer. How to reproduce the bug:

[PULL 10/13] gitmodules: add qemu.org vbootrom submodule

2020-09-23 Thread Stefan Hajnoczi
The vbootrom module is needed for the new NPCM7xx ARM SoCs. The vbootrom.git repo is now mirrored on qemu.org. QEMU mirrors third-party code to ensure that users can always build QEMU even if the dependency goes offline and so QEMU meets its responsibilities to provide full source code under

Re: [PATCH v3] qemu/atomic.h: rename atomic_ to qatomic_

2020-09-23 Thread Philippe Mathieu-Daudé
On 9/23/20 12:56 PM, Stefan Hajnoczi wrote: > clang's C11 atomic_fetch_*() functions only take a C11 atomic type > pointer argument. QEMU uses direct types (int, etc) and this causes a > compiler error when a QEMU code calls these functions in a source file > that also included via a system

Re: [PATCH 00/13] dma: Let the DMA API take MemTxAttrs argument and propagate MemTxResult

2020-09-23 Thread John Snow
On 9/4/20 11:44 AM, Philippe Mathieu-Daudé wrote: Salvaging cleanups patches from the RFC series "Forbid DMA write accesses to MMIO regions" [*], propagating MemTxResult and adding documentation. [*] https://www.mail-archive.com/qemu-block@nongnu.org/msg72924.html Klaus Jensen (1): pci:

Re: [PATCH] docs: Document the throttle block filter

2020-09-23 Thread Kevin Wolf
Am 21.09.2020 um 19:30 hat Alberto Garcia geschrieben: > This filter was added back in 2017 for QEMU 2.11 but it was never > properly documented, so let's explain how it works and add a couple of > examples. > > Signed-off-by: Alberto Garcia > --- > docs/throttle.txt | 107

Re: [PATCH v8 2/7] copy-on-read: add filter append/drop functions

2020-09-23 Thread Vladimir Sementsov-Ogievskiy
17.09.2020 19:09, Andrey Shinkevich wrote: On 04.09.2020 14:22, Max Reitz wrote: On 28.08.20 18:52, Andrey Shinkevich wrote: 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. Do we need

Re: [PATCH 2/4] block/nbd: correctly use qio_channel_detach_aio_context when needed

2020-09-23 Thread Eric Blake
On 9/3/20 2:02 PM, Vladimir Sementsov-Ogievskiy wrote: Don't use nbd_client_detach_aio_context() driver handler where we want to finalize the connection. We should directly use qio_channel_detach_aio_context() in such cases. Driver handler may (and will) contain another things, unrelated to the

[PULL 00/13] Block patches

2020-09-23 Thread Stefan Hajnoczi
The following changes since commit 0fc0142828b5bc965790a1c5c6e241897d3387cb: Merge remote-tracking branch 'remotes/kraxel/tags/input-20200921-pull-request' into staging (2020-09-22 21:11:10 +0100) are available in the Git repository at: https://github.com/stefanha/qemu.git

[PULL 04/13] util/iov: add iov_discard_undo()

2020-09-23 Thread Stefan Hajnoczi
The iov_discard_front/back() operations are useful for parsing iovecs but they modify the array elements. If the original array is needed after parsing finishes there is currently no way to restore it. Although g_memdup() can be used before performing destructive iov_discard_front/back()

[PATCH v2 7/7] configure: Bump the minimum required Python version to 3.6

2020-09-23 Thread Thomas Huth
All our supported build platforms have Python 3.6 or newer nowadays, and there are some useful features in Python 3.6 which are not available in 3.5 yet (e.g. the type hint annotations which will allow us to statically type the QAPI parser), so let's bump the minimum Python version to 3.6 now.

Re: [PATCH 27/29] nbd: Deprecate nbd-server-add/remove

2020-09-23 Thread Kevin Wolf
Am 10.09.2020 um 17:34 hat Max Reitz geschrieben: > On 07.09.20 20:20, Kevin Wolf wrote: > > These QMP commands are replaced by block-export-add/del. > > > > Signed-off-by: Kevin Wolf > > --- > > qapi/block-export.json | 11 +-- > > docs/system/deprecated.rst | 8 > > 2

Re: [PATCH] iotests: Remove 030 from the auto group

2020-09-23 Thread Alberto Garcia
On Fri 04 Sep 2020 10:25:13 AM CEST, Kevin Wolf wrote: >> Test 030 is still occasionally failing in the CI ... so for the >> time being, let's disable it in the "auto" group. We can add it >> back once it got more stable. >> >> Signed-off-by: Thomas Huth > > I would rather just disable this one

[PATCH v4 03/14] hw/block/nvme: Introduce the Namespace Types definitions

2020-09-23 Thread Dmitry Fomichev
From: Niklas Cassel Define the structures and constants required to implement Namespace Types support. Signed-off-by: Niklas Cassel Signed-off-by: Dmitry Fomichev --- hw/block/nvme.c | 2 +- hw/block/nvme.h | 3 ++ include/block/nvme.h | 74

Re: [PATCH v6 2/5] block/io: bdrv_common_block_status_above: support include_base

2020-09-23 Thread Alberto Garcia
On Wed 23 Sep 2020 07:11:57 PM CEST, Vladimir Sementsov-Ogievskiy wrote: >> BlockDriverState *last_bs = include_base ? base : backing_bs(base); > > hmm, in case when include_base is false, last bs is not > backing_bs(base) but the parent of base. Oops, yes, it should be the other way around

[PATCH v4 05/14] hw/block/nvme: Add support for Namespace Types

2020-09-23 Thread Dmitry Fomichev
From: Niklas Cassel Namespace Types introduce a new command set, "I/O Command Sets", that allows the host to retrieve the command sets associated with a namespace. Introduce support for the command set and enable detection for the NVM Command Set. The new workflows for identify commands rely

[PATCH v4 12/14] hw/block/nvme: Add injection of Offline/Read-Only zones

2020-09-23 Thread Dmitry Fomichev
ZNS specification defines two zone conditions for the zones that no longer can function properly, possibly because of flash wear or other internal fault. It is useful to be able to "inject" a small number of such zones for testing purposes. This commit defines two optional device properties,

[PATCH v4 10/14] hw/block/nvme: Introduce max active and open zone limits

2020-09-23 Thread Dmitry Fomichev
Added two module properties, "max_active" and "max_open" to control the maximum number of zones that can be active or open. Once these variables are set to non-default values, these limits are checked during I/O and Too Many Active or Too Many Open command status is returned if they are exceeded.

Re: [PATCH 11/11] block/export: convert vhost-user-blk server to block export API

2020-09-23 Thread Stefan Hajnoczi
On Wed, Sep 23, 2020 at 03:42:30PM +0200, Markus Armbruster wrote: > Stefan Hajnoczi writes: > > > 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

Re: [PATCH v8 7/7] block/io: refactor save/load vmstate

2020-09-23 Thread Eric Blake
On 9/15/20 11:44 AM, Vladimir Sementsov-Ogievskiy wrote: Like for read/write in a previous commit, drop extra indirection layer, generate directly bdrv_readv_vmstate() and bdrv_writev_vmstate(). Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- block/coroutines.h|

Re: [PATCH] docs: Document the throttle block filter

2020-09-23 Thread Kevin Wolf
Am 23.09.2020 um 17:59 hat Alberto Garcia geschrieben: > On Wed 23 Sep 2020 05:55:22 PM CEST, Kevin Wolf wrote: > >> +A throttle-group can also be created with the -object command line > >> +option but at the moment there is no way to pass a 'limits' parameter > >> +that contains a ThrottleLimits

Re: [PATCH v6 2/5] block/io: bdrv_common_block_status_above: support include_base

2020-09-23 Thread Alberto Garcia
On Wed 16 Sep 2020 02:20:05 PM CEST, Vladimir Sementsov-Ogievskiy wrote: > 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 Berto

[PATCH v4 11/14] hw/block/nvme: Support Zone Descriptor Extensions

2020-09-23 Thread Dmitry Fomichev
Zone Descriptor Extension is a label that can be assigned to a zone. It can be set to an Empty zone and it stays assigned until the zone is reset. This commit adds a new optional module property, "zone_descr_ext_size". Its value must be a multiple of 64 bytes. If this value is non-zero, it

[PATCH v4 07/14] hw/block/nvme: Make Zoned NS Command Set definitions

2020-09-23 Thread Dmitry Fomichev
Define values and structures that are needed to support Zoned Namespace Command Set (NVMe TP 4053) in PCI NVMe controller emulator. All new protocol definitions are located in include/block/nvme.h and everything added that is specific to this implementation is kept in hw/block/nvme.h. In order

[PATCH v4 08/14] hw/block/nvme: Define Zoned NS Command Set trace events

2020-09-23 Thread Dmitry Fomichev
The Zoned Namespace Command Set / Namespace Types implementation that is being introduced in this series adds a good number of trace events. Combine all tracepoint definitions into a separate patch to make reviewing more convenient. Signed-off-by: Dmitry Fomichev --- hw/block/trace-events | 26

Re: [PATCH v8 2/7] block/io: refactor coroutine wrappers

2020-09-23 Thread Eric Blake
On 9/15/20 11:44 AM, Vladimir Sementsov-Ogievskiy wrote: Most of our coroutine wrappers already follow this convention: We have 'coroutine_fn bdrv_co_()' as the core function, and a wrapper 'bdrv_()' which does parameters packing and call bdrv_run_co(). The only outsiders are the bdrv_prwv_co

Re: [PATCH v2 7/7] configure: Bump the minimum required Python version to 3.6

2020-09-23 Thread Thomas Huth
On 23/09/2020 18.34, 罗勇刚(Yonggang Luo) wrote: > Should we also warning it in meson.build, cause configure finally shoud > be removed. Sounds like a good idea for a separate patch (let's do one issue at a time...). Thomas

[PATCH v4 06/14] hw/block/nvme: Add support for active/inactive namespaces

2020-09-23 Thread Dmitry Fomichev
From: Niklas Cassel In NVMe, a namespace is active if it exists and is attached to the controller. CAP.CSS (together with the I/O Command Set data structure) defines what command sets are supported by the controller. CC.CSS (together with Set Profile) can be set to enable a subset of the

Re: [PATCH v3 00/17] hw/block/nvme: multiple namespaces support

2020-09-23 Thread Klaus Jensen
On Sep 22 10:45, Klaus Jensen wrote: > From: Klaus Jensen > > This is the next round of my patches for the nvme device. > > This includes a bit of cleanup and two new features: > > * support for scatter/gather lists > > * multiple namespaces support through a new nvme-ns device > >

[PATCH] docs: Better mention of qemu-img amend limitations

2020-09-23 Thread Eric Blake
Missed during merge resolution of commit bc5ee6da71. Signed-off-by: Eric Blake --- docs/tools/qemu-img.rst | 4 1 file changed, 4 insertions(+) diff --git a/docs/tools/qemu-img.rst b/docs/tools/qemu-img.rst index c35bd6482203..2b5891b54db7 100644 --- a/docs/tools/qemu-img.rst +++

Re: [PATCH 00/13] dma: Let the DMA API take MemTxAttrs argument and propagate MemTxResult

2020-09-23 Thread Philippe Mathieu-Daudé
On 9/23/20 5:24 PM, John Snow wrote: > On 9/4/20 11:44 AM, Philippe Mathieu-Daudé wrote: >> Salvaging cleanups patches from the RFC series "Forbid DMA write >> accesses to MMIO regions" [*], propagating MemTxResult and >> adding documentation. >> >> [*]

Re: [PATCH v6 2/5] block/io: bdrv_common_block_status_above: support include_base

2020-09-23 Thread Vladimir Sementsov-Ogievskiy
23.09.2020 19:18, Alberto Garcia wrote: On Wed 16 Sep 2020 02:20:05 PM CEST, Vladimir Sementsov-Ogievskiy wrote: -for (p = backing_bs(bs); p != base; p = backing_bs(p)) { +for (p = backing_bs(bs); include_base || p != base; p = backing_bs(p)) { ret = bdrv_co_block_status(p,

[PATCH v4 09/14] hw/block/nvme: Support Zoned Namespace Command Set

2020-09-23 Thread Dmitry Fomichev
The emulation code has been changed to advertise NVM Command Set when "zoned" device property is not set (default) and Zoned Namespace Command Set otherwise. Handlers for three new NVMe commands introduced in Zoned Namespace Command Set specification are added, namely for Zone Management Receive,

[PATCH v4 00/14] hw/block/nvme: Support Namespace Types and Zoned Namespace Command Set

2020-09-23 Thread Dmitry Fomichev
v3 -> v4 - Fix bugs introduced in v2/v3 for QD > 1 operation. Now, all writes to a zone happen at the new write pointer variable, zone->w_ptr, that is advanced right after submitting the backend i/o. The existing zone->d.wp variable is updated upon the successful write completion and

[PATCH v4 01/14] hw/block/nvme: Report actual LBA data shift in LBAF

2020-09-23 Thread Dmitry Fomichev
Calculate the data shift value to report based on the set value of logical_block_size device property. In the process, use a local variable to calculate the LBA format index instead of the hardcoded value 0. This makes the code more readable and it will make it easier to add support for multiple

Re: [PATCH 3/7] hw/ide/core: Replace magic '512' value by BDRV_SECTOR_SIZE

2020-09-23 Thread Philippe Mathieu-Daudé
On 9/23/20 4:53 PM, John Snow wrote: > On 8/17/20 7:17 AM, Kevin Wolf wrote: >> Am 14.08.2020 um 10:28 hat Philippe Mathieu-Daudé geschrieben: >>> Use self-explicit definitions instead of magic '512' value. >>> >>> Signed-off-by: Philippe Mathieu-Daudé >> >> BDRV_SECTOR_SIZE is the arbitrary unit

[PATCH v4 02/14] hw/block/nvme: Add Commands Supported and Effects log

2020-09-23 Thread Dmitry Fomichev
This log page becomes necessary to implement to allow checking for Zone Append command support in Zoned Namespace Command Set. This commit adds the code to report this log page for NVM Command Set only. The parts that are specific to zoned operation will be added later in the series.

Re: [PULL 00/13] Block patches

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

Re: [PATCH v6 2/5] block/io: bdrv_common_block_status_above: support include_base

2020-09-23 Thread Alberto Garcia
On Wed 16 Sep 2020 02:20:05 PM CEST, Vladimir Sementsov-Ogievskiy wrote: > -for (p = backing_bs(bs); p != base; p = backing_bs(p)) { > +for (p = backing_bs(bs); include_base || p != base; p = backing_bs(p)) { > ret = bdrv_co_block_status(p, want_zero, offset, bytes, pnum, map, >

Re: [PATCH v6 3/5] block/io: bdrv_common_block_status_above: support bs == base

2020-09-23 Thread Alberto Garcia
On Wed 16 Sep 2020 02:20:06 PM CEST, Vladimir Sementsov-Ogievskiy wrote: > 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

Re: [PATCH v2 7/7] configure: Bump the minimum required Python version to 3.6

2020-09-23 Thread Yonggang Luo
Should we also warning it in meson.build, cause configure finally shoud be removed. On Thu, Sep 24, 2020 at 12:32 AM Thomas Huth wrote: > > All our supported build platforms have Python 3.6 or newer nowadays, and > there are some useful features in Python 3.6 which are not available in > 3.5 yet

[PATCH v4 04/14] hw/block/nvme: Define trace events related to NS Types

2020-09-23 Thread Dmitry Fomichev
A few trace events are defined that are relevant to implementing Namespace Types (NVMe TP 4056). Signed-off-by: Dmitry Fomichev Reviewed-by: Klaus Jensen Reviewed-by: Philippe Mathieu-Daudé --- hw/block/trace-events | 10 ++ 1 file changed, 10 insertions(+) diff --git

[PATCH v4 14/14] hw/block/nvme: Document zoned parameters in usage text

2020-09-23 Thread Dmitry Fomichev
Added brief descriptions of the new device properties that are now available to users to configure features of Zoned Namespace Command Set in the emulator. This patch is for documentation only, no functionality change. Signed-off-by: Dmitry Fomichev --- hw/block/nvme.c | 43

[PATCH v4 13/14] hw/block/nvme: Use zone metadata file for persistence

2020-09-23 Thread Dmitry Fomichev
A ZNS drive that is emulated by this module is currently initialized with all zones Empty upon startup. However, actual ZNS SSDs save the state and condition of all zones in their internal NVRAM in the event of power loss. When such a drive is powered up again, it closes or finishes all zones that

Re: [PATCH v8 4/7] scripts: add block-coroutine-wrapper.py

2020-09-23 Thread Eric Blake
On 9/15/20 11:44 AM, Vladimir Sementsov-Ogievskiy wrote: We have a very frequent pattern of creating coroutine from function with several arguments: +++ b/scripts/block-coroutine-wrapper.py @@ -0,0 +1,187 @@ +#!/usr/bin/env python3 +"""Generate coroutine wrappers for block subsystem.

Re: [PATCH v8 3/7] block: declare some coroutine functions in block/coroutines.h

2020-09-23 Thread Eric Blake
On 9/15/20 11:44 AM, Vladimir Sementsov-Ogievskiy wrote: We are going to keep coroutine-wrappers code (structure-packing parameters, BDRV_POLL wrapper functions) in separate auto-generated files. So, we'll need a header with declaration of original _co_ functions, for those which are static now.

Re: [PATCH v8 4/7] scripts: add block-coroutine-wrapper.py

2020-09-23 Thread Eric Blake
On 9/23/20 7:00 PM, Eric Blake wrote: Tested-by: Eric Blake There's enough grammar fixes, and the fact that John is working on python cleanups, to make me wonder if we need a v9, or if I should just stage it where it is with any other cleanups as followups.  But I'm liking the reduced

Re: [PATCH] iotests: Remove 030 from the auto group

2020-09-23 Thread Thomas Huth
On 23/09/2020 20.18, Alberto Garcia wrote: > On Fri 04 Sep 2020 10:25:13 AM CEST, Kevin Wolf wrote: >>> Test 030 is still occasionally failing in the CI ... so for the >>> time being, let's disable it in the "auto" group. We can add it >>> back once it got more stable. >>> >>> Signed-off-by:

Re: [PATCH] docs: Better mention of qemu-img amend limitations

2020-09-23 Thread Nir Soffer
On Wed, Sep 23, 2020 at 11:38 PM Eric Blake wrote: > > Missed during merge resolution of commit bc5ee6da71. > > Signed-off-by: Eric Blake > --- > docs/tools/qemu-img.rst | 4 > 1 file changed, 4 insertions(+) > > diff --git a/docs/tools/qemu-img.rst b/docs/tools/qemu-img.rst > index

Re: [PATCH v8 4/7] scripts: add block-coroutine-wrapper.py

2020-09-23 Thread Eric Blake
On 9/15/20 3:02 PM, Vladimir Sementsov-Ogievskiy wrote: 15.09.2020 19:44, Vladimir Sementsov-Ogievskiy wrote: We have a very frequent pattern of creating coroutine from function with several arguments:    - create structure to pack parameters    - create _entry function to call original

Re: [PATCH v2 00/20] block/export: Allow exporting BDSs via FUSE

2020-09-23 Thread Max Reitz
On 22.09.20 17:58, Daniel P. Berrangé wrote: > On Tue, Sep 22, 2020 at 12:49:12PM +0200, Max Reitz wrote: >> Based-on: <20200907182011.521007-1-kw...@redhat.com> >> (“block/export: Add infrastructure and QAPI for block exports”) >> >> (Though its patch 16 needs a s/= \_exp_nbd/= drv/ on

Re: [PATCH v2 0/2] block: deprecate the sheepdog driver

2020-09-23 Thread Peter Krempa
On Tue, Sep 22, 2020 at 18:42:52 +0100, Daniel Berrange wrote: > On Tue, Sep 22, 2020 at 01:09:06PM -0400, Neal Gompa wrote: > > On Tue, Sep 22, 2020 at 12:16 PM Daniel P. Berrangé > > wrote: > > > > > > 2 years back I proposed dropping the sheepdog mailing list from the > > > MAINTAINERS file,

Re: [PATCH v2 00/20] block/export: Allow exporting BDSs via FUSE

2020-09-23 Thread Stefan Hajnoczi
On Tue, Sep 22, 2020 at 04:58:38PM +0100, Daniel P. Berrangé wrote: > On Tue, Sep 22, 2020 at 12:49:12PM +0200, Max Reitz wrote: > > Based-on: <20200907182011.521007-1-kw...@redhat.com> > > (“block/export: Add infrastructure and QAPI for block exports”) > > > > (Though its patch 16

Re: [PATCH v2] qemu/atomic.h: prefix qemu_ to solve collisions

2020-09-23 Thread Stefan Hajnoczi
On Tue, Sep 22, 2020 at 01:35:37PM +0200, Paolo Bonzini wrote: > On 22/09/20 10:58, Stefan Hajnoczi wrote: > I think the reviews crossed, are you going to respin using a qatomic_ > prefix? Yes, let's do qatomic_. I'll send a v3. Stefan signature.asc Description: PGP signature

Re: [PATCH] qemu/atomic.h: prefix qemu_ to solve collisions

2020-09-23 Thread Stefan Hajnoczi
On Tue, Sep 22, 2020 at 09:18:49AM +0100, Daniel P. Berrangé wrote: > On Tue, Sep 22, 2020 at 08:56:06AM +0200, Paolo Bonzini wrote: > > On 22/09/20 08:45, David Hildenbrand wrote: > > >> It's certainly a good idea but it's quite verbose. > > >> > > >> What about using atomic__* as the prefix? It

Re: [PATCH v2 2/2] block: deprecate the sheepdog block driver

2020-09-23 Thread Philippe Mathieu-Daudé
On 9/22/20 6:16 PM, Daniel P. Berrangé wrote: > This thread from a little over a year ago: > > http://lists.wpkg.org/pipermail/sheepdog/2019-March/thread.html > > states that sheepdog is no longer actively developed. The only mentioned > users are some companies who are said to have it for