← Back to context

Comment by polyrand

3 years ago

Yes, rename is atomic, but that doesn't get you very far. For example, if you want to do a partial update to a file, you need to copy the file (you already need more storage), edit the file and then rename it. But then you can't do this between multiple processes because maybe you have copied the file while another process was already changing a different copy (but not yet renamed). And that's not even considering fsync, or supporting different Operating Systems.