Hi Jan,
Thanks for clarification. I should have used synchronous write, instead of synchronous flush. My point is that I noticed for sync writes, fsync is called to force pages to be on persistent storage. while for AIO pages, fsync is not called to force pages to be on persistent storage. My question here is why fsync is required for sync IOs. Does InnoDB maintain a dirty page table? Is fsync called to guarantee the page to be on persistent storage so that the dirty page table can be updated? If this is the case, when is the dirty page table updated for asynchronous IOs?
P.S. I couldn't find code for dirty page table. So I am not sure if InnoDB maintains a dirty page table for recovery. Could you please give me a pointer to related code and related resources? Thanks.
Xiaofei