From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35840) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aBQIc-0001V8-Gm for qemu-devel@nongnu.org; Tue, 22 Dec 2015 12:00:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aBQIX-0002xo-9m for qemu-devel@nongnu.org; Tue, 22 Dec 2015 12:00:34 -0500 Date: Tue, 22 Dec 2015 18:00:19 +0100 From: Kevin Wolf Message-ID: <20151222170018.GA21482@noname.redhat.com> References: <1450802786-20893-1-git-send-email-kwolf@redhat.com> <1450802786-20893-7-git-send-email-kwolf@redhat.com> <20151222165730.GI10082@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151222165730.GI10082@redhat.com> Subject: Re: [Qemu-devel] [PATCH 06/10] qemu-img: Prepare for locked images List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org, mreitz@redhat.com Am 22.12.2015 um 17:57 hat Daniel P. Berrange geschrieben: > On Tue, Dec 22, 2015 at 05:46:22PM +0100, Kevin Wolf wrote: > > This patch extends qemu-img for working with locked images. It prints a > > helpful error message when trying to access a locked image read-write, > > and adds a 'qemu-img force-unlock' command as well as a 'qemu-img check > > -r all --force' option in order to override a lock left behind after a > > qemu crash. > > > > Signed-off-by: Kevin Wolf > > > > diff --git a/qemu-img-cmds.hx b/qemu-img-cmds.hx > > index 9567774..dd4aebc 100644 > > --- a/qemu-img-cmds.hx > > +++ b/qemu-img-cmds.hx > > @@ -10,9 +10,9 @@ STEXI > > ETEXI > > > > DEF("check", img_check, > > - "check [-q] [-f fmt] [--output=ofmt] [-r [leaks | all]] [-T src_cache] filename") > > + "check [-q] [-f fmt] [--force] [--output=ofmt] [-r [leaks | all]] [-T src_cache] filename") > > STEXI > > -@item check [-q] [-f @var{fmt}] [--output=@var{ofmt}] [-r [leaks | all]] [-T @var{src_cache}] @var{filename} > > +@item check [-q] [-f @var{fmt}] [--force] [--output=@var{ofmt}] [-r [leaks | all]] [-T @var{src_cache}] @var{filename} > > ETEXI > > FWIW, my patch to add a new --source arg to qemu-img commands > means you wouldn't need to keep inventing new command line arguments > for each new block driver option you want to support usage of in > qemu-img - they'll all be accessible: > > https://lists.gnu.org/archive/html/qemu-devel/2015-12/msg04021.html Good point. I think I'd keep 'check --force' anyway because it's kind of intuitive. Your series will be a good solution for all other qemu-img commands, though, so I'll refrain from adding specific options there. Kevin