qemu-e2k/block
Max Reitz 14a58a4e0c qcow2: Respect new_block in alloc_refcount_block()
When choosing a new place for the refcount table, alloc_refcount_block()
tries to infer the number of clusters used so far from its argument
cluster_index (which comes from the idea that if any cluster with an
index greater than cluster_index was in use, the refcount table would
have to be big enough already to describe cluster_index).

However, there is a cluster that may be at or after cluster_index, and
which is not covered by the refcount structures, and that is the new
refcount block new_block. Therefore, it should be taken into account for
the blocks_used calculation.

Also, because new_block already describes (or is intended to describe)
cluster_index, we may not put the new refcount structures there.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-id: 1423598552-24301-2-git-send-email-mreitz@redhat.com
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
2015-03-16 12:10:30 -04:00
..
accounting.c
archipelago.c block: remove superfluous '\n' around error_report/error_setg 2015-03-10 08:15:33 +03:00
backup.c
blkdebug.c blkdebug: fix "once" rule 2015-03-10 14:02:21 +01:00
blkverify.c
block-backend.c block-backend: Add wrappers for blocksizes and geometry probing 2015-03-10 14:02:22 +01:00
bochs.c
cloop.c
commit.c
curl.c
dmg.c block/dmg: improve zeroes handling 2015-02-06 17:24:21 +01:00
gluster.c
iscsi.c iscsi: Fix check for username 2015-03-10 10:49:25 +01:00
linux-aio.c
Makefile.objs block/dmg: support bzip2 block entry types 2015-02-06 17:24:21 +01:00
mirror.c
nbd-client.c nbd: fix the co_queue multi-adding bug 2015-02-16 15:07:17 +00:00
nbd-client.h nbd: Drop BDS backpointer 2015-02-16 14:36:03 +00:00
nbd.c nbd: fix resource leak 2015-03-10 08:15:34 +03:00
nfs.c
null.c
parallels.c
qapi.c block: add event when disk usage exceeds threshold 2015-02-06 17:24:21 +01:00
qcow2-cache.c block: Give always priority to unused entries in the qcow2 L2 cache 2015-02-06 17:24:22 +01:00
qcow2-cluster.c qcow2: Use 64 bits for refcount values 2015-03-10 14:02:21 +01:00
qcow2-refcount.c qcow2: Respect new_block in alloc_refcount_block() 2015-03-16 12:10:30 -04:00
qcow2-snapshot.c qcow2: fix the macro QCOW_MAX_L1_SIZE's use 2015-03-12 17:41:23 +00:00
qcow2.c qcow2: fix the macro QCOW_MAX_L1_SIZE's use 2015-03-12 17:41:23 +00:00
qcow2.h qcow2: Helper function for refcount modification 2015-03-10 14:02:21 +01:00
qcow.c block: fix off-by-one error in qcow and qcow2 2015-02-06 17:24:21 +01:00
qed-check.c
qed-cluster.c
qed-gencb.c
qed-l2-cache.c
qed-table.c
qed.c qed: check for header size overflow 2015-02-06 17:24:21 +01:00
qed.h
quorum.c
raw_bsd.c block: Add driver methods to probe blocksizes and geometry 2015-03-10 14:02:22 +01:00
raw-aio.h
raw-posix.c block/raw-posix: fix launching with failed disks 2015-03-10 14:02:24 +01:00
raw-win32.c block: Remove "growable" from BDS 2015-02-16 15:07:19 +00:00
rbd.c
sheepdog.c sheepdog: Fix misleading error messages in sd_snapshot_create() 2015-03-10 14:02:24 +01:00
snapshot.c
ssh.c
stream.c
vdi.c block/vdi: Add locking for parallel requests 2015-03-10 14:02:24 +01:00
vhdx-endian.c
vhdx-log.c
vhdx.c
vhdx.h
vmdk.c block: vmdk - fixed sizeof() error 2015-02-16 15:07:17 +00:00
vpc.c vpc: Implement bdrv_co_get_block_status() 2015-03-09 11:11:59 +01:00
vvfat.c QemuOpts: Drop qemu_opt_set(), rename qemu_opt_set_err(), fix use 2015-02-26 14:49:31 +01:00
win32-aio.c
write-threshold.c block: Fix block-set-write-threshold not to use funky error class 2015-03-16 17:07:25 +01:00