/* * Copyright (c) 2021, Pankaj R * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include "AK/kmalloc.h" #include #include #include #include #include #include #include #include #include #include namespace Kernel { class NVMeNameSpace : public StorageDevice { public: static ErrorOr> try_create(NonnullRefPtrVector queues, u8 controller_id, u16 nsid, size_t storage_size, size_t lba_size); explicit NVMeNameSpace(NonnullRefPtrVector queues, size_t storage_size, size_t lba_size, size_t major_number, size_t minor_number, u16 nsid, NonnullOwnPtr early_device_name); CommandSet command_set() const override { return CommandSet::NVMe; }; void start_request(AsyncBlockDeviceRequest& request) override; private: u16 m_nsid; NonnullRefPtrVector m_queues; }; }