Skip to content

Commit 05f5937

Browse files
Champ-Goblembergwolf
authored andcommitted
fuse: Ensure lookup sets st_ino of attributes
The filesystem test utility xfs-tests[1] failed on test generic/007 with the error nametest.16 (8370) lookup, should be inumber 72057594037927972. It can be observed in the kernel that the inode number for the file often switches between the hosts inode number and the fuse assigned one. In the vfs lookup function the out entry inode is set on the top level but does not update attr.st_ino field. Adjust this so that the inode number is correctly set on the attributes. After this change the test generic/007 passes. [1] https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git/tree/ Signed-off-by: Champ-Goblem <[email protected]>
1 parent 9ad3977 commit 05f5937

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/api/vfs/sync_io.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ impl FileSystem for Vfs {
7979
// parent is in an underlying rootfs
8080
let mut entry = fs.lookup(ctx, idata.ino(), name)?;
8181
// lookup success, hash it to a real fuse inode
82-
entry.inode = self.convert_inode(idata.fs_idx(), entry.inode)?;
82+
let new_ino = self.convert_inode(idata.fs_idx(), entry.inode)?;
83+
entry.inode = new_ino;
84+
entry.attr.st_ino = new_ino;
8385
Ok(entry)
8486
}
8587
}

0 commit comments

Comments
 (0)