Page MenuHomeFreeBSD

write.2: explain the atomicity guarantees of the writes
ClosedPublic

Authored by kib on Oct 26 2025, 2:59 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 5, 11:42 AM
Unknown Object (File)
Sat, Nov 8, 3:13 PM
Unknown Object (File)
Nov 7 2025, 5:54 PM
Unknown Object (File)
Nov 1 2025, 10:23 AM
Unknown Object (File)
Oct 31 2025, 4:24 PM
Unknown Object (File)
Oct 31 2025, 1:14 PM
Unknown Object (File)
Oct 29 2025, 5:00 PM
Unknown Object (File)
Oct 29 2025, 5:00 PM
Subscribers

Details

Summary
Also provide the pointer to the latest POSIX standard that justifies the
requirement.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kib requested review of this revision.Oct 26 2025, 2:59 PM
rmacklem added inline comments.
lib/libsys/write.2
139

As required.. doesn't sound quite right to me?
Maybe "This is required by the POSIX standard"

(But, I won't claim to be a decent writer, so I'll
let you decide if it needs changing.)

151

"i" -> "I"

This revision is now accepted and ready to land.Oct 26 2025, 3:15 PM
lib/libsys/write.2
137–138

I would write "effects of write" (although "write effects" is also understandable)

139

I think this is OK but the example inline makes it a bit awkward as it's a long sentence.

Could be split into two sentences if desired, something like:

As required by the POSIX standard, the read, write and ftruncate functions and their variations...
See .St -p1003.1-2024 ... for more information.

151

The .Fx above is FreeBSD, so FreeBSD implements the ...

My take on this sentence would be:

FreeBSD implementes the requirement by taking a read/write range lock on the file byte range affected by the corresponding function.

Oh, and it needs the date to be updated.

kib marked 5 inline comments as done.

Edit according to reviewer's suggestions.

This revision now requires review to proceed.Oct 26 2025, 4:03 PM
This revision is now accepted and ready to land.Oct 26 2025, 4:24 PM