Re: [PATCH 0/5] Reintroduce writev(3p)
Junio C Hamano <[email protected]> Wed, 05 Aug 2026 13:29:44 -0700
| Newsgroups | org.kernel.vger.git |
|---|---|
| Message-ID | <[email protected]> |
Johannes Sixt <[email protected]> writes: > Am 05.08.26 um 20:40 schrieb Junio C Hamano: >> I think it is OK to explicitly document that any writev(2) emulation >> is allowed to be non-atomic, and it is also OK to declare that using >> writev(2) in this application to allow competing writes to the same >> destination is a bug. > > These are fine. > > But I'm not worried about current uses of writev, I'm worried about > future uses: "Look, we already use writev elsewhere. Let's use it here, > too, where we can take adavantage of the atomicity of the write." It's > too easy to miss a note about non-atomic emulations when the function > name advertises more than can be guaranteed. For this reason, I strongly > suggest to use a different name. That is why I added the "it is also OK to declare" in the above.