Skip to content

Gofer filesystem does not support hard links #6739

@ayushr2

Description

@ayushr2

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: filesystemIssue related to filesystemno-auto-closerevivedThe Issue has been revived by the issue reviver.type: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions