[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 3/7] nbd: use BDS refcount
From: |
Fam Zheng |
Subject: |
Re: [Qemu-devel] [PATCH 3/7] nbd: use BDS refcount |
Date: |
Wed, 3 Jul 2013 14:30:30 +0800 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Wed, 07/03 07:58, Paolo Bonzini wrote:
> Il 03/07/2013 03:10, Fam Zheng ha scritto:
> > > This has the important side effect of marking the exported disk as
> > > "in_use" (to use the terms before the series). Right now you can serve
> > > a disk and, at the same time, stream it or mirror it or create a live
> > > snapshot of it.
> > >
> > > Do we really want to block anything for a device being served? Perhaps
> > > truncation, but maybe not even that. The NBD server is meant to be as
> > > unobtrusive as possible (in some sense NBD accesses are the same as
> > > guest accesses).
> >
> > OK, it is better to work like that. But I don't quite understand why was
> > there drive_get_ref() on the device (w/o the series), as there's already
> > a close notifier? And it just drive_put_ref() when bs is closed?
>
> The close notifier runs when the user invokes a drive_del or eject
> command from the monitor. The drive_get_ref/drive_put_ref delays the
> bdrv_delete until after nbd.c has cleaned up all the connections.
But drive_put_ref is called by close notifier. I think it can be
omitted, registering a close notifier is enough, and close the export
when drive_del calls it. It doesn't make more sense w/ drive_get_ref,
does it?
--
Fam
- [Qemu-devel] [PATCH 1/7] block: Convert BlockDriverState.in_use to refcount, (continued)
[Qemu-devel] [PATCH 4/7] block: simplify bdrv_drop_intermediate, Fam Zheng, 2013/07/02
[Qemu-devel] [PATCH 5/7] block: rename bdrv_in_use to bdrv_is_shared, Fam Zheng, 2013/07/02
[Qemu-devel] [PATCH 6/7] block: add target-id option to drive-backup QMP command, Fam Zheng, 2013/07/02
[Qemu-devel] [PATCH 7/7] block: assign backing relationship in drive-backup, Fam Zheng, 2013/07/02