summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorLiav A <liavalb@gmail.com>2021-08-27 08:08:43 +0300
committerAndreas Kling <kling@serenityos.org>2021-09-08 00:42:20 +0200
commitfb7b4caa574e8d4ad72657525590c5076d97a65a (patch)
treeee23eb822b2099db5ade437646ca2d28b91e7e97 /Userland
parent74c4c864bdc625c3584cbe6107a1617b946d7a86 (diff)
downloadserenity-fb7b4caa574e8d4ad72657525590c5076d97a65a.zip
Kernel/Storage: Implement basic AHCI hotplug support
This is really a basic support for AHCI hotplug events, so we know how to add a node representing the device in /sys/dev/block and removing it according to the event type (insertion/removal). This change doesn't take into account what happens if the device was mounted or a read/write operation is being handled. For this to work correctly, StorageManagement now uses the Singleton container, as it might be accessed simultaneously from many CPUs for hotplug events. DiskPartition holds a WeakPtr instead of a RefPtr, to allow removal of a StorageDevice object from the heap. StorageDevices are now stored and being referenced to via an IntrusiveList to make it easier to remove them on hotplug event. In future changes, all of the stated above might change, but for now, this commit represents the least amount of changes to make everything to work correctly.
Diffstat (limited to 'Userland')
0 files changed, 0 insertions, 0 deletions