atomically swap two files

Frank A. Kingswood
2010-11-25T20:13:19Z

Hi!

Is it possible to swap two files in an atomic way, so that after the
syscall either the two files have exchanged names or neither has been
modified?

I suspect that btrfs could do it, but I'm wondering about ext3/4.

Frank