[PATCH v6 01/11] block/io: bring request check to bdrv_co_(read, write)v_vmstate

2021-09-03 Thread Vladimir Sementsov-Ogievskiy via
Only qcow2 driver supports vmstate. In qcow2 these requests go through .bdrv_co_p{read,write}v_part handlers. So, let's do our basic check for the request on vmstate generic handlers. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- block/io.c | 18 -- 1

[PATCH 09/11] block/copy-before-write: add cbw_snapshot_read_{lock, unlock}()

2021-08-04 Thread Vladimir Sementsov-Ogievskiy via
Add interface which help to do fleecing read. To be used in the next commit. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/copy-before-write.h | 5 ++ block/copy-before-write.c | 103 +- 2 files changed, 106 insertions(+), 2 deletions(-) diff --git

Re: [PATCH 5/6] co-shared-resource: protect with a mutex

2021-05-15 Thread Vladimir Sementsov-Ogievskiy via
15.05.2021 00:53, Emanuele Giuseppe Esposito wrote: we want to get from shres here, after possible call to block_copy_task_shrink(), as task->bytes may be reduced. Ah right, I missed that. So I guess if we want the caller to protect co-shared-resource, get_from_shres stays where it is, and

Re: [PATCH 5/6] co-shared-resource: protect with a mutex

2021-05-14 Thread Vladimir Sementsov-Ogievskiy via
14.05.2021 20:28, Emanuele Giuseppe Esposito wrote: On 14/05/2021 17:30, Vladimir Sementsov-Ogievskiy wrote: 14.05.2021 17:32, Emanuele Giuseppe Esposito wrote: On 14/05/2021 16:26, Vladimir Sementsov-Ogievskiy wrote: 14.05.2021 17:10, Emanuele Giuseppe Esposito wrote: On 12/05/2021

Re: [PATCH 5/6] co-shared-resource: protect with a mutex

2021-05-14 Thread Vladimir Sementsov-Ogievskiy via
14.05.2021 17:32, Emanuele Giuseppe Esposito wrote: On 14/05/2021 16:26, Vladimir Sementsov-Ogievskiy wrote: 14.05.2021 17:10, Emanuele Giuseppe Esposito wrote: On 12/05/2021 17:44, Stefan Hajnoczi wrote: On Mon, May 10, 2021 at 10:59:40AM +0200, Emanuele Giuseppe Esposito wrote:

Re: [PATCH 5/6] co-shared-resource: protect with a mutex

2021-05-14 Thread Vladimir Sementsov-Ogievskiy via
14.05.2021 17:10, Emanuele Giuseppe Esposito wrote: On 12/05/2021 17:44, Stefan Hajnoczi wrote: On Mon, May 10, 2021 at 10:59:40AM +0200, Emanuele Giuseppe Esposito wrote: co-shared-resource is currently not thread-safe, as also reported in co-shared-resource.h. Add a QemuMutex because

[PATCH v5 01/11] block/io: bring request check to bdrv_co_(read, write)v_vmstate

2021-05-05 Thread Vladimir Sementsov-Ogievskiy via
There are only two drivers supporting vmstate: qcow2 and sheepdog. Sheepdog is deprecated. In qcow2 these requests go through .bdrv_co_p{read,write}v_part handlers. So, let's do our basic check for the request on vmstate generic handlers. Signed-off-by: Vladimir Sementsov-Ogievskiy ---

[PATCH v4 07/36] block: make bdrv_reopen_{prepare, commit, abort} private

2021-04-28 Thread Vladimir Sementsov-Ogievskiy via
These functions are called only from bdrv_reopen_multiple() in block.c. No reason to publish them. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia Reviewed-by: Kevin Wolf --- include/block/block.h | 4 block.c | 13 + 2 files changed, 9

[PATCH v4 01/11] block/io: bring request check to bdrv_co_{read, write}v_vmstate

2021-03-24 Thread Vladimir Sementsov-Ogievskiy via
There are only two drivers supporting vmstate: qcow2 and sheepdog. Sheepdog is deprecated. In qcow2 these requests go through .bdrv_co_p{read,write}v_part handlers. So, let's do our basic check for the request on vmstate generic handlers. Signed-off-by: Vladimir Sementsov-Ogievskiy ---

Re: [PATCH V3] file-posix: allow -EBUSY -EINVAL errors during write zeros on block

2021-03-18 Thread Vladimir Sementsov-Ogievskiy via
18.03.2021 02:23, John Snow wrote: On 3/9/21 7:16 PM, ChangLimin wrote: Since Linux 5.10, write zeros to a multipath device using ioctl(fd, BLKZEROOUT, range) with cache none or directsync return -EBUSY permanently. When do we get -EINVAL? Both of the commits referenced below don't

[PATCH v3 07/36] block: make bdrv_reopen_{prepare, commit, abort} private

2021-03-17 Thread Vladimir Sementsov-Ogievskiy via
These functions are called only from bdrv_reopen_multiple() in block.c. No reason to publish them. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia Reviewed-by: Kevin Wolf --- include/block/block.h | 4 block.c | 13 + 2 files changed, 9

[PATCH v4 14/16] block/io: support int64_t bytes in bdrv_co_p{read, write}v_part()

2020-12-11 Thread Vladimir Sementsov-Ogievskiy via
We are generally moving to int64_t for both offset and bytes parameters on all io paths. Main motivation is realization of 64-bit write_zeroes operation for fast zeroing large disk chunks, up to the whole disk. We chose signed type, to be consistent with off_t (which is signed) and with

[PATCH v2 08/36] block: make bdrv_reopen_{prepare, commit, abort} private

2020-11-27 Thread Vladimir Sementsov-Ogievskiy via
These functions are called only from bdrv_reopen_multiple() in block.c. No reason to publish them. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block.h | 4 block.c | 13 + 2 files changed, 9 insertions(+), 8 deletions(-) diff --git