-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Description
The gofer filesystem does not support hard links correctly.
The gofer client uses different dentry structs for hard linked files (which is correct) however hard linked files have the same inode. But the gofer client embeds the inode fields in the dentry struct itself. Hence inode properties for hard linked files can diverge because of this duplication.
Hard linked files also have different mappings by virtue of having separate dentries.
The solution would be to create a new inode abstraction in the gofer client. A dentry would then point to an inode. Dentries representing hard linked files will point to the same inode hence fixing the issue mentioned above.
Steps to reproduce
This bug can manifest in various ways (with an exclusive gofer mount). Create hard link to a file, change the ownership/time/size or any attribute of one file and see that the other does not reflect the change.
You can also write to one and read from the other and see that the data is not present.