[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 10/62] block: Drop superfluous aligning of bdrv_getle
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 10/62] block: Drop superfluous aligning of bdrv_getlength()'s value |
Date: |
Fri, 8 Aug 2014 19:39:11 +0200 |
From: Markus Armbruster <address@hidden>
It returns a multiple of the sector size.
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: Benoit Canet <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
block.c | 1 -
block/qcow2.c | 1 -
2 files changed, 2 deletions(-)
diff --git a/block.c b/block.c
index c4b3a0b..ebb8aac 100644
--- a/block.c
+++ b/block.c
@@ -1314,7 +1314,6 @@ int bdrv_append_temp_snapshot(BlockDriverState *bs, int
flags, Error **errp)
error_setg_errno(errp, -total_size, "Could not get image size");
goto out;
}
- total_size &= BDRV_SECTOR_MASK;
/* Create the temporary image */
ret = get_tmp_filename(tmp_filename, PATH_MAX + 1);
diff --git a/block/qcow2.c b/block/qcow2.c
index ad93824..964ab93 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;
}
--
1.8.3.1
- [Qemu-devel] [PULL 00/62] Block patches, Kevin Wolf, 2014/08/08
- [Qemu-devel] [PULL 01/62] nbd: Drop nbd_can_read(), Kevin Wolf, 2014/08/08
- [Qemu-devel] [PULL 04/62] block: New bdrv_nb_sectors(), Kevin Wolf, 2014/08/08
- [Qemu-devel] [PULL 02/62] block: Add AIO context notifiers, Kevin Wolf, 2014/08/08
- [Qemu-devel] [PULL 05/62] block: Use bdrv_nb_sectors() in bdrv_make_zero(), Kevin Wolf, 2014/08/08
- [Qemu-devel] [PULL 06/62] block: Use bdrv_nb_sectors() in bdrv_aligned_preadv(), Kevin Wolf, 2014/08/08
- [Qemu-devel] [PULL 03/62] nbd: Follow the BDS' AIO context, Kevin Wolf, 2014/08/08
- [Qemu-devel] [PULL 07/62] block: Use bdrv_nb_sectors() in bdrv_co_get_block_status(), Kevin Wolf, 2014/08/08
- [Qemu-devel] [PULL 08/62] block: Use bdrv_nb_sectors() in img_convert(), Kevin Wolf, 2014/08/08
- [Qemu-devel] [PULL 09/62] block: Use bdrv_nb_sectors() where sectors, not bytes are wanted, Kevin Wolf, 2014/08/08
- [Qemu-devel] [PULL 10/62] block: Drop superfluous aligning of bdrv_getlength()'s value,
Kevin Wolf <=
- [Qemu-devel] [PULL 11/62] qemu-img: Make img_convert() get image size just once per image, Kevin Wolf, 2014/08/08
- [Qemu-devel] [PULL 12/62] block: Avoid bdrv_get_geometry() where errors should be detected, Kevin Wolf, 2014/08/08
- [Qemu-devel] [PULL 14/62] configure: explicitly state version requirements to devel packages, Kevin Wolf, 2014/08/08
- [Qemu-devel] [PULL 15/62] xen_disk: fix possible null-ptr dereference, Kevin Wolf, 2014/08/08
- [Qemu-devel] [PULL 13/62] docs: Make the recommendation for the backing file name position a requirement, Kevin Wolf, 2014/08/08
- [Qemu-devel] [PULL 16/62] docs/multiple-iothreads.txt: add documentation on IOThread programming, Kevin Wolf, 2014/08/08
- [Qemu-devel] [PULL 18/62] qdev-monitor: include QOM properties in -device FOO, help output, Kevin Wolf, 2014/08/08
- [Qemu-devel] [PULL 17/62] qmp: hide "hotplugged" device property from device-list-properties, Kevin Wolf, 2014/08/08
- [Qemu-devel] [PULL 19/62] qemu-iotests: Add data pattern in version3 VMDK sample image in 059, Kevin Wolf, 2014/08/08
- [Qemu-devel] [PULL 21/62] qemu-img info: show nocow info, Kevin Wolf, 2014/08/08