cberner / fuser

Filesystem in Userspace (FUSE) for Rust
MIT License
835 stars 114 forks source link

ENOENT when reading the end of a file #238

Closed ToxicMushroom closed 1 year ago

ToxicMushroom commented 1 year ago

Hi, thanks for creating this library. I'm using it to try and create my first filesystem tagfs. This is a virtual filesystem which is mirroring a supplied source folder at the mountpoint and (will) provide tagging functionality.

I've tried multiple things in read for reading the last part of a file.

using strace cat name.mp4 > /dev/null I can see it returning an error on the last read. https://paste.sr.ht/~pixelhamster/f73f33740f04aafae30bc09f15c5e8feb9062f74

I'm currently under the assumption that it is my fault for misusing fuser

Package versions:

extra/fuse-common 3.14.1-1
extra/fuse2 2.9.9-4
extra/fuse3

Let me know if I need to provide more information.

ToxicMushroom commented 1 year ago

my getattr was simply returning NOENT for file :/ Some function checks if the file exists via getattr after reading an entire file if it was read in chunks apperantly.

ToxicMushroom commented 1 year ago

note this is the part that causes this behaviour: https://github.com/torvalds/linux/blob/ba0ad6ed89fd5dada3b7b65ef2b08e95d449d4ab/fs/fuse/file.c#L1062