[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 27/27] commit: Don't use error_abort in commit_start
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 27/27] commit: Don't use error_abort in commit_start |
Date: |
Tue, 7 Mar 2017 16:40:51 +0100 |
From: Fam Zheng <address@hidden>
bdrv_set_backing_hd failure needn't be abort. Since we already have
error parameter, use it.
Signed-off-by: Fam Zheng <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/commit.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/block/commit.c b/block/commit.c
index e57c1cf..9c41988 100644
--- a/block/commit.c
+++ b/block/commit.c
@@ -316,8 +316,20 @@ void commit_start(const char *job_id, BlockDriverState *bs,
goto fail;
}
- bdrv_set_backing_hd(commit_top_bs, top, &error_abort);
- bdrv_set_backing_hd(overlay_bs, commit_top_bs, &error_abort);
+ bdrv_set_backing_hd(commit_top_bs, top, &local_err);
+ if (local_err) {
+ bdrv_unref(commit_top_bs);
+ commit_top_bs = NULL;
+ error_propagate(errp, local_err);
+ goto fail;
+ }
+ bdrv_set_backing_hd(overlay_bs, commit_top_bs, &local_err);
+ if (local_err) {
+ bdrv_unref(commit_top_bs);
+ commit_top_bs = NULL;
+ error_propagate(errp, local_err);
+ goto fail;
+ }
s->commit_top_bs = commit_top_bs;
bdrv_unref(commit_top_bs);
--
1.8.3.1
- [Qemu-block] [PULL 16/27] sheepdog: Don't truncate long VDI name in _open(), _create(), (continued)
- [Qemu-block] [PULL 16/27] sheepdog: Don't truncate long VDI name in _open(), _create(), Kevin Wolf, 2017/03/07
- [Qemu-block] [PULL 19/27] sheepdog: Implement bdrv_parse_filename(), Kevin Wolf, 2017/03/07
- [Qemu-block] [PULL 17/27] sheepdog: Report errors in pseudo-filename more usefully, Kevin Wolf, 2017/03/07
- [Qemu-block] [PULL 18/27] sheepdog: Use SocketAddress and socket_connect(), Kevin Wolf, 2017/03/07
- [Qemu-block] [PULL 20/27] gluster: Drop assumptions on SocketTransport names, Kevin Wolf, 2017/03/07
- [Qemu-block] [PULL 21/27] gluster: Don't duplicate qapi-util.c's qapi_enum_parse(), Kevin Wolf, 2017/03/07
- [Qemu-block] [PULL 22/27] gluster: Plug memory leaks in qemu_gluster_parse_json(), Kevin Wolf, 2017/03/07
- [Qemu-block] [PULL 25/27] sheepdog: Support blockdev-add, Kevin Wolf, 2017/03/07
- [Qemu-block] [PULL 24/27] qapi-schema: Rename SocketAddressFlat's variant tcp to inet, Kevin Wolf, 2017/03/07
- [Qemu-block] [PULL 23/27] qapi-schema: Rename GlusterServer to SocketAddressFlat, Kevin Wolf, 2017/03/07
- [Qemu-block] [PULL 27/27] commit: Don't use error_abort in commit_start,
Kevin Wolf <=
- [Qemu-block] [PULL 26/27] block: Don't use error_abort in blk_new_open, Kevin Wolf, 2017/03/07
- Re: [Qemu-block] [Qemu-devel] [PULL 00/27] Block layer fixes for 2.9.0-rc0, Peter Maydell, 2017/03/08