]> Git Repo - qemu.git/commit - block.c
block: fix overlapping multiwrite requests
authorStefan Hajnoczi <[email protected]>
Wed, 30 Jul 2014 08:53:30 +0000 (09:53 +0100)
committerStefan Hajnoczi <[email protected]>
Fri, 29 Aug 2014 13:09:43 +0000 (14:09 +0100)
commit391827eb106d2d02062b2582d1545a7c221631c6
tree74840acba94091d0ab90caa619f2dd9b0754ab00
parentf21492817bc426a3bc0b98fa852df95be9dea1e8
block: fix overlapping multiwrite requests

When request A is a strict superset of request B:

  AAAAAAAA
    BBBB

multiwrite_merge() merges them as follows:

  AABBBB

The tail of request A should have been included:

  AABBBBAA

This patch fixes data loss but this code path is probably rare.  Since
guests cannot assume ordering between in-flight requests, few
applications submit overlapping write requests.

Reported-by: Slava Pestov <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: Benoit Canet <[email protected]>
block.c
This page took 0.025003 seconds and 4 git commands to generate.