No description
fuse-backend-rs spawns multiple threads, but these don't automatically inherit the tokio runtime context. Spawning tasks from "the wrong thread" would then cause a panic, as seen in https://git.snix.dev/snix/snix/issues/147. However, cl/30575 didn't really fix this, it only removed one place spawning tasks, without fixing the underlying issue. PathInfoService / BlobService / DirectoryService are expected to spawn tasks. We need to simply invoke `.enter()` from all worker threads, and that's what this CL does. An alternative would be to manually (re)-enter inside every function of the FileSystem trait, but that'd be very messy. A similar fix needs to end up in the virtiofs implementation, but we don't have control over the (single) thread being spawned by VhostUserDaemon there, so cannot just enter the runtime context there, so virtiofs will stay broken for now. Maybe it's time to re-architect this a bit - have our FileSystem impl be little code and call to sync endpoints to do the actual work, which is then handled by workers on another thread - but that's left for another CL. Change-Id: I58cdbd952f4ecc39bdc2f2fa69a788caa0cc78ba Reviewed-on: https://cl.snix.dev/c/snix/+/30585 Tested-by: besadii Reviewed-by: Vova Kryachko <v.kryachko@gmail.com> |
||
|---|---|---|
| .gcroots | ||
| .nixery | ||
| contrib | ||
| fun/solves-this | ||
| nix | ||
| ops | ||
| snix | ||
| third_party | ||
| tools | ||
| web | ||
| .editorconfig | ||
| .envrc | ||
| .git-blame-ignore-revs | ||
| .gitignore | ||
| .gitreview | ||
| .hgignore | ||
| .mailmap | ||
| .rgignore | ||
| buf.gen.yaml | ||
| buf.yaml | ||
| default.nix | ||
| LICENSE | ||
| OWNERS | ||
| README.md | ||
| RULES | ||
| rustfmt.toml | ||