Task #4776

change mount/unmount metaphor to attach/detach

Added by hans almost 3 years ago.

Status:NewStart date:03/23/2015
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:0.3.1
Component:

Description

Right now, IOCipher is built around a model of a single process accessing the IOCipher container. For this, it is easy to make mount() and unmount() make sense. But the underlying sqlfs layer fully supports multi-threaded access, both read and write, thanks to the magic of SQLite3. IOCipher should then also fully support multi-threaded access, and that means changing the API to reflect what the developer needs to track, and to better represent what is happening inside IOCipher.

attach() and detach() seem to make a lot more sense in the multi-threaded case, where mount() and unmount() do not. The mount metaphor is about a single action to make the disk ready for use, aka "mounting", then any process can use that mounted disk.

In order to handle when cacheword's timeout expires, IOCipher should also lock. This shouldn't force lock IOCipher, but instead let threads finish. Each thread will then be responsible for connecting to an IOCipher container, then disconnecting from it when complete.

Also available in: Atom PDF