[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 05/17] block migration: Fix test for read-only drive
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 05/17] block migration: Fix test for read-only drive |
Date: |
Tue, 6 Jul 2010 17:33:14 +0200 |
From: Markus Armbruster <address@hidden>
init_blk_migration_it() skips drives with type hint BDRV_TYPE_CDROM.
The intention is to skip read-only drives. However, BDRV_TYPE_CDROM
is only a hint. It is currently sufficent for read-only. But it's
not necessary, and it may not remain sufficient.
Use bdrv_is_read_only() instead.
Signed-off-by: Markus Armbruster <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block-migration.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/block-migration.c b/block-migration.c
index 7d04d6d..7337349 100644
--- a/block-migration.c
+++ b/block-migration.c
@@ -236,7 +236,7 @@ static void init_blk_migration_it(void *opaque,
BlockDriverState *bs)
BlkMigDevState *bmds;
int64_t sectors;
- if (bs->type == BDRV_TYPE_HD) {
+ if (!bdrv_is_read_only(bs)) {
sectors = bdrv_getlength(bs) >> BDRV_SECTOR_BITS;
if (sectors == 0) {
return;
--
1.6.6.1
- [Qemu-devel] [PULL 00/17] Block patches, Kevin Wolf, 2010/07/06
- [Qemu-devel] [PATCH 01/17] qemu-img check: Distinguish different kinds of errors, Kevin Wolf, 2010/07/06
- [Qemu-devel] [PATCH 03/17] Add virtio disk identification support, Kevin Wolf, 2010/07/06
- [Qemu-devel] [PATCH 04/17] blockdev: Clean up how readonly persists across virtual media change, Kevin Wolf, 2010/07/06
- [Qemu-devel] [PATCH 02/17] qcow2/vdi: Change check to distinguish error cases, Kevin Wolf, 2010/07/06
- [Qemu-devel] [PATCH 05/17] block migration: Fix test for read-only drive,
Kevin Wolf <=
- [Qemu-devel] [PATCH 06/17] raw-posix: Fix test for host CD-ROM, Kevin Wolf, 2010/07/06
- [Qemu-devel] [PATCH 07/17] fdc: Reject unimplemented error actions, Kevin Wolf, 2010/07/06
- [Qemu-devel] [PATCH 09/17] scsi: Reject unimplemented error actions, Kevin Wolf, 2010/07/06
- [Qemu-devel] [PATCH 08/17] qdev: Don't hw_error() in qdev_init_nofail(), Kevin Wolf, 2010/07/06
- [Qemu-devel] [PATCH 10/17] error: New qemu_opts_loc_restore(), Kevin Wolf, 2010/07/06
- [Qemu-devel] [PATCH 12/17] ide: Improve error messages, Kevin Wolf, 2010/07/06
- [Qemu-devel] [PATCH 11/17] scsi: Error locations for -drive if=scsi device initialization, Kevin Wolf, 2010/07/06
- [Qemu-devel] [PATCH 13/17] ide: Replace IDEState members is_cdrom, is_cf by drive_kind, Kevin Wolf, 2010/07/06
- [Qemu-devel] [PATCH 14/17] ide: Make ide_init_drive() return success, Kevin Wolf, 2010/07/06
- [Qemu-devel] [PATCH 15/17] ide: Reject readonly drives unless CD-ROM, Kevin Wolf, 2010/07/06