Doesn't this have a race condition? If the server was just about to fsync anyway there may not be so long wait?