Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The nature of the transfer is implementation-defined.

Does "nature of the transfer" cover "the extent of the data set"? To me, the nature of the transfer refers to the technical implementation of the writeout mechanism. Especially given that the rationale explicitly mentions "since the concepts of "buffer cache", "system crash", "physical write", and "non-volatile storage" are not defined here, the wording has to be more abstract" it seems to me that "nature of the transfer" should not be interpreted as "the data to be written out".

But even going by the formal Description only, it does not follow to me that an implementation can choose to selectively ignore part of the data. These are the phrases used in that section:

- The fsync() function shall request that all data for the open file descriptor [..] to be transferred to the storage device

- [It] shall force all currently queued I/O operations [..] to the synchronized I/O completion state

- All I/O operations shall be completed

Each sentence contains the word "all".

The return value description reads "Upon successful completion, fsync() shall return 0". Based on this thread, the Linux kernel should never return 0 if a previous fsync failed, because the kernel has no intention of honouring the request.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: