> I've failed to understand why we should wait for [0] ... Sorry, missed to answer before. The optimization was to make the virtio-pmem interface completely asynchronous and coalesce the flush requests. As this uses the asynchronous behavior of virtio bus there is no stall of guest vCPU, so this optimization intends to solve below: - Guest IO submitting thread can do other other operations till the host flush completes. - As all the guest flush work on one virtio-pmem device. If there is single flush in queue all the subsequent flush would wait enabling request coalescing. Currently, its solved by splitting the bio request to parent & child. But this results in preorder issue (As PREFLUSH happens after the first fsync, because of the way how bio_submit() works). I think the preflush order issue will still remain after this patch. But currently this interface is broken in mainline. So, this patch fixes the issue. Thanks, Pankaj