qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Max Reitz <mreitz@redhat.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Peter Lieven <pl@kamp.de>,
	Markus Armbruster <armbru@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 2/5] block: Add AioContextNotifier functions to BB
Date: Tue, 18 Nov 2014 10:44:52 +0100	[thread overview]
Message-ID: <546B1514.1000205@redhat.com> (raw)
In-Reply-To: <546B10CC.5040408@redhat.com>

On 18/11/2014 10:26, Max Reitz wrote:
> However, when you consider (as far as I looked into it) that a BDS is
> only closed when there are either no references to it (which will not
> happen as long as it has a BB) or when it is ejected, it suddenly does
> make sense: "Ejecting" really is something for the BB, so it makes sense
> to wait for that event (even though the name "close notifier" doesn't
> sound much like it...).

I agree, and indeed the notifier was added to deal with ejection.

Thanks for clarifying.  I guess if QEMU were written in C++ we would
have a hierarchy like this:

    BlockDevice (abstract)
        BlockBackend
        BlockDriverState

and there would be no duplication of function names; the BlockBackend
implementation would still have to forward to the top BlockDriverState.

Paolo

  reply	other threads:[~2014-11-18  9:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-17 15:30 [Qemu-devel] [PATCH 0/5] nbd: Use BlockBackend Max Reitz
2014-11-17 15:30 ` [Qemu-devel] [PATCH 1/5] block: Lift more functions into BlockBackend Max Reitz
2014-11-17 15:30 ` [Qemu-devel] [PATCH 2/5] block: Add AioContextNotifier functions to BB Max Reitz
2014-11-17 17:26   ` Paolo Bonzini
2014-11-18  9:26     ` Max Reitz
2014-11-18  9:44       ` Paolo Bonzini [this message]
2014-11-17 15:30 ` [Qemu-devel] [PATCH 3/5] block: Add blk_add_close_notifier() for BB Max Reitz
2014-11-17 15:30 ` [Qemu-devel] [PATCH 4/5] nbd: Change external interface to BlockBackend Max Reitz
2014-11-17 15:30 ` [Qemu-devel] [PATCH 5/5] nbd: Use BlockBackend internally Max Reitz
2014-11-17 17:29   ` Paolo Bonzini
2014-11-18  9:32     ` Max Reitz

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=546B1514.1000205@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=armbru@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=pl@kamp.de \
    --cc=qemu-devel@nongnu.org \
    --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).