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 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.
There's also all sorts of FSes that aren't based on hardware, like eCryptFS/EncFS for encrypted directories, s3fs for using AWS S3 as an FS, sshfs for remotely mounting a directory from another machine, btfs for mounting a bittorrent as an FS. The number of things that can be done as an FS seems almost boundless.
revision control systems are littered with filesystem projects that have died on the tree.