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

Inode should be ulong instead of long #51

Open
Kimi-Arthur opened this issue Sep 16, 2024 · 0 comments
Open

Inode should be ulong instead of long #51

Kimi-Arthur opened this issue Sep 16, 2024 · 0 comments

Comments

@Kimi-Arthur
Copy link

According to stat.h, st_ino is of type __darwin_ino64_t , which is an alias of __uint64_t defined in _types.h (for Apple?)

Another example is from opengroup: stat.h says st_ino is of type ino_t and types.h says ino_t is unsigned integer types.

Normally it won't be an issue, but with mergerfs, the calculated inode number can be very big. With current code here, it can raise a conversion error like

System.OverflowException: Value was either too large or too small for an Int64.
   at System.Convert.ThrowInt64OverflowException()
   at System.Convert.ToInt64(UInt64 value)
   at Mono.Unix.UnixFileSystemInfo.get_Inode()
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

No branches or pull requests

1 participant