3 ms·
Am I missing something? I just skimmed it, but: "The nice thing here is that the specification of the rename system call requires it to be automic. So this ste
by GrayShade 7y ago
Am I missing something? I just skimmed it, but:
"The nice thing here is that the specification of the rename system call requires it to be automic. So this step either is done in full (in which case we’ll see the new data) or isn’t done at all (in which case we’ll see the old data, but we won’t have data corruption)."
From the "Files are hard" article:
"Rename isn't atomic on crash. POSIX says that rename is atomic, but this only applies to normal operation, not to crashes."