« Previous | Next » 

Revision 33656af7

ID33656af70230d5ccebe29e2f3bee38afe17db9b2

Added by Marcelo Tosatti over 10 years ago

block migration: do not submit multiple AIOs for same sector

Block migration can submit multiple AIO reads for the same sector/chunk, but
completion of such reads can happen out of order:

migration guest
- get_dirty(N)
- aio_read(N)
- clear_dirty(N)
write(N)
set_dirty(N)
- get_dirty(N)
- aio_read(N)

If the first aio_read completes after the second, stale data will be
migrated to the destination.

Fix by not allowing multiple AIOs inflight for the same sector.

Signed-off-by: Marcelo Tosatti <>
Signed-off-by: Anthony Liguori <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences