Is a successful call to write(2) atomic?

Kurt Hackenberg kh at panix.com
Tue Jun 15 19:51:26 UTC 2021


On 2021/06/15 15:16, Michael Schuster wrote:

> Let's take a step back: an atomic write() either writes everything or
> nothing - and that's all. There's nothing in that claim that says
> "everything must be in a contiguous block", nor, that all the data must be
> written in a single "operation" by the underlying system.
> 
> So after consideration I don't think the observed behaviour is violating
> the claim that write() is atomic - I welcome correction, of course :-)

You're just talking about the exact meaning of that word "atomic". 
Ronald used it to mean indivisible, as atoms were once thought to be; 
you advocate a slightly different meaning.

That's a digression. Ronald's problem is clear, no matter what word we 
use. Paul and I know the problem and have suggested two well-known 
solutions.


More information about the freebsd-questions mailing list