|
|
|
|
|
by nolist_policy
941 days ago
|
|
Well, for one rename() is not always meant to be durable. It can also be used for IPC, for example some mail servers use it to move mails between queues. Flushing before every rename is unexpected in that situation. Fun fact: rename() is atomic with respect to running applications per POSIX, that the on-disk rename is also atomic is only incidental. |
|
With this rule, three outcomes are acceptable: both occur, or neither occur, or just the file write happens. The unacceptable outcome is that just the rename happens.
("file write" here could mean a single write, or an open-write-close sequence, it doesn't particularly matter and I don't want to dig through old discussions in too much detail)