Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added basic support to inode in filestat_get (for #3583 and #3239) #3765

Merged
merged 2 commits into from
Apr 13, 2023

Conversation

ptitSeb
Copy link
Contributor

@ptitSeb ptitSeb commented Apr 13, 2023

Added basic support to inode in filestat_get.
the field st_dev is still 0, but the st_ino is now set to the u64 value of the current inodes.
The effectively fixed #3583
And also fixes #3239

@Michael-F-Bryan
Copy link
Contributor

Is there any reason why we need to set the st_ino field in the first place? I would have thought file_inode.stat would be set up correctly when it is first created.

@ptitSeb
Copy link
Contributor Author

ptitSeb commented Apr 13, 2023

Is there any reason why we need to set the st_ino field in the first place? I would have thought file_inode.stat would be set up correctly when it is first created.

Low level fs don't all have inode. It would be nice to have low level vfs set it up, but that would require intessive change for now, so a high level change will be fine for now.

@theduke
Copy link
Contributor

theduke commented Apr 13, 2023

@ptitSeb we should have a test for this.

@ptitSeb
Copy link
Contributor Author

ptitSeb commented Apr 13, 2023

@theduke, I added a test

@ptitSeb ptitSeb enabled auto-merge (squash) April 13, 2023 14:04
@ptitSeb ptitSeb merged commit 60107df into master Apr 13, 2023
@ptitSeb ptitSeb deleted the feat_filestat_inode branch April 13, 2023 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

st_dev and st_ino returned by stat() are always zero Get unexpected behavior on running clang.wasm
3 participants