Feature #54205
hard links: explore using a "referent" inode whenever hard linking
0%
Description
https://docs.ceph.com/en/latest/dev/cephfs-snapshots/#hard-links
Part of the reason we have to snapshot hard linked files on every system snapshot is because we have no way of tracking all the snapshots that hard link may be part of. The owning location for the inode is easy because you always have to traverse down that path to open it, but there's no reverse link from the owner to all the referring links (because those dentries can get named out to arbitrary locations, and we don't have a place to store back traces like we do on regular file inodes).
But if a hard link generates a new inode X that says "I am a link to inode Y", we could store the backtrace for X's location there, and save metadata that X is a referent on inode Y, and use that information to open all the paths the file is linked to. Would that solve our "all relevant snapshots" lookup problem, or are there other issues that would need to be addressed?
History
#1 Updated by Venky Shankar about 2 years ago
- Assignee set to Kotresh Hiremath Ravishankar