blockdev.c (89126b6dca5a66fb459a6189018c3dabe51d8745) blockdev.c (7fcb8c89f063122864bd274fd673a70a0a802d93)
1/*
2 * QEMU host block devices
3 *
4 * Copyright (c) 2003-2008 Fabrice Bellard
5 *
6 * This work is licensed under the terms of the GNU GPL, version 2 or
7 * later. See the COPYING file in the top-level directory.
8 *

--- 1381 unchanged lines hidden (view full) ---

1390 if (!state->old_bs) {
1391 return;
1392 }
1393
1394 /* Paired with .clean() */
1395 bdrv_drained_begin(state->old_bs);
1396
1397 if (!bdrv_is_inserted(state->old_bs)) {
1/*
2 * QEMU host block devices
3 *
4 * Copyright (c) 2003-2008 Fabrice Bellard
5 *
6 * This work is licensed under the terms of the GNU GPL, version 2 or
7 * later. See the COPYING file in the top-level directory.
8 *

--- 1381 unchanged lines hidden (view full) ---

1390 if (!state->old_bs) {
1391 return;
1392 }
1393
1394 /* Paired with .clean() */
1395 bdrv_drained_begin(state->old_bs);
1396
1397 if (!bdrv_is_inserted(state->old_bs)) {
1398 error_setg(errp, QERR_DEVICE_HAS_NO_MEDIUM, device);
1398 error_setg(errp, QERR_DEVICE_HAS_NO_MEDIUM,
1399 bdrv_get_device_or_node_name(state->old_bs));
1399 return;
1400 }
1401
1402 if (bdrv_op_is_blocked(state->old_bs,
1403 BLOCK_OP_TYPE_EXTERNAL_SNAPSHOT, errp)) {
1404 return;
1405 }
1406

--- 2240 unchanged lines hidden ---
1400 return;
1401 }
1402
1403 if (bdrv_op_is_blocked(state->old_bs,
1404 BLOCK_OP_TYPE_EXTERNAL_SNAPSHOT, errp)) {
1405 return;
1406 }
1407

--- 2240 unchanged lines hidden ---