DataDog / glommio

Glommio is a thread-per-core crate that makes writing highly parallel asynchronous applications in a thread-per-core architecture easier for rustaceans.
Other
3.12k stars 164 forks source link

Fix stat to use the fd instead of the path #649

Closed vlovich closed 7 months ago

vlovich commented 7 months ago

What does this PR do?

Fixes #648. Noticed that the reported inode for two sibling O_TMPFILE was identical because the stat was being invoked on the parent directory (i.e. stat never worked for temporary files). Similarly, you can now remove the path backing a file and stat continues to work.

Motivation

2 sibling O_TMPFILE files having the same inode & being unable to get the size of a temporary file.

Related issues

Additional Notes

Checklist

[X] I have added unit tests to the code I am submitting [X] My unit tests cover both failure and success scenarios [] If applicable, I have discussed my architecture

glommer commented 7 months ago

tnx. Will merge, but format tests failing