On Thu, Aug 31, 2017 at 10:20:19PM +0300, Amir Goldstein wrote: > > IIUC, basically we need to guarantee that a flush submits after > > file_write_and_wait() and completes before we return. > > Yeh. unless we check if file_write_and_wait() submitted anything > at all. Even if file_write_and_wait did not submit anything we need to make sure a flush was submitted and completed after entering xfs_file_fsync. For one to deal with the case where we wrote back data from the flusher threads or the VM, and also for the direct I/O case. Btw, do you have any results for your simple catch? I wonder how much of an issue it actually is in practice. -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html