sys_fsync [fs/buffer.c]
Copies all in-core parts of a file to disk, and waits until the device reports that all parts are on stable storage. It also updates metadata stat information. It does not necessarily ensure that the entry in the directory containing the file has also reached disk. For that an explicit sys_fsync on the file descriptor of the directory is also needed. Arguments
eax | 118
ebx | File descriptor.
Return values If the system call succeeds the return value is 0. If the system call fails the return value is one of the following errno values:
`-EBADF` | `An invalid file descriptor was specified.`
`-EIO` | `An error occurred during synchronization.`
`-EROFS, -EINVAL` | `File descriptor is bound to a special file which does not support synchronization.`
Remarks sys_fdatasync is identical to sys_fsync except it only flushes user data, not the meta data like the st_atime or st_mtime (respectively, time of last access and time of last modification). In case the hard disk has write cache enabled, the data may not really be on permanent storage when sys_fsync/sys_fdatasync return. When an ext2 file system is mounted with the sync option, directory entries are also implicitly synced by sys_fsync. Compatibility n/a