Feature to unmount filesystem after some idle time
Like CryFS's --unmount-idle option to automatically unmount the filesystem X time after no operations (or open files, i assume).
In the absence of this feature, i wrote a shell script to parse the output of securefs m --trace, but obviously the logging slows things down (1.8s to 2.6s when writing a 100MiB file from /dev/random) and with my current shell implementation of the parser, it's super slow (7.6s). But otherwise it works well.
It would be nice to have this feature in securefs if possible. In the meantime i'll optimize the shell script -- probably stop it from reading lines for ~5 seconds after it detects a [Trace] line, or rewrite the parsing in awk.
Let me think how this can be done.
Here's the initial CryFS commit if it helps https://github.com/cryfs/cryfs/commit/978e7dbc467a22ab8b66dee4ff9fbabf019b0401
Fixed in https://github.com/netheril96/securefs/releases/tag/v2.0.0-beta1.