diff options
author | Max Reitz <mreitz@redhat.com> | 2013-10-09 14:41:28 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2013-10-11 16:49:59 +0200 |
commit | f9bff971436b5924ca3c3203c6a3dcd6437bd430 (patch) | |
tree | f95d695b714871789c721066411ed6343e7ec15e /block/qcow2.c | |
parent | 9e3f08923a14ba0655c6797edd9ffef44bb8cbf2 (diff) |
qcow2: Remove wrong metadata overlap check
In qcow2_write_compressed, if the compression fails, a normal cluster is
written to disk. This is done through bdrv_write on the qcow2 BDS
itself (using the guest offset), thus it is wrong to do a metadata
overlap check before.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/qcow2.c')
-rw-r--r-- | block/qcow2.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/block/qcow2.c b/block/qcow2.c index 9095f7ca6e..3d1e74d38d 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -1738,14 +1738,6 @@ static int qcow2_write_compressed(BlockDriverState *bs, int64_t sector_num, if (ret != Z_STREAM_END || out_len >= s->cluster_size) { /* could not compress: write normal cluster */ - - ret = qcow2_pre_write_overlap_check(bs, QCOW2_OL_DEFAULT, - sector_num * BDRV_SECTOR_SIZE, - s->cluster_sectors * BDRV_SECTOR_SIZE); - if (ret < 0) { - goto fail; - } - ret = bdrv_write(bs, sector_num, buf, s->cluster_sectors); if (ret < 0) { goto fail; |