fs: improve generic fsync