ilansch
ilansch

Reputation: 4878

vfs_rename on linux filesystems

on linux filesystems, I see that vfs_rename function is used when move is called on files/directories in the same device/filesystem.
When move files/directories cross file system or devices (e.g multi device file system such as btrfs - when copy file/dir between subvolumes) I see the following vfs operations: vfs_create (on destination) and vfs_delete (on source).

Is this assumption, that vfs_rename is only called within the same file system or device is true ?

Thanks

Upvotes: 0

Views: 187

Answers (1)

itisravi
itisravi

Reputation: 3561

Yes, rename(2) fails with EXDEV if source and destination are across multiple file systems.

Upvotes: 2

Related Questions