Re:Things Unix can do atomically (2010)
by mancerayder on Monday May 30, 2016 @10:46PM
(#11804260)
So that implies that realistically there's a scenario where moving files or directories from one filesystem to another and some interruption occurs can lead to lost data?
[ Parent
| on HN ]
Re:Things Unix can do atomically (2010)
by Dylan16807 on Monday May 30, 2016 @10:57PM
(#11804289)
It's easy to design an algorithm that either succeeds with a move or fails with a copy, never losing data, but someone would have to look deeper into what was actually guaranteed and/or implemented.
Re:Things Unix can do atomically (2010)
by Sanddancer on Monday May 30, 2016 @11:26PM
(#11804364)
Very implausible. Mv across filesystems is usually implemented as a copy then delete. Worst case, you'll have the data exist in both locations.
It's possible, in case of physical disconnection or power interruption. There is no guarantee that the copied data will be flushed out of buffers into nonvolatile storage before the delete is (unless the program asks for such a flush and the system honors it).