/* * Copyright (c) 2021, Pankaj R * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include #include #include #include #include #include #include namespace Kernel { class NVMeController; class NVMeNameSpace : public StorageDevice { friend class DeviceManagement; public: static ErrorOr> try_create(NVMeController const&, NonnullLockRefPtrVector queues, u16 nsid, size_t storage_size, size_t lba_size); CommandSet command_set() const override { return CommandSet::NVMe; }; void start_request(AsyncBlockDeviceRequest& request) override; private: NVMeNameSpace(LUNAddress, u32 hardware_relative_controller_id, NonnullLockRefPtrVector queues, size_t storage_size, size_t lba_size, u16 nsid); u16 m_nsid; NonnullLockRefPtrVector m_queues; }; }