CN113515469A - Method for creating and deleting name space and storage device - Google Patents

Method for creating and deleting name space and storage device Download PDF

Info

Publication number
CN113515469A
CN113515469A CN202110485960.1A CN202110485960A CN113515469A CN 113515469 A CN113515469 A CN 113515469A CN 202110485960 A CN202110485960 A CN 202110485960A CN 113515469 A CN113515469 A CN 113515469A
Authority
CN
China
Prior art keywords
namespace
unit
command
entry
logical address
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110485960.1A
Other languages
Chinese (zh)
Inventor
刘筱君
路向峰
曹定尊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Memblaze Technology Co Ltd
Original Assignee
Beijing Memblaze Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Memblaze Technology Co Ltd filed Critical Beijing Memblaze Technology Co Ltd
Priority to CN202110485960.1A priority Critical patent/CN113515469A/en
Publication of CN113515469A publication Critical patent/CN113515469A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/06Addressing a physical block of locations, e.g. base addressing, module addressing, memory dedication
    • G06F12/0615Address space extension
    • G06F12/063Address space extension for I/O modules, e.g. memory mapped I/O

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Methods for creating and deleting a namespace and a storage device are provided. The provided namespace creating method comprises the following steps: receiving a command to create a namespace, the command indicating a size of the namespace to be created; allocating a namespace identifier for a namespace to be created; an entry is added to the NS element mapping table to record the namespace identifier.

Description

Method for creating and deleting name space and storage device
Technical Field
The present invention relates to solid state storage devices, and in particular, to providing multiple namespaces in a solid state storage device.
Background
Taking a Solid-State Storage Device (SSD) as an example, as shown in fig. 1, a block diagram of the Storage Device is shown. The solid-state storage device 102 is coupled to a host for providing storage capabilities to the host. The host and the solid-state storage device 102 may be coupled by various methods, including but not limited to, connecting the host and the solid-state storage device 102 by, for example, SATA (Serial Advanced Technology Attachment), SCSI (Small Computer System Interface), SAS (Serial Attached SCSI), IDE (Integrated Drive Electronics), USB (Universal Serial Bus), PCIE (Peripheral Component Interconnect Express, PCIE, high-speed Peripheral Component Interconnect), NVMe (NVM Express, high-speed nonvolatile storage), ethernet, fiber channel, wireless communication network, etc. The host may be an information processing device, such as a personal computer, tablet, server, portable computer, network switch, router, cellular telephone, personal digital assistant, etc., capable of communicating with the storage device in the manner described above. The storage device 102 includes an interface 103, a control section 104, one or more NVM (Non-Volatile Memory) chips 105, and a DRAM (Dynamic Random Access Memory) 110. NAND flash, phase change memory, FeRAM, MRAM, etc. are common NVMs. The interface 103 may be adapted to exchange data with a host by means such as SATA, IDE, USB, PCIE, NVMe, SAS, ethernet, fibre channel, etc. The control unit 104 is used to control data transfer between the interface 103, the NVM chip 105, and the DRAM 110, and also used for memory management, host logical address to flash physical address mapping, erase leveling, bad block management, and the like. The control component 104 can be implemented in a variety of ways including software, hardware, firmware, or a combination thereof. The control unit 104 may be in the form of an FPGA (Field-programmable gate array), an ASIC (Application Specific Integrated Circuit), or a combination thereof. The control component 104 may also include a processor or controller in which software is executed to manipulate the hardware of the control component 104 to process IO commands. The control unit 104 is also coupled to the DRAM 110 and can access data of the DRAM 110. FTL tables and/or cached IO command data may be stored in the DRAM.
The control section 104 includes a flash interface controller (or referred to as a flash channel controller). The flash interface controller is coupled to NVM chip 105 and issues commands to NVM chip 105 to operate NVM chip 105 and receive command execution results output from NVM chip 105 in a manner that conforms to the interface protocol of NVM chip 105. The interface protocol of the NVM chip 105 includes well-known interface protocols or standards such as "Toggle", "ONFI", etc.
The memory Target (Target) is one or more Logic units (Logic units) that share a Chip Enable (CE) signal within the NAND flash package. Each logical Unit has a Logical Unit Number (LUN). One or more dies (Die) may be included within the NAND flash memory package. Typically, a logic cell corresponds to a single die. The logical unit may include a plurality of planes (planes). Multiple planes within a logical unit may be accessed in parallel, while multiple logical units within a NAND flash memory chip may execute commands and report status independently of each other. The meaning for target, logical Unit, LUN, Plane (Plane) is provided in "Open NAND Flash Interface Specification (Revision 3.0)" available from http:// www.micron.com// media/Documents/Products/Other% 20Documents/ONFI3_0 gold.
Data is typically stored and read on a storage medium on a page-by-page basis. And data is erased in blocks. A block contains a plurality of pages. Pages on the storage medium (referred to as physical pages) have a fixed size, e.g., 17664 bytes. Physical pages may also have other sizes.
In the solid-state storage device, mapping information from logical addresses to physical addresses is maintained using FTL (Flash Translation Layer). The logical addresses constitute the storage space of the solid-state storage device as perceived by upper-level software, such as an operating system. The physical address is an address for accessing a physical memory location of the solid-state memory device. Address mapping may also be implemented in the prior art using an intermediate address modality. E.g. mapping the logical address to an intermediate address, which in turn is further mapped to a physical address.
A table structure storing mapping information from logical addresses to physical addresses is called an FTL table. FTL tables are important metadata in solid state storage devices. Usually, the data entry of the FTL table records the address mapping relationship in the unit of data page in the solid-state storage device.
The FTL table includes a plurality of FTL table entries (or table entries). In one embodiment, each FTL table entry records a correspondence relationship between a logical page address and a physical page. In another example, each FTL table entry records the correspondence between consecutive logical page addresses and consecutive physical pages. In another embodiment, each FTL table entry records the corresponding relationship between the logical block address and the physical block address. In still another embodiment, the FTL table records the mapping relationship between logical block addresses and physical block addresses, and/or the mapping relationship between logical page addresses and physical page addresses.
Namespaces (NS) are also defined in the NVMe protocol. A namespace of size n is a set of logical blocks with logical block addresses from 0 to n-1. Namespaces can be uniquely identified by a Namespace ID (NSID). The namespace can be shared between the host/NVMe controllers. The hosts can access different namespaces through a single NVMe controller. Different hosts may also access the same namespace through multiple NVMe controllers. The logical blocks may be addressed and accessed. Each FTL table entry may correspond to one or more logical blocks, or a plurality of FTL table entries collectively correspond to one logical block.
Disclosure of Invention
The solid-state storage device needs to implement a namespace of the NVMe protocol and support creation and deletion of the namespace and access to the solid-state storage device according to the namespace.
According to a first aspect of the present application, there is provided a first method for processing an IO command according to the first aspect of the present application, where the IO command indicates a namespace identifier and a namespace logical address, the method including: mapping the namespace identifier and namespace logical address to a physical address; the physical address is accessed in response to the IO command.
According to the first method for processing an IO command of the first aspect of the present application, there is provided a second method for processing an IO command of the first aspect of the present application, further including: obtaining one or more namespace units corresponding to the namespace identifier, wherein the namespace units indicate a continuous global logical address space; selecting a first namespace unit from the one or more namespace units according to the namespace logical address, wherein a global logical address space indicated by the first namespace unit provides a global logical address accessed by the IO command; obtaining a global logic address accessed by the IO command according to the offset of the logic address of the namespace in the global logic address space indicated by the first namespace unit; and converting the global logical address accessed by the IO command into the physical address.
According to the second method for processing an IO command of the first aspect of the present application, there is provided a third method for processing an IO command of the first aspect of the present application, further including: selecting a second namespace unit from the one or more namespace units according to the namespace logical address length of the IO command, wherein a global logical address space indicated by the second namespace unit provides a global logical address accessed by the IO command; and obtaining a second global logic address accessed by the IO command according to the part of the length of the logic address of the namespace of the IO command in the global logic address space indicated by the second namespace unit.
According to the first method for processing an IO command of the first aspect of the present application, there is provided a fourth method for processing an IO command of the first aspect of the present application, further including: acquiring a base address of an NS unit mapping table entry according to the namespace identifier, wherein the NS unit mapping table entry takes the namespace identifier as an index, and takes the first address of the FTL table entry of the global logical address space indicated by one or more namespace units corresponding to the namespace identifier as content; calculating an offset value in the obtained NS unit mapping table entry according to the logic address of the namespace, and obtaining a first address of the FTL table entry at the offset value in the obtained NS unit mapping table entry; obtaining an FTL table entry according to the initial address of the FTL table entry and an FTL table entry offset value calculated according to the logic address of the name space; and obtaining the physical address from the FTL table entry.
According to a fourth method for processing an IO command of the first aspect of the present application, there is provided a fifth method for processing an IO command of the first aspect of the present application, further including: acquiring the first address of the next FTL table entry after the first address of the acquired FTL table entry in the acquired NS unit mapping table entry according to the namespace logical address and the namespace logical address length of the IO command and the acquired offset value in the NS unit mapping table entry; obtaining a second FTL table entry according to the first address of the next FTL table entry and the FTL table entry offset value calculated according to the logic address length of the name space; and obtaining the physical address from the second FTL table entry.
According to a second aspect of the present application, there is provided an apparatus for processing an IO command according to the second aspect of the present application, where the IO command indicates a namespace identifier and a namespace logical address, the apparatus comprising: an address mapping module for mapping the namespace identifier and namespace logical address to a physical address; and the access module is used for accessing the physical address to respond to the IO command.
According to a third aspect of the present application, there is provided a first namespace creation method according to the third aspect of the present application, comprising: receiving a command to create a namespace, the command indicating a size of the namespace to be created; allocating one or more namespace units according to the size of a namespace to be created, wherein the namespace units indicate a continuous global logical address space; allocating a namespace identifier for a namespace to be created; an entry is added to the NS unit mapping table to record the namespace identifier and the assigned one or more namespace units.
According to a first namespace creation method of the third aspect of the present application, there is provided a second namespace creation method according to the third aspect of the present application, wherein an available namespace unit is obtained from an NS unit assignment table, and assigned to a namespace to be created, wherein an entry of the NS unit assignment table records whether or not a namespace unit is assigned to the namespace.
According to the first or second namespace creation method of the third aspect of the present application, there is provided a third namespace creation method according to the third aspect of the present application, further comprising: and recording the NS unit mapping table or the update of the NS unit mapping table to the NVM chip.
According to the second namespace creation method of the third aspect of the present application, there is provided a fourth namespace creation method according to the third aspect of the present application, further comprising: and recording the NS unit distribution table or the update of the NS unit distribution table to the NVM chip.
According to one of the first to fourth processing namespace creation methods of the third aspect of the present application, there is provided the fifth namespace creation method according to the third aspect of the present application wherein one or more namespace units in NS unit mapping table entries are ordered, and a location of an NS unit in an NS unit mapping table entry indicates a location of the NS unit in the global logical address space.
According to a fourth aspect of the present application, there is provided a first namespace creating apparatus according to the fourth aspect of the present application, comprising: a command receiving module for receiving a command to create a namespace, the command indicating a size of the namespace to be created; the system comprises a namespace unit allocation module, a namespace unit allocation module and a namespace unit allocation module, wherein the namespace unit allocation module is used for allocating one or more namespace units according to the size of a namespace to be created, and the namespace units indicate continuous global logic address spaces; the identifier allocation module is used for allocating a namespace identifier for the namespace to be created; and the NS unit mapping table module is used for adding an entry in the NS unit mapping table so as to record the namespace identifier and the one or more allocated namespace units.
According to a fifth aspect of the present application, there is provided a first namespace deletion method according to the fifth aspect of the present application, comprising: receiving a command to delete a namespace, the command indicating a namespace identifier of a namespace to be deleted; deleting the entry taking the name space identifier as an index from an NS unit mapping table, wherein the entry of the NS unit mapping table takes the name space identifier as the index, and takes the first address of the FTL table entry of the continuous global logic address space indicated by the name space unit corresponding to the name space identifier as the content; and reclaiming the namespace identifier.
According to the first namespace deletion method of the fifth aspect of the present application, there is provided the second namespace deletion method of the fifth aspect of the present application, further comprising: the namespace unit recorded in the deleted entry of the NS unit mapping table is marked as unallocated in the NS unit allocation table, wherein the entry of the NS unit allocation table records whether the namespace unit is allocated to a namespace.
According to the first or second namespace deletion method of the fifth aspect of the present application, there is provided a third namespace deletion method according to the fifth aspect of the present application, further comprising: all entries following the deleted entry in the NS-unit mapping table are moved to fill the storage space occupied by the deleted entry.
According to one of the first to third namespace deletion methods of the fifth aspect of the present application, there is provided a fourth namespace deletion method according to the fifth aspect of the present application, further comprising: and recording the NS unit mapping table or the update of the NS unit mapping table to the NVM chip.
According to the second namespace deletion method of the fifth aspect of the present application, there is provided the fifth namespace deletion method according to the fifth aspect of the present application, further comprising: and recording the NS unit distribution table or the update of the NS unit distribution table to the NVM chip.
According to one of the first to fifth namespace deletion methods of the fifth aspect of the present application, a sixth namespace deletion method according to the fifth aspect of the present application is provided wherein the reclaimed namespace identifiers can be assigned to new namespaces.
According to a sixth aspect of the present application, there is provided a first namespace deletion apparatus according to the sixth aspect of the present application, comprising: a command receiving module for receiving a command to delete a namespace, the command indicating a namespace identifier of a namespace to be deleted; the NS unit mapping table module is used for deleting the items taking the name space identifiers as indexes from the NS unit mapping table, wherein the items of the NS unit mapping table take the name space identifiers as indexes, and the first address of the FTL table items of the continuous global logic address space indicated by the name space units corresponding to the name space identifiers is used as content; and an identifier recycling module for recycling the namespace identifier.
According to a seventh aspect of the present application, there is provided a first namespace creation method according to the seventh aspect of the present application, comprising: receiving a command to create a namespace, the command indicating a size of the namespace to be created; allocating a namespace identifier for a namespace to be created; an entry is added to the NS element mapping table to record the namespace identifier.
According to the first namespace creation method of the seventh aspect of the present application, there is provided the second namespace creation method of the seventh aspect of the present application, further comprising: receiving an IO command, wherein the IO command indicates a namespace identifier and a namespace logical address; assigning a namespace unit to the namespace logical address, wherein the namespace unit indicates a continuous global logical address space; recording the assigned namespace unit in an entry indexed by the namespace identifier in an NS unit mapping table; mapping according to the allocated namespace unit and the namespace logical address indicated by the IO command to obtain a physical address; the physical address is accessed in response to the IO command.
According to the first or second namespace creation method of the seventh aspect of the present application, there is provided a third namespace creation method according to the seventh aspect of the present application, further comprising: if the namespace unit is allocated to the namespace logic address, the physical address is obtained according to the allocated namespace unit and the namespace logic address mapping indicated by the IO command without allocating the namespace unit again, wherein the namespace unit indicates a continuous global logic address space.
According to one of the first to third namespace creation methods of the seventh aspect of the present application, there is provided the fourth namespace creation method of the seventh aspect of the present application, wherein one or more namespace units are allocated according to the namespace logical address and the namespace logical address length of the IO command.
According to one of the second to fourth namespace creation methods of the seventh aspect of the present application, there is provided a fifth namespace creation method according to the seventh aspect of the present application, further comprising: obtaining a global logic address accessed by the IO command according to the offset of the logic address of the name space in the global logic address space indicated by the name space unit; and converting the global logical address accessed by the IO command into the physical address.
According to one of the second to fourth namespace creation methods of the seventh aspect of the present application, there is provided a sixth namespace creation method according to the seventh aspect of the present application, further comprising: obtaining the initial address of an FTL table entry according to the name space unit; obtaining an FTL table entry according to the initial address of the FTL table entry and the offset of the logic address of the name space in the global logic address space indicated by the name space unit; and obtaining the physical address from the FTL table entry.
According to one of the second to sixth namespace creation methods of the seventh aspect of the present application, there is provided a seventh namespace creation method according to the seventh aspect of the present application, wherein: recording the assigned namespace unit in an NS unit mapping table at a first location in an entry indexed by the namespace identifier, wherein the first location corresponds to a location of the namespace logical address of the IO command in the namespace logical address space accessed by the IO command.
According to one of the second to seventh namespace creation methods of the seventh aspect of the present application, there is provided the eighth namespace creation method of the seventh aspect of the present application wherein the allocated namespace unit is a namespace unit that is obtained from an NS unit allocation table, wherein an entry of the NS unit allocation table records whether or not a namespace unit is allocated to a namespace.
According to one of the second to eighth namespace creation methods of the seventh aspect of the present application, there is provided a ninth namespace creation method according to the seventh aspect of the present application, further comprising: and recording the NS unit mapping table or the update of the NS unit mapping table to the NVM chip.
According to a ninth namespace creation method of the seventh aspect of the present application, there is provided the tenth namespace creation method of the seventh aspect of the present application, further comprising: and recording the NS unit distribution table or the update of the NS unit distribution table to the NVM chip.
According to an eighth aspect of the present application, there is provided a first namespace creating apparatus according to the eighth aspect of the present application, comprising: a command receiving module for receiving a command to create a namespace, the command indicating a size of the namespace to be created; the identifier allocation module is used for allocating a namespace identifier for the namespace to be created; and the NS unit mapping table module is used for adding an entry in the NS unit mapping table so as to record the namespace identifier.
According to a ninth aspect of the present application, there is provided a first IO command processing method according to the ninth aspect of the present application, including: receiving an IO command, wherein the IO command indicates a namespace identifier and a namespace logical address; assigning a namespace unit to the namespace logical address, wherein the namespace unit indicates a continuous global logical address space; recording the assigned namespace unit in an entry indexed by the namespace identifier in an NS unit mapping table; mapping according to the allocated namespace unit and the namespace logical address indicated by the IO command to obtain a physical address; the physical address is accessed in response to the IO command.
According to the first IO command processing method of the ninth aspect of the present application, there is provided the second IO command processing method of the ninth aspect of the present application, further comprising: if the namespace unit is allocated to the namespace logic address, the physical address is obtained according to the allocated namespace unit and the namespace logic address mapping indicated by the IO command without allocating the namespace unit again, wherein the namespace unit indicates a continuous global logic address space.
According to the first or second IO command processing method of the ninth aspect of the present application, there is provided the third IO command processing method of the ninth aspect of the present application, wherein one or more namespace units are allocated according to a namespace logical address and a namespace logical address length of the IO command.
According to one of the first to third IO command processing methods of the ninth aspect of the present application, there is provided a fourth IO command processing method of the ninth aspect of the present application, wherein a global logical address accessed by the IO command is obtained according to an offset of the namespace logical address in a global logical address space indicated by the namespace unit; and converting the global logical address accessed by the IO command into the physical address.
According to one of the first to fourth IO command processing methods of the ninth aspect of the present application, there is provided a fifth IO command processing method of the ninth aspect of the present application, wherein a first address of an FTL table entry is obtained according to the namespace unit; obtaining an FTL table entry according to the initial address of the FTL table entry and the offset of the logic address of the name space in the global logic address space indicated by the name space unit; and obtaining the physical address from the FTL table entry.
According to one of the first to fifth IO command processing methods of the ninth aspect of the present application, there is provided the sixth IO command processing method of the ninth aspect of the present application, wherein the assigned namespace unit is recorded in an NS unit mapping table at a first location in an entry indexed by the namespace identifier, wherein the first location corresponds to a location of the namespace logical address of the IO command in the namespace logical address space accessed by the IO command.
According to one of the first to sixth IO command processing methods of the ninth aspect of the present application, there is provided the seventh IO command processing method of the ninth aspect of the present application, wherein the allocating namespace unit is a namespace unit that is obtained from an NS unit allocation table, wherein an entry of the NS unit allocation table records whether or not the namespace unit is allocated to a namespace.
According to a tenth aspect of the present application, there is provided a first IO command processing apparatus according to the tenth aspect of the present application, including: the command receiving module is used for receiving an IO command, wherein the IO command indicates a namespace identifier and a namespace logic address; a namespace unit allocation module for allocating namespace units to the namespace logical addresses, wherein the namespace units indicate a continuous global logical address space; the NS unit mapping table module is used for recording the allocated namespace units in the entries indexed by the namespace identifiers in the NS unit mapping table; the address mapping module is used for mapping the allocated namespace units and the namespace logical addresses indicated by the IO commands to obtain physical addresses; and the access module is used for accessing the physical address to respond to the IO command.
According to an eleventh aspect of the present application, there is provided a first solid-state storage device according to the eleventh aspect of the present application, comprising a controller and a nonvolatile memory; the processor in the controller executes the program to perform the method according to any one of the first, third, fifth, seventh and ninth aspects of the present application.
Drawings
The invention, as well as a preferred mode of use and further objectives and advantages thereof, will best be understood by reference to the following detailed description of an illustrative embodiment when read in conjunction with the accompanying drawings, wherein:
FIG. 1 illustrates a block diagram of a solid-state storage device;
FIG. 2 is a schematic diagram of an FTL table and NS unit according to an embodiment of the present application;
FIG. 3A is a NS unit mapping table according to an embodiment of the present application;
FIG. 3B is a NS unit assignment table according to an embodiment of the present application;
FIG. 4 illustrates a flow diagram for mapping namespace logical addresses to global logical addresses;
FIG. 5 is a flow diagram of creating a namespace according to an embodiment of the application;
FIG. 6A is an NS element mapping table prior to creation of a namespace according to an embodiment of the application;
FIG. 6B is a NS unit assignment table prior to creation of a namespace according to an embodiment of the present application;
FIG. 7A is an NS unit mapping table after a namespace has been created according to an embodiment of the application;
FIG. 7B is a NS unit assignment table after a namespace has been created according to an embodiment of the application;
FIG. 8 is a flow diagram of deleting a namespace according to an embodiment of the application;
FIG. 9A is a NS element mapping table prior to the deletion of a namespace according to an embodiment of the present application;
FIG. 9B is a NS unit assignment table prior to namespace deletion according to an embodiment of the present application;
FIG. 10A is a NS unit mapping table after a namespace has been deleted according to an embodiment of the application;
FIG. 10B is a NS unit assignment table after namespace deletion according to an embodiment of the application; and
FIGS. 11A and 11B are flowcharts of creating a namespace and processing IO commands according to yet another embodiment of the present application.
Detailed Description
Fig. 2 is a diagram illustrating an FTL table and an NS unit (namespace unit) according to an embodiment of the present application.
FTL table 21 includes FTL table entries (e.g., FTL table entries 210, 212). The FTL table entry records the mapping relationship between the logical address and the physical address. FTL table 21 is stored in memory. It will be appreciated that the memory need not store the logical address of the FTL table entry, but rather the address of the memory is used to indicate the logical address and the stored value is used to indicate the physical address. The FTL tables may also be recorded using other means known to those skilled in the art.
According to an embodiment of the present application, an NS-unit (in fig. 2, the NS-unit is indicated by each of NSUN1, NSUN2, NSUN 3) for providing storage capability for a namespace is provided. Each NS unit indicates a continuous logical address space. For example, NSUN1 indicates logical address spaces 0-M-1, NSUN2 indicates logical address spaces M-2M-1, NSUN3 indicates logical address spaces 2M-1-3M, and NSUN k indicates logical address spaces (k-1) M (kM-1). The logical address space of each NS unit is much larger than the logical address space indicated by the FTL table entry. For example, FTL table entries consecutive by 1000 logical addresses indicate the logical address space of one NS unit.
The logical address space indicated by FTL table 21 is referred to as global logical address space, and the logical addresses therein are referred to as global logical addresses. The NS units are ordered, with the sequence number k of the NS unit indicating the position of the NS unit in the global logical address space. Optionally, the NS unit is indicated by the first address of the FTL table entry corresponding to the NS unit. For example, referring to fig. 2, NSUN1 is identified by the first address of FTL table entry 210.
Fig. 3A is a NS unit mapping table according to an embodiment of the present application, and fig. 3B is a NS unit allocation table according to an embodiment of the present application.
Referring to FIG. 3A, each entry of the NS unit mapping table records one of the namespaces identified by the NSID, and one or more NS units assigned to that namespace. The NSID is also called a namespace identifier, and is used to identify a namespace. In fig. 3A, entry 310 of the NS element mapping table records that 3 NS elements (NSUN1, NSUN9, and NSUN12) are allocated to a namespace (abbreviated as NS1) having an NSID of 1. One or more NS units recorded in an entry of the NS unit mapping table are ordered. The 3 NS units assigned to NS1 provide the logical address space for NS1 in sequence. For example, the logical address space of NS1 is 0 to (3M-1), where NSUN1 provides the logical address spaces 0 to M-1 of NS1, NSUN9 provides the logical address spaces M-2M-1 of NS1, and NSUN12 provides the logical address spaces 2M-3M-1 of NS 1.
As yet another example, the logical address space of NS1 is 0 to (3M-n) (where M is an integer and n is an integer less than M), where NSUN1 provides the logical address space 0 to M-1 of NS1, NSUN9 provides the logical address space M-2M-1 of NS1, and NSUN12 provides the logical address space 2M-3M-n of NS 1. In this example, the logical address space provided by NSUN12 to NS1 is only a portion of the logical address space of NSUN 12. Even though namespace NS1 only requires 1 logical block, it is assigned 1 full N-th cell.
For the sake of clarity, a logical address space belonging to a namespace is referred to as namespace logical address space, wherein logical addresses are referred to as namespace logical addresses. It will be appreciated that in the logical address space of the NS1, NSUN9 provides the M-2M-1 range of the namespace logical address space, while in solid state storage, NSUN9 provides the 8M-9M-1 range of the global logical address space. It will still be appreciated that the translation between the global logical address space and the namespace logical address space may be performed by the NS unit (either its sequence number or the first address of the FTL table entry). Thus, a plurality of NS units recorded in the entry of the NS unit mapping table provide a continuous address space (namespace logical address space) for each namespace, and for any address of the namespace logical address space, it can be mapped into the global logical address space by the NS unit providing the address.
Referring to fig. 3B, the NS unit assignment table records whether an NS unit of the solid-state storage device is assigned to a namespace. Since in fig. 3A, NSUN1, NSUN9, and NSUN12 are assigned to NS 1. Accordingly, in fig. 3B, the entries of the NS unit assignment table corresponding to NSUN1, NSUN9, and NSUN12 record that these NS units have been assigned. It is also noted in FIG. 3B that other NS units are not assigned to namespaces. Alternatively, only NS units not allocated to the namespace are recorded in the NS unit allocation table, so that the NS unit allocation table becomes a resource pool of NS units that provides all available NS units.
In the example of fig. 3B, the sequence numbers of the NS units (e.g., NSUN1, NSUN 2) and the assignment of the NS units are recorded in the entries of the NS unit assignment table. In another embodiment, since each entry of the NS unit assignment table records the assignment of NS units with consecutive sequence numbers, the sequence number of the NS unit can be omitted from the NS unit assignment table, and the sequence number of the corresponding NS unit can be determined according to the address of the NS unit assignment table entry. As another example, the NS unit is identified by replacing its sequence number with the first of the FTL table entries corresponding to the global logical address space indicated by the NS unit.
FIG. 4 illustrates a flow chart for mapping namespace logical addresses to global logical addresses.
The IO command received by the solid state storage device indicates the NSID and the namespace logical address. In order to access the solid-state storage device according to the IO command, a namespace logical address of the IO command needs to be converted into a global logical address of the solid-state storage device.
In response to receiving the IO command, the NSID it indicates is obtained, and the NS unit mapping table (see FIG. 3A) is accessed according to the NSID, resulting in the NS unit (410) assigned to the namespace having the NSID. And dividing the namespace logical address indicated by the IO command by the size of the NS unit to obtain a quotient and remainder (420). The NS element is obtained from the NS element assigned to the namespace having the NSID using the quotient as an ordinal number, and the remainder as an offset value within the obtained NS element. And according to the acquired sequence number of the NS unit, acquiring the position of the NS unit in the global logical address space, and adding an offset value to obtain the global logical address accessed by the IO command (430). The physical address is accessed in response to the IO command upon translating the global logical address to the physical address via the FTL table.
For example, the IO command indicates a consecutive 4 logical blocks beginning at logical address 2358 to access namespace NS 1. The NS unit mapping table (FIG. 3A) is queried according to NS1 to obtain NS units NSUN1, NSUN9 and NSUN 12. And dividing the namespace logical address 2358 by the size M of the NS unit's logical address space (e.g., M equals 2000) to obtain a quotient (q) and a remainder (r). Using the quotient (q) as an ordinal number, the q +1 (numbered from 1) NS cell (e.g., NSUN9) belonging to NS1, derived from the NS cell mapping table, is selected, and the global logical address M (9-1) of NSUN9 is derived from the sequence number "9" of NSUN9, plus the remainder (r) as an offset value. Then the global logical address of logical address 2358 of NS1 is M x (9-1) + r. And the IO command is to access 4 logical blocks in the global logical address space starting from logical address M (9-1) + r.
As another example, if an IO command indicates accessing 4 consecutive logical blocks beginning at logical address 2358 of namespace NS1, the logical address space of NSUN9 beginning at offset value (r) to the end of the logical address space is less than 4 logical blocks, meaning that the logical address space accessed by the IO command is provided by both NS units in common. The first portion of the logical address space accessed by the IO command is provided from the offset value (r) of the logical address space of NSUN9 to the end of the logical address space (denoted as r1), the second portion of the logical address space accessed by the IO command is provided from the start of the logical address space of the q +2 th NS cell (NSUN12) belonging to NS1 (denoted as r2), and r1+ r2 is 4 (the logical address length accessed by the IO command).
As yet another example, the IO command indicates a consecutive 4 logical blocks beginning at logical address 2358 to access namespace NS 1. And dividing the namespace logical address 2358 by the size M of the NS unit's logical address space to obtain a quotient (q) and a remainder (r). In the entries of the NS unit mapping table, the address of the first FTL table entry indicating the global logical address space corresponding to each NS unit is sequentially recorded. An entry of the NS unit mapping table is obtained from NS1, and the address of the starting FTL table entry corresponding to the global logical address space of the (q + 1) th NS unit (e.g., NSUN9) belonging to NS1 is obtained at the position of the mapping table entry whose offset value is the quotient (q). Based on the address of the starting FTL table entry, the remainder (r) is added as an offset value (optionally, appropriately adjusted according to the size of the logical address space corresponding to the FTL table entry, for example, the logical address space indicated by each FTL table entry holds 4 logical blocks), so as to obtain the FTL table entry address corresponding to the global logical address of the logical address 2358 of NS 1.
The global logical address of the NS unit may be obtained in other ways. For example, an NS unit address mapping table is provided that records the starting address of each NS unit in the global logical address space. In this way, each NS unit may have a different size of logical address space, thereby increasing the utilization of the NS unit. As yet another example, the NS cell is selected using the remainder (r) as the ordinal number, and the quotient (q) as the offset value within the logical address space to which the NS cell corresponds.
For processing the IO command, the NSID and the logic address of the name space are indicated by the IO command to obtain a global logic address, a physical address is obtained by using a global logic address FTL table, and the physical address is accessed to obtain data to be accessed by the IO command.
FIG. 5 is a flow diagram of creating a namespace according to an embodiment of the application.
To create a namespace in a solid state storage device, a host sends a command to the solid state storage device to create the namespace, the command indicating the size of the namespace that is desired to be created.
In response to receiving a command to create a namespace (510), an NS unit is allocated (520) depending on the size of the namespace to be created. Rounding up the namespace size to be created divided by the NS unit size results in the number of NS units to be allocated. For example, to create a namespace of 100GB in size, with 10GB per NS unit, 10 NS units are allocated. If a 101GB namespace is to be created, with each NS unit being 10GB in size, then 11 NS units need to be allocated to accommodate the created namespace.
The newly created namespace is assigned an NSID that has not been used (530). For example, two namespaces, NS1 and NS2, already exist in the solid-state storage device, and NS3 may be assigned to the newly created namespace as its NSID.
The mapping of the newly assigned NSID to the NS unit is recorded in the NS unit mapping table (550). And also record in the NS unit assignment table that the NS unit has been assigned.
Optionally, metadata (570) indexed by the NSID is also created for the namespace, in which the size of the namespace, the logical block size, and/or the starting address of the NS unit mapping table entry corresponding to the NSID is recorded. Thus, when an IO command for accessing the namespace having the NSID is received, the NSID is used as an index to obtain metadata, and an NS unit (a sequence number of the NS unit, or a first address of an FTL table indicating a global logical address space corresponding to the NS unit) for responding to the IO command is obtained at an offset position obtained by dividing a namespace logical address of the IO command by a size of the NS unit from a start address of an NS unit mapping table entry corresponding to the NSID.
Still optionally, the NS unit mapping table, the NS unit allocation table, and/or the namespace metadata or updates thereof are also recorded to the NVM chip of the solid state storage. To record updates to the NS unit mapping table and the NS unit assignment table, each assigned NS unit number and corresponding NSID may be recorded in pairs. Therefore, the updated unit mapping table and the NS unit distribution table can be rebuilt according to the initial values and all updates of the NS unit mapping table and the NS unit distribution table. And when the solid-state storage device is powered on, reconstructing the unit mapping table and the NS unit allocation table.
And the solid state storage provides a response to the host indicating that the namespace creation is complete. The NSID of the created namespace is also indicated in the response.
Fig. 6A is an NS unit mapping table before a namespace is created according to an embodiment of the present application, fig. 6B is an NS unit allocation table before a namespace is created according to an embodiment of the present application, fig. 7A is an NS unit mapping table after a namespace is created according to an embodiment of the present application, and fig. 7B is an NS unit allocation table after a namespace is created according to an embodiment of the present application.
Referring to FIG. 6A, each entry of the NS unit mapping table records one of the namespaces identified by the NSID, and one or more NS units assigned to that namespace. In FIG. 6A, entry 610 of the NS unit mapping table records that the NSID allocates 3 NS units (NSUN1, NSUN9, and NSUN12) for the namespace of NS1 (abbreviated as NS 1). Entry 620 of the NS element mapping table records that the NSID allocates 4 NS elements (NSUN4-7) for the namespace of NS2 (abbreviated NS 2).
Referring to fig. 6B, the NS unit assignment table records whether an NS unit of the solid-state storage device is assigned to a namespace. Since in FIG. 6A, NSUN1, NSUN4-7, NSUN9, and NSUN12 are assigned to namespaces. Accordingly, in FIG. 6B, the entries of the NS unit assignment tables corresponding to NSUN1, NSUN4-7, NSUN9, and NSUN12 record that these NS units have been assigned. It is also noted in FIG. 6B that other NS units are not assigned to namespaces.
By way of example, a command is received from a host to create a namespace of 15GB in size. The total size of the allocated NS units should be no smaller than the size of the namespace to be created. By way of example, each NS unit is 10GB in size, requiring two NS units to be allocated. Two NS units that have not yet been allocated (e.g., NS units numbered 2 and 8, labeled as NSUN2 and NSUN8, respectively) are obtained from the NS unit allocation table shown in fig. 6B. The namespace to be created is assigned an NSID of NS 3. An entry is added in the NS unit mapping table and the record NS3 corresponds to NSUN2 and NSUN8 (see fig. 7A). Record in the NS-unit assignment table that NSUN2 and NSUN8 have been assigned (see fig. 7B). Optionally, metadata is also created for NS3, recording the starting address of NS unit mapping table entry corresponding to NS3 of size 15GB and/or NS 3.
After attaching (Attach) the created namespace NS3 to the NVMe controller, NS3 can respond to the host's IO commands. Upon receiving an IO command to access NS3, NS cells belonging to NS3 are obtained from the NS cell mapping table or (if present) namespace metadata indexed by NS3, in accordance with the NSID of the IO command (NS3), and the namespace logical address accessed by the IO command is converted to a global logical address, and the global logical address is accessed to respond to the IO command.
FIG. 8 is a flow diagram of deleting a namespace according to an embodiment of the application.
To delete a namespace in a solid state storage device, a host sends a command to the solid state storage device to delete the namespace, with the command indicating the NSID of the namespace desired to be deleted.
In response to receiving a command to delete a namespace (810), the NSID of the namespace to delete is obtained. The NS unit mapping table is accessed and the entry corresponding to the NSID is deleted (820). Optionally, all entries in the NS-unit mapping table following the entry corresponding to the NSID are also moved to fill the space occupied by the deleted entry, so that the size of the NS-unit mapping table does not become too large due to the presence of a hole in the table. And updating the initial address of the NS unit mapping table entry corresponding to the NSID in the metadata of the namespace indexed by the NSID according to the address of the moved entry. When an entry corresponding to an NSID is deleted from the NS unit mapping table, or the starting address of the NS unit mapping table entry corresponding to an NSID is deleted from the metadata (if any) of the namespace indexed by the NSID, the namespace cannot be accessed any more because the mapping of the namespace logical address to the global logical address cannot be completed.
The NS units indicated in the deleted NS unit mapping table entry are also returned to the NS unit assignment table, where they are recorded as not assigned (830). The NS units in the unallocated state may again be allocated to other namespaces.
Optionally, updates to the NS unit mapping table, NS unit allocation table, and/or namespace metadata are also recorded to the NVM chip of the solid-state storage device.
And the solid state storage provides a response to the host indicating that the namespace deletion is complete.
Fig. 9A is an NS unit mapping table before a namespace is deleted according to an embodiment of the present application, fig. 9B is an NS unit allocation table before a namespace is deleted according to an embodiment of the present application, fig. 10A is an NS unit mapping table after a namespace is deleted according to an embodiment of the present application, and fig. 10B is an NS unit allocation table after a namespace is deleted according to an embodiment of the present application.
Referring to FIG. 9A, each entry of the NS unit mapping table records one of the namespaces identified by the NSID, and one or more NS units assigned to that namespace. In FIG. 9A, entry 910 of the NS unit mapping table records that the NSID allocates 3 NS units (NSUN1, NSUN9, and NSUN12) for the namespace of NS1 (abbreviated as NS 1). Entry 920 of the NS unit mapping table records that the NSID allocates 4 NS units (NSUN4-7) for the namespace of NS2 (abbreviated NS 2). Entry 930 of the NS unit mapping table records that the NSID allocates 2 NS units (NSUN2 and NSUN8) for the namespace of NS3 (abbreviated NS 2).
Referring to fig. 9B, the NS unit assignment table records whether an NS unit of the solid-state storage device is assigned to a namespace. Since in FIG. 9A, NSUN1, NSUN2, NSUN4-9, and NSUN12 are assigned to namespaces. Accordingly, in FIG. 9B, the entries of the NS unit assignment tables corresponding to NSUN1, NSUN2, NSUN4-9, and NSUN12 record that these NS units have been assigned. FIG. 9B also notes that other NS units are not assigned to namespaces.
By way of example, a command is received from the host to delete the namespace having NSID NS 2. And according to the NSID, accessing the NS unit mapping table, and deleting the entry with the NSID of NS 2. Optionally, all entries in the NS-unit mapping table that follow the entry whose NSID is NS2 are also moved to fill the storage space left after the deletion of the entry whose NSID is NS 2. Referring to FIG. 10A, the entry for NS3 with NSID advanced. It will be appreciated that the size of each entry of the NS-unit mapping table may vary due to the different number of NS-units occupied by the namespace. Optionally, metadata of the namespace indexed by the NSID is also maintained in the solid-state storage device, and when the namespace with the NSID of NS2 is deleted, the metadata of the namespace is deleted together. The NS unit (NSUN4-7) recorded in the NS unit mapping table that was originally assigned to the namespace having NSID NS2 is also marked as unallocated in the NS unit allocation table (fig. 10B). Thus, these NS elements (NSUN4-7) can be reassigned to other namespaces, and NSID "NS 2" can also be reassigned to other namespaces. Optionally, updates to the NS unit mapping table, NS unit allocation table, and/or namespace metadata are also recorded to the NVM chip of the solid-state storage device. And the solid state storage provides a response to the host indicating that the namespace deletion is complete.
FIGS. 11A and 11B are flow diagrams of creating a namespace according to yet another embodiment of the present application.
In response to receiving a command to create a namespace (1110), the newly created namespace is assigned an NSID that has not been used (1130). For example, two namespaces, NS1 and NS2, already exist in the solid-state storage device, and NS3 may be assigned to the newly created namespace as its NSID.
The newly assigned NSID is recorded in the NS unit mapping table entry (1150). At this time, the NS unit has not been allocated for the namespace NS3, and thus only the newly allocated NSID is recorded in the mapping table entry of the NS unit without including the NS unit. And without updating the NS unit allocation table. Sufficient space is reserved in the NS unit mapping table entry to accommodate the one or more NS units required by the namespace. For example, if the namespace requires 3 NS units, a storage space for accommodating 3 NSIDs or corresponding 3 FTL entry header addresses is reserved in the NS unit allocation table.
Optionally, metadata indexed by the NSID is also created for the namespace, in which the size of the namespace, the logical block size, and/or the starting address of the NS-unit mapping table entry corresponding to the NSID (and marking that no NS unit has been allocated) is recorded. Optionally, updates to the NS unit mapping table, NS unit allocation table, and/or namespace metadata are also recorded to the NVM chip of the solid-state storage device. Still alternatively, NS units needed for the namespace that has been created are recorded, although these NS units may not have been assigned to the namespace. In one embodiment, the difference between the total number of NS units of the solid-state storage device and the required NS units for the namespace that has been created is the number of NS units available for creating other namespaces. In another embodiment, since the host (user) will not use all of the storage capacity of the namespace in most cases, the NS units in the solid-state storage device that have not yet been allocated may be used to create other namespaces, and thus the number of NS units needed for the created namespace may be greater than the number of all of the NS units of the solid-state storage device to increase the usage of the NS units.
And the solid state storage provides a response to the host indicating that the namespace creation is complete. The NSID of the created namespace is also indicated in the response.
In the embodiment according to FIG. 11B, the NS element is actually allocated for a namespace only when an IO command is received to access the namespace. Referring to FIG. 11B, in response to receiving an IO command (1160), the IO command indicates the NSID and namespace logical address of the accessed namespace. It is checked by the NS unit mapping table or namespace metadata whether an NS unit has been assigned for the namespace logical address to be accessed (1170). If an NS unit has been allocated for the namespace logical address to be accessed by the IO command, a global logical address and/or a corresponding physical address is obtained according to the NS unit, and the physical address is accessed to respond to the IO command (1175). If the NS unit is not allocated to the logical address of the namespace to be accessed by the IO command, the unallocated NS unit is obtained (for example, by accessing the NS unit allocation table), and the obtained NS unit sequence number or the start address of the FTL entry corresponding to the NS unit (the start address and the NS unit sequence number are in a linear relationship) is filled into an entry (1180) of the NS unit mapping table corresponding to the NSID accessed by the IO command.
And determining the position of the allocated NS unit in the NS unit mapping table entry according to the namespace logic address of the IO command. For example, if the namespace occupies 3 NS units and the namespace logical address of the IO command indicates that the 2 nd NS unit is accessed, then the NS unit assigned at step 1180 is placed in the 2 nd storage location of the NS unit mapping table entry. As another example, where the namespace logical address of the IO command indicates that the 2 nd and 3 rd NS units are accessed, then the 2 NS units allocated at step 1180 are placed into the 2 nd and 3 rd storage locations of the NS Unit mapping table entry. And for the allocated NS unit, also updating the NS unit allocation table to record the allocated NS unit.
Global logical addresses and/or physical addresses corresponding to namespace logical addresses are obtained according to the allocated NS units, and the physical addresses are accessed in response to IO commands (1190).
In the embodiment shown in fig. 11A and 11B, the NS unit is allocated to the namespace only when it is used, thereby improving the utilization of the NS unit.
By way of example, to create a namespace of 100GB in size, each NS unit being 10GB in size, the number of NS units allocated to the namespace by the recording solid-state storage device is increased by 10, but NS units are not actually allocated to the created namespace. The namespace is assigned an NSID (NS 4). The NS4 is recorded in the entry of the NS unit mapping table, but the namespace has no NS unit yet, and 10 storage locations are reserved in the NS unit mapping table entry indexed by NS4 to accommodate the sequence number of the NS unit or the FTL entry start address corresponding to the NS unit. And indicates to the host that the namespace creation was successful.
In response to receiving a host-issued IO command, for example, namespace logical address A of NS4 is accessed. It is checked whether an NS element has been allocated for namespace logical address a of NS 4. For example, if an NS unit is allocated, the NS unit accessed should be the a/M +1 th NS unit allocated to belong to NS4, where M is the size of the logical address space of the NS unit. By accessing the NS unit mapping table entry with NS4 as an index, it is known whether its A/M +1 th NS unit has been allocated. If the NS unit is allocated, the global logical address corresponding to the namespace logical address a of the NS4 (or the FTL table entry address corresponding to the global logical address, or the physical address corresponding to the global logical address) is obtained according to the sequence number of the NS unit or the start address of the corresponding FTL table entry. If the NS unit is not allocated, the NS unit allocation table is accessed to obtain the unallocated NS unit, the A/M +1 position of the NS unit mapping table entry indexed by NS4 is filled, and the NS unit is recorded in the NS unit allocation table. And obtaining a global logical address corresponding to the namespace logical address a of the NS4 (or an FTL table entry address corresponding to the global logical address, or a physical address corresponding to the global logical address) according to the sequence number of the NS unit or the start address of the corresponding FTL table entry. And respond to IO commands with access to physical addresses.
Embodiments of the present invention also provide a program comprising program code that, when loaded into a host CPU and executed in the CPU, causes the CPU to perform the above method performed by the host.
Embodiments of the present invention also provide a program comprising program code which, when loaded into a storage device and executed thereon, causes a processor of the storage device to perform one of the methods described above as being performed by a device.
It will be understood that each block of the block diagrams and flowchart illustrations, and combinations of blocks in the block diagrams and flowchart illustrations, respectively, can be implemented by various means including computer program instructions. These computer program instructions may be loaded onto a general purpose computer, special purpose computer, or other programmable data control apparatus to produce a machine, such that the instructions which execute on the computer or other programmable data control apparatus create means for implementing the functions specified in the flowchart block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data control apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including computer-readable instructions for implementing the function specified in the flowchart block or blocks. The computer program instructions may also be loaded onto a computer or other programmable data control apparatus to cause a series of operational operations to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide operations for implementing the functions specified in the flowchart block or blocks.
Accordingly, blocks of the block diagrams and flowchart illustrations support combinations of means for performing the specified functions, combinations of operations for performing the specified functions and program instruction means for performing the specified functions. It will also be understood that each block of the block diagrams and flowchart illustrations, and combinations of blocks in the block diagrams and flowchart illustrations, can be implemented by special purpose hardware-based computer systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Although the present invention has been described with reference to examples, which are intended to be illustrative only and not to be limiting of the invention, changes, additions and/or deletions may be made to the embodiments without departing from the scope of the invention.
Many modifications and other embodiments of the inventions set forth herein will come to mind to one skilled in the art to which these embodiments pertain having the benefit of the teachings presented in the foregoing descriptions and the associated drawings. Therefore, it is to be understood that the inventions are not to be limited to the specific embodiments disclosed and that modifications and other embodiments are intended to be included within the scope of the appended claims. Although specific terms are employed herein, they are used in a generic and descriptive sense only and not for purposes of limitation.

Claims (10)

1. A namespace creation method comprising:
receiving a command to create a namespace, the command indicating a size of the namespace to be created;
allocating a namespace identifier for a namespace to be created;
an entry is added to the NS element mapping table to record the namespace identifier.
2. The method of claim 1, further comprising:
allocating one or more namespace units according to the size of a namespace to be created, wherein the namespace units indicate a continuous global logical address space;
an entry is added to the NS unit mapping table to record the namespace identifier and the assigned one or more namespace units.
3. The method of claim 2, wherein
The available namespace units are obtained from the NS unit assignment table and assigned to the namespace to be created, wherein entries of the NS unit assignment table record whether a namespace unit is assigned to the namespace.
4. The method of one of claims 1-3, further comprising: and recording the NS unit mapping table or the update of the NS unit mapping table to the NVM chip.
5. The method according to one of claims 1 to 4, wherein
One or more namespace units in the NS unit map entry are ordered, a location of the NS unit in the NS unit map entry indicating a location of the NS unit in the global logical address space.
6. The method of one of claims 1-5, further comprising:
receiving an IO command, wherein the IO command indicates a namespace identifier and a namespace logical address;
assigning a namespace unit to the namespace logical address, wherein the namespace unit indicates a continuous global logical address space;
recording the assigned namespace unit in an entry indexed by the namespace identifier in an NS unit mapping table;
mapping according to the allocated namespace unit and the namespace logical address indicated by the IO command to obtain a physical address;
the physical address is accessed in response to the IO command.
7. The method of claim 6, further comprising:
if the namespace unit is allocated to the namespace logic address, the physical address is obtained according to the allocated namespace unit and the namespace logic address mapping indicated by the IO command without allocating the namespace unit again, wherein the namespace unit indicates a continuous global logic address space.
8. A namespace deletion method comprising:
receiving a command to delete a namespace, the command indicating a namespace identifier of a namespace to be deleted;
deleting the entry taking the name space identifier as an index from an NS unit mapping table, wherein the entry of the NS unit mapping table takes the name space identifier as the index, and takes the first address of the FTL table entry of the continuous global logic address space indicated by the name space unit corresponding to the name space identifier as the content; and
the namespace identifier is reclaimed.
9. The method of claim 8, further comprising:
the namespace unit recorded in the deleted entry of the NS unit mapping table is marked as unallocated in the NS unit allocation table, wherein the entry of the NS unit allocation table records whether the namespace unit is allocated to a namespace.
10. A memory device includes a controller and a nonvolatile memory;
a processor in the controller executes a program to perform the method according to any one of claims 1-9.
CN202110485960.1A 2017-03-22 2017-03-22 Method for creating and deleting name space and storage device Pending CN113515469A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110485960.1A CN113515469A (en) 2017-03-22 2017-03-22 Method for creating and deleting name space and storage device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110485960.1A CN113515469A (en) 2017-03-22 2017-03-22 Method for creating and deleting name space and storage device
CN201710173447.2A CN108628762B (en) 2017-03-22 2017-03-22 Solid-state storage device and IO command processing method thereof

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN201710173447.2A Division CN108628762B (en) 2017-03-22 2017-03-22 Solid-state storage device and IO command processing method thereof

Publications (1)

Publication Number Publication Date
CN113515469A true CN113515469A (en) 2021-10-19

Family

ID=63706625

Family Applications (2)

Application Number Title Priority Date Filing Date
CN201710173447.2A Active CN108628762B (en) 2017-03-22 2017-03-22 Solid-state storage device and IO command processing method thereof
CN202110485960.1A Pending CN113515469A (en) 2017-03-22 2017-03-22 Method for creating and deleting name space and storage device

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN201710173447.2A Active CN108628762B (en) 2017-03-22 2017-03-22 Solid-state storage device and IO command processing method thereof

Country Status (1)

Country Link
CN (2) CN108628762B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI693517B (en) 2018-11-16 2020-05-11 慧榮科技股份有限公司 Method for performing storage space management, and associated data storage device and controller thereof
TWI749516B (en) * 2018-11-16 2021-12-11 慧榮科技股份有限公司 Method for performing storage space management, and associated data storage device and controller thereof
KR20200072639A (en) * 2018-12-12 2020-06-23 삼성전자주식회사 Storage device and operating method thereof

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110060887A1 (en) * 2009-09-09 2011-03-10 Fusion-io, Inc Apparatus, system, and method for allocating storage
US20140281040A1 (en) * 2013-03-13 2014-09-18 Futurewei Technologies, Inc. Namespace Access Control in NVM Express PCIe NVM with SR-IOV
US20150143134A1 (en) * 2013-11-15 2015-05-21 Kabushiki Kaisha Toshiba Secure data encryption in shared storage using namespaces
US20160170903A1 (en) * 2014-12-11 2016-06-16 Kabushiki Kaisha Toshiba Information processing device, non-transitory computer readable recording medium, and information processing system
US20160342463A1 (en) * 2015-05-20 2016-11-24 Kabushiki Kaisha Toshiba Data protection in a namespace
US20170024137A1 (en) * 2015-07-23 2017-01-26 Kabushiki Kaisha Toshiba Memory system for controlling nonvolatile memory
US20170024166A1 (en) * 2015-07-21 2017-01-26 Samsung Electronics Co., Ltd. Area and performance optimized namespace sharing method in virtualized pcie based ssd controller

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10102144B2 (en) * 2013-04-16 2018-10-16 Sandisk Technologies Llc Systems, methods and interfaces for data virtualization
CN106030552A (en) * 2014-04-21 2016-10-12 株式会社日立制作所 Computer system
WO2017040706A1 (en) * 2015-09-02 2017-03-09 Cnex Labs, Inc. Nvm express controller for remote access of memory and i/o over ethernet-type networks
CN105892955B (en) * 2016-04-29 2019-10-18 华为技术有限公司 A kind of method and apparatus managing storage system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110060887A1 (en) * 2009-09-09 2011-03-10 Fusion-io, Inc Apparatus, system, and method for allocating storage
US20140281040A1 (en) * 2013-03-13 2014-09-18 Futurewei Technologies, Inc. Namespace Access Control in NVM Express PCIe NVM with SR-IOV
US20150143134A1 (en) * 2013-11-15 2015-05-21 Kabushiki Kaisha Toshiba Secure data encryption in shared storage using namespaces
US20160170903A1 (en) * 2014-12-11 2016-06-16 Kabushiki Kaisha Toshiba Information processing device, non-transitory computer readable recording medium, and information processing system
US20160342463A1 (en) * 2015-05-20 2016-11-24 Kabushiki Kaisha Toshiba Data protection in a namespace
US20170024166A1 (en) * 2015-07-21 2017-01-26 Samsung Electronics Co., Ltd. Area and performance optimized namespace sharing method in virtualized pcie based ssd controller
US20170024137A1 (en) * 2015-07-23 2017-01-26 Kabushiki Kaisha Toshiba Memory system for controlling nonvolatile memory

Also Published As

Publication number Publication date
CN108628762B (en) 2021-05-28
CN108628762A (en) 2018-10-09

Similar Documents

Publication Publication Date Title
CN106354615B (en) Solid state disk log generation method and device
TWI679537B (en) Data moving method and storage controller
US10445246B2 (en) Memory system and method for controlling nonvolatile memory
KR102042643B1 (en) Managing multiple namespaces in a non-volatile memory (nvm)
US10761977B2 (en) Memory system and non-transitory computer readable recording medium
US20180089074A1 (en) Techniques to Manage Key-Value Storage at a Memory or Storage Device
CN109086219B (en) De-allocation command processing method and storage device thereof
CN108614668B (en) KV model-based data access method and solid-state storage device
CN107797934B (en) Method for processing de-allocation command and storage device
JP6147933B2 (en) Controller, flash memory device, method for identifying data block stability, and method for storing data in flash memory device
CN108595349B (en) Address translation method and device for mass storage device
US11347412B2 (en) Memory system and method of controlling nonvolatile memory
KR20200072639A (en) Storage device and operating method thereof
CN107797938B (en) Method for accelerating de-allocation command processing and storage device
CN108628762B (en) Solid-state storage device and IO command processing method thereof
CN109976664B (en) Log data organization for solid state storage devices
CN108614671B (en) Key-data access method based on namespace and solid-state storage device
US11347637B2 (en) Memory system and non-transitory computer readable recording medium
CN110554833A (en) Parallel processing of IO commands in a storage device
CN110865945B (en) Extended address space for memory devices
JP7407230B2 (en) ecc parity bias for key value data storage devices
CN112181274A (en) Large block organization method for improving performance stability of storage device and storage device thereof
CN110968520B (en) Multi-stream storage device based on unified cache architecture
CN108614669B (en) Key-data access method for solving hash collision and solid-state storage device
CN112115065A (en) Unified address space for memory devices

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination