Re: [PATCH RFC 2/2] hw: Replace drive_get_next() by drive_get()

2021-11-16 Thread Cédric Le Goater
On 11/15/21 16:57, Markus Armbruster wrote: Philippe Mathieu-Daudé writes: On 11/15/21 13:55, Markus Armbruster wrote: drive_get_next() is basically a bad idea. It returns the "next" block backend of a certain interface type. "Next" means bus=0,unit=N, where subsequent calls count N up

Re: [PATCH v2 09/10] block: Let replace_child_noperm free children

2021-11-16 Thread Vladimir Sementsov-Ogievskiy
15.11.2021 16:04, Hanna Reitz wrote: On 12.11.21 17:10, Vladimir Sementsov-Ogievskiy wrote: 11.11.2021 15:08, Hanna Reitz wrote: In most of the block layer, especially when traversing down from other BlockDriverStates, we assume that BdrvChild.bs can never be NULL.  When it becomes NULL, it is

Re: [PATCH v2 10/10] iotests/030: Unthrottle parallel jobs in reverse

2021-11-16 Thread Vladimir Sementsov-Ogievskiy
15.11.2021 16:56, Hanna Reitz wrote: On 12.11.21 17:25, Vladimir Sementsov-Ogievskiy wrote: 11.11.2021 15:08, Hanna Reitz wrote: See the comment for why this is necessary. Signed-off-by: Hanna Reitz ---   tests/qemu-iotests/030 | 11 ++-   1 file changed, 10 insertions(+), 1

Re: [PULL 00/13] Block layer patches

2021-11-16 Thread Hanna Reitz
On 15.11.21 21:55, Richard Henderson wrote: On 11/15/21 3:53 PM, Kevin Wolf wrote: The following changes since commit 42f6c9179be4401974dd3a75ee72defd16b5092d:    Merge tag 'pull-ppc-2022' of https://github.com/legoater/qemu into staging (2021-11-12 12:28:25 +0100) are available in the

Re: [PATCH RFC 2/2] hw: Replace drive_get_next() by drive_get()

2021-11-16 Thread Markus Armbruster
Cédric Le Goater writes: > On 11/15/21 16:57, Markus Armbruster wrote: >> Philippe Mathieu-Daudé writes: >> >>> On 11/15/21 13:55, Markus Armbruster wrote: drive_get_next() is basically a bad idea. It returns the "next" block backend of a certain interface type. "Next" means

Re: [PATCH v4 06/25] include/block/block_int: split header into I/O and global state API

2021-11-16 Thread Emanuele Giuseppe Esposito
On 12/11/2021 13:17, Hanna Reitz wrote: On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: Similarly to the previous patch, split block_int.h in block_int-io.h and block_int-global-state.h block_int-common.h contains the structures shared between the two headers, and the functions that

[PULL v2 13/13] file-posix: Fix alignment after reopen changing O_DIRECT

2021-11-16 Thread Hanna Reitz
From: Kevin Wolf At the end of a reopen, we already call bdrv_refresh_limits(), which should update bs->request_alignment according to the new file descriptor. However, raw_probe_alignment() relies on s->needs_alignment and just uses 1 if it isn't set. We neglected to update this field, so

[PULL v2 01/13] stream: Traverse graph after modification

2021-11-16 Thread Hanna Reitz
bdrv_cor_filter_drop() modifies the block graph. That means that other parties can also modify the block graph before it returns. Therefore, we cannot assume that the result of a graph traversal we did before remains valid afterwards. We should thus fetch `base` and `unfiltered_base` afterwards

[PATCH v2 for-6.2] file-posix: Fix alignment after reopen changing O_DIRECT

2021-11-16 Thread Hanna Reitz
From: Kevin Wolf At the end of a reopen, we already call bdrv_refresh_limits(), which should update bs->request_alignment according to the new file descriptor. However, raw_probe_alignment() relies on s->needs_alignment and just uses 1 if it isn't set. We neglected to update this field, so

Re: [PATCH v4 05/25] block/block-backend.c: assertions for block-backend

2021-11-16 Thread Hanna Reitz
On 16.11.21 11:15, Emanuele Giuseppe Esposito wrote: On 12/11/2021 12:01, Hanna Reitz wrote: On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: All the global state (GS) API functions will check that qemu_in_main_thread() returns true. If not, it means that the safety of BQL cannot be

[PULL v2 00/13] Block patches

2021-11-16 Thread Hanna Reitz
The following changes since commit 42f6c9179be4401974dd3a75ee72defd16b5092d: Merge tag 'pull-ppc-2022' of https://github.com/legoater/qemu into staging (2021-11-12 12:28:25 +0100) are available in the Git repository at: https://gitlab.com/hreitz/qemu.git tags/pull-block-2021-11-16 for

[PULL v2 02/13] block: Manipulate children list in .attach/.detach

2021-11-16 Thread Hanna Reitz
The children list is specific to BDS parents. We should not modify it in the general children modification code, but let BDS parents deal with it in their .attach() and .detach() methods. This also has the advantage that a BdrvChild is removed from the children list before its .bs pointer can

[PULL v2 03/13] block: Unite remove_empty_child and child_free

2021-11-16 Thread Hanna Reitz
Now that bdrv_remove_empty_child() no longer removes the child from the parent's children list but only checks that it is not in such a list, it is only a wrapper around bdrv_child_free() that checks that the child is empty and unused. That should apply to all children that we free, so put those

[PULL v2 08/13] block: Let replace_child_tran keep indirect pointer

2021-11-16 Thread Hanna Reitz
As of a future commit, bdrv_replace_child_noperm() will clear the indirect BdrvChild pointer passed to it if the new child BDS is NULL. bdrv_replace_child_tran() will want to let it do that, but revert this change in its abort handler. For that, we need to have it receive a BdrvChild ** pointer,

Re: [PATCH 1/2] block:hdev: support BLKSECDISCARD

2021-11-16 Thread Stefan Hajnoczi
On Tue, Nov 16, 2021 at 02:03:15AM +, Qi, Yadong wrote: > > > Add a new option "secdiscard" for block drive. Parse it and record it > > > in bs->open_flags as bit(BDRV_O_SECDISCARD). > > > > > > Add a new BDRV_REQ_SECDISCARD bit for secure discard request from > > > virtual device. > > > > > >

Re: [PATCH v4 06/25] include/block/block_int: split header into I/O and global state API

2021-11-16 Thread Hanna Reitz
On 16.11.21 11:24, Emanuele Giuseppe Esposito wrote: On 12/11/2021 13:17, Hanna Reitz wrote: On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: Similarly to the previous patch, split block_int.h in block_int-io.h and block_int-global-state.h block_int-common.h contains the structures

[PULL v2 04/13] block: Drop detached child from ignore list

2021-11-16 Thread Hanna Reitz
bdrv_attach_child_common_abort() restores the parent's AioContext. To do so, the child (which was supposed to be attached, but is now detached again by this abort handler) is added to the ignore list for the AioContext changing functions. However, since we modify a BDS's children list in the

[PULL v2 11/13] docs: Deprecate incorrectly typed device_add arguments

2021-11-16 Thread Hanna Reitz
From: Kevin Wolf While introducing a non-QemuOpts code path for device creation for JSON -device, we noticed that QMP device_add doesn't check its input correctly (accepting arguments that should have been rejected), and that users may be relying on this behaviour (libvirt did until it was fixed

[PULL v2 12/13] softmmu/qdev-monitor: fix use-after-free in qdev_set_id()

2021-11-16 Thread Hanna Reitz
From: Stefan Hajnoczi Reported by Coverity (CID 1465222). Fixes: 4a1d937796de0fecd8b22d7dbebf87f38e8282fd ("softmmu/qdev-monitor: add error handling in qdev_set_id") Cc: Damien Hedde Cc: Kevin Wolf Cc: Michael S. Tsirkin Signed-off-by: Stefan Hajnoczi Message-Id:

Re: [PATCH v4 02/25] include/block/block: split header into I/O and global state API

2021-11-16 Thread Emanuele Giuseppe Esposito
On 12/11/2021 13:25, Hanna Reitz wrote: On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: block.h currently contains a mix of functions: some of them run under the BQL and modify the block layer graph, others are instead thread-safe and perform I/O in iothreads. It is not easy to

Re: [PATCH v4 05/25] block/block-backend.c: assertions for block-backend

2021-11-16 Thread Emanuele Giuseppe Esposito
On 12/11/2021 12:01, Hanna Reitz wrote: On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: All the global state (GS) API functions will check that qemu_in_main_thread() returns true. If not, it means that the safety of BQL cannot be guaranteed, and they need to be moved to I/O.

Re: [PATCH v4 04/25] include/sysemu/block-backend: split header into I/O and global state (GS) API

2021-11-16 Thread Emanuele Giuseppe Esposito
+int blk_make_zero(BlockBackend *blk, BdrvRequestFlags flags); +int64_t blk_nb_sectors(BlockBackend *blk); I’d have considered this an I/O function, and blk_getlength() is classified as such.  Why not this? This one by itself is only invoked under BQL. I believe in facts that in

Re: [PATCH v2 0/3] virtio: increase VIRTQUEUE_MAX_SIZE to 32k

2021-11-16 Thread Stefan Hajnoczi
On Mon, Nov 15, 2021 at 03:32:46PM +0100, Christian Schoenebeck wrote: > I would appreciate if you'd let me know whether I should suggest the > discussed > two virtio capabilities as official virtio ones, or whether I should directly > go for 9p device specific ones instead. Please propose

Re: [PATCH RFC 2/2] hw: Replace drive_get_next() by drive_get()

2021-11-16 Thread Cédric Le Goater
On 11/16/21 10:29, Markus Armbruster wrote: Cédric Le Goater writes: On 11/15/21 16:57, Markus Armbruster wrote: Philippe Mathieu-Daudé writes: On 11/15/21 13:55, Markus Armbruster wrote: drive_get_next() is basically a bad idea. It returns the "next" block backend of a certain

[PULL v2 06/13] block: Restructure remove_file_or_backing_child()

2021-11-16 Thread Hanna Reitz
As of a future patch, bdrv_replace_child_tran() will take a BdrvChild ** pointer. Prepare for that by getting such a pointer and using it where applicable, and (dereferenced) as a parameter for bdrv_replace_child_tran(). Signed-off-by: Hanna Reitz Message-Id:

[PULL v2 05/13] block: Pass BdrvChild ** to replace_child_noperm

2021-11-16 Thread Hanna Reitz
bdrv_replace_child_noperm() modifies BdrvChild.bs, and can potentially set it to NULL. That is dangerous, because BDS parents generally assume that their children's .bs pointer is never NULL. We therefore want to let bdrv_replace_child_noperm() set the corresponding BdrvChild pointer to NULL,

[PULL v2 07/13] transactions: Invoke clean() after everything else

2021-11-16 Thread Hanna Reitz
Invoke the transaction drivers' .clean() methods only after all .commit() or .abort() handlers are done. This makes it easier to have nested transactions where the top-level transactions pass objects to lower transactions that the latter can still use throughout their commit/abort phases, while

[PULL v2 10/13] iotests/030: Unthrottle parallel jobs in reverse

2021-11-16 Thread Hanna Reitz
See the comment for why this is necessary. Signed-off-by: Hanna Reitz Message-Id: <2021120829.81329-11-hre...@redhat.com> Signed-off-by: Kevin Wolf Message-Id: <2025145409.176785-11-kw...@redhat.com> Signed-off-by: Hanna Reitz --- tests/qemu-iotests/030 | 11 ++- 1 file

[PULL v2 09/13] block: Let replace_child_noperm free children

2021-11-16 Thread Hanna Reitz
In most of the block layer, especially when traversing down from other BlockDriverStates, we assume that BdrvChild.bs can never be NULL. When it becomes NULL, it is expected that the corresponding BdrvChild pointer also becomes NULL and the BdrvChild object is freed. Therefore, once

Re: [PATCH v4 04/25] include/sysemu/block-backend: split header into I/O and global state (GS) API

2021-11-16 Thread Hanna Reitz
On 16.11.21 15:24, Emanuele Giuseppe Esposito wrote: On 12/11/2021 13:30, Hanna Reitz wrote: On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: Similarly to the previous patches, split block-backend.h in block-backend-io.h and block-backend-global-state.h In addition, remove

[PATCH v2 00/15] hw/nvme: SR-IOV with Virtualization Enhancements

2021-11-16 Thread Łukasz Gieryk
This is the updated version of SR-IOV support for the NVMe device. Changes since v1: - Dropped the "pcie: Set default and supported MaxReadReq to 512" patch. The original author agrees it may be no longer needed for recent kernels. - Dropped the "pcie: Add callback preceding SR-IOV VFs

[PATCH v2 09/15] hw/nvme: Make max_ioqpairs and msix_qsize configurable in runtime

2021-11-16 Thread Łukasz Gieryk
The NVMe device defines two properties: max_ioqpairs, msix_qsize. Having them as constants is problematic for SR-IOV support. SR-IOV introduces virtual resources (queues, interrupts) that can be assigned to PF and its dependent VFs. Each device, following a reset, should work with the configured

[PATCH v2 10/15] hw/nvme: Remove reg_size variable and update BAR0 size calculation

2021-11-16 Thread Łukasz Gieryk
The n->reg_size parameter unnecessarily splits the BAR0 size calculation in two phases; removed to simplify the code. With all the calculations done in one place, it seems the pow2ceil, applied originally to reg_size, is unnecessary. The rounding should happen as the last step, when BAR size

[PATCH v2 01/15] pcie: Add support for Single Root I/O Virtualization (SR/IOV)

2021-11-16 Thread Łukasz Gieryk
From: Knut Omang This patch provides the building blocks for creating an SR/IOV PCIe Extended Capability header and register/unregister SR/IOV Virtual Functions. Signed-off-by: Knut Omang --- hw/pci/meson.build | 1 + hw/pci/pci.c| 97 +--- hw/pci/pcie.c

[PATCH v2 02/15] pcie: Add some SR/IOV API documentation in docs/pcie_sriov.txt

2021-11-16 Thread Łukasz Gieryk
From: Knut Omang Add a small intro + minimal documentation for how to implement SR/IOV support for an emulated device. Signed-off-by: Knut Omang --- docs/pcie_sriov.txt | 115 1 file changed, 115 insertions(+) create mode 100644

[PATCH v2 14/15] docs: Add documentation for SR-IOV and Virtualization Enhancements

2021-11-16 Thread Łukasz Gieryk
From: Lukasz Maniak Signed-off-by: Lukasz Maniak --- docs/system/devices/nvme.rst | 35 +++ 1 file changed, 35 insertions(+) diff --git a/docs/system/devices/nvme.rst b/docs/system/devices/nvme.rst index bff72d1c24..29fe2565b5 100644 ---

[PATCH v2 08/15] hw/nvme: Implement the Function Level Reset

2021-11-16 Thread Łukasz Gieryk
This patch implements the Function Level Reset, a feature currently not implemented for the Nvme device, while listed as a mandatory ("shall") in the 1.4 spec. The implementation reuses FLR-related building blocks defined for the pci-bridge module, and follows the same logic: - FLR capability

[PATCH v2 07/15] hw/nvme: Add support for Secondary Controller List

2021-11-16 Thread Łukasz Gieryk
From: Lukasz Maniak Introduce handling for Secondary Controller List (Identify command with CNS value of 15h). Secondary controller ids are unique in the subsystem, hence they are reserved by it upon initialization of the primary controller to the number of sriov_max_vfs. ID reservation

[PATCH v2 13/15] hw/nvme: Add support for the Virtualization Management command

2021-11-16 Thread Łukasz Gieryk
With the new Virtualization Management command one can: - assign flexible resources (queues, interrupts) to primary and secondary controllers, - toggle the online/offline state of given controller. Signed-off-by: Łukasz Gieryk --- hw/nvme/ctrl.c | 204

[PATCH v2 11/15] hw/nvme: Calculate BAR attributes in a function

2021-11-16 Thread Łukasz Gieryk
An NVMe device with SR-IOV capability calculates the BAR size differently for PF and VF, so it makes sense to extract the common code to a separate function. Signed-off-by: Łukasz Gieryk --- hw/nvme/ctrl.c | 45 +++-- 1 file changed, 31 insertions(+), 14

Re: [PATCH v4 07/25] assertions for block_int global state API

2021-11-16 Thread Emanuele Giuseppe Esposito
On 12/11/2021 14:51, Hanna Reitz wrote: On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Stefan Hajnoczi ---   block.c | 17 +   block/backup.c  |  1 +   block/block-backend.c  

[PATCH v2 12/15] hw/nvme: Initialize capability structures for primary/secondary controllers

2021-11-16 Thread Łukasz Gieryk
With four new properties: - sriov_v{i,q}_flexible, - sriov_max_v{i,q}_per_vf, one can configure the number of available flexible resources, as well as the limits. The primary and secondary controller capability structures are initialized accordingly. Since the number of available queues

Re: [PATCH 0/2] hw/nvme: fix namespace attachment on controller hotplug

2021-11-16 Thread Keith Busch
On Fri, Sep 24, 2021 at 09:27:40AM +0200, Klaus Jensen wrote: > From: Klaus Jensen > > First patch from Hannes fixes the subsystem registration process such > that shared (but non-detached) namespaces are automatically attached to > hotplugged controllers. > > The second patch changes the

[PATCH v2 15/15] hw/nvme: Update the initalization place for the AER queue

2021-11-16 Thread Łukasz Gieryk
This patch updates the initialization place for the AER queue, so it’s initialized once, at controller initialization, and not every time controller is enabled. While the original version works for a non-SR-IOV device, as it’s hard to interact with the controller if it’s not enabled, the multiple

[PULL 1/2] nbd/server: Silence clang sanitizer warning

2021-11-16 Thread Eric Blake
clang's sanitizer is picky: memset(NULL, x, 0) is technically undefined behavior, even though no sane implementation of memset() deferences the NULL. Caught by the nbd-qemu-allocation iotest. The alternative to checking before each memset is to instead force an allocation of 1 element instead of

Re: [PATCH v2 for-6.2] file-posix: Fix alignment after reopen changing O_DIRECT

2021-11-16 Thread Eric Blake
On Tue, Nov 16, 2021 at 11:14:31AM +0100, Hanna Reitz wrote: > From: Kevin Wolf > > At the end of a reopen, we already call bdrv_refresh_limits(), which > should update bs->request_alignment according to the new file > descriptor. However, raw_probe_alignment() relies on s->needs_alignment > and

Re: [PATCH v4 04/25] include/sysemu/block-backend: split header into I/O and global state (GS) API

2021-11-16 Thread Emanuele Giuseppe Esposito
On 12/11/2021 13:30, Hanna Reitz wrote: On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: Similarly to the previous patches, split block-backend.h in block-backend-io.h and block-backend-global-state.h In addition, remove "block/block.h" include as it seems it is not necessary anymore,

Re: [PATCH v4 07/25] assertions for block_int global state API

2021-11-16 Thread Hanna Reitz
On 16.11.21 16:43, Emanuele Giuseppe Esposito wrote: On 12/11/2021 14:51, Hanna Reitz wrote: On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Stefan Hajnoczi ---   block.c | 17 +  

[PULL 2/2] nbd/server: Add --selinux-label option

2021-11-16 Thread Eric Blake
From: "Richard W.M. Jones" Under SELinux, Unix domain sockets have two labels. One is on the disk and can be set with commands such as chcon(1). There is a different label stored in memory (called the process label). This can only be set by the process creating the socket. When using SELinux

Re: [PATCH for 6.2 v4] nbd/server: Add --selinux-label option

2021-11-16 Thread Eric Blake
On Tue, Nov 16, 2021 at 08:06:03AM +0100, Thomas Huth wrote: > On 15/11/2021 21.29, Eric Blake wrote: > > From: "Richard W.M. Jones" > > > > Under SELinux, Unix domain sockets have two labels. One is on the > > disk and can be set with commands such as chcon(1). There is a > > different label

[PATCH] block/vvfat.c fix leak when failure occurs

2021-11-16 Thread Daniella Lee
Function vvfat_open called function enable_write_target and init_directories, and these functions malloc new memory for BDRVVVFATState::qcow_filename, BDRVVVFATState::used_clusters, and BDRVVVFATState::cluster_buff. When the specified folder does not exist ,it may contains memory leak. After

Re: [PULL v2 00/13] Block patches

2021-11-16 Thread Richard Henderson
On 11/16/21 2:06 PM, Hanna Reitz wrote: The following changes since commit 42f6c9179be4401974dd3a75ee72defd16b5092d: Merge tag 'pull-ppc-2022' of https://github.com/legoater/qemu into staging (2021-11-12 12:28:25 +0100) are available in the Git repository at:

[PATCH v2 06/15] hw/nvme: Add support for Primary Controller Capabilities

2021-11-16 Thread Łukasz Gieryk
From: Lukasz Maniak Implementation of Primary Controller Capabilities data structure (Identify command with CNS value of 14h). Currently, the command returns only ID of a primary controller. Handling of remaining fields are added in subsequent patches implementing virtualization enhancements.

[PATCH v2 03/15] pcie: Add helpers to the SR/IOV API

2021-11-16 Thread Łukasz Gieryk
Two convenience functions for retrieving: - the total number of VFs, - the PCIDevice object of the N-th VF. Signed-off-by: Łukasz Gieryk Reviewed-by: Knut Omang --- hw/pci/pcie_sriov.c | 14 ++ include/hw/pci/pcie_sriov.h | 8 2 files changed, 22 insertions(+)

[PATCH v2 05/15] hw/nvme: Add support for SR-IOV

2021-11-16 Thread Łukasz Gieryk
From: Lukasz Maniak This patch implements initial support for Single Root I/O Virtualization on an NVMe device. Essentially, it allows to define the maximum number of virtual functions supported by the NVMe controller via sriov_max_vfs parameter. Passing a non-zero value to sriov_max_vfs

[PATCH v2 04/15] pcie: Add 1.2 version token for the Power Management Capability

2021-11-16 Thread Łukasz Gieryk
Signed-off-by: Łukasz Gieryk --- include/hw/pci/pci_regs.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/hw/pci/pci_regs.h b/include/hw/pci/pci_regs.h index 77ba64b931..a590140962 100644 --- a/include/hw/pci/pci_regs.h +++ b/include/hw/pci/pci_regs.h @@ -4,5 +4,6 @@ #include

Re: [PATCH v2 08/15] hw/nvme: Implement the Function Level Reset

2021-11-16 Thread Keith Busch
On Tue, Nov 16, 2021 at 04:34:39PM +0100, Łukasz Gieryk wrote: > if (!pci_is_vf(>parent_obj) && n->params.sriov_max_vfs) { > -pcie_sriov_pf_disable_vfs(>parent_obj); > +if (rst != NVME_RESET_CONTROLLER) { > +pcie_sriov_pf_disable_vfs(>parent_obj); Shouldn't this

[PULL 0/5] Python patches

2021-11-16 Thread John Snow
The following changes since commit 2b22e7540d6ab4efe82d442363e3fc900cea6584: Merge tag 'm68k-for-6.2-pull-request' of git://github.com/vivier/qemu-m68k into staging (2021-11-09 13:16:56 +0100) are available in the Git repository at: https://gitlab.com/jsnow/qemu.git

[PULL 5/5] scripts/device-crash-test: hide tracebacks for QMP connect errors

2021-11-16 Thread John Snow
Generally, the traceback for a connection failure is uninteresting and all we need to know is that the connection attempt failed. Reduce the verbosity in these cases, except when debugging. Signed-off-by: John Snow Reported-by: Thomas Huth Tested-by: Thomas Huth Message-id:

[PULL 3/5] scripts/device-crash-test: simplify Exception handling

2021-11-16 Thread John Snow
We don't need to handle KeyboardInterruptError specifically; we can instead tighten the scope of the broad Exception handlers to only catch "Exception", which has the effect of allowing all BaseException classes that do not inherit from Exception to be raised through. KeyboardInterruptError and a

[PULL 2/5] python/aqmp: fix ConnectError string method

2021-11-16 Thread John Snow
When ConnectError is used to wrap an Exception that was initialized without an error message, we are treated to a traceback with a rubbish line like this: ... ConnectError: Failed to establish session: Correct this to use the name of an exception as a fallback message: ... ConnectError: Failed

[PULL 1/5] python/aqmp: Fix disconnect during capabilities negotiation

2021-11-16 Thread John Snow
If we receive ConnectionResetError (ECONNRESET) while attempting to perform capabilities negotiation -- prior to the establishment of the async reader/writer tasks -- the disconnect function is not aware that we are in an error pathway. As a result, when attempting to close the StreamWriter,

[PULL 4/5] scripts/device-crash-test: don't emit AQMP connection errors to stdout

2021-11-16 Thread John Snow
These errors are expected, so they shouldn't clog up terminal output. In the event that they're *not* expected, we'll be seeing an awful lot more output concerning the nature of the failure. Reported-by: Thomas Huth Signed-off-by: John Snow Tested-by: Thomas Huth Message-id:

Re: [PATCH 1/2] block:hdev: support BLKSECDISCARD

2021-11-16 Thread Christoph Hellwig
On Tue, Nov 16, 2021 at 10:58:30AM +, Stefan Hajnoczi wrote: > Question for Jens and Christoph: > > Is there a way for userspace to detect whether a Linux block device > supports SECDISCARD? I don't know of one. > If not, then maybe a new sysfs attribute can be added: This looks correct,