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 >> --- >> 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