diff options
author | Kevin Wolf <kwolf@redhat.com> | 2013-12-04 16:43:44 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2014-01-24 17:40:02 +0100 |
commit | 2dbafdc012d3ea81a97fec6226ca82d644539c9a (patch) | |
tree | eed999e7c42d8262fcdedaec8a8ed28962de6859 /include/block | |
parent | ec746e10cb2e6276a8d2e036454792fe0674864a (diff) | |
download | qemu-2dbafdc012d3ea81a97fec6226ca82d644539c9a.zip qemu-2dbafdc012d3ea81a97fec6226ca82d644539c9a.tar.gz qemu-2dbafdc012d3ea81a97fec6226ca82d644539c9a.tar.bz2 |
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/block')
-rw-r--r-- | include/block/block_int.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/block/block_int.h b/include/block/block_int.h index bcdd98c..c1153cb 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; |