[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 04/11] block: Support streaming to an intermedia
From: |
Alberto Garcia |
Subject: |
Re: [Qemu-devel] [PATCH 04/11] block: Support streaming to an intermediate layer |
Date: |
Fri, 15 May 2015 11:04:13 +0200 |
User-agent: |
Notmuch/0.13.2 (http://notmuchmail.org) Emacs/23.2.1 (i486-pc-linux-gnu) |
On Fri 15 May 2015 04:33:19 AM CEST, Fam Zheng wrote:
>> + /* Make sure that the image is opened in read-write mode */
>> + orig_bs_flags = bdrv_get_flags(bs);
>> + if (!(orig_bs_flags & BDRV_O_RDWR)) {
>> + if (bdrv_reopen(bs, orig_bs_flags | BDRV_O_RDWR, errp) != 0) {
>
> I don't think all bdrv_reopen implementation will guarantee to set errp
> on error :(. For example:
>
> static int qcow2_reopen_prepare(BDRVReopenState *state,
> BlockReopenQueue *queue, Error **errp)
> {
bdrv_reopen_prepare() already sets a generic error if the implementation
(qcow2_reopen_prepare() in this case) doesn't provide one:
ret = drv->bdrv_reopen_prepare(reopen_state, queue, &local_err);
if (ret) {
if (local_err != NULL) {
error_propagate(errp, local_err);
} else {
error_setg(errp, "failed while preparing to reopen image '%s'",
reopen_state->bs->filename);
}
goto error;
}
Berto
- [Qemu-devel] [PATCH 08/11] qemu-iotests: add no-op streaming test, (continued)
- [Qemu-devel] [PATCH 08/11] qemu-iotests: add no-op streaming test, Alberto Garcia, 2015/05/13
- [Qemu-devel] [PATCH 01/11] block: keep a list of block jobs, Alberto Garcia, 2015/05/13
- [Qemu-devel] [PATCH 05/11] block: Add QMP support for streaming to an intermediate layer, Alberto Garcia, 2015/05/13
- [Qemu-devel] [PATCH 07/11] qemu-iotests: fix test_stream_partial(), Alberto Garcia, 2015/05/13
- [Qemu-devel] [PATCH 04/11] block: Support streaming to an intermediate layer, Alberto Garcia, 2015/05/13
- [Qemu-devel] [PATCH 06/11] docs: Document how to stream to an intermediate layer, Alberto Garcia, 2015/05/13
- [Qemu-devel] [PATCH 11/11] qemu-iotests: test overlapping block-stream operations, Alberto Garcia, 2015/05/13
[Qemu-devel] [PATCH 02/11] block: allow block jobs in any arbitrary node, Alberto Garcia, 2015/05/13
[Qemu-devel] [PATCH 10/11] qemu-iotests: test block-stream operations in parallel, Alberto Garcia, 2015/05/13