[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH v2 04/11] block: Storage child acce
From: |
Max Reitz |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH v2 04/11] block: Storage child access function |
Date: |
Wed, 14 Nov 2018 20:56:37 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 |
On 12.11.18 23:32, Eric Blake wrote:
> On 8/9/18 5:31 PM, Max Reitz wrote:
>> For completeness' sake, add a function for accessing a node's storage
>> child, too. For filters, this is there filtered child; for non-filters,
>
> s/there/their/
>
>> this is bs->file.
>>
>> Some places are deliberately left unconverted:
>> - BDS opening/closing functions where bs->file is handled specially
>> (which is basically wrong, but at least simplifies probing)
>> - bdrv_co_block_status_from_file(), because its name implies that it
>> points to ->file
>
> I'm wondering if we can clean up block_status to let filters have a NULL
> callback and io.c do the right thing automatically, rather than the
> current approach of filters assigning the callback to the common helper
> routine. Maybe later in the series.
Hm! I didn't even think of that. Yes, everything that uses
bdrv_co_block_status_from_*() seems to be an R/W filter, and which they
use simply depends on whether they use bs->backing or bs->file. Well,
blkdebug is the exception, because it really wants to put an assertion
there, but inlining the code there shouldn't be the showstopper.
Max
signature.asc
Description: OpenPGP digital signature