kahing / catfs

Cache AnyThing filesystem written in Rust
Apache License 2.0
842 stars 54 forks source link

read syscall intermittently fails with ECANCELED (Operation canceled) #48

Open cebtenzzre opened 4 years ago

cebtenzzre commented 4 years ago

I have a brand-new, read-only catfs filesystem. I am using it to accelerate a python script that reads many small files from NFS. After the script reads 1,000-20,000 files, the read system call fairly reliably returns -ECANCELED. Python throws an exception and the script terminates. catfs does not log anything when this occurs.

ECANCELED is not mentioned as a possible error in the read(2) or read(3p) man pages. Does catfs actually intend to return this error? If so, what does it mean, and what are programs expected to do about it?

A quick grep shows this line of code as a potential source of the error: https://github.com/kahing/catfs/blob/daa2b85798fa8ca38306242d51cbc39ed122e271/src/catfs/file.rs#L499