summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2013-12-04 16:43:44 +0100
committerKevin Wolf <kwolf@redhat.com>2014-01-24 17:40:02 +0100
commit2dbafdc012d3ea81a97fec6226ca82d644539c9a (patch)
treeeed999e7c42d8262fcdedaec8a8ed28962de6859 /include
parentec746e10cb2e6276a8d2e036454792fe0674864a (diff)
downloadqemu-2dbafdc012d3ea81a97fec6226ca82d644539c9a.tar.gz
block: Generalise and optimise COR serialisation
Change the API so that specific requests can be marked serialising. Only these requests are checked for overlaps then. This means that during a Copy on Read operation, not all requests overlapping other requests are serialised any more, but only those that actually overlap with the specific COR request. Also remove COR from function and variable names because this functionality can be useful in other contexts. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Benoit Canet <benoit@irqsave.net>
Diffstat (limited to 'include')
-rw-r--r--include/block/block_int.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/block/block_int.h b/include/block/block_int.h
index bcdd98c503..c1153cb3ab 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -60,6 +60,7 @@ typedef struct BdrvTrackedRequest {
int64_t offset;
unsigned int bytes;
bool is_write;
+ bool serialising;
QLIST_ENTRY(BdrvTrackedRequest) list;
Coroutine *co; /* owner, used for deadlock detection */
CoQueue wait_queue; /* coroutines blocked on this request */
@@ -302,8 +303,8 @@ struct BlockDriverState {
/* Callback before write request is processed */
NotifierWithReturnList before_write_notifiers;
- /* number of in-flight copy-on-read requests */
- unsigned int copy_on_read_in_flight;
+ /* number of in-flight serialising requests */
+ unsigned int serialising_in_flight;
/* I/O throttling */
ThrottleState throttle_state;