[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/2] block: trickle down the fallback image creation function

From: Max Reitz
Subject: Re: [PATCH 2/2] block: trickle down the fallback image creation function use to the block drivers
Date: Thu, 26 Mar 2020 14:39:59 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0

On 26.03.20 14:35, Eric Blake wrote:
> On 3/26/20 8:28 AM, Kevin Wolf wrote:
>> Am 26.03.2020 um 14:20 hat Eric Blake geschrieben:
>>>> +++ b/block/file-posix.c
>>>> @@ -3513,6 +3513,8 @@ static BlockDriver bdrv_host_device = {
>>>>        .bdrv_reopen_prepare = raw_reopen_prepare,
>>>>        .bdrv_reopen_commit  = raw_reopen_commit,
>>>>        .bdrv_reopen_abort   = raw_reopen_abort,
>>>> +    .bdrv_co_create_opts = bdrv_co_create_opts_simple,
>>>> +    .create_opts         = &bdrv_create_opts_simple,
>>> I'd drop the leading & for consistency with the rest of this struct
>>> initializer.
>> This one isn't a function pointer, so I think the & is necessary.
> Ah, right. Visual pattern-matching failed me, since I didn't read the
> actual types in the .h file.
> Hmm - is it possible to write the patch in such a way that .create_opts
> can be left NULL when .bdrv_co_create_opts is bdrv_co_create_opts_simple?

Setting .create_opts is actually the main point of this series, so we
don’t have to look for and fix all places that decide whether a block
driver is capable of image creation based on whether it’s set or not.


Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]