From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32877) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VswjH-0001ul-4W for qemu-devel@nongnu.org; Tue, 17 Dec 2013 10:38:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VswjC-0005Jr-2f for qemu-devel@nongnu.org; Tue, 17 Dec 2013 10:38:39 -0500 Received: from mx1.redhat.com ([209.132.183.28]:3305) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VswjB-0005Jh-RB for qemu-devel@nongnu.org; Tue, 17 Dec 2013 10:38:34 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rBHFcWhR031046 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 17 Dec 2013 10:38:33 -0500 Date: Tue, 17 Dec 2013 10:38:30 -0500 From: Jeff Cody Message-ID: <20131217153830.GC4333@localhost.localdomain> References: <184d3b68e1da2f5b0dd80e06416836286e3f840f.1387276279.git.jcody@redhat.com> <52B05819.8040708@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52B05819.8040708@redhat.com> Subject: Re: [Qemu-devel] [qemu-kvm PATCH] block: vhdx - improve error message, and .bdrv_check implementation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com On Tue, Dec 17, 2013 at 06:56:41AM -0700, Eric Blake wrote: > On 12/17/2013 03:33 AM, Jeff Cody wrote: > > If there is a dirty log file to be replayed in a VHDX image, it is > > replayed in .vhdx_open(). However, if the file is opened read-only, > > then a somewhat cryptic error message results. > > > > This adds a more helpful error message for the user. If an image file > > contains a log to be replayed, and is opened read-only, the user is > > instructed to run 'qemu-img check -r all' on the image file. > > > > Running qemu-img check -r all will cause the image file to be opened > > r/w, which will replay the log file. If a log file replay is detected, > > this is flagged, and bdrv_check will increase the corruptions_fixed > > count for the image. > > > + error_setg_errno(errp, EPERM, > > + "VHDX image file '%s' opened read-only, but " > > + "contains a log that needs replayed. To replay " > > s/replayed/replaying/ > How about "to be replayed" instead? "Replaying", while correct, just sounds a bit off to me. > > + "the log, execute:\n qemu-img check -r all '%s'", > > + bs->filename, bs->filename); > > + goto exit; > > -- > Eric Blake eblake redhat com +1-919-301-3266 > Libvirt virtualization library http://libvirt.org >