diff options
Diffstat (limited to 'migration/block.c')
-rw-r--r-- | migration/block.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/migration/block.c b/migration/block.c index 0de9d84198..8e49382070 100644 --- a/migration/block.c +++ b/migration/block.c @@ -906,7 +906,7 @@ static int block_load(QEMUFile *f, void *opaque, int version_id) do { addr = qemu_get_be64(f); - flags = addr & ~BDRV_SECTOR_MASK; + flags = addr & (BDRV_SECTOR_SIZE - 1); addr >>= BDRV_SECTOR_BITS; if (flags & BLK_MIG_FLAG_DEVICE_BLOCK) { |