diff options
Diffstat (limited to 'block/qcow.c')
-rw-r--r-- | block/qcow.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/qcow.c b/block/qcow.c index 67c237fe7d..7f142f78c8 100644 --- a/block/qcow.c +++ b/block/qcow.c @@ -162,7 +162,7 @@ static int qcow_open(BlockDriverState *bs, QDict *options, int flags, s->cluster_sectors = 1 << (s->cluster_bits - 9); s->l2_bits = header.l2_bits; s->l2_size = 1 << s->l2_bits; - bs->total_sectors = header.size / 512; + bdrv_setlength(bs, BDRV_SECTOR_SIZE * (header.size / 512)); s->cluster_offset_mask = (1LL << (63 - s->cluster_bits)) - 1; /* read the level 1 table */ |