docs/qcow2: Correct refcount_block_entries

A refblock entry may have a different size than 16 bits, it may even be
smaller than a byte. Correct the refcount_block_entries calculation
accordingly.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
master
Max Reitz 2014-09-03 00:25:08 +02:00 committed by Kevin Wolf
parent 17bd5f4727
commit 4b318d6ca6
1 changed files with 1 additions and 1 deletions

View File

@ -183,7 +183,7 @@ blocks and are exactly one cluster in size.
Given a offset into the image file, the refcount of its cluster can be obtained
as follows:
refcount_block_entries = (cluster_size / sizeof(uint16_t))
refcount_block_entries = (cluster_size * 8 / refcount_bits)
refcount_block_index = (offset / cluster_size) % refcount_block_entries
refcount_table_index = (offset / cluster_size) / refcount_block_entries