Patent attributes
Described is hard link handling when a directory snapshot exists that includes the hard link's connected file object. A hard link is created by allocating a virtual inode number for the hard link, with the virtual inode number mapped to a real inode number that identifies a real inode of the file object; the hard link is assigned weight. A total weight associated with the real inode is increased by the hard link weight, and a hard link data store is updated with an entry for the hard link. Upon receiving data write request to the hard link, weight data determines that the file object is shared as a result of the snapshot; the hard link is disassociated from the real inode file, and associated with a new real inode number and new real inode of a new file object. The data is written based on the new real inode.