diff options
author | Markus Armbruster <armbru@redhat.com> | 2014-06-26 13:23:23 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2014-08-15 15:07:13 +0200 |
commit | 75d3d21f9ed9fc66a56d4d7cf491d504541fc6ac (patch) | |
tree | b71cf60ee59ed5c2161ec9a9e5f5afc4a7daf4a3 /block/qcow2.c | |
parent | 57322b7811a9136507742bb7ebc2215dd8c2e911 (diff) | |
download | qemu-75d3d21f9ed9fc66a56d4d7cf491d504541fc6ac.tar.gz qemu-75d3d21f9ed9fc66a56d4d7cf491d504541fc6ac.tar.bz2 qemu-75d3d21f9ed9fc66a56d4d7cf491d504541fc6ac.zip |
block: Drop superfluous aligning of bdrv_getlength()'s value
It returns a multiple of the sector size.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block/qcow2.c')
-rw-r--r-- | block/qcow2.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/block/qcow2.c b/block/qcow2.c index ad93824c6c..964ab93b08 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -1947,7 +1947,6 @@ static int qcow2_write_compressed(BlockDriverState *bs, int64_t sector_num, /* align end of file to a sector boundary to ease reading with sector based I/Os */ cluster_offset = bdrv_getlength(bs->file); - cluster_offset = (cluster_offset + 511) & ~511; bdrv_truncate(bs->file, cluster_offset); return 0; } |