[Qemu-devel] [PATCH] block/rbd: add .bdrv_reopen_prepare() stub

2016-05-13 Thread Sebastian Färber
Add support for reopen() by adding the .bdrv_reopen_prepare() stub Signed-off-by: Sebastian Färber Tested-by: Sebastian Färber --- block/rbd.c | 9 + 1 file changed, 9 insertions(+) diff --git a/block/rbd.c b/block/rbd.c index 5bc5b32..5f121b5 100644 --- a/block/rbd.c +++ b/block/rbd.c

Re: [Qemu-devel] [PATCH] block/rbd: add .bdrv_reopen_prepare() stub

2016-05-17 Thread Jeff Cody
On Tue, May 17, 2016 at 12:03:53PM +0200, Sebastian Färber wrote: > Hi Kevin, > > > A correct reopen implementation must consider all options and flags that > > .bdrv_open() looked at. > > > > The options are okay, as both "filename" and "password-secret" aren't > > things that we want to allow a

Re: [Qemu-devel] [PATCH] block/rbd: add .bdrv_reopen_prepare() stub

2016-05-18 Thread Sebastian Färber
> > There's no need to reset the librados state, so connections to the > cluster can stick around. I'm a bit unclear on the bdrv_reopen_* > functions though - what is their intended use and semantics? My motivation for implementing this basic reopen support is getting active block commit in qemu

Re: [Qemu-devel] [PATCH] block/rbd: add .bdrv_reopen_prepare() stub

2016-05-18 Thread Kevin Wolf
Am 17.05.2016 um 20:48 hat Josh Durgin geschrieben: > On 05/17/2016 03:03 AM, Sebastian Färber wrote: > >Hi Kevin, > > > >>A correct reopen implementation must consider all options and flags that > >>.bdrv_open() looked at. > >> > >>The options are okay, as both "filename" and "password-secret" are

Re: [Qemu-devel] [PATCH] block/rbd: add .bdrv_reopen_prepare() stub

2016-05-18 Thread Jason Dillaman
On Wed, May 18, 2016 at 4:19 AM, Kevin Wolf wrote: >> Updating this setting on an open image won't do anything, but if you >> rbd_close() and rbd_open() it again the setting will take effect. >> rbd_close() will force a flush of any pending I/O in librbd and >> free the memory for librbd's ImageCt

Re: [Qemu-devel] [PATCH] block/rbd: add .bdrv_reopen_prepare() stub

2016-05-13 Thread Kevin Wolf
Am 13.05.2016 um 10:29 hat Sebastian Färber geschrieben: > Add support for reopen() by adding the .bdrv_reopen_prepare() stub > > Signed-off-by: Sebastian Färber > Tested-by: Sebastian Färber > --- > block/rbd.c | 9 + > 1 file changed, 9 insertions(+) > > diff --git a/block/rbd.c b/bl

Re: [Qemu-devel] [PATCH] block/rbd: add .bdrv_reopen_prepare() stub

2016-05-17 Thread Sebastian Färber
Hi Kevin, > A correct reopen implementation must consider all options and flags that > .bdrv_open() looked at. > > The options are okay, as both "filename" and "password-secret" aren't > things that we want to allow a reopen to change. However, in the flags > BDRV_O_NOCACHE makes a difference: >

Re: [Qemu-devel] [PATCH] block/rbd: add .bdrv_reopen_prepare() stub

2016-05-17 Thread Jason Dillaman
On Tue, May 17, 2016 at 6:03 AM, Sebastian Färber wrote: > Hi Kevin, > >> A correct reopen implementation must consider all options and flags that >> .bdrv_open() looked at. >> >> The options are okay, as both "filename" and "password-secret" aren't >> things that we want to allow a reopen to chan

Re: [Qemu-devel] [PATCH] block/rbd: add .bdrv_reopen_prepare() stub

2016-05-17 Thread Josh Durgin
On 05/17/2016 03:03 AM, Sebastian Färber wrote: Hi Kevin, A correct reopen implementation must consider all options and flags that .bdrv_open() looked at. The options are okay, as both "filename" and "password-secret" aren't things that we want to allow a reopen to change. However, in the flag