blockdev.c (c737c7a608f4cd2c06e6600303845c4b469822c5) blockdev.c (d44f928a54497188c25357840a3224925d1b527b)
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 *

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

532 bdrv_flags &= ~BDRV_O_CACHE_MASK;
533 bdrv_flags |= (BDRV_O_SNAPSHOT|BDRV_O_CACHE_WB|BDRV_O_NO_FLUSH);
534 }
535
536 if (copy_on_read) {
537 bdrv_flags |= BDRV_O_COPY_ON_READ;
538 }
539
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 *

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

532 bdrv_flags &= ~BDRV_O_CACHE_MASK;
533 bdrv_flags |= (BDRV_O_SNAPSHOT|BDRV_O_CACHE_WB|BDRV_O_NO_FLUSH);
534 }
535
536 if (copy_on_read) {
537 bdrv_flags |= BDRV_O_COPY_ON_READ;
538 }
539
540 if (runstate_check(RUN_STATE_INMIGRATE)) {
541 bdrv_flags |= BDRV_O_INCOMING;
542 }
543
544 bdrv_flags |= ro ? 0 : BDRV_O_RDWR;
545
546 blk = blk_new_open(qemu_opts_id(opts), file, NULL, bs_opts, bdrv_flags,
547 errp);
548 if (!blk) {
549 goto err_no_bs_opts;
550 }
551 bs = blk_bs(blk);

--- 2682 unchanged lines hidden ---
540 bdrv_flags |= ro ? 0 : BDRV_O_RDWR;
541
542 blk = blk_new_open(qemu_opts_id(opts), file, NULL, bs_opts, bdrv_flags,
543 errp);
544 if (!blk) {
545 goto err_no_bs_opts;
546 }
547 bs = blk_bs(blk);

--- 2682 unchanged lines hidden ---