History | View | Annotate | Download (25.5 kB)
qcow2: Fix error handling in qcow2_grow_l1_table
Return the appropriate error value instead of always using EIO. Don't free theL1 table on errors, we still need it.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qcow2: Return 0/-errno in get_cluster_table
Switching to 0/-errno allows it to distinguish different error cases.
qcow2: Return 0/-errno in qcow2_alloc_cluster_offset
Returning 0/-errno allows it to distingush different errors classes. Thecluster offset of newly allocated clusters is now returned in the QCowL2Metastruct.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>...
qcow2: Don't ignore qcow2_alloc_clusters return value
Now that qcow2_alloc_clusters can return error codes, we must handle them inthe callers of qcow2_alloc_clusters.
qcow2: Allow qcow2 disk images with size zero
Images with disk size 0 may be used forVM snapshots, but not to save normal block data.
It is possible to create such images usingqemu-img, but opening them later fails.
So even "qemu-img info image.qcow2" is not...
Revert "qcow2: Bring synchronous read/write back to life"
It was merely a workaround and the real fix is done now.This reverts commit ef845c3bf421290153154635dc18eaa677cecb43.
qcow2: Bring synchronous read/write back to life
When the synchronous read and write functions were dropped, they were replacedby generic emulation functions. Unfortunately, these emulation functions don'tprovide the same semantics as the original functions did....
qcow2: Increase maximum cluster size to 2 MB
This patch increases the maximum qcow2 cluster size to 2 MB. Starting with 128kclusters, L2 tables span 2 GB or more of virtual disk space, causing 32 bittruncation and wraparound of signed integers. Therefore some variables need to...
Fix sys-queue.h conflict for good
Problem: Our file sys-queue.h is a copy of the BSD file, but there aresome additions and it's not entirely compatible. Because of that, there havebeen conflicts with system headers on BSD systems. Some hacks have beenintroduced in the commits 15cc9235840a22c289edbe064a9b3c19c5f49896,...
qcow2: Order concurrent AIO requests on the same unallocated cluster
When two AIO requests write to the same cluster, and this cluster isunallocated, currently both requests allocate a new cluster and the second onemerges the first one when it is completed. This means an cluster allocation, a...
qcow2: Fix L1 table memory allocation
Contrary to what one could expect, the size of L1 tables is not clusteraligned. So as we're writing whole sectors now instead of single entries,we need to ensure that the L1 table in memory is large enough; otherwise...
qcow2: Split out guest cluster functions
qcow2-cluster.c contains all functions related to the management of guestclusters, i.e. what the guest sees on its virtual disk. This code is aboutmapping these guest clusters to host clusters in the image file using the...
qcow2: Rename global functions
The qcow2 source is now split into several more manageable files. During theconversion quite some functions that were static before needed to be changed tobe global to make the source compile again.
We were lucky enough not to get name conflicts with these additional global...
l2_allocate: Write complete sectors
When modifying the L1 table, l2_allocate() needs to write complete sectorsinstead of single entries. The L1 table is already in memory, reading it fromdisk in the block layer to align the request is wasted performance....
alloc_cluster_link_l2: Write complete sectors
When updating the L2 tables in alloc_cluster_link_l2(), write completesectors instead of updating single entries.