You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
…ic dir.
This is consistent with attempting to hard link a synthetic file in a synthetic
directory (fs.LinkAt() => fs.doCreateAt(..., createInSyntheticDir=nil)), which
should result in error.
Due to #6739, fsimpl/gofer does not support hard links correctly since it does
not have an inode abstraction. All inode fields are embedded in the dentry.
So inode attributes and file data of hard linked files can go out of sync.
In remote_revalidating mode, at least the inode attributes of non-synthetic
files are refreshed on each access. But since synthetic files don't exist on
the remote filesystem, there is no way to sync hard linked synthetic dentries.
We'd have to wait for #6739 to be resolved to add such support. For now
returning EOPNOTSUPP is most consistent.
Fixes#10143.
PiperOrigin-RevId: 615537813
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.
The text was updated successfully, but these errors were encountered: