From 7327145f63a224c9ba9c16d0c29781feffef8dc6 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Wed, 4 Dec 2013 17:08:50 +0100 Subject: block: Make overlap range for serialisation dynamic Copy on Read wants to serialise with all requests touching the same cluster, so wait_serialising_requests() rounded to cluster boundaries. Other users like alignment RMW will have different requirements, though (requests touching the same sector), so make it dynamic. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: Benoit Canet --- include/block/block_int.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/block') diff --git a/include/block/block_int.h b/include/block/block_int.h index c1153cb..0ee955c 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -60,7 +60,11 @@ typedef struct BdrvTrackedRequest { int64_t offset; unsigned int bytes; bool is_write; + bool serialising; + int64_t overlap_offset; + unsigned int overlap_bytes; + QLIST_ENTRY(BdrvTrackedRequest) list; Coroutine *co; /* owner, used for deadlock detection */ CoQueue wait_queue; /* coroutines blocked on this request */ -- cgit v1.1