[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL 08/17] block: Assert no write requests under BDRV
From: |
Laurent Vivier |
Subject: |
Re: [Qemu-devel] [PULL 08/17] block: Assert no write requests under BDRV_O_INCOMING |
Date: |
Thu, 18 Feb 2016 17:03:06 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 |
Hi,
this commit breaks incoming migration case:
qemu-system-ppc64 XXX -incoming tcp:0:4444
qemu-system-ppc64: .../qemu/block/io.c:1304: bdrv_co_do_pwritev:
Assertion `!(bs->open_flags & 0x0800)' failed.
Without "-incoming", the same command line boots fine.
Are you aware of the problem?
Laurent
On 20/01/2016 17:24, Kevin Wolf wrote:
> As long as BDRV_O_INCOMING is set, the image file is only opened so we
> have a file descriptor for it. We're definitely not supposed to modify
> the image, it's still owned by the migration source.
>
> Signed-off-by: Kevin Wolf <address@hidden>
> Reviewed-by: Eric Blake <address@hidden>
> ---
> block/io.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/block/io.c b/block/io.c
> index 707c04b..2372994 100644
> --- a/block/io.c
> +++ b/block/io.c
> @@ -1301,6 +1301,7 @@ static int coroutine_fn
> bdrv_co_do_pwritev(BlockDriverState *bs,
> if (bs->read_only) {
> return -EPERM;
> }
> + assert(!(bs->open_flags & BDRV_O_INCOMING));
>
> ret = bdrv_check_byte_request(bs, offset, bytes);
> if (ret < 0) {
> @@ -2462,6 +2463,7 @@ int coroutine_fn bdrv_co_discard(BlockDriverState *bs,
> int64_t sector_num,
> } else if (bs->read_only) {
> return -EPERM;
> }
> + assert(!(bs->open_flags & BDRV_O_INCOMING));
>
> /* Do nothing if disabled. */
> if (!(bs->open_flags & BDRV_O_UNMAP)) {
>
- Re: [Qemu-devel] [PULL 08/17] block: Assert no write requests under BDRV_O_INCOMING,
Laurent Vivier <=