Re: [sheepdog] [PATCH v2 00/17] 64bit block-layer

2020-04-28 Thread Vladimir Sementsov-Ogievskiy
29.04.2020 0:33, Eric Blake wrote: On 4/27/20 3:23 AM, Vladimir Sementsov-Ogievskiy wrote: Hi all! v1 was "[RFC 0/3] 64bit block-layer part I", please refer to initial cover-letter   https://lists.gnu.org/archive/html/qemu-devel/2020-03/msg08723.html for motivation. v2: patch 02 is unchanged,

Re: [sheepdog] [PATCH v2 01/17] block/throttle-groups: throttle_group_co_io_limits_intercept(): 64bit bytes

2020-04-28 Thread Vladimir Sementsov-Ogievskiy
29.04.2020 1:09, Eric Blake wrote: On 4/27/20 3:23 AM, Vladimir Sementsov-Ogievskiy wrote: The function is called from 64bit io handlers, and bytes is just passed to throttle_account() which is 64bit too (unsigned though). So, let's convert intermediate argument to 64bit too. My audit for

Re: [sheepdog] [PATCH v2 01/17] block/throttle-groups: throttle_group_co_io_limits_intercept(): 64bit bytes

2020-04-28 Thread Eric Blake
On 4/27/20 3:23 AM, Vladimir Sementsov-Ogievskiy wrote: The function is called from 64bit io handlers, and bytes is just passed to throttle_account() which is 64bit too (unsigned though). So, let's convert intermediate argument to 64bit too. My audit for this patch: Caller has 32-bit, this

Re: [sheepdog] [PATCH v2 00/17] 64bit block-layer

2020-04-28 Thread Eric Blake
On 4/27/20 3:23 AM, Vladimir Sementsov-Ogievskiy wrote: Hi all! v1 was "[RFC 0/3] 64bit block-layer part I", please refer to initial cover-letter https://lists.gnu.org/archive/html/qemu-devel/2020-03/msg08723.html for motivation. v2: patch 02 is unchanged, add Stefan's r-b. Everything other

[sheepdog] [PATCH 5/9] sheepdog: Support BDRV_REQ_ZERO_WRITE for truncate

2020-04-28 Thread Eric Blake
Our .bdrv_has_zero_init_truncate always returns 1 because sheepdog always 0-fills; we can use that same knowledge to implement BDRV_REQ_ZERO_WRITE by ignoring it. Signed-off-by: Eric Blake --- block/sheepdog.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/sheepdog.c

[sheepdog] [PATCH 9/9] block: Drop unused .bdrv_has_zero_init_truncate

2020-04-28 Thread Eric Blake
Now that there are no clients of bdrv_has_zero_init_truncate, none of the drivers need to worry about providing it. What's more, this eliminates a source of some confusion: a literal reading of the documentation as written in ceaca56f and implemented in commit 1dcaf527 claims that a driver which

[sheepdog] [PATCH v4 1/3] block: Add blk_new_with_bs() helper

2020-04-28 Thread Eric Blake
There are several callers that need to create a new block backend from an existing BDS; make the task slightly easier with a common helper routine. Suggested-by: Max Reitz Signed-off-by: Eric Blake Message-Id: <20200424190903.522087-2-ebl...@redhat.com> [mreitz: Set @ret only in error paths,

Re: [sheepdog] [PATCH v3 1/3] block: Add blk_new_with_bs() helper

2020-04-28 Thread Eric Blake
On 4/28/20 1:34 AM, Max Reitz wrote: block_crypto_co_create_generic(BlockDriverState *bs,     PreallocMode prealloc,     Error **errp)   { -    int ret; +    int ret = -EPERM; I’m not sure I’m a fan of this,

Re: [sheepdog] [PATCH v3 1/3] block: Add blk_new_with_bs() helper

2020-04-28 Thread Max Reitz
On 27.04.20 16:03, Eric Blake wrote: > On 4/27/20 5:00 AM, Max Reitz wrote: >> On 24.04.20 21:09, Eric Blake wrote: >>> There are several callers that need to create a new block backend from >>> an existing BDS; make the task slightly easier with a common helper >>> routine. >>> >>> Suggested-by: