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

fstat + stat inode support #119

Danack opened this issue Nov 9, 2015 · 3 comments


Copy link

commented Nov 9, 2015

It looks like in the stream wrapper that the values for inodes in stream_stat are hard-coded to 0.

Is that from a limitation, or is that just something that support hasn't been added yet?

The context is that I have a unit-test that needs to behave in a certain way when a file on a disk has been unlinked, and replaced with a file of the same name, but checks the inode values to see if it is the original file. Which is not testable currently using vfsStream as the inodes are always 0, so it appears to be the same file.


This comment has been minimized.

Copy link

commented Nov 9, 2015

I'd say support just hasn't been added yet. This is the first time I hear that someone uses the inode information. 😃 On the other hand, I don't know much about inodes (yet) so I can't say what a proper implementation must look like.


This comment has been minimized.

Copy link

commented Nov 9, 2015

I think for most people who are concerned with inodes, the behaviour would be 'correct enough' if

  • each file created is given a unique inode number.
  • renaming files does not change the inode number.
  • unlinking or otherwise deleting the file does not alter the inode number. The file needs to exist on disk after it has been unlinked while any process has an active filehandle to it. As it's probably too hard to keep track of filehandles, just not re-using inode numbers during a test would accomplish that.

However, if I'm the first person to ask about it, it's probably not worth doing. Or at least not justified by a single person asking about it.

Although skipping file IO in unit tests is a nice idea, getting the vfs stuff to support it correctly might be a non-trivial amount of work.

@mikey179 mikey179 added the feature label Jan 11, 2016
@mikey179 mikey179 changed the title fstat + stat support ? fstat + stat inode support Jan 11, 2016

This comment has been minimized.

Copy link

commented Oct 24, 2017

Or at least not justified by a single person asking about it.

I would like this too.

bizurkur added a commit to bizurkur/vfsStream that referenced this issue Sep 27, 2019
@bizurkur bizurkur closed this in 8e0a833 Sep 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.