Here is my take:
Flush writes the file content to kernel memory. The kernel will write to disk at fixed interval as configured in the OS. On Linux this is often every 5 seconds. If your OS crashes in the window between a flush and a disk write then the file will be lost. You may or may not want this. It all depends on what you have promised to the user.
Sync (sync_data and sync_all) will force the kernel to write the file to disk immediately and wait for it to do so.
Sync and Flush are not the same thing. Flush goes from your app to the OS kernel and Sync from the OS kernel to disk. It is OK that your app crashes after Flush, it is not OK that your OS crashes (or power failure) after Flush and before the kernel syncs.