From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57656) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SvNSP-0008BA-4J for qemu-devel@nongnu.org; Sun, 29 Jul 2012 02:58:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SvNSO-0007l1-4c for qemu-devel@nongnu.org; Sun, 29 Jul 2012 02:58:29 -0400 Received: from e23smtp02.au.ibm.com ([202.81.31.144]:52055) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SvNSN-0007kv-IM for qemu-devel@nongnu.org; Sun, 29 Jul 2012 02:58:28 -0400 Received: from /spool/local by e23smtp02.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sun, 29 Jul 2012 16:58:02 +1000 Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139]) by d23relay04.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q6T6o31h10223742 for ; Sun, 29 Jul 2012 16:50:04 +1000 Received: from d23av04.au.ibm.com (loopback [127.0.0.1]) by d23av04.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q6T6wGr7017126 for ; Sun, 29 Jul 2012 16:58:16 +1000 Received: from skannery.in.ibm.com ([9.79.211.146]) by d23av04.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q6T6wFxI017106 for ; Sun, 29 Jul 2012 16:58:16 +1000 Message-ID: <5014DF07.4070403@linux.vnet.ibm.com> Date: Sun, 29 Jul 2012 12:28:15 +0530 From: Supriya Kannery MIME-Version: 1.0 References: <20120615204648.9853.1225.sendpatchset@skannery.in.ibm.com> <20120615204716.9853.24941.sendpatchset@skannery.in.ibm.com> <4FFAEEF5.7000305@redhat.com> In-Reply-To: <4FFAEEF5.7000305@redhat.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [v1 Patch 2/10]Qemu: Error classes for hostcache setting and data sync failures Reply-To: supriyak@linux.vnet.ibm.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On 07/09/2012 08:17 PM, Kevin Wolf wrote: > Am 15.06.2012 22:47, schrieb Supriya Kannery: >> New error classes defined for hostcache setting and data >> sync error >> >> Signed-off-by: Supriya Kannery >> >> --- >> qerror.c | 8 ++++++++ >> qerror.h | 6 ++++++ >> 2 files changed, 14 insertions(+) >> >> Index: qemu/qerror.c >> =================================================================== >> --- qemu.orig/qerror.c >> +++ qemu/qerror.c >> @@ -80,6 +80,10 @@ static const QErrorStringTable qerror_ta >> .desc = "The command %(name) has not been found", >> }, >> { >> + .error_fmt = QERR_DATA_SYNC_FAILED, >> + .desc = "Syncing of data failed for device '%(device)'", >> + }, >> + { >> .error_fmt = QERR_DEVICE_ENCRYPTED, >> .desc = "Device '%(device)' is encrypted", >> }, >> @@ -152,6 +156,10 @@ static const QErrorStringTable qerror_ta >> .desc = "The feature '%(name)' is not enabled", >> }, >> { >> + .error_fmt = QERR_HOSTCACHE_NOT_CHANGED, >> + .desc = "Could not change hostcache setting for '%(device)'", >> + }, >> + { >> .error_fmt = QERR_INVALID_BLOCK_FORMAT, >> .desc = "Invalid block format '%(name)'", >> }, >> Index: qemu/qerror.h >> =================================================================== >> --- qemu.orig/qerror.h >> +++ qemu/qerror.h >> @@ -82,6 +82,9 @@ QError *qobject_to_qerror(const QObject >> #define QERR_COMMAND_NOT_FOUND \ >> "{ 'class': 'CommandNotFound', 'data': { 'name': %s } }" >> >> +#define QERR_DATA_SYNC_FAILED \ >> + "{ 'class': 'DataSyncFailed', 'data': { 'device': %s } }" >> + >> #define QERR_DEVICE_ENCRYPTED \ >> "{ 'class': 'DeviceEncrypted', 'data': { 'device': %s, 'filename': %s } }" >> >> @@ -136,6 +139,9 @@ QError *qobject_to_qerror(const QObject >> #define QERR_FEATURE_DISABLED \ >> "{ 'class': 'FeatureDisabled', 'data': { 'name': %s } }" >> >> +#define QERR_HOSTCACHE_NOT_CHANGED \ >> + "{ 'class': 'HostcacheNotChanged', 'data': { 'device': %s } }" >> + >> #define QERR_INVALID_BLOCK_FORMAT \ >> "{ 'class': 'InvalidBlockFormat', 'data': { 'name': %s } }" > > In the light of the recent error handling discussion: Do we really need > two separate errors? Can we just reuse an existing one? Just > QERR_IO_ERROR could be good enough. > > Kevin > Yes, will use QERR_IO_ERROR instead of these two new errors. -thanks, Supriya