Open Jille opened 3 years ago
I think this could happen if the size of rufs-warnings.txt
changes between the readdir/stat and the open. We don't cache the contents of the rufs-warnings.txt
(since we generate it clientside, and we only cache contentside responses), so this scenario is possible:
rufs-warnings.txt
existsrufs-warnings.txt
is ~300 bytesrufs-warnings.txt
is now ~400 bytes so our Handleis a fixedContentHandle with 400 bytes content, but of course, fuse doesn't know that.This can also happen if the error around a client changes (e.g. context deadline exceeded <-> connection timeout).
This could be resolved if FUSE optimistically reads further than Stat size until it receives EOF. Not sure if we have any effect on that, though.
It can also happen the other way around: our Stat says the file is ~400 bytes, but then we open and the file is ~300 bytes, so fuse Read returns EOF before FUSE expects it. This should be handled gracefully though.
I would propose, until further evidence that this is really a bug, to close this as expected/acceptable behavior.
~483 bytes
This really should be impossible, no? fuse.go opens the handle, we get a vfs.fixedContentHandle. We shouldn't be in the business of reopening it.