From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54623) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WORPc-0004jO-P1 for qemu-devel@nongnu.org; Fri, 14 Mar 2014 08:40:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WORPW-0003mK-OI for qemu-devel@nongnu.org; Fri, 14 Mar 2014 08:40:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47848) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WORPW-0003mC-Eo for qemu-devel@nongnu.org; Fri, 14 Mar 2014 08:40:26 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s2ECeOq4031516 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 14 Mar 2014 08:40:25 -0400 Date: Fri, 14 Mar 2014 08:40:09 -0400 From: Jeff Cody Message-ID: <20140314124009.GA9540@localhost.localdomain> References: <2fb3ea05d2e1ee06d578a0f2c53f56df1661401c.1389726691.git.jcody@redhat.com> <20140124133319.GH3342@dhcp-200-207.str.redhat.com> <20140124134857.GG13722@localhost.localdomain> <20140312111604.GD2662@dhcp-200-207.str.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140312111604.GD2662@dhcp-200-207.str.redhat.com> Subject: Re: [Qemu-devel] [PATCH] block: do not allow read-only=on and snapshot=on to be used together List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: pbonzini@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com On Wed, Mar 12, 2014 at 12:16:04PM +0100, Kevin Wolf wrote: > Am 24.01.2014 um 14:48 hat Jeff Cody geschrieben: > > On Fri, Jan 24, 2014 at 02:33:19PM +0100, Kevin Wolf wrote: > > > Am 14.01.2014 um 20:12 hat Jeff Cody geschrieben: > > > > Having both read-only=on and snapshot=on together does not make sense; > > > > currently, the read-only argument is effectively ignored for the > > > > temporary snapshot. To prevent confusion, disallow the usage of both > > > > 'snapshot=on' and 'read-only=on'. > > > > > > > > Signed-off-by: Jeff Cody > > > > > > This breaks in a surprising way: > > > > > > $ softmmu/qemu-system-x86_64 -drive file=~/images/hd.img,snapshot=on > > > ... works fine ... > > > > > > $ qemu-system-x86_64 -drive file=~/images/hd.img -snapshot > > > qemu-system-x86_64: invalid option combination: read-only and snapshot > > > > > > qemu-iotests case 051 catches this. I'll have to remove this patch and > > > the follow-up from the queue for now. > > > > > > > Odd - OK, I'll follow up on this and submit a series with both patches > > (well, likely squashed together), and whatever is needed to fix this > > as well. > > Jeff, what happened with this? I found the two patches in an old git > branch and wondered why they didn't disappear in the rebase. But > apparently we still allow read-only and snapshot at the same time. > The test case 051 failed because when -snapshot was specified, it was enabled for all the default drives as well, which included default_cdrom. The solutions for that seemed a little hacky, and I wasn't sure it was actually worth it, given that this is probably not a real problem to begin with. If you think it is worth it, I can resurrect the patch and make sure it works with both snapshot=on and -snapshot.