Bug 217068

Summary: Command to determine that two files are identical reflinks of each other
Product: File System Reporter: John Wiersba (jrw32982)
Component: btrfsAssignee: BTRFS virtual assignee (fs_btrfs)
Status: NEW ---    
Severity: normal    
Priority: P1    
Hardware: All   
OS: Linux   
See Also: https://github.com/tytso/e2fsprogs/issues/88
Kernel Version: 5.4 Subsystem:
Regression: No Bisected commit-id:

Description John Wiersba 2023-02-21 21:04:41 UTC
Btrfs/xfs needs a way to identify reflinked files.  If I run a user-level command, say btrfs-id FILE, it returns a string containing an identifier.  If I then run btrfs-id ANOTHER_FILE and find that the two outputs are identical, then I know that FILE and ANOTHER_FILE are "identical" reflinked files.  This would be similar in concept to using dev/ino to identify file content in ext4.