diff options
author | Kevin Wolf <kwolf@redhat.com> | 2011-06-30 17:42:09 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2011-08-02 15:53:41 +0200 |
commit | 68d100e905453ebbeea8e915f4f18a2bd4339fe8 (patch) | |
tree | bb01befe74a82982e3451822e274f53c91b82140 /block/qcow2.h | |
parent | b96e92470ab4a87268e8b174602eaea6c508003b (diff) |
qcow2: Use coroutines
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/qcow2.h')
-rw-r--r-- | block/qcow2.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/block/qcow2.h b/block/qcow2.h index 6a0a21b694..de23abe1a4 100644 --- a/block/qcow2.h +++ b/block/qcow2.h @@ -26,6 +26,7 @@ #define BLOCK_QCOW2_H #include "aes.h" +#include "qemu-coroutine.h" //#define DEBUG_ALLOC //#define DEBUG_ALLOC2 @@ -114,6 +115,8 @@ typedef struct BDRVQcowState { int64_t free_cluster_index; int64_t free_byte_offset; + CoMutex lock; + uint32_t crypt_method; /* current crypt method, 0 if no key yet */ uint32_t crypt_method_header; AES_KEY aes_encrypt_key; @@ -146,7 +149,7 @@ typedef struct QCowL2Meta int nb_available; int nb_clusters; struct QCowL2Meta *depends_on; - QLIST_HEAD(QCowAioDependencies, QCowAIOCB) dependent_requests; + CoQueue dependent_requests; QLIST_ENTRY(QCowL2Meta) next_in_flight; } QCowL2Meta; |