[sheepdog] [PATCH v2 1/3] block: Add blk_new_with_bs() helper
Max Reitz
mreitz at redhat.com
Fri Apr 24 12:02:15 CEST 2020
On 24.04.20 11:56, Max Reitz wrote:
> On 24.04.20 11:53, Max Reitz wrote:
>> On 24.04.20 00:17, 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 <mreitz at redhat.com>
>>> Signed-off-by: Eric Blake <eblake at redhat.com>
>>> ---
>>> include/sysemu/block-backend.h | 2 ++
>>> block/block-backend.c | 23 +++++++++++++++++++++++
>>> block/crypto.c | 8 +++-----
>>> block/parallels.c | 7 +++----
>>> block/qcow.c | 7 +++----
>>> block/qcow2.c | 15 ++++++---------
>>> block/qed.c | 7 +++----
>>> block/sheepdog.c | 9 ++++-----
>>> block/vdi.c | 7 +++----
>>> block/vhdx.c | 7 +++----
>>> block/vmdk.c | 9 ++++-----
>>> block/vpc.c | 7 +++----
>>> blockdev.c | 8 +++-----
>>> blockjob.c | 7 ++-----
>>> 14 files changed, 65 insertions(+), 58 deletions(-)
>>
>> Reviewed-by: Max Reitz <mreitz at redhat.com>
>
> (With the Patchew warning fixed, of course (i.e., we should set ret to
> -EPERM or something in qcow.c))
Er, well, maybe I should have looked into more places. The compiler
only warns about that single one because it’s the only place where @ret
is really uninitialized, but there are many more where we need to set
it: crypto.c, parallels.c, qcow.c, qcow2.c (both hunks), qed.c,
sheepdog.c, vdi.c, vhdx.c, and vpc.c.
(So basically everywhere but vmdk.c, blockdev.c, and blockjob.c.)
And now I’m going to get another coffee...
Max
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.wpkg.org/pipermail/sheepdog/attachments/20200424/ac145c3b/attachment.sig>
More information about the sheepdog
mailing list