Received: from eggs.gnu.org ([208.118.235.92]:42565) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYCgo-0002MN-Ne for qemu-devel@nongnu.org; Fri, 03 May 2013 05:54:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UYCgn-00065t-FL for qemu-devel@nongnu.org; Fri, 03 May 2013 05:54:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:62751) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UYCgn-00062M-7m for qemu-devel@nongnu.org; Fri, 03 May 2013 05:54:05 -0400 Date: Fri, 3 May 2013 11:53:59 +0200 From: Kevin Wolf Message-ID: <20130503095358.GC3171@dhcp-200-207.str.redhat.com> References: <8b6851c3a59103d7dd55ae400be90e6d7431ab0b.1366817130.git.phrdina@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8b6851c3a59103d7dd55ae400be90e6d7431ab0b.1366817130.git.phrdina@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2 02/12] block: update error reporting for bdrv_snapshot_delete() and related functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pavel Hrdina Cc: xiawenc@linux.vnet.ibm.com, lcapitulino@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com Am 24.04.2013 um 17:32 hat Pavel Hrdina geschrieben: > @@ -2528,15 +2530,13 @@ void do_delvm(Monitor *mon, const QDict *qdict) > bs1 = NULL; > while ((bs1 = bdrv_next(bs1))) { > if (bdrv_can_snapshot(bs1)) { > - ret = bdrv_snapshot_delete(bs1, name); > - if (ret < 0) { > - if (ret == -ENOTSUP) > - monitor_printf(mon, > - "Snapshots not supported on device '%s'\n", > - bdrv_get_device_name(bs1)); > - else > - monitor_printf(mon, "Error %d while deleting snapshot on " > - "'%s'\n", ret, bdrv_get_device_name(bs1)); > + bdrv_snapshot_delete(bs1, name, &local_err); > + if (error_is_set(&local_err)) { > + qerror_report(ERROR_CLASS_GENERIC_ERROR, "Failed to delete " > + "old snapshot on device '%s': %s", Here in do_delvm() it doesn't make sense to talk about an "old" snapshot. Probably some unchanged copy & paste from above? > + bdrv_get_device_name(bs), > + error_get_pretty(local_err)); > + error_free(local_err); > } > } > } Kevin