From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48648) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDeQ6-0000wm-F7 for qemu-devel@nongnu.org; Mon, 17 Sep 2012 12:43:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TDePw-0007Pu-Ud for qemu-devel@nongnu.org; Mon, 17 Sep 2012 12:43:38 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:64460) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDePw-0007PJ-OG for qemu-devel@nongnu.org; Mon, 17 Sep 2012 12:43:28 -0400 Received: by pbbrp12 with SMTP id rp12so9859417pbb.4 for ; Mon, 17 Sep 2012 09:43:27 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <50575318.5010001@redhat.com> Date: Mon, 17 Sep 2012 18:43:04 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1346079626-16386-1-git-send-email-pbonzini@redhat.com> <504A17B6.6020703@redhat.com> <504A1CBB.6000800@redhat.com> In-Reply-To: <504A1CBB.6000800@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] ping Re: [RFC PATCH 00/13] Embedded NBD server List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: stefanha@gmail.com, qemu-devel@nongnu.org Il 07/09/2012 18:11, Kevin Wolf ha scritto: > I was planning to review it in more detail next week, but I just had a > quick look. I'm not sure if automatically shutting down the NBD server > when the guest stops using it is always right (for removable media it > could even be an eject from the guest), Yes, the removable media case could be a bit too eager. Note however that a guest-triggered eject doesn't do bdrv_close, only a user-triggered eject does, and that's blocked by bdrv_in_use. Luckily removable media are usually not too interesting, so a slightly suboptimal behavior is okay as long as it does not break the important use cases---mostly migration without shared storage, where also uninteresting images have to be mirrored or exposed via NBD. Those should be covered by bdrv_in_use. > but introducing a notifier list > doesn't look too bad. We can probably use it for other things that are > currently hardcoded in bdrv_close() with some if statements, like > disabling I/O throttling, cancelling a block job, etc. Yes, though a lot of these could be moved to "filters" and use whatever filter-specific method is there (e.g. a filter bdrv_close). This circles back to the question of whether bdrv_close kills filters or only the base image... Paolo