qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>,
	Manos Pitsidianakis <el13635@mail.ntua.gr>
Cc: Kevin Wolf <kwolf@redhat.com>, qemu-block <qemu-block@nongnu.org>,
	qemu-devel <qemu-devel@nongnu.org>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH 1/2] block: pass bdrv_* methods to bs->file by default
Date: Thu, 29 Jun 2017 11:00:17 -0500	[thread overview]
Message-ID: <a195f024-687b-82a7-3e76-7b6c5e18e124@redhat.com> (raw)
In-Reply-To: <20170629140521.GC18146@stefanha-x1.localdomain>

[-- Attachment #1: Type: text/plain, Size: 1177 bytes --]

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 <el13635@mail.ntua.gr>
>> ---
>>  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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2017-06-29 16:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-27 22:46 [Qemu-devel] [PATCH 0/2] block: block driver callbacks fixes Manos Pitsidianakis
2017-06-27 22:46 ` [Qemu-devel] [PATCH 1/2] block: pass bdrv_* methods to bs->file by default Manos Pitsidianakis
2017-06-29 14:00   ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2017-06-29 14:05   ` Stefan Hajnoczi
2017-06-29 16:00     ` Eric Blake [this message]
2017-06-27 22:46 ` [Qemu-devel] [PATCH 2/2] block: add default implementations for bdrv_co_get_block_status() Manos Pitsidianakis
2017-06-29 14:04   ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a195f024-687b-82a7-3e76-7b6c5e18e124@redhat.com \
    --to=eblake@redhat.com \
    --cc=el13635@mail.ntua.gr \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).