From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:33529) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOX7q-0005y6-LD for qemu-devel@nongnu.org; Mon, 23 May 2011 11:32:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QOX7p-0003NK-HU for qemu-devel@nongnu.org; Mon, 23 May 2011 11:32:58 -0400 Received: from mail-yi0-f45.google.com ([209.85.218.45]:49535) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QOX7p-0003ND-El for qemu-devel@nongnu.org; Mon, 23 May 2011 11:32:57 -0400 Received: by yib19 with SMTP id 19so2519370yib.4 for ; Mon, 23 May 2011 08:32:56 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <4DDA59F6.5040208@redhat.com> References: <20110519170730.29027.44430.sendpatchset@skannery> <20110519170803.29027.15255.sendpatchset@skannery> <20110520082033.GA6003@stefanha-thinkpad.localdomain> <4DDA0709.4080601@in.ibm.com> <4DDA59F6.5040208@redhat.com> Date: Mon, 23 May 2011 16:32:56 +0100 Message-ID: From: Stefan Hajnoczi Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: Supriya Kannery Cc: Kevin Wolf , Supriya Kannery , Markus Armbruster , qemu-devel@nongnu.org, Luiz Capitulino , Christoph Hellwig On Mon, May 23, 2011 at 1:58 PM, Kevin Wolf wrote: > Am 23.05.2011 12:00, schrieb Stefan Hajnoczi: >> On Mon, May 23, 2011 at 8:04 AM, Supriya Kannery w= rote: >>> 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 dynami= c >>>>> 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 the= m >>>> at runtime. >>>> >>>> The alternative would be: >>>> >>>> block_set hostcache on >>>> >>>> "block_set", {"device": "ide1-cd0", "name": "hostcache", "enable": tru= e} >>>> >>>> The hostcache_get information would be part of query-block output: >>>> =A0 =A0 =A0 =A0 =A0{ >>>> =A0 =A0 =A0 =A0 =A0 =A0 "device":"ide0-hd0", >>>> =A0 =A0 =A0 =A0 =A0 =A0 "locked":false, >>>> =A0 =A0 =A0 =A0 =A0 =A0 "removable":false, >>>> =A0 =A0 =A0 =A0 =A0 =A0 "inserted":{ >>>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"ro":false, >>>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"drv":"qcow2", >>>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"encrypted":false, >>>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"file":"disks/test.img" >>>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 "hostcache":true, >>>> =A0 =A0 =A0 =A0 =A0 =A0 }, >>>> =A0 =A0 =A0 =A0 =A0 =A0 "type":"hd" >>>> =A0 =A0 =A0 =A0 =A0}, >>>> >>>> This approach is extensible if more options need to be exposed. >>> >>> Sure, I will resubmit this patchset, after making this feature more gen= eric. >>> Can you pls help finding atleast one or two options (other than hostcac= he) >>> which can be changed dynamically. This will help me evaluate the generi= c >>> approach. >> >> Hang on, let's see if we can get agreement from Kevin and others >> before taking this approach. =A0Like 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=3D... 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. Supriya, it sounds to me like the generic block_set command and query-block integration is an acceptable approach. Stefan