Re: [PATCH v3 05/21] block/vhost-user-blk-server: don't expose VHOST_USER_F_PROTOCOL_FEATURES

2022-07-27 Thread Jason Wang
在 2022/7/27 03:21, Alex Bennée 写道: This bit is unused in actual VirtIO feature negotiation and should only appear in the vhost-user messages between master and slave. I might be wrong, but this is actually used between master and slave not the device and driver? Thanks [AJB: experimen

Re: [RFC patch 0/1] block: vhost-blk backend

2022-07-27 Thread Andrey Zhadchenko
On 7/27/22 16:06, Stefano Garzarella wrote: On Tue, Jul 26, 2022 at 04:15:48PM +0200, Denis V. Lunev wrote: On 26.07.2022 15:51, Michael S. Tsirkin wrote: On Mon, Jul 25, 2022 at 11:55:26PM +0300, Andrey Zhadchenko wrote: Although QEMU virtio-blk is quite fast, there is still some room for i

Re: [RFC v4 2/9] qemu-io: add zoned block device operations.

2022-07-27 Thread Damien Le Moal
On 7/27/22 23:13, Stefan Hajnoczi wrote: > On Mon, 11 Jul 2022 at 22:17, Sam Li wrote: >> +int bdrv_co_zone_report(BlockDriverState *bs, int64_t offset, >> +int64_t *nr_zones, >> +BlockZoneDescriptor *zones) >> +{ >> +BlockDriver *drv = bs->drv;

Re: [RFC v3 1/8] blkio: add io_uring block driver using libblkio

2022-07-27 Thread Kevin Wolf
Am 08.07.2022 um 06:17 hat Stefan Hajnoczi geschrieben: > libblkio (https://gitlab.com/libblkio/libblkio/) is a library for > high-performance disk I/O. It currently supports io_uring and > virtio-blk-vhost-vdpa with additional drivers under development. > > One of the reasons for developing libbl

[PULL 1/2] block/parallels: Fix buffer-based write call

2022-07-27 Thread Vladimir Sementsov-Ogievskiy
From: Hanna Reitz Commit a4072543ccdddbd241d5962d9237b8b41fd006bf has changed the I/O here from working on a local one-element I/O vector to just using the buffer directly (using the bdrv_co_pread()/bdrv_co_pwrite() helper functions introduced shortly before). However, it only changed the bdrv_c

Re: [PATCH v5 5/8] blockdev: Add a new IF type IF_OTHER

2022-07-27 Thread Kevin Wolf
Am 18.07.2022 um 11:49 hat Markus Armbruster geschrieben: > Hao Wu writes: > > > This type is used to represent block devs that are not suitable to > > be represented by other existing types. > > > > A sample use is to represent an at24c eeprom device defined in > > hw/nvram/eeprom_at24c.c. The b

[PULL 2/2] iotests/131: Add parallels regression test

2022-07-27 Thread Vladimir Sementsov-Ogievskiy
From: Hanna Reitz Test an allocating write to a parallels image that has a backing node. Before HEAD^, doing so used to give me a failed assertion (when the backing node contains only `42` bytes; the results varies with the value chosen, for `0` bytes, for example, all I get is EIO). Signed-off-

[PULL 0/2] block: fix parallels block driver

2022-07-27 Thread Vladimir Sementsov-Ogievskiy
The following changes since commit f6cce6bcb2ef959cdd4da0e368f7c72045f21d6d: Merge tag 'pull-target-arm-20220726' of https://git.linaro.org/people/pmaydell/qemu-arm into staging (2022-07-26 08:32:01 -0700) are available in the Git repository at: https://gitlab.com/vsementsov/qemu.git tags/

Re: [PATCH] block/io_uring: add missing include file

2022-07-27 Thread Kevin Wolf
Am 21.07.2022 um 09:09 hat Stefano Garzarella geschrieben: > On Thu, Jul 21, 2022 at 02:56:45PM +0800, Jinhao Fan wrote: > > The commit "Use io_uring_register_ring_fd() to skip fd operations" uses > > warn_report but did not include the header file "qemu/error-report.h". > > This causes "error: imp

Re: [PATCH v3 05/21] block/vhost-user-blk-server: don't expose VHOST_USER_F_PROTOCOL_FEATURES

2022-07-27 Thread Kevin Wolf
Am 26.07.2022 um 21:21 hat Alex Bennée geschrieben: > This bit is unused in actual VirtIO feature negotiation and should > only appear in the vhost-user messages between master and slave. > > [AJB: experiment, this doesn't break the tests but I'm not super > confident of the range of tests] > > S

Re: [PATCH v2 00/11] Refactor bdrv_try_set_aio_context using transactions

2022-07-27 Thread Vladimir Sementsov-Ogievskiy
On 7/25/22 15:21, Emanuele Giuseppe Esposito wrote: The aim of this series is to reorganize bdrv_try_set_aio_context and drop BDS ->set_aio_context and ->can_set_aio_ctx callbacks in favour of a new one, ->change_aio_ctx. More informations in patch 3 (which is also RFC, due to the doubts I have

Re: [RFC v4 5/9] qemu-iotests: test new zone operations.

2022-07-27 Thread Ming Lei
On Wed, Jul 27, 2022 at 10:34:56AM -0400, Stefan Hajnoczi wrote: > On Mon, 11 Jul 2022 at 22:21, Sam Li wrote: > > > > We have added new block layer APIs of zoned block devices. Test it with: > > (1) Create a null_blk device, run each zone operation on it and see > > whether reporting right zone i

[PATCH v1 1/5] block/vhost-user-blk-server: don't expose VHOST_USER_F_PROTOCOL_FEATURES

2022-07-27 Thread Alex Bennée
This bit is unused in actual VirtIO feature negotiation and should only appear in the vhost-user messages between master and slave. [AJB: experiment, this doesn't break the tests but I'm not super confident of the range of tests] Signed-off-by: Alex Bennée Message-Id: <20220726192150.2435175-6-a

Re: [PATCH v10 18/21] job.c: enable job lock/unlock and remove Aiocontext locks

2022-07-27 Thread Vladimir Sementsov-Ogievskiy
On 7/25/22 10:38, Emanuele Giuseppe Esposito wrote: Change the job_{lock/unlock} and macros to use job_mutex. Now that they are not nop anymore, remove the aiocontext to avoid deadlocks. Therefore: - when possible, remove completely the aiocontext lock/unlock pair - if it is used by some other

Re: [PATCH v10 17/21] blockjob: protect iostatus field in BlockJob struct

2022-07-27 Thread Vladimir Sementsov-Ogievskiy
On 7/25/22 10:38, Emanuele Giuseppe Esposito wrote: iostatus is the only field (together with .job) that needs protection using the job mutex. It is set in the main loop (GLOBAL_STATE functions) but read in I/O code (block_job_error_action). Hmm, block_job_error_action doesn't read iostatus..

Re: [PATCH v10 14/21] jobs: protect job.aio_context with BQL and job_mutex

2022-07-27 Thread Vladimir Sementsov-Ogievskiy
On 7/25/22 10:38, Emanuele Giuseppe Esposito wrote: In order to make it thread safe, implement a "fake rwlock", where we allow reads under BQL *or* job_mutex held, but writes only under BQL *and* job_mutex. The only write we have is in child_job_set_aio_ctx, which always happens under drain (so

Re: [RFC v4 0/9] Add support for zoned device

2022-07-27 Thread Sam Li
Stefan Hajnoczi 于2022年7月27日周三 23:06写道: > > This patch series introduces the concept of zoned storage to the QEMU > block layer. Documentation is needed so that users and developers know > how to use and maintain this feature. > > As a minimum, let's document how to pass through zoned block devices

Re: [RFC v4 5/9] qemu-iotests: test new zone operations.

2022-07-27 Thread Stefan Hajnoczi
On Wed, 27 Jul 2022 at 11:00, Ming Lei wrote: > > On Wed, Jul 27, 2022 at 10:34:56AM -0400, Stefan Hajnoczi wrote: > > On Mon, 11 Jul 2022 at 22:21, Sam Li wrote: > > > > > > We have added new block layer APIs of zoned block devices. Test it with: > > > (1) Create a null_blk device, run each zone

Re: [RFC v4 0/9] Add support for zoned device

2022-07-27 Thread Stefan Hajnoczi
This patch series introduces the concept of zoned storage to the QEMU block layer. Documentation is needed so that users and developers know how to use and maintain this feature. As a minimum, let's document how to pass through zoned block devices on Linux: diff --git a/docs/system/qemu-block-dri

Re: [RFC v4 0/9] Add support for zoned device

2022-07-27 Thread Stefan Hajnoczi
On Mon, 11 Jul 2022 at 22:17, Sam Li wrote: > > This patch series adds support for zoned device to virtio-blk emulation. Zoned > Storage can support sequential writes, which reduces write amplification in > SSD, > leading to higher write throughput and increased capacity. Please use "git rebase

Re: [RFC v4 9/9] qapi: add support for zoned host device

2022-07-27 Thread Stefan Hajnoczi
On Mon, 11 Jul 2022 at 22:31, Sam Li wrote: > > --- > block/file-posix.c | 8 +++- > qapi/block-core.json | 7 +-- > 2 files changed, 12 insertions(+), 3 deletions(-) Please squash this into the patch that adds zoned_host_device. Stefan

Re: [RFC v4 8/9] include: add support for zoned block devices

2022-07-27 Thread Stefan Hajnoczi
On Mon, 11 Jul 2022 at 22:21, Sam Li wrote: > > This is the virtio_blk.h header file from Dmitry's "virtio-blk: add > support for zoned block devices" patch. It introduces > virtio_blk_zoned_characteristics struct from Dmitry's virtio-blk zoned > storage spec. > > Signed-off-by: Dmitry Fomichev >

Re: [RFC v4 7/9] config: add check to block layer

2022-07-27 Thread Stefan Hajnoczi
On Mon, 11 Jul 2022 at 22:22, Sam Li wrote: > > Putting zoned/non-zoned BlockDrivers on top of each other is not > allowed. > > Signed-off-by: Sam Li > --- > block.c | 7 +++ > block/file-posix.c | 2 ++ > include/block/block_int-common.h | 5 + > 3

Re: [RFC v4 5/9] qemu-iotests: test new zone operations.

2022-07-27 Thread Stefan Hajnoczi
On Mon, 11 Jul 2022 at 22:21, Sam Li wrote: > > We have added new block layer APIs of zoned block devices. Test it with: > (1) Create a null_blk device, run each zone operation on it and see > whether reporting right zone information. > > Signed-off-by: Sam Li > --- > tests/qemu-iotests/tests/zo

Re: [PATCH v10 11/21] jobs: group together API calls under the same job lock

2022-07-27 Thread Vladimir Sementsov-Ogievskiy
On 7/25/22 10:38, Emanuele Giuseppe Esposito wrote: Now that the API offers also _locked() functions, take advantage of it and give also the caller control to take the lock and call _locked functions. This makes sense especially when we have for loops, because it makes no sense to have: for(job

Re: [RFC v4 6/9] raw-format: add zone operations

2022-07-27 Thread Stefan Hajnoczi
On Mon, 11 Jul 2022 at 22:21, Sam Li wrote: > > Signed-off-by: Sam Li > --- > block/raw-format.c | 13 + > 1 file changed, 13 insertions(+) > > diff --git a/block/raw-format.c b/block/raw-format.c > index 69fd650eaf..96bdb6c1e2 100644 > --- a/block/raw-format.c > +++ b/block/raw-form

Re: [PATCH v10 09/21] jobs: use job locks also in the unit tests

2022-07-27 Thread Vladimir Sementsov-Ogievskiy
On 7/25/22 10:38, Emanuele Giuseppe Esposito wrote: Add missing job synchronization in the unit tests, with explicit locks. We are deliberately using _locked functions wrapped by a guard instead of a normal call because the normal call will be removed in future, as the only usage is limited to t

Re: [RFC v4 2/9] qemu-io: add zoned block device operations.

2022-07-27 Thread Stefan Hajnoczi
On Mon, 11 Jul 2022 at 22:17, Sam Li wrote: > +int bdrv_co_zone_report(BlockDriverState *bs, int64_t offset, > +int64_t *nr_zones, > +BlockZoneDescriptor *zones) > +{ > +BlockDriver *drv = bs->drv; > +CoroutineIOCompletion co = { > +

Re: [RFC patch 0/1] block: vhost-blk backend

2022-07-27 Thread Stefano Garzarella
On Tue, Jul 26, 2022 at 04:15:48PM +0200, Denis V. Lunev wrote: On 26.07.2022 15:51, Michael S. Tsirkin wrote: On Mon, Jul 25, 2022 at 11:55:26PM +0300, Andrey Zhadchenko wrote: Although QEMU virtio-blk is quite fast, there is still some room for improvements. Disk latency can be reduced if we

Re: [PATCH v10 05/21] job.c: add job_lock/unlock while keeping job.h intact

2022-07-27 Thread Vladimir Sementsov-Ogievskiy
On 7/25/22 10:38, Emanuele Giuseppe Esposito wrote: With "intact" we mean that all job.h functions implicitly take the lock. Therefore API callers are unmodified. This means that: - many static functions that will be always called with job lock held become _locked, and call _locked functions

Re: [PATCH] hw/nvme: add trace events for ioeventfd

2022-07-27 Thread Jinhao Fan
at 3:10 PM, Klaus Jensen wrote: > On Jul 20 10:47, Jinhao Fan wrote: >> at 10:41 PM, Jinhao Fan wrote: >> >>> at 1:34 PM, Klaus Jensen wrote: >>> From: Klaus Jensen While testing Jinhaos ioeventfd patch I found it useful with a couple of additional trace events since we

Re: [PATCH] hw/nvme: add trace events for ioeventfd

2022-07-27 Thread Klaus Jensen
On Jul 20 10:47, Jinhao Fan wrote: > at 10:41 PM, Jinhao Fan wrote: > > > at 1:34 PM, Klaus Jensen wrote: > > > >> From: Klaus Jensen > >> > >> While testing Jinhaos ioeventfd patch I found it useful with a couple of > >> additional trace events since we no longer see the mmio events. > >> >