Am 11.04.2013 um 17:44 hat Stefan Hajnoczi geschrieben: > Here's my entry to the "let's get rid of io_flush()" effort. It's based on > Paolo's insight about bdrv_drain_all() that the block layer already has a > tracked_requests list. io_flush() is redundant since the block layer already > knows if requests are pending.
Except when there are requests that don't come from the guest, but are issued internally. In this case, block.c doesn't know about them, but only the block driver does, so we need a .bdrv_drain callback to tell the block layer about these. The one specific case that comes to mind is the QED timer for resetting the dirty bit. I think you need to have the .bdrv_drain callback before you can start ignoring .io_flush. Kevin