qcow2: Drop l2meta.cluster_offset

There's no real reason to have an l2meta for normal requests that don't
allocate anything. Before we can get rid of it, we must return the host
cluster offset in a different way.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Kevin Wolf 2012-12-07 18:08:45 +01:00
parent cf5c1a231e
commit 060bee8943
3 changed files with 14 additions and 15 deletions

View file

@ -213,9 +213,6 @@ typedef struct QCowL2Meta
/** Guest offset of the first newly allocated cluster */
uint64_t offset;
/** Host offset of the first cluster of the request */
uint64_t cluster_offset;
/** Host offset of the first newly allocated cluster */
uint64_t alloc_offset;
@ -336,7 +333,7 @@ void qcow2_encrypt_sectors(BDRVQcowState *s, int64_t sector_num,
int qcow2_get_cluster_offset(BlockDriverState *bs, uint64_t offset,
int *num, uint64_t *cluster_offset);
int qcow2_alloc_cluster_offset(BlockDriverState *bs, uint64_t offset,
int n_start, int n_end, int *num, QCowL2Meta *m);
int n_start, int n_end, int *num, uint64_t *host_offset, QCowL2Meta *m);
uint64_t qcow2_alloc_compressed_cluster_offset(BlockDriverState *bs,
uint64_t offset,
int compressed_size);