-
Notifications
You must be signed in to change notification settings - Fork 0
Use an Async Command Queue in AHCIPort #3
Description
We are currently in the process of reworking our filesystem APIs to fully abstract away the specific implementation of how it interacts with the FS on the disk (or even if it does so at all, e.g. ramfs). To make this new API thread-safe, we used Arc Mutexes to hold much of our objects, including a shared weak reference to each directory's corresponding the filesystem. This introduces an edge case where two parallel processes are trying to simultaneously access filesystem APIs, thus causing the mutex to be locked. Instead, we propose an async API for filesystem access as well as reworking the AHCIPort interface to be async, and add to the command queue instead of awaiting immediate AHCI command execution, thus locking the whole AHCI port and preventing other processes from accessing it.