From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:39428) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOUfx-0005p0-Cr for qemu-devel@nongnu.org; Mon, 23 May 2011 08:56:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QOUfw-0005sV-5k for qemu-devel@nongnu.org; Mon, 23 May 2011 08:56:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56792) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOUfv-0005sP-Ss for qemu-devel@nongnu.org; Mon, 23 May 2011 08:56:00 -0400 Message-ID: <4DDA59F6.5040208@redhat.com> Date: Mon, 23 May 2011 14:58:30 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <20110519170730.29027.44430.sendpatchset@skannery> <20110519170803.29027.15255.sendpatchset@skannery> <20110520082033.GA6003@stefanha-thinkpad.localdomain> <4DDA0709.4080601@in.ibm.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [V2 2/2]Qemu: Add commands "hostcache_set" and "hostcache_get" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Supriya Kannery , Markus Armbruster , qemu-devel@nongnu.org, Luiz Capitulino , Supriya Kannery , Christoph Hellwig Am 23.05.2011 12:00, schrieb Stefan Hajnoczi: > On Mon, May 23, 2011 at 8:04 AM, Supriya Kannery wrote: >> 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 options would be nice, >>> althought I don't see other options where it makes sense to change them >>> at runtime. >>> >>> The alternative would be: >>> >>> block_set hostcache on >>> >>> "block_set", {"device": "ide1-cd0", "name": "hostcache", "enable": true} >>> >>> The hostcache_get information would be part of query-block output: >>> { >>> "device":"ide0-hd0", >>> "locked":false, >>> "removable":false, >>> "inserted":{ >>> "ro":false, >>> "drv":"qcow2", >>> "encrypted":false, >>> "file":"disks/test.img" >>> "hostcache":true, >>> }, >>> "type":"hd" >>> }, >>> >>> This approach is extensible if more options need to be exposed. >> >> Sure, I will resubmit this patchset, after making this feature more generic. >> Can you pls help finding atleast one or two options (other than hostcache) >> which can be changed dynamically. This will help me evaluate the generic >> approach. > > Hang on, let's see if we can get agreement from Kevin and others > before taking this approach. Like I said, I don't see other options > that should be changed at runtime. Things like enabling copy on read could fit here. Generally I'm in favour of having a generic command. We just need to pay attention not to include things that we don't want to maintain long term, i.e. just putting the current cache=... parameter into the argument isn't going to work. Maybe two booleans 'o_direct' and 'ignore_flushes' is what we want to have. The same structure should be used for blkdev_add then, even though it will allow some more options. I'm also not completely sure how you would enable cache=writethrough from the command line in a fully converted world. Would this be one of the arguments that must be specified on BlockDriverState creation and can't be changed later, and the device will pick it up from there? Or is it a qdev property and somehow makes it way to the block layer? Kevin