One feature I wish filesystems had is transaction support, ie:
begin transaction
create file X if it doesn't exist, otherwise abort transaction
write some stuff to file X
open file Y
overwrite some data in file Y
if <insert condition here> commit transaction
end transaction
Nested transactions would be required as you'd have no idea whether you're already in a transaction.Something like this can be coded (painfully) with renames, but it's unreliable, hard to test, and hard/impossible to coordinate with higher-level modules.