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

2011-08-08 Thread 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: On Fri, Aug 05, 2011 at 02:12:48PM +0100, Daniel P. Berrange wrote: Because you cannot

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

2011-08-05 Thread Supriya Kannery
.qcow2 ro=0 drv=qcow2 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/block.c

[Qemu-devel] [v6 Patch 2/4]Qemu: qerrors for file reopen and data sync

2011-08-05 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] [v6 Patch 3/4]Qemu: Command block_set_hostcache for dynamic hostcache change

2011-08-05 Thread Supriya Kannery
New command block_set_hostcache added for dynamically changing host pagecache setting of a block device. Signed-off-by: Supriya Kannery supri...@linux.vnet.ibm.com --- block.c | 54 ++ block.h |2 ++ blockdev.c

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

2011-08-05 Thread Supriya Kannery
-by: Supriya Kannery supri...@linux.vnet.ibm.com --- blockdev.c | 13 + qemu-config.c |4 qemu-options.hx |2 +- 3 files changed, 18 insertions(+), 1 deletion(-) Index: qemu/blockdev.c === --- qemu.orig

[Qemu-devel] [v6 Patch 0/4]Qemu: Set host pagecache from cmdline and monitor

2011-08-05 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

Re: [Qemu-devel] [V5 Patch 3/4]Qemu: Command block_set for dynamic block params change

2011-08-04 Thread Supriya Kannery
On 08/01/2011 09:14 PM, Anthony Liguori wrote: On 08/01/2011 10:44 AM, Kevin Wolf wrote: Am 01.08.2011 17:28, schrieb Anthony Liguori: 2. Top-level command for each parameter (e.g. block_set_hostcache). Supported parameters are easily discoverable via query-commands. If individual block

Re: [Qemu-devel] [V5 Patch 3/4]Qemu: Command block_set for dynamic block params change

2011-08-04 Thread Supriya Kannery
On 08/04/2011 02:01 PM, Stefan Hajnoczi wrote: On Thu, Aug 4, 2011 at 9:32 AM, Supriya Kannery supri...@linux.vnet.ibm.com wrote: On 08/01/2011 09:14 PM, Anthony Liguori wrote: On 08/01/2011 10:44 AM, Kevin Wolf wrote: Am 01.08.2011 17:28, schrieb Anthony Liguori: 2. Top-level command

[Qemu-devel] [Patch] virtio: security patch

2011-08-03 Thread Supriya Kannery
For security purpose, convert 'int i' to 'unsigned int i' in virtio functions, so that range of index is restricted to positive value. Signed-off-by: Supriya Kannery (supri...@linux.vnet.ibm.com) --- hw/virtio.c | 27 +-- hw/virtio.h |3 ++- 2 files changed, 19

Re: [Qemu-devel] [V5 Patch 3/4]Qemu: Command block_set for dynamic block params change

2011-07-28 Thread Supriya Kannery
On 07/27/2011 09:32 PM, Anthony Liguori wrote: On 07/27/2011 09:31 AM, Stefan Hajnoczi wrote: On Wed, Jul 27, 2011 at 1:58 PM, Anthony Liguorianth...@codemonkey.ws wrote: Index: qemu/hmp-commands.hx === ---

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

2011-07-28 Thread Supriya Kannery
On 07/27/2011 07:49 PM, Stefan Hajnoczi wrote: On Wed, Jul 27, 2011 at 12:30 PM, Supriya Kannery supri...@linux.vnet.ibm.com wrote: Enhance info block to display hostcache setting for each block device. Example: (qemu) info block ide0-hd0: type=hd removable=0 file=../rhel6-32.qcow2 ro=0 drv

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

2011-07-27 Thread Supriya Kannery
.qcow2 ro=0 drv=qcow2 encrypted=0 Signed-off-by: Supriya Kannery supri...@in.ibm.com --- block.c | 21 + qmp-commands.hx |2 ++ 2 files changed, 19 insertions(+), 4 deletions(-) Index: qemu/block.c

[Qemu-devel] [V5 Patch 2/4]Qemu: qerrors for file reopen, data sync and cmd syntax

2011-07-27 Thread Supriya Kannery
New error classes defined for file reopen failure, data sync error and incorrect command syntax Signed-off-by: Supriya Kannery supri...@in.ibm.com --- qerror.c | 12 qerror.h |8 2 files changed, 20 insertions(+) Index: qemu/qerror.c

[Qemu-devel] [V5 Patch 3/4]Qemu: Command block_set for dynamic block params change

2011-07-27 Thread Supriya Kannery
New command block_set added for dynamically changing any of the block device parameters. For now, dynamic setting of hostcache params using this command is implemented. Other block device parameter changes, can be integrated in similar lines. Signed-off-by: Supriya Kannery supri...@in.ibm.com

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

2011-07-27 Thread Supriya Kannery
to specify only one among these. Signed-off-by: Supriya Kannery supri...@in.ibm.com --- blockdev.c | 13 + qemu-config.c |4 qemu-options.hx |2 +- 3 files changed, 18 insertions(+), 1 deletion(-) Index: qemu/blockdev.c

[Qemu-devel] [V5 Patch 0/4]Qemu: Set host cache from cmdline and monitor

2011-07-27 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 host cache setting for block devices through qemu monitor. Code changes are based on patches from Christoph Hellwig and Prerna Saxena. This

Re: [Qemu-devel] [V4 Patch 3/4 - Updated]Qemu: Command block_set for dynamic block params change

2011-07-25 Thread Supriya Kannery
On 07/25/2011 12:00 PM, Stefan Hajnoczi wrote: On Wed, Jul 13, 2011 at 06:37:05PM +0530, Supriya Kannery wrote: +ret = bdrv_open(bs, bs-filename, bdrv_flags, drv); +if (ret 0) { +/* Reopen failed. Try to open with original flags */ +error_report(Opening file

Re: [Qemu-devel] [V4 Patch 3/4 - Updated]Qemu: Command block_set for dynamic block params change

2011-07-25 Thread Supriya Kannery
On 07/25/2011 07:04 PM, Kevin Wolf wrote: Am 25.07.2011 14:50, schrieb Stefan Hajnoczi: On Mon, Jul 25, 2011 at 1:52 PM, Supriya Kannerysupri...@in.ibm.com wrote: On 07/25/2011 12:00 PM, Stefan Hajnoczi wrote: On Wed, Jul 13, 2011 at 06:37:05PM +0530, Supriya Kannery wrote

Re: [Qemu-devel] [V4 Patch 3/4 - Updated]Qemu: Command block_set for dynamic block params change

2011-07-20 Thread Supriya Kannery
On 07/13/2011 06:37 PM, Supriya Kannery wrote: Updated block_set command to accept multiple -drive parameters. Also, added code for re-opening of device file with original flags, incase opening file using changed hostcache setting fails

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

2011-07-20 Thread Supriya Kannery
On 07/05/2011 04:35 PM, Supriya Kannery wrote: Updated patch to use qemu_opt_get_bool() instead of qemu_opt_get() to read 'hostcache' --- qemu command option 'hostcache' added to -drive for block devices. While starting a VM from

Re: [Qemu-devel] [V4 Patch 1/4 -Updated]Qemu: Enhance info block to display host cache setting

2011-07-20 Thread Supriya Kannery
On 07/05/2011 04:19 PM, Supriya Kannery wrote: Updated patch to display hostcache = 1/0 instead of true/false in monitor. --- Enhance info block to display hostcache setting for each block device. Example: (qemu) info block ide0

Re: [Qemu-devel] [V4 Patch 3/4 - Updated]Qemu: Command block_set for dynamic block params change

2011-07-13 Thread Supriya Kannery
for dynamically changing any of the block device parameters. For now, dynamic setting of hostcache params using this command is implemented. Other block device parameters, can be integrated in similar lines. Signed-off-by: Supriya Kannery supri...@in.ibm.com --- block.c | 60

Re: [Qemu-devel] [V4 Patch 1/4 -Updated]Qemu: Enhance info block to display host cache setting

2011-07-05 Thread Supriya Kannery
ro=0 drv=qcow2 encrypted=0 Enhanced to display hostcache setting: (qemu) info block ide0-hd0: type=hd removable=0 hostcache=true file=../rhel6-32.qcow2 ro=0 drv=qcow2 encrypted=0 Signed-off-by: Supriya Kannery supri...@in.ibm.com --- block.c | 21 + qmp-commands.hx

Re: [Qemu-devel] [V4 Patch 3/4]Qemu: Command block_set for dynamic block params change

2011-07-05 Thread Supriya Kannery
On 07/04/2011 05:59 PM, Stefan Hajnoczi wrote: On Mon, Jul 4, 2011 at 11:43 AM, Supriya Kannery supri...@linux.vnet.ibm.com wrote: { +.name = block_set, +.args_type = device:B,name:s,enable:b, +.params = device name enable, Perhaps: .args_type

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

2011-07-05 Thread Supriya Kannery
for setting host cache usage for block data access. It is not allowed to specify both 'hostcache' and 'cache' options in the same commandline. User has to specify only one among these. Signed-off-by: Supriya Kannery supri...@in.ibm.com --- blockdev.c | 13 + qemu-config.c |4

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

2011-07-04 Thread Supriya Kannery
.qcow2 ro=0 drv=qcow2 encrypted=0 Signed-off-by: Supriya Kannery supri...@in.ibm.com --- block.c | 21 + qmp-commands.hx |2 ++ 2 files changed, 19 insertions(+), 4 deletions(-) Index: qemu/block.c

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

2011-07-04 Thread Supriya Kannery
New error classes defined for cases where device not inserted and file reopen failed. Signed-off-by: Supriya Kannery supri...@in.ibm.com --- qerror.c |8 qerror.h |6 ++ 2 files changed, 14 insertions(+) Index: qemu/qerror.c

[Qemu-devel] [V4 Patch 0/4]Qemu: Hostcache setting from cmdline and monitor

2011-07-04 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

[Qemu-devel] [V4 Patch 3/4]Qemu: Command block_set for dynamic block params change

2011-07-04 Thread Supriya Kannery
New command block_set added for dynamically changing any of the block device parameters. For now, dynamic setting of hostcache params using this command is implemented. Other block device parameters, can be integrated in similar lines. Signed-off-by: Supriya Kannery supri...@in.ibm.com

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

2011-07-04 Thread Supriya Kannery
to specify only one among these. Signed-off-by: Supriya Kannery supri...@in.ibm.com --- blockdev.c | 17 + qemu-config.c |4 qemu-options.hx |2 +- qemu.pod|5 + 4 files changed, 27 insertions(+), 1 deletion(-) Index: qemu/blockdev.c

Re: [Qemu-devel] [V3 1/3] Enhance info block to display hostcache setting

2011-06-22 Thread Supriya Kannery
On 06/20/2011 07:53 PM, Kevin Wolf wrote: Am 17.06.2011 18:37, schrieb Supriya Kannery: + int open_flags = qdict_get_int(bs_dict, open_flags); + if (open_flags BDRV_O_NOCACHE) + monitor_printf(mon, hostcache=false); + else

Re: [Qemu-devel] [V2 3/3] Command block_set for dynamic block params change

2011-06-22 Thread Supriya Kannery
On 06/20/2011 08:04 PM, Kevin Wolf wrote: Am 17.06.2011 18:38, schrieb Supriya Kannery: + if (bdrv_is_inserted(bs)) { + /* cache change applicable only if device inserted */ + return bdrv_change_hostcache(bs, enable

[Qemu-devel] [V3 1/3] Enhance info block to display hostcache setting

2011-06-17 Thread Supriya Kannery
.qcow2 ro=0 drv=qcow2 encrypted=0 Signed-off-by: Supriya Kannery supri...@in.ibm.com --- block.c | 21 + qmp-commands.hx |2 ++ 2 files changed, 19 insertions(+), 4 deletions(-) Index: qemu/block.c

[Qemu-devel] [V3 0/3]block: Dynamically change hostcache setting using new block_set command

2011-06-17 Thread Supriya Kannery
Currently host page cache setting for a block device cannot be changed without restarting a running VM. Following patchset [V3] is for enabling dynamic change of hostcache setting for block devices through qemu monitor and QMP. Code changes are based on patches from Christoph Hellwig and Prerna

[Qemu-devel] [V2 3/3] Command block_set for dynamic block params change

2011-06-17 Thread Supriya Kannery
New command block_set added for dynamically changing any of the block device parameters. For now, dynamic setting of hostcache params using this command is implemented. Other block device parameters, can be integrated in similar lines. Signed-off-by: Supriya Kannery supri...@in.ibm.com

[Qemu-devel] [V3 2/3] Error classes for file reopen and device insertion

2011-06-17 Thread Supriya Kannery
New error classes defined for cases where device not inserted and file reopen failed. Signed-off-by: Supriya Kannery supri...@in.ibm.com --- qerror.c |8 qerror.h |6 ++ 2 files changed, 14 insertions(+) Index: qemu/qerror.c

Re: [Qemu-devel] [V2 3/3] Resend Command block_set for dynamic block params change

2011-06-17 Thread Supriya Kannery
of hostcache params using block_set is implemented. Other block device parameter changes can be integrated in similar lines. Signed-off-by: Supriya Kannery supri...@in.ibm.com --- block.c | 41 + block.h |2 ++ blockdev.c | 32

Re: [Qemu-devel] [V2 2/2]Qemu: Add commands hostcache_set and hostcache_get

2011-05-23 Thread Supriya Kannery
On 05/20/2011 01:50 PM, Stefan Hajnoczi wrote: On Thu, May 19, 2011 at 10:38:03PM +0530, Supriya Kannery wrote: Monitor commands hostcache_set and hostcache_get added for dynamic host cache change and display of host cache setting respectively. A generic command for changing block device

[Qemu-devel] [V2 0/2]Qemu: Enable dynamic hostcache change through monitor

2011-05-19 Thread Supriya Kannery
 Currently host page cache setting for a block device cannot be changed without restarting a running VM. Following patchset [V2] is for enabling dynamic change of host cache setting for devices through qemu monitor. Changes from patchset V1: 1. Support of dynamic cache change only for

[Qemu-devel] [V2 2/2]Qemu: Add commands hostcache_set and hostcache_get

2011-05-19 Thread Supriya Kannery
Monitor commands hostcache_set and hostcache_get added for dynamic host cache change and display of host cache setting respectively. Signed-off-by: Supriya Kannery supri...@in.ibm.com --- block.c | 48 block.h |2

[Qemu-devel] [V2 1/2]Qemu: New error classes for file reopen and device insertion

2011-05-19 Thread Supriya Kannery
New errors defined for device insertion and file reopen Signed-off-by: Supriya Kannery supri...@in.ibm.com --- qerror.c |8 qerror.h |6 ++ 2 files changed, 14 insertions(+) Index: qemu/qerror.c

Re: [Qemu-devel] [RFC Patch 0/3]Qemu: Enable dynamic cache change through qemu monitor

2011-05-19 Thread Supriya Kannery
On 05/17/2011 09:11 PM, Christoph Hellwig wrote: On Mon, May 16, 2011 at 04:10:21PM -0500, Anthony Liguori wrote: To further clarify: Today cache=none|writethrough|writeback does two things. It: 1) Changes the WCE flag that's visible to the guest 2) Determines whether the host page cache is

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

2011-05-17 Thread supriya kannery
Kevin Wolf wrote: Am 16.05.2011 20:10, schrieb Supriya Kannery: Enhance info block to display cache setting Example: (qemu) info block ide0-hd0: type=hd removable=0 file=../rhel6-32.qcow2 ro=0 drv=qcow2 encrypted=0 Enhanced to include cache setting: (qemu) info block ide0-hd0: type=hd

Re: [Qemu-devel] [RFC Patch 0/3]Qemu: Enable dynamic cache change through qemu monitor

2011-05-17 Thread supriya kannery
Christoph Hellwig wrote: Why are you even trying this again? Enabling control of cache setting from qemu monitor will help users/admins to accomplish cache value change without depending on the guest. As explained very clearly last time you can't change from a writeback-style to a

Re: [Qemu-devel] [RFC Patch 0/3]Qemu: Enable dynamic cache change through qemu monitor

2011-05-17 Thread supriya kannery
Anthony Liguori wrote: On 05/16/2011 03:23 PM, Christoph Hellwig wrote: Why are you even trying this again? As explained very clearly last time you can't change from a writeback-style to a write-through style I/O from the monitor without creating massive data integrity problems. To further

[Qemu-devel] [RFC Patch 0/3]Qemu: Enable dynamic cache change through qemu monitor

2011-05-16 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. Monitor

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

2011-05-16 Thread Supriya Kannery
Signed-off-by: Supriya Kannery supri...@in.ibm.com Signed-off-by: Prerna Saxena pre...@linux.vnet.ibm.com --- block.c | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) Index: qemu/block.c === --- qemu.orig

[Qemu-devel] [RFC Patch 2/3]Qemu: New error classes for file reopen and device insertion

2011-05-16 Thread Supriya Kannery
New errors defined for device insertion and file reopen Signed-off-by: Supriya Kannery supri...@in.ibm.com --- qerror.c |8 qerror.h |6 ++ 2 files changed, 14 insertions(+) Index: qemu/qerror.c

[Qemu-devel] [RFC Patch 3/3]Qemu: Add command cache_set for dynamic cache change

2011-05-16 Thread Supriya Kannery
Add monitor command cache_set for dynamic cache change Signed-off-by: Christoph Hellwig h...@lst.de Signed-off-by: Supriya Kannery supri...@in.ibm.com --- block.c | 53 + block.h |2 ++ blockdev.c | 20

<    1   2