Re: [PATCH] qio: Inherit follow_coroutine_ctx across TLS

2024-05-17 Thread Daniel P . Berrangé
On Wed, May 15, 2024 at 09:14:06PM -0500, Eric Blake wrote: > Since qemu 8.2, the combination of NBD + TLS + iothread crashes on an > assertion failure: > > qemu-kvm: ../io/channel.c:534: void qio_channel_restart_read(void *): > Assertion `qemu_get_current_aio_context() == > qemu_coroutine_get_a

[PATCH v3 00/11] Support persistent reservation operations

2024-05-17 Thread Changqi Lu
Hi, Please ignore the v2 series. Please review the v3 series instead. Thanks! v2->v3: In v2 Persist Through Power Loss(PTPL) is enable default. In v3 PTPL is supported, which is passed as a parameter. v1->v2: - Add sg_persist --report-capabilities for SCSI protocol and enable oncs and rescap f

[PATCH v3 11/11] block/iscsi: add persistent reservation in/out driver

2024-05-17 Thread Changqi Lu
Add persistent reservation in/out operations for iscsi driver. The following methods are implemented: bdrv_co_pr_read_keys, bdrv_co_pr_read_reservation, bdrv_co_pr_register, bdrv_co_pr_reserve, bdrv_co_pr_release, bdrv_co_pr_clear and bdrv_co_pr_preempt. Signed-off-by: Changqi Lu Signed-off-by: z

[PATCH v3 05/11] hw/scsi: add persistent reservation in/out api for scsi device

2024-05-17 Thread Changqi Lu
Add persistent reservation in/out operations in the SCSI device layer. By introducing the persistent reservation in/out api, this enables the SCSI device to perform reservation-related tasks, including querying keys, querying reservation status, registering reservation keys, initiating and releasin

[PATCH v3 09/11] hw/nvme: enable namespace rescap function

2024-05-17 Thread Changqi Lu
This commit enables the rescap function in the namespace by detecting the supported reservation function in the backend driver. Signed-off-by: Changqi Lu Signed-off-by: zhenwei pi --- hw/nvme/ns.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/nvme/ns.c b/hw/nvme/ns.c index ea8d

[PATCH v3 02/11] block/raw: add persistent reservation in/out driver

2024-05-17 Thread Changqi Lu
Add persistent reservation in/out operations for raw driver. The following methods are implemented: bdrv_co_pr_read_keys, bdrv_co_pr_read_reservation, bdrv_co_pr_register, bdrv_co_pr_reserve, bdrv_co_pr_release, bdrv_co_pr_clear and bdrv_co_pr_preempt. Signed-off-by: Changqi Lu Signed-off-by: zhe

[PATCH v3 01/11] block: add persistent reservation in/out api

2024-05-17 Thread Changqi Lu
Add persistent reservation in/out operations at the block level. The following operations are included: - read_keys:retrieves the list of registered keys. - read_reservation: retrieves the current reservation status. - register: registers a new reservation key. - reserve:

[PATCH v3 03/11] scsi/constant: add persistent reservation in/out protocol constants

2024-05-17 Thread Changqi Lu
Add constants for the persistent reservation in/out protocol in the scsi/constant module. The constants include the persistent reservation command, type, and scope values defined in sections 6.13 and 6.14 of the SCSI Primary Commands-4 (SPC-4) specification. Signed-off-by: Changqi Lu Signed-off-b

[PATCH v3 04/11] scsi/util: add helper functions for persistent reservation types conversion

2024-05-17 Thread Changqi Lu
This commit introduces two helper functions that facilitate the conversion between the persistent reservation types used in the SCSI protocol and those used in the block layer. Signed-off-by: Changqi Lu Signed-off-by: zhenwei pi --- include/scsi/utils.h | 8 + scsi/utils.c | 81 +++

[PATCH v3 10/11] hw/nvme: add reservation protocal command

2024-05-17 Thread Changqi Lu
Add reservation acquire, reservation register, reservation release and reservation report commands in the nvme device layer. By introducing these commands, this enables the nvme device to perform reservation-related tasks, including querying keys, querying reservation status, registering reservati

[PATCH v3 08/11] hw/nvme: enable ONCS reservations

2024-05-17 Thread Changqi Lu
This commit enables ONCS to support the reservation function at the controller level. It also lays the groundwork for detecting and enabling the reservation function on a per-namespace basis in RESCAP. Signed-off-by: Changqi Lu Signed-off-by: zhenwei pi --- hw/nvme/ctrl.c | 3 ++- 1 file change

[PATCH v3 07/11] hw/nvme: add helper functions for converting reservation types

2024-05-17 Thread Changqi Lu
This commit introduces two helper functions that facilitate the conversion between the reservation types used in the NVME protocol and those used in the block layer. Reviewed-by: Stefan Hajnoczi Signed-off-by: Changqi Lu Signed-off-by: zhenwei pi --- hw/nvme/nvme.h | 40 +++

[PATCH v3 06/11] block/nvme: add reservation command protocol constants

2024-05-17 Thread Changqi Lu
Add constants for the NVMe persistent command protocol. The constants include the reservation command opcode and reservation type values defined in section 7 of the NVMe 2.0 specification. Signed-off-by: Changqi Lu Signed-off-by: zhenwei pi --- include/block/nvme.h | 61

Re: [PATCH-for-9.1 v2 2/3] migration: Remove RDMA protocol handling

2024-05-17 Thread Yu Zhang
Hello Michael and Peter, Exactly, not so compelling, as I did it first only on servers widely used for production in our data center. The network adapters are Ethernet controller: Broadcom Inc. and subsidiaries NetXtreme BCM5720 2-port Gigabit Ethernet PCIe InfiniBand controller: Mellanox Technol

Re: [PATCH 1/1] prealloc: add truncate mode for prealloc filter

2024-05-17 Thread Denis V. Lunev
On 4/30/24 19:05, Denis V. Lunev wrote: Preallocate filter allows to implement really interesting setups. Assume that we have * shared block device, f.e. iSCSI LUN, implemented with some HW device * clustered LVM on top of it * QCOW2 image stored inside LVM volume This allows very cheap cluster

Re: [PATCH 1/1] block: drop force_dup parameter of raw_reconfigure_getfd()

2024-05-17 Thread Denis V. Lunev
On 4/30/24 19:02, Denis V. Lunev wrote: This parameter is always passed as 'false' from the caller. Signed-off-by: Denis V. Lunev CC: Andrey Zhadchenko CC: Kevin Wolf CC: Hanna Reitz --- block/file-posix.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/block/f

[PATCH v2 2/2] iotests: test NBD+TLS+iothread

2024-05-17 Thread Eric Blake
Prevent regressions when using NBD with TLS in the presence of iothreads, adding coverage the fix to qio channels made in the previous patch. CC: qemu-sta...@nongnu.org Signed-off-by: Eric Blake --- tests/qemu-iotests/tests/nbd-tls-iothread | 170 ++ tests/qemu-iotests/tests/

[PATCH v2 0/2] Fix NBD+TLS regression in presence of iothread

2024-05-17 Thread Eric Blake
In v2: - correct list email address - add iotest - add R-b I'm offline next week, and have been communicating with Stefan who may want to push this through his block tree instead of waiting for me to get back. Eric Blake (2): qio: Inherit follow_coroutine_ctx across TLS iotests: test NBD+TLS+

[PATCH v2 1/2] qio: Inherit follow_coroutine_ctx across TLS

2024-05-17 Thread Eric Blake
Since qemu 8.2, the combination of NBD + TLS + iothread crashes on an assertion failure: qemu-kvm: ../io/channel.c:534: void qio_channel_restart_read(void *): Assertion `qemu_get_current_aio_context() == qemu_coroutine_get_aio_context(co)' failed. It turns out that when we removed AioContext loc

Re: [PATCH v2 0/2] Fix NBD+TLS regression in presence of iothread

2024-05-17 Thread Eric Blake
On Fri, May 17, 2024 at 09:50:13PM GMT, Eric Blake wrote: > In v2: > - correct list email address > - add iotest > - add R-b > > I'm offline next week, and have been communicating with Stefan who may > want to push this through his block tree instead of waiting for me to > get back. I also meant

Re: [PATCH v2 2/2] iotests: test NBD+TLS+iothread

2024-05-17 Thread Eric Blake
Adding a bit of self-review (in case you want to amend this before pushing, instead of waiting for me to get back online), On Fri, May 17, 2024 at 09:50:15PM GMT, Eric Blake wrote: > Prevent regressions when using NBD with TLS in the presence of > iothreads, adding coverage the fix to qio channels

[PATCH v2] hw/nvme: Add properties for PCI vendor/device IDs and IEEE-OUI ID

2024-05-17 Thread Saif Abrar
Add properties for user specified - PCI vendor, device, subsystem vendor and subsystem IDs - IEEE-OUI ID e.g. PCI IDs to be specified as follows: -device nvme,id_vendor=0xABCD,id_device=0xA0B0,id_subsys_vendor=0xEF00,id_subsys=0xEF01 IEEE-OUI ID (Identify Controller bytes 75:73) is to be specifi