News for hackers. Stuff that matters.
Re:Durability: Linux File APIs by dfox on Monday October 12, 2020 @03:22PM (#24758362)
> Does that mean write is atomic? Technically, yes: future reads must return the entire contents of the write, or none of it. However, write is not required to be complete, and is allowed to only transfer part of the data.

This is technically right interpretation of what POSIX says but totally ignores the fact that in such state the application will know that this happened and should handle that. Because in the first place the rest of the write request did not happen at all and it will not happen unless the application retries the write(2) with rest of the data. Most applications simply ignore this situation which is the reason that this situation is guaranteed to not happen on any even vaguely unix-derived OS (and exactly this is the number one reason for error messages of the "Error: Success" kind).

Re:Durability: Linux File APIs by remexre on Monday October 12, 2020 @04:13PM (#24758935)
Right, I think the point is that you no longer have atomic semantics for the write as a whole.
Re:Durability: Linux File APIs by formerly_proven on Monday October 12, 2020 @04:34PM (#24759140)
Well until people's file descriptors happen to be pipes or sockets.
Re:Durability: Linux File APIs by the8472 on Monday October 12, 2020 @03:27PM (#24758408)
and then there's mmap where you can observe changes at byte-level granularity.