Re: [PATCH nbd 1/4] nbd: Add multi-conn option

2023-03-10 Thread Richard W.M. Jones
On Fri, Mar 10, 2023 at 04:17:17PM -0600, Eric Blake wrote: > On Thu, Mar 09, 2023 at 11:39:43AM +, Richard W.M. Jones wrote: > > + * safe for multi-conn, force it to 1. > > + */ > > +if (!(s->info.flags & NBD_FLAG_CAN_MULTI_CONN)) { > > +s->multi_conn = 1; > > +} > > +

Re: [PATCH nbd 1/4] nbd: Add multi-conn option

2023-03-10 Thread Eric Blake
On Thu, Mar 09, 2023 at 11:39:43AM +, Richard W.M. Jones wrote: > Add multi-conn option to the NBD client. This commit just adds the > option, it is not functional. Maybe add the phrase "until later in this patch series" ? > > Setting this to a value > 1 permits multiple connections to the

Re: [PATCH nbd 0/4] Enable multi-conn NBD [for discussion only]

2023-03-10 Thread Richard W.M. Jones
On Fri, Mar 10, 2023 at 01:04:12PM -0600, Eric Blake wrote: > How many of these timing numbers can be repeated with TLS in the mix? While I have been playing with TLS and kTLS recently, it's not something that is especially important to v2v since all NBD traffic goes over Unix domain sockets only

Re: [PATCH] hw/block: replace TABs with space Bring the block files in line with the QEMU coding style, with spaces for indentation. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/371

2023-03-10 Thread Eric Blake
Missing the blank line between the one-line summary and the rest of the commit body, which killed the subject line. You now have multiple threads referencing gitlab issue 371; maybe instead of saying 'Resolves:', you should just mention that each patch is a partial resolution (since one patch in

Re: [PATCH nbd 0/4] Enable multi-conn NBD [for discussion only]

2023-03-10 Thread Eric Blake
On Thu, Mar 09, 2023 at 11:39:42AM +, Richard W.M. Jones wrote: > [ Patch series also available here, along with this cover letter and the > script used to generate test results: > https://gitlab.com/rwmjones/qemu/-/commits/2023-nbd-multi-conn-v1 ] > > This patch series adds multi-conn

[PULL 3/3] qed: remove spurious BDRV_POLL_WHILE()

2023-03-10 Thread Kevin Wolf
From: Stefan Hajnoczi This looks like a copy-paste or merge error. BDRV_POLL_WHILE() is already called above. It's not needed in the qemu_in_coroutine() case. Fixes: 9fb4dfc570ce ("qed: make bdrv_qed_do_open a coroutine_fn") Signed-off-by: Stefan Hajnoczi Message-Id:

[PULL 0/3] Block layer patches

2023-03-10 Thread Kevin Wolf
The following changes since commit ee59483267de29056b5b2ee2421ef3844e5c9932: Merge tag 'qemu-openbios-20230307' of https://github.com/mcayland/qemu into staging (2023-03-09 16:55:03 +) are available in the Git repository at: https://repo.or.cz/qemu/kevin.git tags/for-upstream for you

[PULL 2/3] iotests/308: Add test for 'write -zu'

2023-03-10 Thread Kevin Wolf
From: Hanna Czenczek Try writing zeroes to a FUSE export while allowing the area to be unmapped; block/file-posix.c generally implements writing zeroes with BDRV_REQ_MAY_UNMAP ('write -zu') by calling fallocate(PUNCH_HOLE). This used to lead to a blk_pdiscard() in the FUSE export, which may or

[PULL 1/3] block/fuse: Let PUNCH_HOLE write zeroes

2023-03-10 Thread Kevin Wolf
From: Hanna Czenczek fallocate(2) says about PUNCH_HOLE: "After a successful call, subsequent reads from this range will return zeros." As it is, PUNCH_HOLE is implemented as a call to blk_pdiscard(), which does not guarantee this. We must call blk_pwrite_zeroes() instead. The difference to

Re: [PATCH nbd 0/4] Enable multi-conn NBD [for discussion only]

2023-03-10 Thread Vladimir Sementsov-Ogievskiy
On 09.03.23 14:39, Richard W.M. Jones wrote: [ Patch series also available here, along with this cover letter and the script used to generate test results: https://gitlab.com/rwmjones/qemu/-/commits/2023-nbd-multi-conn-v1 ] This patch series adds multi-conn support to the NBD block

Re: [PATCH v2] block: replace TABs with space

2023-03-10 Thread Eric Blake
On Fri, Mar 10, 2023 at 11:19:05AM +0800, Yeqi Fu wrote: > Bring the block files in line with the QEMU coding style, with spaces > for indentation. > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/371 In v1, I mentioned I like (but don't insist on) one-space '='; then Kevin mentioned he

Re: [PATCH v2 0/8] iotests: make meson aware of individual I/O tests

2023-03-10 Thread Hanna Czenczek
On 10.03.23 17:17, Daniel P. Berrangé wrote: Kevin / Hanna. do you have any comments you want to make on this, since it is notionally under the maintainership of the block team ? If not Alex has volunteered to queue this via his testing tree. Looks good to me! So, if it helps: Acked-by:

Re: [PATCH v2 0/8] iotests: make meson aware of individual I/O tests

2023-03-10 Thread Daniel P . Berrangé
Kevin / Hanna. do you have any comments you want to make on this, since it is notionally under the maintainership of the block team ? If not Alex has volunteered to queue this via his testing tree. On Fri, Mar 03, 2023 at 04:07:19PM +, Daniel P. Berrangé wrote: > To just repeat the patch

Re: [PATCH for-8.0] ide: Fix manual in-flight count for TRIM BH

2023-03-10 Thread Paolo Bonzini
On Fri, Mar 10, 2023 at 3:25 PM Kevin Wolf wrote: > > 1. The TRIM operation should be completed on the IDE level before > > draining ends. > > 2. Block layer requests issued after draining has begun are queued. > > > > To me, the conclusion seems to be: > > Issue all block layer requests

Re: [PATCH for-8.0] ide: Fix manual in-flight count for TRIM BH

2023-03-10 Thread Kevin Wolf
Am 10.03.2023 um 14:05 hat Fiona Ebner geschrieben: > Am 09.03.23 um 18:46 schrieb Kevin Wolf: > > Am 09.03.2023 um 14:59 hat Paolo Bonzini geschrieben: > >> On 3/9/23 13:31, Hanna Czenczek wrote: > >>> On 09.03.23 13:08, Paolo Bonzini wrote: > On Thu, Mar 9, 2023 at 1:05 PM Paolo Bonzini

Re: [PATCH for-8.0] ide: Fix manual in-flight count for TRIM BH

2023-03-10 Thread Fiona Ebner
Am 09.03.23 um 18:46 schrieb Kevin Wolf: > Am 09.03.2023 um 14:59 hat Paolo Bonzini geschrieben: >> On 3/9/23 13:31, Hanna Czenczek wrote: >>> On 09.03.23 13:08, Paolo Bonzini wrote: On Thu, Mar 9, 2023 at 1:05 PM Paolo Bonzini wrote: > I think having to do this is problematic, because

[PATCH] hw/ide: replace TABs with space Bring the block files in line with the QEMU coding style, with spaces for indentation. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/371

2023-03-10 Thread Yeqi Fu
Signed-off-by: Yeqi Fu --- hw/ide/cmd646.c | 28 +-- hw/ide/core.c | 84 - hw/ide/microdrive.c | 360 +++--- include/hw/ide/internal.h | 254 +-- 4 files changed, 363 insertions(+), 363 deletions(-)

[PATCH v2] hw/block: replace TABs with space Bring the block files in line with the QEMU coding style, with spaces for indentation. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/371

2023-03-10 Thread Yeqi Fu
Signed-off-by: Yeqi Fu --- hw/block/fdc.c | 4 +- hw/block/nand.c | 222 +++ hw/block/onenand.c | 126 +++--- hw/block/tc58128.c | 138 include/hw/block/flash.h | 20 ++-- 5 files

Re: [PATCH v10 07/12] parallels: Move check of cluster outside image to a separate function

2023-03-10 Thread Hanna Czenczek
On 10.03.23 12:08, Alexander Ivanov wrote: On 3/7/23 13:17, Hanna Czenczek wrote: On 03.02.23 10:18, Alexander Ivanov wrote: We will add more and more checks so we need a better code structure in parallels_co_check. Let each check performs in a separate loop in a separate helper.

Re: [PATCH v10 07/12] parallels: Move check of cluster outside image to a separate function

2023-03-10 Thread Alexander Ivanov
On 3/7/23 13:17, Hanna Czenczek wrote: On 03.02.23 10:18, Alexander Ivanov wrote: We will add more and more checks so we need a better code structure in parallels_co_check. Let each check performs in a separate loop in a separate helper. Signed-off-by: Alexander Ivanov Reviewed-by: Denis

[PATCH v7 3/4] block: add accounting for zone append operation

2023-03-10 Thread Sam Li
Taking account of the new zone append write operation for zoned devices, BLOCK_ACCT_APPEND enum is introduced as other I/O request type (read, write, flush). Signed-off-by: Sam Li --- block/qapi-sysemu.c| 11 block/qapi.c | 15 ++ hw/block/virtio-blk.c

[PATCH v7 2/4] virtio-blk: add zoned storage emulation for zoned devices

2023-03-10 Thread Sam Li
This patch extends virtio-blk emulation to handle zoned device commands by calling the new block layer APIs to perform zoned device I/O on behalf of the guest. It supports Report Zone, four zone oparations (open, close, finish, reset), and Append Zone. The VIRTIO_BLK_F_ZONED feature bit will only

[PATCH v7 4/4] virtio-blk: add some trace events for zoned emulation

2023-03-10 Thread Sam Li
Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi --- hw/block/trace-events | 7 +++ hw/block/virtio-blk.c | 12 2 files changed, 19 insertions(+) diff --git a/hw/block/trace-events b/hw/block/trace-events index 2c45a62bd5..34be8b9135 100644 --- a/hw/block/trace-events +++

[PATCH v7 1/4] include: update virtio_blk headers to v6.3-rc1

2023-03-10 Thread Sam Li
Use scripts/update-linux-headers.sh to update headers to 6.3-rc1. Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi Reviewed-by: Dmitry Fomichev --- include/standard-headers/drm/drm_fourcc.h| 12 +++ include/standard-headers/linux/ethtool.h | 48 -

[PATCH v7 0/4] Add zoned storage emulation to virtio-blk driver

2023-03-10 Thread Sam Li
This patch adds zoned storage emulation to the virtio-blk driver. The patch implements the virtio-blk ZBD support standardization that is recently accepted by virtio-spec. The link to related commit is at https://github.com/oasis-tcs/virtio-spec/commit/b4e8efa0fa6c8d844328090ad15db65af8d7d981

Re: [PATCH] block: replace TABs with space

2023-03-10 Thread Kevin Wolf
Am 09.03.2023 um 19:46 hat Eric Blake geschrieben: > On Fri, Mar 10, 2023 at 12:10:08AM +0800, Yeqi Fu wrote: > > Bring the block files in line with the QEMU coding style, with spaces > > for indentation. > > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/371 > > > > Signed-off-by: Yeqi

Re: [PATCH v6 4/4] hw: replace most qemu_bh_new calls with qemu_bh_new_guarded

2023-03-10 Thread Thomas Huth
On 05/02/2023 05.07, Alexander Bulekov wrote: This protects devices from bh->mmio reentrancy issues. Reviewed-by: Darren Kenny Reviewed-by: Stefan Hajnoczi Signed-off-by: Alexander Bulekov --- ... diff --git a/hw/9pfs/xen-9p-backend.c b/hw/9pfs/xen-9p-backend.c index 65c4979c3c..f077c1b255

[PATCH] hw/block: replace TABs with space Bring the block files in line with the QEMU coding style, with spaces for indentation. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/371

2023-03-10 Thread Yeqi Fu
Signed-off-by: Yeqi Fu --- hw/block/fdc.c | 4 +- hw/block/nand.c| 222 ++--- hw/block/onenand.c | 126 - hw/block/tc58128.c | 136 +-- 4 files changed, 244 insertions(+), 244 deletions(-) diff

[PATCH v6 3/4] qemu-iotests: test zone append operation

2023-03-10 Thread Sam Li
This tests is mainly a helper to indicate append writes in block layer behaves as expected. Signed-off-by: Sam Li --- qemu-io-cmds.c | 65 ++ tests/qemu-iotests/tests/zoned.out | 7 tests/qemu-iotests/tests/zoned.sh | 9 + 3 files

[PATCH v6 2/4] block: introduce zone append write for zoned devices

2023-03-10 Thread Sam Li
A zone append command is a write operation that specifies the first logical block of a zone as the write position. When writing to a zoned block device using zone append, the byte offset of writes is pointing to the write pointer of that zone. Upon completion the device will respond with the

[PATCH v6 4/4] block: add some trace events for zone append

2023-03-10 Thread Sam Li
Signed-off-by: Sam Li --- block/file-posix.c | 3 +++ block/trace-events | 2 ++ 2 files changed, 5 insertions(+) diff --git a/block/file-posix.c b/block/file-posix.c index 2ba9174778..5187f810e5 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -2489,6 +2489,8 @@ out: if

[PATCH v6 1/4] file-posix: add tracking of the zone write pointers

2023-03-10 Thread Sam Li
Since Linux doesn't have a user API to issue zone append operations to zoned devices from user space, the file-posix driver is modified to add zone append emulation using regular writes. To do this, the file-posix driver tracks the wp location of all zones of the device. It uses an array of

[PATCH v6 0/4] Add zone append write for zoned device

2023-03-10 Thread Sam Li
This patch series add zone append operation based on the previous zoned device support part. The file-posix driver is modified to add zone append emulation using regular writes. v6: - add small fixes v5: - fix locking conditions and error handling - drop some trival optimizations - add tracing

[PATCH v16 5/8] config: add check to block layer

2023-03-10 Thread Sam Li
Putting zoned/non-zoned BlockDrivers on top of each other is not allowed. Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi Reviewed-by: Hannes Reinecke Reviewed-by: Dmitry Fomichev --- block.c | 19 +++ block/file-posix.c | 12

[PATCH v16 8/8] docs/zoned-storage: add zoned device documentation

2023-03-10 Thread Sam Li
Add the documentation about the zoned device support to virtio-blk emulation. Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi Reviewed-by: Damien Le Moal Reviewed-by: Dmitry Fomichev --- docs/devel/zoned-storage.rst | 43 ++

[PATCH v16 6/8] qemu-iotests: test new zone operations

2023-03-10 Thread Sam Li
We have added new block layer APIs of zoned block devices. Test it as follows: Run each zone operation on a newly created null_blk device and see whether the logs show the correct zone information. By: $ ./tests/qemu-iotests/tests/zoned.sh Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi ---

[PATCH v16 4/8] raw-format: add zone operations to pass through requests

2023-03-10 Thread Sam Li
raw-format driver usually sits on top of file-posix driver. It needs to pass through requests of zone commands. Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Dmitry Fomichev --- block/raw-format.c | 17

[PATCH v16 7/8] block: add some trace events for new block layer APIs

2023-03-10 Thread Sam Li
Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi --- block/file-posix.c | 3 +++ block/trace-events | 2 ++ 2 files changed, 5 insertions(+) diff --git a/block/file-posix.c b/block/file-posix.c index 2eceb250f1..563acc76ae 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -3256,6

[PATCH v16 3/8] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls

2023-03-10 Thread Sam Li
Add zoned device option to host_device BlockDriver. It will be presented only for zoned host block devices. By adding zone management operations to the host_block_device BlockDriver, users can use the new block layer APIs including Report Zone and four zone management operations (open, close,

[PATCH v16 2/8] file-posix: introduce helper functions for sysfs attributes

2023-03-10 Thread Sam Li
Use get_sysfs_str_val() to get the string value of device zoned model. Then get_sysfs_zoned_model() can convert it to BlockZoneModel type of QEMU. Use get_sysfs_long_val() to get the long value of zoned device information. Signed-off-by: Sam Li Reviewed-by: Hannes Reinecke Reviewed-by: Stefan

[PATCH v16 1/8] include: add zoned device structs

2023-03-10 Thread Sam Li
Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke --- include/block/block-common.h | 43 1 file changed, 43 insertions(+) diff --git a/include/block/block-common.h b/include/block/block-common.h

[PATCH v16 0/8] Add support for zoned device

2023-03-10 Thread Sam Li
Zoned Block Devices (ZBDs) devide the LBA space to block regions called zones that are larger than the LBA size. It can only allow sequential writes, which reduces write amplification in SSD, leading to higher throughput and increased capacity. More details about ZBDs can be found at: