Re:Out-Tridging Tridge by improving rsync
by keeperofdakeys on Wednesday August 28, 2013 @07:15PM
(#6293266)
Most Unix file systems don't have the semantics of a "move". You unlink an inode from a filename, and link another inode (usually the inode for the tmp file). Then you unlink the original tmp filename. As far as btrfs is concerned, there is no relation between these inodes, and without copying the file (like you suggest), you can't improve this.
Also, in case the FS is saving copies of the temp file and you don't like that, the --temp-dir option might help with that.
Then again, depending on how btrfs treats overwriting a file with a move, if the temp file had a timestamp in the name (patch probably needed) in some form before replacing the original, that might be good enough.