The bytes saved calculation doesn't take into account whether the destination file is already hardlinked, which makes the result overly optimistic. If a destination file is already hardlinked, it shouldn't count towards the bytes saved in did_hardlink().
If/when the stat_info data saved to file_hashes is kept up to date after the link() operation, we could use it to properly calculate the amount of bytes saved (basically when a link destination file has a link count of 1).
The bytes saved calculation doesn't take into account whether the destination file is already hardlinked, which makes the result overly optimistic. If a destination file is already hardlinked, it shouldn't count towards the bytes saved in did_hardlink().
If/when the stat_info data saved to file_hashes is kept up to date after the link() operation, we could use it to properly calculate the amount of bytes saved (basically when a link destination file has a link count of 1).