qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [Qemu-devel] [PATCH 1/2] block: pass bdrv_* methods to


From: Eric Blake
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH 1/2] block: pass bdrv_* methods to bs->file by default
Date: Thu, 29 Jun 2017 11:00:17 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0

On 06/29/2017 09:05 AM, Stefan Hajnoczi wrote:
> On Wed, Jun 28, 2017 at 01:46:15AM +0300, Manos Pitsidianakis wrote:
>> The following functions fail if bs->drv does not implement them:
>>
>> bdrv_probe_blocksizes
>> bdrv_probe_geometry
>> bdrv_truncate
>> bdrv_has_zero_init
>> bdrv_get_info
>> bdrv_media_changed
>> bdrv_eject
>> bdrv_lock_medium
>> bdrv_co_ioctl
>>
>> Instead, the call should be passed to bs->file if it exists, to allow
>> filter drivers to support those methods without implementing them.
>>
>> Signed-off-by: Manos Pitsidianakis <address@hidden>
>> ---
>>  block.c    | 45 ++++++++++++++++++++++++++++++++++-----------
>>  block/io.c |  4 ++++
>>  2 files changed, 38 insertions(+), 11 deletions(-)
> 
> Will you send a block/raw-format.c patch that removes the forwarding
> functions that are no longer needed?

block/raw-format.c does some additional things thanks to its 'offset'
parameter, so I think it will have to still implement things directly
rather than relying on defaults.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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