Re: [Qemu-devel] [v2 Patch 1/9]block: Framework for reopening image files safely

2012-08-14 Thread Supriya Kannery
On 08/03/2012 01:49 AM, Luiz Capitulino wrote: On Tue, 31 Jul 2012 03:04:22 +0530 Supriya Kannerysupri...@linux.vnet.ibm.com wrote: + +void bdrv_reopen_commit(BlockDriverState *bs, BDRVReopenState *rs) +{ +BlockDriver *drv = bs-drv; + +drv-bdrv_reopen_commit(bs, rs); +} +

Re: [Qemu-devel] [v2 Patch 1/9]block: Framework for reopening image files safely

2012-08-14 Thread Supriya Kannery
On 08/09/2012 02:43 AM, Jeff Cody wrote: On 07/30/2012 05:34 PM, Supriya Kannery wrote: Struct BDRVReopenState along with three reopen related functions introduced for handling reopening of images safely. This can be extended by each of the block drivers to reopen respective image files

Re: [Qemu-devel] [v2 Patch 1/9]block: Framework for reopening image files safely

2012-08-14 Thread Supriya Kannery
On 08/09/2012 06:32 PM, Jeff Cody wrote: On 08/09/2012 05:20 AM, Kevin Wolf wrote: Am 09.08.2012 06:26, schrieb Jeff Cody: On 07/30/2012 05:34 PM, Supriya Kannery wrote: + +void bdrv_reopen(BlockDriverState *bs, int bdrv_flags, Error **errp) +{ +BlockDriver *drv = bs-drv; +int ret

Re: [Qemu-devel] [v2 Patch 2/9]block: raw-posix image file reopen

2012-08-14 Thread Supriya Kannery
On 07/31/2012 10:47 PM, Eric Blake wrote: On 07/30/2012 03:34 PM, Supriya Kannery wrote: +s-fd = dup3(raw_rs-stash_s-fd, s-fd, O_CLOEXEC); You called it out in your cover letter, but just pointing out that this is one of the locations that needs a conditional fallback to dup2

Re: [Qemu-devel] [v2 Patch 2/9]block: raw-posix image file reopen

2012-08-14 Thread Supriya Kannery
On 08/10/2012 07:15 PM, Corey Bryant wrote: On 07/30/2012 05:34 PM, Supriya Kannery wrote: +static int raw_reopen_prepare(BlockDriverState *bs, BDRVReopenState **prs, + int flags) +{ + BDRVRawReopenState *raw_rs = g_malloc0(sizeof(BDRVRawReopenState)); + BDRVRawState *s = bs-opaque

Re: [Qemu-devel] [v2 Patch 0/9]block: Image file reopen and dynamic host pagecache change

2012-08-01 Thread Supriya Kannery
On 08/01/2012 02:03 AM, Jeff Cody wrote: On 07/30/2012 05:34 PM, Supriya Kannery wrote: For changing host pagecache setting of a running VM, it is important to have a safe way of reopening its image file. Hi Supriya, I never received patches 6 or 8, either through the list or at my direct

Re: [Qemu-devel] [v2 Patch 6/9]block: qcow image file reopen

2012-08-01 Thread Supriya Kannery
qcow driver changes for bdrv_reopen_xx functions to safely reopen image files. Reopening of image files while changing hostcache dynamically is handled here. Signed-off-by: Shrinidhi Joshi spjosh...@gmail.com Index: qemu/block/qcow.c

[Qemu-devel] [v2 Patch 8/9]block: Cmd block_set_hostcache for dynamic cache change

2012-08-01 Thread Supriya Kannery
New command block_set_hostcache added for dynamically changing host pagecache setting of a block device. Usage: block_set_hostcache device option device = block device option = on/off Example: (qemu) block_set_hostcache ide0-hd0 off Signed-off-by: Supriya Kannery supri

[Qemu-devel] [v2 Patch 1/9]block: Framework for reopening image files safely

2012-07-30 Thread Supriya Kannery
Struct BDRVReopenState along with three reopen related functions introduced for handling reopening of images safely. This can be extended by each of the block drivers to reopen respective image files. Signed-off-by: Supriya Kannery supri...@linux.vnet.ibm.com --- Index: qemu/block.c

[Qemu-devel] [v2 Patch 4/9]block: vmdk image file reopen

2012-07-30 Thread Supriya Kannery
vmdk driver changes for bdrv_reopen_xx functions to safely reopen image files. Reopening of image files while changing hostcache dynamically is handled here. Signed-off-by: Supriya Kannery supri...@linux.vnet.ibm.com --- Index: qemu/block/vmdk.c

[Qemu-devel] [v2 Patch 3/9]block: raw-win32 image file reopen

2012-07-30 Thread Supriya Kannery
raw-win32 driver changes for bdrv_reopen_xx functions to safely reopen image files. Reopening of image files while changing hostcache dynamically is handled here. Signed-off-by: Supriya Kannery supri...@linux.vnet.ibm.com Signed-off-by: Shrinidhi Joshi spjosh...@gmail.com --- Index: qemu/block

[Qemu-devel] [v2 Patch 2/9]block: raw-posix image file reopen

2012-07-30 Thread Supriya Kannery
raw-posix driver changes for bdrv_reopen_xx functions to safely reopen image files. Reopening of image files while changing hostcache dynamically is handled here. Signed-off-by: Supriya Kannery supri...@linux.vnet.ibm.com --- Index: qemu/block/raw.c

[Qemu-devel] [v2 Patch 5/9]block: qcow2 image file reopen

2012-07-30 Thread Supriya Kannery
qcow2 driver changes for bdrv_reopen_xx functions to safely reopen image files. Reopening of image files while changing hostcache dynamically is handled here. Signed-off-by: Supriya Kannery supri...@linux.vnet.ibm.com --- Index: qemu/block/qcow2.c

[Qemu-devel] [v2 Patch 0/9]block: Image file reopen and dynamic host pagecache change

2012-07-30 Thread Supriya Kannery
For changing host pagecache setting of a running VM, it is important to have a safe way of reopening its image file. V1 introduced: * a generic way to reopen image files safely. In this approach, before reopening an image, for each block driver, its state will be stashed. Incase

[Qemu-devel] [v2 Patch 9/9]block: Enhance info block to display host cache setting

2012-07-30 Thread Supriya Kannery
encrypted=0 Signed-off-by: Supriya Kannery supri...@linux.vnet.ibm.com --- Index: qemu/qapi-schema.json === --- qemu.orig/qapi-schema.json +++ qemu/qapi-schema.json @@ -453,6 +453,8 @@ # @locked: True if the guest has locked this device

[Qemu-devel] [v2 Patch 7/9]block: qed image file reopen

2012-07-30 Thread Supriya Kannery
qed driver changes for bdrv_reopen_xx functions to safely reopen image files. Reopening of image files while changing hostcache dynamically is handled here. Signed-off-by: Supriya Kannery supri...@linux.vnet.ibm.com --- Index: qemu/block/qed.c

Re: [Qemu-devel] [v1 Patch 1/10]Qemu: Enhance info block to display host cache setting

2012-07-29 Thread Supriya Kannery
On 07/11/2012 07:33 PM, Luiz Capitulino wrote: On Mon, 09 Jul 2012 16:43:40 +0200 Kevin Wolfkw...@redhat.com wrote: Am 15.06.2012 23:07, schrieb Eric Blake: On 06/15/2012 02:47 PM, Supriya Kannery wrote: Enhance info block to display hostcache setting for each block device

Re: [Qemu-devel] [v1 Patch 1/10]Qemu: Enhance info block to display host cache setting

2012-07-29 Thread Supriya Kannery
On 07/05/2012 10:08 PM, Jeff Cody wrote: On 06/15/2012 04:47 PM, Supriya Kannery wrote: Enhance info block to display hostcache setting for each block device. Example: (qemu) info block ide0-hd0: removable=0 file=../rhel6-32.raw ro=0 drv=raw encrypted=0 Enhanced to display hostcache setting

Re: [Qemu-devel] [v1 Patch 2/10]Qemu: Error classes for hostcache setting and data sync failures

2012-07-29 Thread Supriya Kannery
On 07/09/2012 08:17 PM, Kevin Wolf wrote: Am 15.06.2012 22:47, schrieb Supriya Kannery: New error classes defined for hostcache setting and data sync error Signed-off-by: Supriya Kannerysupri...@linux.vnet.ibm.com --- qerror.c |8 qerror.h |6 ++ 2 files changed, 14

Re: [Qemu-devel] [v1 Patch 3/10]Qemu: Cmd block_set_hostcache for dynamic cache change

2012-07-29 Thread Supriya Kannery
On 06/16/2012 03:26 AM, Eric Blake wrote: On 06/15/2012 02:47 PM, Supriya Kannery wrote: New command block_set_hostcache added for dynamically changing host pagecache setting of a block device. Usage: block_set_hostcachedevice option device = block device option = on/off Example

Re: [Qemu-devel] [v1 Patch 3/10]Qemu: Cmd block_set_hostcache for dynamic cache change

2012-07-29 Thread Supriya Kannery
On 07/11/2012 07:46 PM, Luiz Capitulino wrote: On Sat, 16 Jun 2012 02:17:30 +0530 Supriya Kannerysupri...@linux.vnet.ibm.com wrote: New command block_set_hostcache added for dynamically changing host pagecache setting of a block device. Usage: block_set_hostcachedevice option device

[Qemu-devel] [v1 Patch 0/10]Qemu: Dynamic host pagecache change and image file reopen

2012-06-15 Thread Supriya Kannery
For changing host pagecache setting of a running VM, it is important to have a safe way of reopening its image file. Following patchset introduces: * a generic way to reopen image files safely. In this approach, before reopening an image, for each block driver, its state will be

[Qemu-devel] [v1 Patch 1/10]Qemu: Enhance info block to display host cache setting

2012-06-15 Thread Supriya Kannery
encrypted=0 Signed-off-by: Supriya Kannery supri...@linux.vnet.ibm.com --- block.c | 20 qmp-commands.hx |2 ++ 2 files changed, 18 insertions(+), 4 deletions(-) Index: qemu/qapi-schema.json

[Qemu-devel] [v1 Patch 3/10]Qemu: Cmd block_set_hostcache for dynamic cache change

2012-06-15 Thread Supriya Kannery
New command block_set_hostcache added for dynamically changing host pagecache setting of a block device. Usage: block_set_hostcache device option device = block device option = on/off Example: (qemu) block_set_hostcache ide0-hd0 off Signed-off-by: Supriya Kannery supri

[Qemu-devel] [v1 Patch 7/10]Qemu: vmdk image file reopen

2012-06-15 Thread Supriya Kannery
vmdk driver changes for bdrv_reopen_xx functions to safely reopen image files. Reopening of image files while changing hostcache dynamically is handled here. Signed-off-by: Supriya Kannery supri...@linux.vnet.ibm.com Index: qemu/block/vmdk.c

[Qemu-devel] [v1 Patch 10/10]Qemu: qed image file reopen

2012-06-15 Thread Supriya Kannery
qed driver changes for bdrv_reopen_xx functions to safely reopen image files. Reopening of image files while changing hostcache dynamically is handled here. Signed-off-by: Supriya Kannery supri...@linux.vnet.ibm.com Index: qemu/block/qed.c

[Qemu-devel] [v1 Patch 8/10]Qemu: qcow2 image file reopen

2012-06-15 Thread Supriya Kannery
qcow2 driver changes for bdrv_reopen_xx functions to safely reopen image files. Reopening of image files while changing hostcache dynamically is handled here. Signed-off-by: Supriya Kannery supri...@linux.vnet.ibm.com Index: qemu/block/qcow2.c

Re: [Qemu-devel] CoW image commit+shrink(= make_empty) support

2012-06-15 Thread Supriya Kannery
On 06/14/2012 11:58 PM, Supriya Kannery wrote: On 06/14/2012 07:59 PM, Jeff Cody wrote: On 06/14/2012 10:23 AM, Zhi Hui Li wrote: On 2012年06月11日 23:37, Jeff Cody wrote: On 06/11/2012 10:24 AM, Stefan Hajnoczi wrote: On Mon, Jun 11, 2012 at 1:50 PM, Kevin Wolfkw...@redhat.com wrote: Am

[Qemu-devel] [v1 Patch 9/10]Qemu: qcow image file reopen

2012-06-15 Thread Supriya Kannery
qcow driver changes for bdrv_reopen_xx functions to safely reopen image files. Reopening of image files while changing hostcache dynamically is handled here. Signed-off-by: Shrinidhi Joshi spjosh...@gmail.com Index: qemu/block/qcow.c

[Qemu-devel] [v1 Patch 4/10]Qemu: Framework for reopening image files safely

2012-06-15 Thread Supriya Kannery
Struct BDRVReopenState along with three reopen related functions introduced for handling reopening of images safely. This can be extended by each of the block drivers to reopen respective image files. Signed-off-by: Supriya Kannery supri...@linux.vnet.ibm.com Index: qemu/block.c

[Qemu-devel] [v1 Patch 2/10]Qemu: Error classes for hostcache setting and data sync failures

2012-06-15 Thread Supriya Kannery
New error classes defined for hostcache setting and data sync error Signed-off-by: Supriya Kannery supri...@linux.vnet.ibm.com --- qerror.c |8 qerror.h |6 ++ 2 files changed, 14 insertions(+) Index: qemu/qerror.c

[Qemu-devel] [v1 Patch 5/10]Qemu: raw-posix image file reopen

2012-06-15 Thread Supriya Kannery
raw-posix driver changes for bdrv_reopen_xx functions to safely reopen image files. Reopening of image files while changing hostcache dynamically is handled here. Signed-off-by: Supriya Kannery supri...@linux.vnet.ibm.com Index: qemu/block/raw.c

[Qemu-devel] [v1 Patch 6/10]Qemu: raw-win32 image file reopen

2012-06-15 Thread Supriya Kannery
raw-win32 driver changes for bdrv_reopen_xx functions to safely reopen image files. Reopening of image files while changing hostcache dynamically is handled here. Signed-off-by: Supriya Kannery supri...@linux.vnet.ibm.com Signed-off-by: Shrinidhi Joshi spjosh...@gmail.com Index: qemu/block/raw

Re: [Qemu-devel] CoW image commit+shrink(= make_empty) support

2012-06-14 Thread Supriya Kannery
On 06/14/2012 07:59 PM, Jeff Cody wrote: On 06/14/2012 10:23 AM, Zhi Hui Li wrote: On 2012年06月11日 23:37, Jeff Cody wrote: On 06/11/2012 10:24 AM, Stefan Hajnoczi wrote: On Mon, Jun 11, 2012 at 1:50 PM, Kevin Wolfkw...@redhat.com wrote: Am 11.06.2012 14:09, schrieb Stefan Hajnoczi: On Fri,

Re: [Qemu-devel] CoW image commit+shrink(= make_empty) support

2012-06-13 Thread Supriya Kannery
On 06/12/2012 04:26 PM, Stefan Hajnoczi wrote: On Mon, Jun 11, 2012 at 4:37 PM, Jeff Codyjc...@redhat.com wrote: On 06/11/2012 10:24 AM, Stefan Hajnoczi wrote: On Mon, Jun 11, 2012 at 1:50 PM, Kevin Wolfkw...@redhat.com wrote: Am 11.06.2012 14:09, schrieb Stefan Hajnoczi: On Fri, Jun 8,

Re: [Qemu-devel] [RFC Patch 4/7]Qemu: Framework for reopening image files safely

2012-02-14 Thread Supriya Kannery
On 02/07/2012 03:38 PM, Stefan Hajnoczi wrote: On Wed, Feb 01, 2012 at 08:36:58AM +0530, Supriya Kannery wrote: Struct BDRVReopenState along with three reopen related functions introduced for handling reopening of images safely. This can be extended by each of the block drivers to reopen

Re: [Qemu-devel] [RFC Patch 5/7]Qemu: raw-posix image file reopen

2012-02-14 Thread Supriya Kannery
On 02/07/2012 03:47 PM, Stefan Hajnoczi wrote: On Wed, Feb 01, 2012 at 08:37:12AM +0530, Supriya Kannery wrote: +/* stash state before reopen */ +raw_rs-stash_s = g_malloc0(sizeof(BDRVRawState)); +memcpy(raw_rs-stash_s, s, sizeof(BDRVRawState)); Copying a struct is fragile, Mike

Re: [Qemu-devel] [RFC Patch 5/7]Qemu: raw-posix image file reopen

2012-02-13 Thread Supriya Kannery
On 02/02/2012 05:45 AM, Michael Roth wrote: On 01/31/2012 09:07 PM, Supriya Kannery wrote: raw-posix driver changes for bdrv_reopen_xx functions to safely reopen image files. Reopening of image files while changing hostcache dynamically is handled here. + + /* Flags that can be set using

Re: [Qemu-devel] [RFC Patch 2/7]Qemu: Error classes for file reopen and data sync failure

2012-02-13 Thread Supriya Kannery
On 02/07/2012 01:26 PM, Stefan Hajnoczi wrote: On Wed, Feb 01, 2012 at 08:36:28AM +0530, Supriya Kannery wrote: Index: qemu/qerror.c === --- qemu.orig/qerror.c +++ qemu/qerror.c @@ -108,6 +108,14 @@ static const QErrorStringTable

Re: [Qemu-devel] [RFC Patch 1/7]Qemu: Enhance info block to display host cache setting

2012-02-13 Thread Supriya Kannery
On 02/08/2012 05:30 PM, Luiz Capitulino wrote: On Wed, 01 Feb 2012 08:36:14 +0530 Supriya Kannerysupri...@linux.vnet.ibm.com wrote: Enhance info block to display hostcache setting for each block device. Example: (qemu) info block ide0-hd0: removable=0 file=../rhel6-32.raw ro=0 drv=raw

Re: [Qemu-devel] [RFC Patch 3/7]Qemu: Cmd block_set_hostcache for dynamic cache change

2012-02-13 Thread Supriya Kannery
On 02/08/2012 05:37 PM, Luiz Capitulino wrote: On Wed, 01 Feb 2012 08:36:41 +0530 Supriya Kannerysupri...@linux.vnet.ibm.com wrote: +ret = bdrv_open(bs, bs-filename, bdrv_flags, drv); +if (ret 0) { +/* Reopen failed. Try to open with original flags */ +

Re: [Qemu-devel] [RFC Patch 5/7]Qemu: raw-posix image file reopen

2012-02-13 Thread Supriya Kannery
On 02/08/2012 08:24 PM, Kevin Wolf wrote: Am 01.02.2012 04:07, schrieb Supriya Kannery: raw-posix driver changes for bdrv_reopen_xx functions to safely reopen image files. Reopening of image files while changing hostcache dynamically is handled here. +typedef struct BDRVRawReopenState

Re: [Qemu-devel] [RFC Patch 6/7]Qemu: raw-win32 image file reopen

2012-02-13 Thread Supriya Kannery
On 02/08/2012 08:32 PM, Kevin Wolf wrote: Am 01.02.2012 04:07, schrieb Supriya Kannery: win32 driver changes for bdrv_reopen_xx functions to safely reopen image files. Reopening of image files while changing hostcache dynamically is handled here. + +if (osvi.dwMajorVersion= WINDOWS_VISTA

Re: [Qemu-devel] [RFC Patch 4/7]Qemu: Framework for reopening image files safely

2012-02-13 Thread Supriya Kannery
On 02/08/2012 08:37 PM, Kevin Wolf wrote: Am 01.02.2012 04:06, schrieb Supriya Kannery: Struct BDRVReopenState along with three reopen related functions introduced for handling reopening of images safely. This can be extended by each of the block drivers to reopen respective image files

[Qemu-devel] [RFC Patch 0/7]Qemu: Dynamic host pagecache change

2012-01-31 Thread Supriya Kannery
For changing host pagecache setting of a running VM, it is important to have a safe way of reopening its image file. Following patchset introduces: * a generic way to reopen image files safely. In this approach, before reopening an image, for each block driver, its state will be

[Qemu-devel] [RFC Patch 2/7]Qemu: Error classes for file reopen and data sync failure

2012-01-31 Thread Supriya Kannery
New error classes defined for file reopen failure and data sync error Signed-off-by: Supriya Kannery supri...@linux.vnet.ibm.com --- qerror.c |8 qerror.h |6 ++ 2 files changed, 14 insertions(+) Index: qemu/qerror.c

[Qemu-devel] [RFC Patch 1/7]Qemu: Enhance info block to display host cache setting

2012-01-31 Thread Supriya Kannery
encrypted=0 Signed-off-by: Supriya Kannery supri...@linux.vnet.ibm.com --- block.c | 20 qmp-commands.hx |2 ++ 2 files changed, 18 insertions(+), 4 deletions(-) Index: qemu/qapi-schema.json

[Qemu-devel] [RFC Patch 3/7]Qemu: Cmd block_set_hostcache for dynamic cache change

2012-01-31 Thread Supriya Kannery
New command block_set_hostcache added for dynamically changing host pagecache setting of a block device. Usage: block_set_hostcache device option device = block device option = on/off Example: (qemu) block_set_hostcache ide0-hd0 off Signed-off-by: Supriya Kannery supri

[Qemu-devel] [RFC Patch 4/7]Qemu: Framework for reopening image files safely

2012-01-31 Thread Supriya Kannery
Struct BDRVReopenState along with three reopen related functions introduced for handling reopening of images safely. This can be extended by each of the block drivers to reopen respective image files. Signed-off-by: Supriya Kannery supri...@linux.vnet.ibm.com Index: qemu/block.c

[Qemu-devel] [RFC Patch 6/7]Qemu: raw-win32 image file reopen

2012-01-31 Thread Supriya Kannery
win32 driver changes for bdrv_reopen_xx functions to safely reopen image files. Reopening of image files while changing hostcache dynamically is handled here. Signed-off-by: Supriya Kannery supri...@linux.vnet.ibm.com Index: qemu/block/raw-win32.c

[Qemu-devel] [RFC Patch 7/7]Qemu: vmdk image file reopen

2012-01-31 Thread Supriya Kannery
vmdk driver changes for bdrv_reopen_xx functions to safely reopen image files. Reopening of image files while changing hostcache flag dynamically is handled here. Signed-off-by: Supriya Kannery supri...@linux.vnet.ibm.com Index: qemu/block/vmdk.c

[Qemu-devel] [RFC Patch 5/7]Qemu: raw-posix image file reopen

2012-01-31 Thread Supriya Kannery
raw-posix driver changes for bdrv_reopen_xx functions to safely reopen image files. Reopening of image files while changing hostcache dynamically is handled here. Signed-off-by: Supriya Kannery supri...@linux.vnet.ibm.com Index: qemu/block/raw.c

Re: [Qemu-devel] [v9 Patch 4/6]Qemu: Add commandline -drive option 'hostcache'

2011-11-22 Thread supriya kannery
Stefan Hajnoczi wrote: On Mon, Nov 21, 2011 at 12:28 PM, supriya kannery supri...@in.ibm.com wrote: Stefan Hajnoczi wrote: On Thu, Nov 17, 2011 at 5:18 AM, Supriya Kannery supri...@linux.vnet.ibm.com wrote: On 11/17/2011 01:36 AM, Stefan Hajnoczi wrote: On Fri, Nov

Re: [Qemu-devel] [v9 Patch 6/6]Qemu: raw posix implementation of reopen functions

2011-11-22 Thread supriya kannery
supriya kannery wrote: Stefan Hajnoczi wrote: On Fri, Nov 11, 2011 at 6:48 AM, Supriya Kannery supri...@linux.vnet.ibm.com wrote: +} +if ((flags BDRV_O_NOCACHE)) { +raw_rs-reopen_state.reopen_flags |= O_DIRECT; +} else { +raw_rs

Re: [Qemu-devel] [v9 Patch 5/6]Qemu: Framework for reopening images safely

2011-11-22 Thread supriya kannery
Stefan Hajnoczi wrote: On Mon, Nov 21, 2011 at 12:13 PM, supriya kannery supri...@in.ibm.com wrote: Stefan Hajnoczi wrote: On Fri, Nov 11, 2011 at 6:48 AM, Supriya Kannery supri...@linux.vnet.ibm.com wrote: @@ -708,17 +731,31 @@ int bdrv_reopen(BlockDriverState *bs

Re: [Qemu-devel] [v9 Patch 5/6]Qemu: Framework for reopening images safely

2011-11-22 Thread supriya kannery
Kevin Wolf wrote: Am 22.11.2011 11:24, schrieb supriya kannery: Stefan Hajnoczi wrote: On Mon, Nov 21, 2011 at 12:13 PM, supriya kannery supri...@in.ibm.com wrote: Stefan Hajnoczi wrote: On Fri, Nov 11, 2011 at 6:48 AM, Supriya Kannery supri

Re: [Qemu-devel] [v9 Patch 6/6]Qemu: raw posix implementation of reopen functions

2011-11-22 Thread supriya kannery
Stefan Hajnoczi wrote: On Tue, Nov 22, 2011 at 9:45 AM, supriya kannery supri...@in.ibm.com wrote: supriya kannery wrote: Stefan Hajnoczi wrote: On Fri, Nov 11, 2011 at 6:48 AM, Supriya Kannery supri...@linux.vnet.ibm.com wrote: +} +if ((flags

Re: [Qemu-devel] [v9 Patch 5/6]Qemu: Framework for reopening images safely

2011-11-22 Thread Supriya Kannery
On 11/22/2011 05:19 PM, Stefan Hajnoczi wrote: On Tue, Nov 22, 2011 at 11:16 AM, supriya kannerysupri...@in.ibm.com wrote: Kevin Wolf wrote: Am 22.11.2011 11:24, schrieb supriya kannery: How does VMDK implement its prepare/commit/abort? It needs to use the public bdrv_reopen_prepare

Re: [Qemu-devel] [v9 Patch 5/6]Qemu: Framework for reopening images safely

2011-11-21 Thread supriya kannery
Stefan Hajnoczi wrote: On Fri, Nov 11, 2011 at 6:48 AM, Supriya Kannery supri...@linux.vnet.ibm.com wrote: @@ -708,17 +731,31 @@ int bdrv_reopen(BlockDriverState *bs, in qerror_report(QERR_DATA_SYNC_FAILED, bs-device_name); return ret; } -open_flags = bs-open_flags

Re: [Qemu-devel] [v9 Patch 4/6]Qemu: Add commandline -drive option 'hostcache'

2011-11-21 Thread supriya kannery
Stefan Hajnoczi wrote: On Thu, Nov 17, 2011 at 5:18 AM, Supriya Kannery supri...@linux.vnet.ibm.com wrote: On 11/17/2011 01:36 AM, Stefan Hajnoczi wrote: On Fri, Nov 11, 2011 at 6:48 AM, Supriya Kannery supri...@linux.vnet.ibm.com wrote: +if ((hostcache

Re: [Qemu-devel] [v9 Patch 6/6]Qemu: raw posix implementation of reopen functions

2011-11-21 Thread supriya kannery
Stefan Hajnoczi wrote: On Fri, Nov 11, 2011 at 6:48 AM, Supriya Kannery supri...@linux.vnet.ibm.com wrote: +static int raw_reopen_prepare(BlockDriverState *bs, BDRVReopenState **prs, + int flags) +{ +BDRVRawReopenState *raw_rs = g_malloc0(sizeof

Re: [Qemu-devel] [v9 Patch 1/6 - updated]Qemu: Enhance info block to display host cache setting

2011-11-18 Thread supriya kannery
Luiz Capitulino wrote: On Fri, 11 Nov 2011 15:39:29 +0530 Supriya Kannery supri...@linux.vnet.ibm.com wrote: On 11/11/2011 12:17 PM, Supriya Kannery wrote: hostcache gets added to qapi-types.h from the change done in qapi-schema.json. Hence above change has to be ignored. Pls find updated

Re: [Qemu-devel] [v9 Patch 2/6]Qemu: Error classes for file reopen and data sync failure

2011-11-18 Thread supriya kannery
Luiz Capitulino wrote: On Fri, 11 Nov 2011 12:17:35 +0530 Supriya Kannery supri...@linux.vnet.ibm.com wrote: New error classes defined for file reopen failure and data sync error Signed-off-by: Supriya Kannery supri...@linux.vnet.ibm.com --- qerror.c |8 qerror.h |6

Re: [Qemu-devel] [v9 Patch 3/6]Qemu: Cmd block_set_hostcache for dynamic cache change

2011-11-18 Thread supriya kannery
Luiz Capitulino wrote: On Fri, 11 Nov 2011 12:17:48 +0530 Supriya Kannery supri...@linux.vnet.ibm.com wrote: + +ret = bdrv_open(bs, bs-filename, bdrv_flags, drv); +if (ret 0) { +/* Reopen failed. Try to open with original flags */ +qerror_report

Re: [Qemu-devel] [v9 Patch 4/6]Qemu: Add commandline -drive option 'hostcache'

2011-11-16 Thread Supriya Kannery
On 11/17/2011 01:36 AM, Stefan Hajnoczi wrote: On Fri, Nov 11, 2011 at 6:48 AM, Supriya Kannery supri...@linux.vnet.ibm.com wrote: +if ((hostcache = qemu_opt_get_bool(opts, hostcache, -1)) != -1) { This does not work. qemu_opt_get_bool() takes a bool default argument and returns

Re: [Qemu-devel] [v9 Patch 1/6 - updated]Qemu: Enhance info block to display host cache setting

2011-11-11 Thread Supriya Kannery
On 11/11/2011 12:17 PM, Supriya Kannery wrote: Enhance info block to display hostcache setting for each block device. ## Index: qemu/qapi-types.h === --- qemu.orig/qapi-types.h +++ qemu/qapi-types.h @@ -383,6 +383,7

[Qemu-devel] [v9 Patch 0/6]Qemu: Host pagecache setting from cmdline and monitor

2011-11-10 Thread Supriya Kannery
Following patchset is for enabling dynamic change of host pagecache setting of block devices through qemu monitor. This patchset introduces a. monitor command 'block_set_hostcache' using which host pagecache setting for a block device can be changed dynamically. b. a new option for

[Qemu-devel] [v9 Patch 1/6]Qemu: Enhance info block to display host cache setting

2011-11-10 Thread Supriya Kannery
encrypted=0 Signed-off-by: Supriya Kannery supri...@linux.vnet.ibm.com --- block.c | 20 qmp-commands.hx |2 ++ 2 files changed, 18 insertions(+), 4 deletions(-) Index: qemu/qapi-schema.json

[Qemu-devel] [v9 Patch 2/6]Qemu: Error classes for file reopen and data sync failure

2011-11-10 Thread Supriya Kannery
New error classes defined for file reopen failure and data sync error Signed-off-by: Supriya Kannery supri...@linux.vnet.ibm.com --- qerror.c |8 qerror.h |6 ++ 2 files changed, 14 insertions(+) Index: qemu/qerror.c

[Qemu-devel] [v9 Patch 4/6]Qemu: Add commandline -drive option 'hostcache'

2011-11-10 Thread Supriya Kannery
qemu command option 'hostcache' added to -drive for block devices. While starting a VM from qemu commandline, this option can be used for setting host cache usage for block data access. Signed-off-by: Supriya Kannery supri...@linux.vnet.ibm.com --- blockdev.c | 13 + qemu

[Qemu-devel] [v9 Patch 5/6]Qemu: Framework for reopening images safely

2011-11-10 Thread Supriya Kannery
Struct BDRVReopenState along with three reopen related functions introduced for handling reopen state of images safely. This can be extended by each of the block drivers to reopen respective image files. Signed-off-by: Supriya Kannery supri...@linux.vnet.ibm.com Index: qemu/block.c

[Qemu-devel] [v9 Patch 6/6]Qemu: raw posix implementation of reopen functions

2011-11-10 Thread Supriya Kannery
raw-posix driver changes for bdrv_reopen_xx functions to safely reopen image files. Reopening of image files while changing hostcache dynamically is handled here. Signed-off-by: Supriya Kannery supri...@linux.vnet.ibm.com Index: qemu/block/raw.c

[Qemu-devel] [v9 Patch 3/6]Qemu: Cmd block_set_hostcache for dynamic cache change

2011-11-10 Thread Supriya Kannery
New command block_set_hostcache added for dynamically changing host pagecache setting of a block device. Usage: block_set_hostcache device option device = block device option = on/off Example: (qemu) block_set_hostcache ide0-hd0 off Signed-off-by: Supriya Kannery supri

Re: [Qemu-devel] [v8 Patch 0/6]Qemu: Host pagecache setting from cmdline and monitor

2011-11-07 Thread Supriya Kannery
On 11/04/2011 07:59 AM, Zhi Yong Wu wrote: On Sun, Oct 30, 2011 at 6:33 PM, Supriya Kannery supri...@linux.vnet.ibm.com wrote: Currently cache setting of a block device cannot be changed without restarting a running VM. Following patchset is for enabling dynamic change of cache setting

Re: [Qemu-devel] [v8 Patch 0/6]Qemu: Host pagecache setting from cmdline and monitor

2011-11-07 Thread Supriya Kannery
On 11/07/2011 02:19 PM, Zhi Yong Wu wrote: On Mon, Nov 7, 2011 at 4:38 PM, Supriya Kannery supri...@linux.vnet.ibm.com wrote: On 11/04/2011 07:59 AM, Zhi Yong Wu wrote: On Sun, Oct 30, 2011 at 6:33 PM, Supriya Kannery supri...@linux.vnet.ibm.comwrote: Currently cache setting of a block

Re: [Qemu-devel] [v8 Patch 1/6]Qemu: Enhance info block to display host cache setting

2011-11-04 Thread Supriya Kannery
On 11/03/2011 07:25 PM, Luiz Capitulino wrote: On Sun, 30 Oct 2011 16:03:54 +0530 Supriya Kannerysupri...@linux.vnet.ibm.com wrote: +if (qdict_haskey(bs_dict, hostcache)) { +monitor_printf(mon, hostcache=%d, + qdict_get_bool(bs_dict, hostcache)); +}

Re: [Qemu-devel] [v8 Patch 3/6]Qemu: Cmd block_set_hostcache for dynamic cache change

2011-11-04 Thread Supriya Kannery
On 11/04/2011 03:30 PM, Kevin Wolf wrote: Am 30.10.2011 11:34, schrieb Supriya Kannery: + +if (bdrv_is_inserted(bs)) { +/* Reopen file with changed set of flags */ +return bdrv_reopen(bs, bdrv_flags); +} else { +/* Save hostcache change for future use

Re: [Qemu-devel] [v8 Patch 5/6]Qemu: Framework for reopening images safely

2011-11-04 Thread Supriya Kannery
On 11/04/2011 03:35 PM, Kevin Wolf wrote: Am 30.10.2011 11:35, schrieb Supriya Kannery: +struct BDRVReopenState { +BlockDriverState *bs; +int reopen_flags; + +/* For raw-posix */ +int reopen_fd; +}; I think I commented the same on the previous version: BDRVReopenState

[Qemu-devel] [v8 Patch 0/6]Qemu: Host pagecache setting from cmdline and monitor

2011-10-30 Thread Supriya Kannery
Currently cache setting of a block device cannot be changed without restarting a running VM. Following patchset is for enabling dynamic change of cache setting for block devices through qemu monitor. Code changes are based on patches from Christoph Hellwig and Prerna Saxena. This patchset

[Qemu-devel] [v8 Patch 1/6]Qemu: Enhance info block to display host cache setting

2011-10-30 Thread Supriya Kannery
encrypted=0 Signed-off-by: Supriya Kannery supri...@linux.vnet.ibm.com --- block.c | 20 qmp-commands.hx |2 ++ 2 files changed, 18 insertions(+), 4 deletions(-) Index: qemu/qmp-commands.hx

[Qemu-devel] [v8 Patch 2/6]Qemu: Error classes for file reopen and data sync failure

2011-10-30 Thread Supriya Kannery
New error classes defined for file reopen failure and data sync error Signed-off-by: Supriya Kannery supri...@linux.vnet.ibm.com --- qerror.c |8 qerror.h |6 ++ 2 files changed, 14 insertions(+) Index: qemu/qerror.c

[Qemu-devel] [v8 Patch 4/6]Qemu: Add commandline -drive option 'hostcache'

2011-10-30 Thread Supriya Kannery
qemu command option 'hostcache' added to -drive for block devices. While starting a VM from qemu commandline, this option can be used for setting host cache usage for block data access. 'cache=xx' overrides 'hostcache=yy' when specified simultaneously. Signed-off-by: Supriya Kannery supri

[Qemu-devel] [v8 Patch 6/6]Qemu: raw posix implementation of reopen functions

2011-10-30 Thread Supriya Kannery
raw-posix driver changes for bdrv_reopen_xx functions to safely reopen image files. Reopening of image files while changing hostcache dynamically, is handled here. Signed-off-by: Supriya Kannery supri...@linux.vnet.ibm.com Index: qemu/block/raw.c

[Qemu-devel] [v8 Patch 5/6]Qemu: Framework for reopening images safely

2011-10-30 Thread Supriya Kannery
Struct BDRVReopenState along with three reopen related functions introduced for handling reopen state of images safely. This can be extended by each of the block drivers to reopen respective image files. Signed-off-by: Supriya Kannery supri...@linux.vnet.ibm.com Index: qemu/block.c

[Qemu-devel] [v8 Patch 3/6]Qemu: Cmd block_set_hostcache for dynamic cache change

2011-10-30 Thread Supriya Kannery
New command block_set_hostcache added for dynamically changing host pagecache setting of a block device. Usage: block_set_hostcache device option device = block device option = on/off Example: (qemu) block_set_hostcache ide0-hd0 off Signed-off-by: Supriya Kannery supri

Re: [Qemu-devel] [v7 Patch 1/5]Qemu: Enhance info block to display host cache setting

2011-10-14 Thread Supriya Kannery
On 10/12/2011 07:47 PM, Kevin Wolf wrote: Am 11.10.2011 05:10, schrieb Supriya Kannery: Enhance info block to display hostcache setting for each block device. +if (qdict_haskey(bs_dict, open_flags)) { +int open_flags = qdict_get_int(bs_dict, open_flags); +if (open_flags

Re: [Qemu-devel] [v7 Patch 4/5]Qemu: Add commandline -drive option 'hostcache'

2011-10-14 Thread Supriya Kannery
On 10/12/2011 08:00 PM, Kevin Wolf wrote: Am 11.10.2011 05:11, schrieb Supriya Kannery: qemu command option 'hostcache' added to -drive for block devices. While starting a VM from qemu commandline, this option can be used for setting host cache usage for block data access. Simultaneous use

Re: [Qemu-devel] [v7 Patch 5/5]Qemu: New struct 'BDRVReopenState' for image files reopen

2011-10-14 Thread Supriya Kannery
On 10/12/2011 08:25 PM, Kevin Wolf wrote: Am 11.10.2011 05:11, schrieb Supriya Kannery: Struct BDRVReopenState introduced for handling reopen state of images. This can be extended by each of the block drivers to reopen respective image files. Implementation for raw-posix is done here. Signed

Re: [Qemu-devel] [v7 Patch 5/5]Qemu: New struct 'BDRVReopenState' for image files reopen

2011-10-14 Thread Supriya Kannery
On 10/14/2011 04:43 PM, Stefan Hajnoczi wrote: On Tue, Oct 11, 2011 at 08:41:59AM +0530, Supriya Kannery wrote: Index: qemu/block.c === --- qemu.orig/block.c +++ qemu/block.c @@ -706,6 +706,7 @@ int bdrv_reopen(BlockDriverState *bs

[Qemu-devel] [v7 Patch 0/5]Qemu: Host pagecache setting from cmdline and monitor

2011-10-10 Thread Supriya Kannery
Currently cache setting of a block device cannot be changed without restarting a running VM. Following patchset is for enabling dynamic change of cache setting for block devices through qemu monitor and qmp. Code changes are based on patches from Christoph Hellwig and Prerna Saxena. This

[Qemu-devel] [v7 Patch 1/5]Qemu: Enhance info block to display host cache setting

2011-10-10 Thread Supriya Kannery
encrypted=0 Signed-off-by: Supriya Kannery supri...@linux.vnet.ibm.com --- block.c | 20 qmp-commands.hx |2 ++ 2 files changed, 18 insertions(+), 4 deletions(-) Index: qemu/qmp-commands.hx

[Qemu-devel] [v7 Patch 2/5]Qemu: Error classes for file reopen and data sync failure

2011-10-10 Thread Supriya Kannery
New error classes defined for file reopen failure and data sync error Signed-off-by: Supriya Kannery supri...@linux.vnet.ibm.com --- qerror.c |8 qerror.h |6 ++ 2 files changed, 14 insertions(+) Index: qemu/qerror.c

[Qemu-devel] [v7 Patch 3/5]Qemu: Cmd block_set_hostcache for dynamic cache change

2011-10-10 Thread Supriya Kannery
New command block_set_hostcache added for dynamically changing host pagecache setting of a block device. Usage: block_set_hostcache device option device = block device option = on/off Example: (qemu) block_set_hostcache ide0-hd0 off Signed-off-by: Supriya Kannery supri

[Qemu-devel] [v7 Patch 4/5]Qemu: Add commandline -drive option 'hostcache'

2011-10-10 Thread Supriya Kannery
qemu command option 'hostcache' added to -drive for block devices. While starting a VM from qemu commandline, this option can be used for setting host cache usage for block data access. Simultaneous use of 'hostcache' and 'cache' options not allowed. Signed-off-by: Supriya Kannery supri

[Qemu-devel] [v7 Patch 5/5]Qemu: New struct 'BDRVReopenState' for image files reopen

2011-10-10 Thread Supriya Kannery
Struct BDRVReopenState introduced for handling reopen state of images. This can be extended by each of the block drivers to reopen respective image files. Implementation for raw-posix is done here. Signed-off-by: Supriya Kannery supri...@linux.vnet.ibm.com --- block.c | 46

Re: [Qemu-devel] Safely reopening image files by stashing fds

2011-10-10 Thread Supriya Kannery
On 10/10/2011 11:58 PM, Kevin Wolf wrote: Am 09.08.2011 11:22, schrieb supriya kannery: Kevin Wolf wrote: Am 08.08.2011 09:02, schrieb Supriya Kannery: On 08/05/2011 09:19 PM, Anthony Liguori wrote: On 08/05/2011 10:43 AM, Kevin Wolf wrote: Am 05.08.2011 17:24, schrieb Stefan Hajnoczi

Re: [Qemu-devel] [RFC] Safely reopening image files by stashing fds

2011-08-16 Thread Supriya Kannery
On 08/09/2011 03:02 PM, supriya kannery wrote: Kevin Wolf wrote: Am 09.08.2011 11:22, schrieb supriya kannery: Kevin Wolf wrote: What I meant is that in the end, with a generic bdrv_reopen(), we can have raw-posix only call dup() and fcntl() instead of doing a close()/open() sequence

Re: [Qemu-devel] [RFC] Safely reopening image files by stashing fds

2011-08-16 Thread Supriya Kannery
On 08/09/2011 03:02 PM, supriya kannery wrote: Kevin Wolf wrote: Am 09.08.2011 11:22, schrieb supriya kannery: Kevin Wolf wrote: What I meant is that in the end, with a generic bdrv_reopen(), we can have raw-posix only call dup() and fcntl() instead of doing a close()/open() sequence

Re: [Qemu-devel] Safely reopening image files by stashing fds

2011-08-09 Thread supriya kannery
Kevin Wolf wrote: Am 08.08.2011 09:02, schrieb Supriya Kannery: On 08/05/2011 09:19 PM, Anthony Liguori wrote: On 08/05/2011 10:43 AM, Kevin Wolf wrote: Am 05.08.2011 17:24, schrieb Stefan Hajnoczi: On Fri, Aug 5, 2011 at 3:28 PM, Christoph Hellwigh...@lst.de wrote

Re: [Qemu-devel] Safely reopening image files by stashing fds

2011-08-09 Thread supriya kannery
Kevin Wolf wrote: Am 09.08.2011 11:22, schrieb supriya kannery: Kevin Wolf wrote: Am 08.08.2011 09:02, schrieb Supriya Kannery: On 08/05/2011 09:19 PM, Anthony Liguori wrote: On 08/05/2011 10:43 AM, Kevin Wolf wrote: Am 05.08.2011 17:24

  1   2   >