From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:44627) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qm29G-0003T8-Qd for qemu-devel@nongnu.org; Wed, 27 Jul 2011 07:19:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qm29F-00082t-9r for qemu-devel@nongnu.org; Wed, 27 Jul 2011 07:19:34 -0400 Received: from e2.ny.us.ibm.com ([32.97.182.142]:49350) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qm29F-00082p-7G for qemu-devel@nongnu.org; Wed, 27 Jul 2011 07:19:33 -0400 Received: from d01relay05.pok.ibm.com (d01relay05.pok.ibm.com [9.56.227.237]) by e2.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id p6RAwEmt029685 for ; Wed, 27 Jul 2011 06:58:14 -0400 Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay05.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p6RBIEBX167846 for ; Wed, 27 Jul 2011 07:18:16 -0400 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p6RBIDEW007004 for ; Wed, 27 Jul 2011 08:18:14 -0300 From: Supriya Kannery Date: Wed, 27 Jul 2011 17:00:00 +0530 Message-Id: <20110727113000.25109.16204.sendpatchset@skannery> Subject: [Qemu-devel] [V5 Patch 0/4]Qemu: Set host cache from cmdline and monitor List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Hajnoczi , Christoph Hellwig , 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 patchset introduces monitor command 'block_set' using which various parameters for block devices can be changed dynamically. Dynamic changing of host cache setting is implemented for now. This patchset also introduces 'hostcache', a new option for setting host cache from qemu command line. 'Hostcache and 'cache' options cannot be used simultaneously from commandline. Changes from patchset V4: 1. Defined a new qerror class for incorrect command syntax. 2. Changed some of the error_report() calls to qerror_report() calls New block command added: "block_set" -- Sets block device parameters while guest is running. Usage: block_set = block device = parameter (say, "hostcache") = on/off New 'hostcache' option added to -drive: -drive [file=file][,if=type][,bus=n][,unit=m][,media=d][,index=i]\n" .... " [,readonly=on|off][,hostcache=on|off]\n" 1/4 Enhance "info block" to display hostcache setting 2/4 New qerrors for file reopen, data sync and command syntax 3/4 Command "block_set" for dynamic params change for block device 4/4 'hostcache' option added to -drive in qemu commandline qemu/block.c | 75 +++++++++++++++++++++++++++++++++++++++++++++ qemu/block.h | 2 + qemu/blockdev.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++ qemu/blockdev.h | 1 qemu/hmp-commands.hx | 14 +++++++++++ qemu/qemu-config.c | 17 ++++++++++ qemu/qemu-option.c | 25 ++++++++++++++++++++ qemu/qemu-option.h | 2 + qemu/qemu-options.hx | 2 - qemu/qerror.c | 12 ++++++++++ qemu/qerror.h | 8 ++++++ qemu/qmp-commands.hx | 30 +++++++++++++++++++++++ 12 files changed, 257 insertions(+), 2 deletions(-) ~