Fsync() is a means to declare a kind of full priority against any performance ordering.
rename() is a kind of tricks to minimise the problem of empty file after a power failure.
But what an application writer really want is a fast file system that do _atomicity_ : that means he want the previous file states or the new content of the last sys_write() and nothing else.
At the time of fsync(), i think we better need a fdone() which should be a kind of "wait on complete transaction" instead of "flush everthing quickly".
If fdone() is too long, i could use threads. If fdone() take time, it's for bandwith optimisation. One of a great linux optimisation for system without important data is to map fsync() to a void function, then everything fly :)
Is it coslty to have the behavior of open()/write()/rename() for a single sys_write() ?