[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 05/18] xen: add xenstore watcher infrastructu
From: |
Anthony PERARD |
Subject: |
Re: [Qemu-devel] [PATCH v2 05/18] xen: add xenstore watcher infrastructure |
Date: |
Fri, 7 Dec 2018 15:57:45 +0000 |
User-agent: |
Mutt/1.11.1 (2018-12-01) |
On Thu, Dec 06, 2018 at 03:08:31PM +0000, Paul Durrant wrote:
> @@ -36,6 +54,12 @@ static void xen_block_unrealize(XenDevice *xendev, Error
> **errp)
>
> trace_xen_block_unrealize(type, vdev->disk, vdev->partition);
>
> + /* Disconnect from the frontend in case this has not already happened */
> + xen_block_disconnect(xendev, &local_err);
> + if (local_err) {
> + error_propagate(errp, local_err);
If xen_block_disconnect fails, local_err is going to be reuse below. If
it's fine to try unrealize, then `local_err=NULL` is probably enough.
> + }
> +
> if (blockdev_class->unrealize) {
> blockdev_class->unrealize(blockdev, &local_err);
> if (local_err) {
[...]
> +static void xen_bus_remove_watch(XenBus *xenbus, XenWatch *watch,
> + Error **errp)
> +{
> + Error *local_err = NULL;
> +
> + trace_xen_bus_remove_watch(watch->node, watch->key, watch->token);
> +
> + xs_node_unwatch(xenbus->xsh, watch->node, watch->key, watch->token,
> + &local_err);
You could simply pass `errp' directly instead of having `local_err'.
> +
> + notifier_remove(&watch->notifier);
> + free_watch(watch);
> +
> + if (local_err) {
> + error_propagate(errp, local_err);
> + }
> +}
> +
--
Anthony PERARD
- [Qemu-devel] [PATCH v2 00/18] Xen PV backend 'qdevification', Paul Durrant, 2018/12/06
- [Qemu-devel] [PATCH v2 01/18] xen: re-name XenDevice to XenLegacyDevice..., Paul Durrant, 2018/12/06
- [Qemu-devel] [PATCH v2 02/18] xen: introduce new 'XenBus' and 'XenDevice' object hierarchy, Paul Durrant, 2018/12/06
- [Qemu-devel] [PATCH v2 08/18] xen: duplicate xen_disk.c as basis of dataplane/xen-block.c, Paul Durrant, 2018/12/06
- [Qemu-devel] [PATCH v2 05/18] xen: add xenstore watcher infrastructure, Paul Durrant, 2018/12/06
- Re: [Qemu-devel] [PATCH v2 05/18] xen: add xenstore watcher infrastructure,
Anthony PERARD <=
- [Qemu-devel] [PATCH v2 04/18] xen: create xenstore areas for XenDevice-s, Paul Durrant, 2018/12/06
- [Qemu-devel] [PATCH v2 09/18] xen: remove unnecessary code from dataplane/xen-block.c, Paul Durrant, 2018/12/06
- [Qemu-devel] [PATCH v2 07/18] xen: add event channel interface for XenDevice-s, Paul Durrant, 2018/12/06
- [Qemu-devel] [PATCH v2 06/18] xen: add grant table interface for XenDevice-s, Paul Durrant, 2018/12/06
- [Qemu-devel] [PATCH v2 03/18] xen: introduce 'xen-block', 'xen-disk' and 'xen-cdrom', Paul Durrant, 2018/12/06