cberner / fuser

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

Filesystem.destroy() is not always called when using BackgroundSession #239

Open thundergolfer opened 1 year ago

thundergolfer commented 1 year ago

https://github.com/cberner/fuser/pull/154 (Ensure that Filesystem.destroy() is always called) made destroy() an exactly once method for Session, but BackgroundSession still relies on the ll::Operation::Destroy request to be received from the kernel.

We have an issue where an OverlayFS unmount is failing, and this somehow causes a subsequent FUSE unmount to not send back ll::Operation::Destroy so the .destroy() method is never run, and some teardown code of ours inside it isn't executed.

It seems desirable that both Session and BackgroundSession support running destroy() exactly once. Is this feasible?

I'm happy to take a crack at the change.

cberner commented 1 year ago

I haven't been working on fuser very actively, recently, but ya that seems desirable to call it exactly once in both cases. So ya, if you find a good way to implement that I'm happy to merge it.