On 2019-11-13 20:29, Christos Zoulas wrote:
Yes, but open(O_EXCL) does not protect you against mmapped segments
(which has the potential to kill running processes that use shared
libraries/jar/other mapped files) or crashing in the middle of
writing a file and leaving stuff 1/2 written. For me safety trumps
speed (after all we don't mount our filesystems async :-), so I
would prefer that the default is slow and safe as opposed to fast
and unsafe, like the old pax/tar did:

     https://nxr.netbsd.org/xref/src/bin/pax/file_subs.c#238


But isn't the flow "unlink and extract new file" safe in this regard?

I don't like the "temp file" idea, since it potentially (depending on old and new file size) requires double the space on the file system.

regards,
chris

Reply via email to