Re: [Qemu-devel] [PATCH 3/7] nbd: use BDS refcount

2013-07-03 Thread Paolo Bonzini
Il 03/07/2013 08:30, Fam Zheng ha scritto: >> > 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

Re: [Qemu-devel] [PATCH 3/7] nbd: use BDS refcount

2013-07-02 Thread Fam Zheng
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

Re: [Qemu-devel] [PATCH 3/7] nbd: use BDS refcount

2013-07-02 Thread Paolo Bonzini
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

Re: [Qemu-devel] [PATCH 3/7] nbd: use BDS refcount

2013-07-02 Thread Fam Zheng
On Tue, 07/02 12:16, Paolo Bonzini wrote: > Il 02/07/2013 07:59, Fam Zheng ha scritto: > > Previously, nbd call drive_get_ref on the drive of bs. A BDS doesn't > > always have associated dinfo, it's more proper to use bdrv_get_ref(). > > This has the important side effect of marking the exported d

Re: [Qemu-devel] [PATCH 3/7] nbd: use BDS refcount

2013-07-02 Thread Paolo Bonzini
Il 02/07/2013 07:59, Fam Zheng ha scritto: > Previously, nbd call drive_get_ref on the drive of bs. A BDS doesn't > always have associated dinfo, it's more proper to use bdrv_get_ref(). This has the important side effect of marking the exported disk as "in_use" (to use the terms before the series)

[Qemu-devel] [PATCH 3/7] nbd: use BDS refcount

2013-07-01 Thread Fam Zheng
Previously, nbd call drive_get_ref on the drive of bs. A BDS doesn't always have associated dinfo, it's more proper to use bdrv_get_ref(). Signed-off-by: Fam Zheng --- blockdev-nbd.c | 9 + nbd.c | 5 + 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/blockdev-