aboutsummaryrefslogtreecommitdiff
path: root/kvm-stub.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2014-01-14 11:41:35 +0100
committerKevin Wolf <kwolf@redhat.com>2014-01-24 17:40:03 +0100
commit28de2dcd88de31f50bbd43d9c2fcb046c3a727cb (patch)
tree23658259614a06a9956daec2d1667c3c6b9af121 /kvm-stub.c
parent3b8242e0ea2a2c201ef3d1bd24080490dae33080 (diff)
block: Assert serialisation assumptions in pwritev
If a request calls wait_serialising_requests() and actually has to wait in this function (i.e. a coroutine yield), other requests can run and previously read data (like the head or tail buffer) could become outdated. In this case, we would have to restart from the beginning to read in the updated data. However, we're lucky and don't actually need to do that: A request can only wait in the first call of wait_serialising_requests() because we mark it as serialising before that call, so any later requests would wait. So as we don't wait in practice, we don't have to reload the data. This is an important assumption that may not be broken or data corruption will happen. Document it with some assertions. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'kvm-stub.c')
0 files changed, 0 insertions, 0 deletions