On 07/03/2016 21:56, Stefan Hajnoczi wrote: > I think the timer concept itself is troublesome. A radical approach but > limited to changing QED itself is to drop the timer and instead keep a > timestamp for the last allocating write request. Next time a write > request (allocating or rewriting) is about to complete, do the flush and > clear the need check flag as part of the write request (if 5 seconds > have passed since the timestamp).
bdrv_qed_drain should be easy to fix in my new drain implementation, which is based on draining the parent before the BdrvChild-ren. It's just troublesome in the current one which alternates flushing and draining. I would just revert the patch that introduced bdrv_qed_drain for now, and reintroduce it later (note however that something was messed up in commit df9a681, "qed: Implement .bdrv_drain", 2015-11-12, because it includes some dirty bitmap stuff). Or perhaps the idea of making QED read-only has some merit... Paolo