[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] block: Fix block-set-write-threshold not to use
Re: [Qemu-devel] [PATCH] block: Fix block-set-write-threshold not to use funky error class
Fri, 13 Mar 2015 13:11:54 -0600
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0
On 03/13/2015 11:51 AM, Markus Armbruster wrote:
> Error classes are a leftover from the days of "rich" error objects.
> New code should always use ERROR_CLASS_GENERIC_ERROR.
More precisely, new code should use ERROR_CLASS_GENERIC_ERROR unless
there is a good reason where a caller knowing a different error class is
likely to react differently as a result (for example, with
'drive-mirror', libvirt DOES rely on QERR_DEVICE_NOT_FOUND as a witness
that the command supports an optional 'top' argument, vs.
ERROR_CLASS_GENERIC_ERROR to state that 'top' was still mandatory).
But I agree that this situation is one unlikely to be where libvirt
cares what error class was used.
> Commit e246211
> added a use of ERROR_CLASS_DEVICE_NOT_FOUND. Replace it.
> Signed-off-by: Markus Armbruster <address@hidden>
> block/write-threshold.c | 2 +-
> qapi/block-core.json | 4 ----
> 2 files changed, 1 insertion(+), 5 deletions(-)
Reviewed-by: Eric Blake <address@hidden>
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
Description: OpenPGP digital signature