mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:37:34 +00:00
Kernel: Stop using NonnullLockRefPtrVector
This commit is contained in:
parent
21db2b7b90
commit
7369d0ab5f
41 changed files with 90 additions and 109 deletions
|
@ -12,13 +12,13 @@
|
|||
|
||||
namespace Kernel {
|
||||
|
||||
UNMAP_AFTER_INIT ErrorOr<NonnullLockRefPtr<NVMeNameSpace>> NVMeNameSpace::try_create(NVMeController const& controller, NonnullLockRefPtrVector<NVMeQueue> queues, u16 nsid, size_t storage_size, size_t lba_size)
|
||||
UNMAP_AFTER_INIT ErrorOr<NonnullLockRefPtr<NVMeNameSpace>> NVMeNameSpace::try_create(NVMeController const& controller, Vector<NonnullLockRefPtr<NVMeQueue>> queues, u16 nsid, size_t storage_size, size_t lba_size)
|
||||
{
|
||||
auto device = TRY(DeviceManagement::try_create_device<NVMeNameSpace>(StorageDevice::LUNAddress { controller.controller_id(), nsid, 0 }, controller.hardware_relative_controller_id(), move(queues), storage_size, lba_size, nsid));
|
||||
return device;
|
||||
}
|
||||
|
||||
UNMAP_AFTER_INIT NVMeNameSpace::NVMeNameSpace(LUNAddress logical_unit_number_address, u32 hardware_relative_controller_id, NonnullLockRefPtrVector<NVMeQueue> queues, size_t max_addresable_block, size_t lba_size, u16 nsid)
|
||||
UNMAP_AFTER_INIT NVMeNameSpace::NVMeNameSpace(LUNAddress logical_unit_number_address, u32 hardware_relative_controller_id, Vector<NonnullLockRefPtr<NVMeQueue>> queues, size_t max_addresable_block, size_t lba_size, u16 nsid)
|
||||
: StorageDevice(logical_unit_number_address, hardware_relative_controller_id, lba_size, max_addresable_block)
|
||||
, m_nsid(nsid)
|
||||
, m_queues(move(queues))
|
||||
|
@ -34,9 +34,9 @@ void NVMeNameSpace::start_request(AsyncBlockDeviceRequest& request)
|
|||
VERIFY(request.block_count() <= (PAGE_SIZE / block_size()));
|
||||
|
||||
if (request.request_type() == AsyncBlockDeviceRequest::Read) {
|
||||
queue.read(request, m_nsid, request.block_index(), request.block_count());
|
||||
queue->read(request, m_nsid, request.block_index(), request.block_count());
|
||||
} else {
|
||||
queue.write(request, m_nsid, request.block_index(), request.block_count());
|
||||
queue->write(request, m_nsid, request.block_index(), request.block_count());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue