diff options
Diffstat (limited to 'block/qcow2.h')
-rw-r--r-- | block/qcow2.h | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/block/qcow2.h b/block/qcow2.h index 2a406a7..1106b33 100644 --- a/block/qcow2.h +++ b/block/qcow2.h @@ -196,6 +196,17 @@ typedef struct QCowCreateState { struct QCowAIOCB; +typedef struct Qcow2COWRegion { + /** + * Offset of the COW region in bytes from the start of the first cluster + * touched by the request. + */ + uint64_t offset; + + /** Number of sectors to copy */ + int nb_sectors; +} Qcow2COWRegion; + /* XXX This could be private for qcow2-cluster.c */ typedef struct QCowL2Meta { @@ -209,12 +220,6 @@ typedef struct QCowL2Meta uint64_t alloc_offset; /** - * Number of sectors between the start of the first allocated cluster and - * the area that the guest actually writes to. - */ - int n_start; - - /** * Number of sectors from the start of the first allocated cluster to * the end of the (possibly shortened) request */ @@ -229,6 +234,18 @@ typedef struct QCowL2Meta */ CoQueue dependent_requests; + /** + * The COW Region between the start of the first allocated cluster and the + * area the guest actually writes to. + */ + Qcow2COWRegion cow_start; + + /** + * The COW Region between the area the guest actually writes to and the + * end of the last allocated cluster. + */ + Qcow2COWRegion cow_end; + QLIST_ENTRY(QCowL2Meta) next_in_flight; } QCowL2Meta; |