Re: [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, bec

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

2020-04-27 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: M

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

2020-04-27 Thread Eric Blake
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: Max Reitz Signed-off-by: Eric Blake --- +++ b/block/cr

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

2020-04-27 Thread Max Reitz
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: Max Reitz > Signed-off-by: Eric Blake > --- > include/sysemu/block-backend.h | 2 ++ >

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

2020-04-24 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 --- include/sysemu/block-backend.h | 2 ++ block/block-backend.c | 23 +