Storage devices of PI operated via DMA units and methods thereof

By optimizing the generation, inspection, and deletion of protection information through DMA units, the problems of increased processing latency and power consumption in storage devices are solved, achieving more efficient data processing and device adaptability.

CN113448494BActive Publication Date: 2026-07-31BEIJING STARBLAZE TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING STARBLAZE TECH CO LTD
Filing Date
2020-03-27
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing storage devices suffer from increased processing latency and power consumption when handling protected information, and they are also unable to flexibly meet the needs of different hosts, resulting in design complexity and wasted resources.

Method used

The protection information is processed using a DMA unit. By generating, checking, and deleting protection information, the data and metadata transfer process is controlled according to DMA commands, thereby optimizing the checking and processing of protection information and reducing unnecessary protection information transmission.

Benefits of technology

It reduces processing latency and power consumption, improves the flexibility and efficiency of storage devices, adapts to diverse host requirements, and simplifies the design of control components.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113448494B_ABST
    Figure CN113448494B_ABST
Patent Text Reader

Abstract

This application discloses a storage device and method for operating a PI via a DMA unit. The control component in the disclosed storage device includes a processor and a DMA unit; the processor provides one or more DMA commands to the DMA unit; the DMA unit moves data and metadata according to the DMA commands; wherein, according to the instruction of a first DMA command, the DMA unit acquires data and metadata, and discards part or all of the acquired metadata, storing only the acquired data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to storage technology, and in particular to a storage device that uses DMA units to operate PI (Protection Information) and a method for operating PI. Background Technology

[0002] Figure 1 A block diagram of the storage device is shown. Storage device 102 is coupled to a host to provide storage capabilities to the host. The host and solid-state storage device 102 can be coupled in various ways, including but not limited to connections via 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), NVMe (NVM Express), Ethernet, Fibre Channel, and wireless communication networks. The host can be an information processing device capable of communicating with the storage device via the above methods, such as a personal computer, tablet computer, server, laptop computer, network switch, router, cellular phone, or personal digital assistant. Storage device 102 includes interface 103, control unit 104, one or more NVM chips 105, and DRAM (Dynamic Random Access Memory) 110.

[0003] NAND flash memory, phase change memory, FeRAM (Ferroelectric RAM), MRAM (Magnetic Random Access Memory), RRAM (Resistive Random Access Memory), XPoint memory, etc. are common NVMs.

[0004] Interface 103 is compatible with exchanging data with the host via methods such as SATA, IDE, USB, PCIe, NVMe, SAS, Ethernet, and Fibre Channel.

[0005] The control unit 104 is used to control data transfer between the interface 103, the NVM chip 105, and the DRAM 110. It is also used for memory management, host logical address to flash physical address mapping, erase leveling, bad block management, etc. The control unit 104 can be implemented in various ways, including software, hardware, firmware, or a combination thereof. For example, the control unit 104 can be in the form of an FPGA (Field-programmable gate array), an ASIC (Application Specific Integrated Circuit), or a combination thereof. The control unit 104 may also include a processor or controller, in which software executes to manipulate the hardware of the control unit 104 to process I / O (Input / Output) commands. The control unit 104 can also be coupled to the DRAM 110 and can access the data in the DRAM 110. FTL tables and / or cached I / O command data can be stored in the DRAM.

[0006] The control unit 104 includes a flash interface controller (or media interface controller, flash channel controller), which is coupled to the NVM chip 105 and issues commands to the NVM chip 105 in accordance with the interface protocol of the NVM chip 105 to operate the NVM chip 105, and receives the command execution results output from the NVM chip 105. Known NVM chip interface protocols include "Toggle", "ONFI", etc.

[0007] In storage devices, the FTL (Flash Translation Layer) is used to maintain the mapping information from logical addresses to physical addresses. Logical addresses constitute the storage space of the storage device as perceived by upper-layer software such as the operating system. Physical addresses are the addresses used to access the physical storage units of the storage device. In related technologies, intermediate address formats can also be used for address mapping. For example, a logical address can be mapped to an intermediate address, and then the intermediate address can be further mapped to a physical address. In these cases, the read / write commands received by the storage device indicate the logical address.

[0008] A table structure that stores mapping information from logical addresses to physical addresses is called an FTL table. The FTL table is important metadata in storage devices. Typically, FTL table entries record address mappings within the storage device, on a per-data-page basis.

[0009] For some storage devices, the File Transfer Table (FTL) is provided by the host coupled to the storage device. The host's memory stores the FTL table, and the host's CPU executes the FTL software. In other cases, a storage management unit positioned between the host and the storage device provides the FTL. In these situations, the read / write commands received by the storage device indicate the physical address.

[0010] Data errors can also occur due to data transmission channels or other components in the storage system. The NVMe standard defines end-to-end data protection. Protection information (PI) is carried in the transmitted data; this information is related to the transmitted data to identify whether errors exist. DIF / DIX (Data Integrity Field / Data Integrity Extension), defined by the T10 subcommittee of ICITS (International Committee for Information Standards), is also used to verify data integrity (available at http: / / www.t10.org / ftp / t10 / document.03 / 03-111r0.pdf).

[0011] The Protection Information (PI) in the NVMe standard includes three fields: Guard, Application Tag, and Reference Tag. For example, the Guard field contains verification information for the corresponding data (e.g., CRC checksum), the Application Tag field is provided by the application that generated the data, and the Reference Tag field is, for example, the logical address of the transmitted data.

[0012] The control unit of the storage device performs a protection information (PI) check during processes such as data transfer. If the protection information (PI) fails the check, an error message will be displayed indicating that the data contains errors.

[0013] Figure 2A and Figure 2B A schematic diagram illustrating the use of PI in storage devices is shown.

[0014] See Figure 2AIn one operating mode, the host provides the data 210 to be written to the control unit of the storage device, carrying protection information (PI). The protection information has a specified relationship with the data 210, allowing the control unit to check whether the received data and the protection information (PI) have this specified relationship to detect errors in data transmission. The control unit also writes data 215, along with the protection information (PI), to the NVM chip. Data 215 is the same as data 210, or data derived from data 210 (e.g., with added ECC check information).

[0015] When reading data, the control unit obtains data 225 and its protection information (PI) from the NVM chip. The control unit checks whether data 225 and its protection information (PI) have a specified relationship, and transmits data 220 and its protection information (PI) to the host. Data 220 and data 225 can be the same data, or data 220 can be obtained by ECC decoding of data 225.

[0016] As an example, the DMA (Direct Memory Access) unit of the control component checks the protection information (PI) of the data when transmitting data, and / or generates protection information (PI) for the data.

[0017] See Figure 2B In another operating mode, the host provides the data 240 to be written to the control unit of the storage device without carrying protection information (PI). The control unit generates protection information (PI) based on data 240 and writes data 245 together with the generated protection information (PI) to the NVM chip. Data 245 is the same data as data 240, or data obtained from data 240 (e.g., with added ECC check information). When reading data, the control unit obtains data 255 and its protection information (PI) from the NVM chip. The control unit checks whether data 255 and its protection information (PI) have a specified relationship. If the check result is correct, the control unit deletes the protection information (PI) carried by data 255 and transmits data 250 to the host. Data 250 and data 255 can be the same data, or data 250 can be obtained by ECC decoding of data 255. Summary of the Invention

[0018] Protection information is optional. Data written by the host to the storage device may or may not include protection information, and may include one or more types of protection information. The host may or may not check the protection information of data read from the storage device, and may check one or more types of protection information. For the purpose of simplifying the design, the control unit of the storage device may check the complete protection information for all data written to or read from it to meet diverse host requirements, but such an implementation increases processing latency and power consumption.

[0019] It is desirable to provide appropriate checks on protection information as needed, and to use only the necessary protection information without transmitting or storing unnecessary protection information, in order to improve processing latency, reduce power consumption, and / or reduce the amount of data written to storage devices. It is also desirable to offload the processor burden of the control unit and implement the checking and / or processing of protection information in hardware.

[0020] It is also hoped that multiple ways of using various protections can be easily implemented or changed without redesigning storage devices.

[0021] According to a first aspect of this application, a first control component according to the first aspect of this application is provided, comprising a processor and a DMA unit; the processor provides one or more DMA commands to the DMA unit; the DMA unit moves data and metadata according to the DMA commands; wherein, according to the instruction of the first DMA command, the DMA unit acquires data and metadata, and discards part or all of the acquired metadata, while storing only the acquired data.

[0022] According to the first control component of the first aspect of this application, a second control component of the first aspect of this application is provided, wherein the control component is also coupled to a memory; the DMA unit stores part or all of the acquired data and the acquired metadata into the memory.

[0023] According to the first or second control component of the first aspect of this application, a third control component of the first aspect of this application is provided, which further includes a media interface controller; the media interface controller writes data from the memory to the non-volatile memory, or reads data from the non-volatile memory and moves it to the memory.

[0024] According to the control component of any one of the first to third claims of the first aspect of this application, a fourth control component of the first aspect of this application is provided, wherein a first DMA command instructs a DMA unit to acquire complete metadata and delete a specified portion of the acquired metadata, and writes the remaining portion of the metadata after the specified portion has been deleted into memory in association with the corresponding data.

[0025] According to the fourth control component of the first aspect of this application, a fifth control component of the first aspect of this application is provided, wherein the metadata includes protection information; a first DMA command instructs the DMA unit to delete one or more of the verification information, reference tag and application tag in the protection information of the metadata, and in response, the DMA unit deletes one or more of the verification information, reference tag and application tag according to the first DMA command during the process of moving data and its metadata from the host to the memory, and the deleted protection information is not written to the memory.

[0026] According to the fourth or fifth control component of the first aspect of this application, a sixth control component of the first aspect of this application is provided, wherein, in response to a first DMA command instructing the deletion of a reference tag, the DMA unit further checks whether a reference tag exists in the metadata obtained from the host; if the metadata received from the host does not contain a reference tag, the DMA unit writes the complete metadata received from the host along with the data into the memory.

[0027] According to the control component of any one of the fourth to sixth claims of the first aspect of this application, a seventh control component of the first aspect of this application is provided, wherein the first DMA command indicates the storage address in the cache and the length of the data to be written to the cache based on the size of the metadata after the specified portion has been deleted and the corresponding data.

[0028] According to the control components of any one of the first to seventh claims of the first aspect of this application, an eighth control component of the first aspect of this application is provided, wherein if the host instructs to read data from the storage device without transmitting protection information, the processor provides a second DMA command to the DMA unit to instruct the deletion of the protection information carried in the data read from the non-volatile storage medium.

[0029] According to the eighth control component of the first aspect of this application, a ninth control component of the first aspect of this application is provided, wherein, in response to the second DMA command, the DMA unit verifies the data read from the non-volatile memory based on the protection information read from the non-volatile memory, and after the verification is passed, sends the data with the protection information deleted and the metadata to the host.

[0030] According to the eighth or ninth control component of the first aspect of this application, a tenth control component of the first aspect of this application is provided, wherein, in response to the second DMA command, the DMA unit performs verification on the data read from the non-volatile memory based on the protection information read from the non-volatile memory, and when the verification fails, it indicates to the host other types of errors besides the protection information verification error.

[0031] According to the control components of any one of the first to tenth claims of the first aspect of this application, an eleventh control component of the first aspect of this application is provided, wherein a third DMA command provided by the processor to the DMA unit instructs the DMA unit to add one or more protection information to the received data.

[0032] According to the eleventh control component of the first aspect of this application, a twelfth control component of the first aspect of this application is provided, wherein the third DMA command further instructs the DMA unit on the parameters required to generate protection information.

[0033] According to the eleventh or twelfth control component of the first aspect of this application, a thirteenth control component of the first aspect of this application is provided, wherein the DMA unit generates corresponding verification data based on the received data, and the third DMA command received by the DMA unit indicates the formula used to generate the verification data and an optional random number seed.

[0034] According to the twelfth control component of the first aspect of this application, the fourteenth control component of the first aspect of this application is provided, wherein the DMA unit generates corresponding verification data and application tag based on the received data, and the third DMA command indicates the method for generating the application tag or the application tag used.

[0035] According to the fourteenth control component of the first aspect of this application, a fifteenth control component of the first aspect of this application is provided, wherein the third DMA command instructs the generation of an application tag based on the identifier of an IO command provided by the host, wherein the processor marks the received IO command with a stream identifier, such that the same application tag is generated based on the same stream identifier, and different application tags are generated based on different stream identifiers.

[0036] According to the fourteenth or fifteenth control component of the first aspect of this application, a sixteenth control component of the first aspect of this application is provided, wherein the third DMA command instructs the generation of application tags based on the namespace accessed according to the IO command provided by the host.

[0037] According to the eleventh or twelfth control component of the first aspect of this application, a seventeenth control component of the first aspect of this application is provided, wherein the third DMA command instructs the DMA unit to generate corresponding verification data, application tag and reference tag according to the received data, and the DMA command indicates the method for generating the reference tag or the reference tag used.

[0038] According to the seventeenth control component of the first aspect of this application, an eighteenth control component of the first aspect of this application is provided, wherein the logical address of the storage device or the host address corresponding to the transmitted data is used as a reference label.

[0039] According to the control component of any one of the eleventh to eighteenth claims of the first aspect of this application, a nineteenth control component of the first aspect of this application is provided, wherein, in response to the fact that the data and metadata stored in the non-volatile memory do not include protection information, and the host needs to read data from the storage device that carries protection information, the processor provides a fourth DMA command to the DMA unit to instruct the DMA unit to generate protection information and then send the data and protection information in association to the host.

[0040] According to the nineteenth control component of the first aspect of this application, a twentieth control component of the first aspect of this application is provided, wherein if the host uses a specified method to generate check data and / or reference tags, the fourth DMA command instructs the DMA unit to generate check data and / or reference tags for the data to be transmitted to the host in the same manner.

[0041] According to the twentieth control component of the first aspect of this application, a twenty-first control component of the first aspect of this application is provided, wherein when the DMA unit of the storage device receives write data provided by the host, it deletes all or part of the protection information and writes the data with all or part of the protection information deleted and the metadata into the non-volatile memory.

[0042] According to the control components of any one of the first to twenty-one of the first aspects of this application, a twenty-second control component of the first aspect of this application is provided, wherein a fifth DMA command provided by the processor to the DMA unit instructs the DMA unit to check one or more protection information in the metadata.

[0043] According to the twenty-second control component of the first aspect of this application, a twenty-third control component of the first aspect of this application is provided, wherein the fifth DMA command instructs the DMA unit to generate metadata based on data obtained from the host, and checks the protection information by comparing whether the generated metadata is consistent with the metadata obtained from the host.

[0044] According to the twenty-third control component of the first aspect of this application, a twenty-fourth control component of the first aspect of this application is provided, wherein the operation related to the verification data indicated by the verification data field of the fifth DMA command includes checking whether the verification data is consistent with the corresponding data, generating and adding verification data, and / or deleting verification data from the received data and metadata.

[0045] According to the twenty-fourth control component of the first aspect of this application, a twenty-fifth control component of the first aspect of this application is provided, wherein the application tag field of the fifth DMA command indicates operations related to the application tag, including whether the application tag is consistent with the expectation, generating and adding the application tag, and / or deleting the application tag from the received data and metadata.

[0046] According to the 24th or 25th control component of the first aspect of this application, a 26th control component of the first aspect of this application is provided, wherein the reference tag field of the fifth DMA command indicates an operation related to the reference tag, the operation including whether the reference tag is consistent with the expectation, generating and adding the reference tag, and / or deleting the reference tag from the received data and metadata.

[0047] According to the control component of any one of the twenty-fourth to twenty-sixth claims of the first aspect of this application, a twenty-seventh control component of the first aspect of this application is provided, wherein the verification data configuration field of the fifth DMA command indicates the method for generating verification data.

[0048] According to the control components of any one of the first to twenty-seven claims of the first aspect of this application, a twenty-eighth control component of the first aspect of this application is provided, wherein the sixth DMA command instructs the DMA unit to perform verification on the transmitted data and metadata based on the verification data.

[0049] According to the twenty-eighth control component of the first aspect of this application, a twenty-ninth control component of the first aspect of this application is provided, wherein the DMA unit further includes a command receiving unit, a protection information generating unit, and a comparison unit; the command receiving unit identifies the received sixth DMA command and instructs the protection information generating unit to generate verification data based on the data moved by the DMA unit; the verification data generated by the protection information generating unit is provided to the comparison unit.

[0050] According to the twenty-ninth control component of the first aspect of this application, a thirtieth control component of the first aspect of this application is provided, wherein the command receiving unit further instructs the protection information generating unit on the method of generating verification data.

[0051] According to the control component of any one of the twenty-eighth to thirtieth claims of the first aspect of this application, the thirty-first control component of the first aspect of this application is provided, wherein the verification data in the metadata moved by the DMA unit is provided to the comparison unit, the comparison unit identifies whether the verification data received from the protection information generation unit is consistent with the verification data obtained from the moved data, and outputs the verification result.

[0052] According to the control component of any one of the twenty-ninth to thirty-first claims of the first aspect of this application, a thirty-second control component of the first aspect of this application is provided, wherein, according to the instruction of the sixth DMA command, the DMA unit performs verification on the transmitted data and metadata based on both the verification data and the application tag.

[0053] According to the thirty-second control component of the first aspect of this application, a thirty-third control component of the first aspect of this application is provided, wherein the command receiving unit identifies the received sixth DMA command and instructs the protection information generation unit to generate verification data based on the data moved by the DMA unit, and also instructs the protection information generation unit to generate an application tag, and the verification data and application tag generated by the protection information generation unit are provided to the comparison unit.

[0054] According to the thirty-third control component of the first aspect of this application, a thirty-fourth control component of the first aspect of this application is provided, wherein the verification data and application tag in the metadata moved by the DMA unit are provided to the comparison unit, the comparison unit identifies whether the verification data and application tag received from the protection information generation unit are consistent with the verification data and application tag obtained from the moved data, and outputs the verification result.

[0055] According to the control component of any one of the twenty-ninth to thirty-fourth claims of the first aspect of this application, the thirty-fifth control component of the first aspect of this application is provided, wherein the sixth DMA command instructs the DMA unit to check one or more of the following: verification data, application tag, and reference tag.

[0056] According to the control component of any one of the twenty-ninth to thirty-fifth claims of the first aspect of this application, the thirty-sixth control component of the first aspect of this application is provided, wherein the seventh DMA command instructs the DMA unit to generate protection information for the transmitted data.

[0057] According to the thirty-sixth control component of the first aspect of this application, a thirty-seventh control component of the first aspect of this application is provided, wherein the DMA unit further includes a protection information adding unit, the protection information adding unit being coupled to the command receiving unit and the protection information generating unit; the protection information adding unit adds one or more of the verification data, application tag and reference tag provided by the protection information generating unit to the data moved by the DMA unit according to the instructions of the command receiving unit.

[0058] According to the thirty-seventh control component of the first aspect of this application, a thirty-eighth control component of the first aspect of this application is provided, wherein the command receiving unit identifies the received seventh DMA command and instructs the protection information generation unit to generate verification data based on the data moved by the DMA unit, and provides it to the protection information adding unit.

[0059] According to the thirty-seventh control component of the first aspect of this application, a thirty-ninth control component of the first aspect of this application is provided, wherein the data moved by the DMA unit is recorded in a memory, and the verification data received by the protection information adding unit from the protection information generating unit is also recorded in the memory, and the moved data in the memory and its corresponding verification data are stored together.

[0060] According to the thirty-eighth control component of the first aspect of this application, the fortieth control component of the first aspect of this application is provided, wherein the command receiving unit identifies the received seventh DMA command and instructs the protection information generation unit to generate verification data based on the data moved by the DMA unit, and also instructs the protection information generation unit to generate application tags and reference tags; the verification data, application tags and reference tags generated by the protection information generation unit are provided to the protection information adding unit.

[0061] According to the control component of any one of the thirty-sixth to fortyth claims of the first aspect of this application, the forty-first control component of the first aspect of this application is provided, wherein the data moved by the DMA unit is recorded in the memory, and the verification data, application tag and reference tag received by the protection information adding unit from the protection information generating unit are also recorded in the memory.

[0062] According to the control components of any one of the first to forty-one of the first aspects of the present application, a forty-second control component of the first aspect of the present application is provided, wherein the media interface controller includes a second DMA unit for transferring data between memory and non-volatile memory.

[0063] According to the forty-second control component of the first aspect of this application, a forty-third control component of the first aspect of this application is provided, wherein the processor generates one or more commands and provides them to the media interface controller to instruct the media interface controller to move data between the non-volatile memory and the memory according to the commands, the media interface controller issues a command to the non-volatile memory to operate the non-volatile memory, and operates the second DMA unit of the media interface controller to move data between the memory and the non-volatile memory.

[0064] According to the forty-second or forty-third control component of the first aspect of this application, a forty-fourth control component of the first aspect of this application is provided, wherein, during the process of transferring data from memory to non-volatile memory, the second DMA unit also generates metadata for the transferred data and writes it together with the transferred data into the non-volatile memory.

[0065] According to the forty-fourth control component of the first aspect of this application, the forty-fifth control component of the first aspect of this application is provided, wherein the metadata includes protection information, a randomization seed for randomizing the moved data, and / or a checksum generated for the moved data.

[0066] According to the control component of any one of the forty-two to forty-five of the first aspect of this application, the forty-sixth control component of the first aspect of this application is provided, wherein the second DMA unit of the media interface controller receives data and metadata from non-volatile memory, performs verification or error correction on the data and metadata during the transfer process, and records the data read from the non-volatile memory in memory while deleting part or all of the metadata read from the non-volatile memory.

[0067] According to the control component of any one of the forty-first to forty-sixth claims of the first aspect of this application, the forty-seventh control component of the first aspect of this application is provided, wherein the number of processors is multiple.

[0068] According to the forty-seventh control component of the first aspect of this application, a forty-eighth control component of the first aspect of this application is provided, wherein a first processor among a plurality of processors generates one or more DMA commands and provides them to a first DMA unit, and the first DMA unit obtains corresponding data and metadata from the host according to the one or more DMA commands provided by the first processor.

[0069] According to the forty-eighth control component of the first aspect of this application, the forty-ninth control component of the first aspect of this application is provided, wherein, in response to a DMA command provided by the first processor to the first DMA unit, during the process of the first DMA unit moving data and metadata from the host to the memory according to the DMA command, the first DMA unit obtains data and corresponding metadata from the host, discards part or all of the metadata within the first DMA unit, and writes the data obtained from the host into the memory.

[0070] According to the forty-eighth or forty-ninth control component of the first aspect of this application, a fiftieth control component of the first aspect of this application is provided, wherein the first DMA unit further checks the data based on the discarded metadata.

[0071] According to the control component of any one of the forty-eighth to fiftyth claims of the first aspect of this application, the fifty-first control component of the first aspect of this application is provided, wherein the first DMA unit generates new metadata for the acquired data and records it in the memory.

[0072] According to the control component of any one of the forty-seventh to fifty-first claims of the first aspect of this application, a fifty-second control component of the first aspect of this application is provided, wherein a second processor among a plurality of processors generates one or more commands and a media interface controller is provided to instruct the media interface controller to write data in memory to non-volatile memory or read data from non-volatile memory and write it to memory.

[0073] According to the fifty-second control component of the first aspect of this application, the fifty-third control component of the first aspect of this application is provided, wherein, during the process of moving data to non-volatile memory, the second DMA unit also generates metadata for the moved data and writes it together with the moved data into the non-volatile memory.

[0074] According to the fifty-third control component of the first aspect of this application, the fifty-fourth control component of the first aspect of this application is provided, wherein the metadata generated by the second DMA unit for the transferred data is different from the metadata obtained by the first DMA unit from the host.

[0075] According to the control components of any one of the fifty-two to fifty-fourth claims of the first aspect of this application, the fifty-fifth control component of the first aspect of this application is provided, wherein the second processor issues a command to the media interface controller to read corresponding data from the non-volatile memory.

[0076] According to the fifty-fifth control component of the first aspect of this application, the fifty-sixth control component of the first aspect of this application is provided, wherein the second DMA unit of the media interface controller receives data and metadata from the non-volatile memory, performs verification or error correction on the data and metadata during the transfer process, and records the read data in the memory while deleting part or all of the metadata read from the non-volatile memory.

[0077] According to the fifty-sixth control component of the first aspect of this application, a fifty-seventh control component of the first aspect of this application is provided, wherein, in response to the second DMA unit of the media interface controller, data and metadata are read from the non-volatile memory, and the first processor issues a DMA command to the first DMA unit to move the data corresponding to the DMA command to the host.

[0078] According to the fifty-seventh control component of the first aspect of this application, a fifty-eighth control component of the first aspect of this application is provided, wherein the first processor further instructs the first DMA unit to generate metadata based on the data to be moved, and moves the generated metadata together with the data to the host.

[0079] According to a second aspect of this application, a first storage device according to the second aspect of this application is provided, comprising a control unit for performing the first aspect, a non-volatile memory, and a memory. Attached Figure Description

[0080] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings.

[0081] Figure 1 A block diagram of a storage device in the prior art is shown;

[0082] Figure 2A and Figure 2B A schematic diagram illustrating the use of PI in storage devices is shown;

[0083] Figure 3 A block diagram illustrating the processing of protection information according to an embodiment of this application is shown;

[0084] Figure 4A A schematic diagram illustrating the removal of reference tags from received data (and metadata) according to an embodiment of this application is shown;

[0085] Figure 4B A schematic diagram illustrating the removal of reference tags and application tags from received data (and metadata) according to an embodiment of this application is shown;

[0086] Figure 4C A schematic diagram illustrating the deletion of verification data, reference tags, and application tags from received data (and metadata) according to an embodiment of this application is shown.

[0087] Figure 5A A schematic diagram illustrating received data according to yet another embodiment of this application is shown;

[0088] Figure 5B This application illustrates a method for directing data according to yet another embodiment. Figure 5A A diagram illustrating the addition of verification data to received data;

[0089] Figure 5C This application illustrates a method for directing data according to yet another embodiment. Figure 5A The illustration shows the addition of verification data and application tags to the received data;

[0090] Figure 5D This application illustrates a method for directing data according to yet another embodiment. Figure 5A The illustration shows the received data with added verification data and the application tag with a reference tag;

[0091] Figure 6 The DMA commands provided to the DMA unit according to embodiments of this application are illustrated;

[0092] Figure 7A and 7B A schematic diagram illustrating the use of protection information by a DMA unit according to an embodiment of this application is shown;

[0093] Figure 8A and 8B A schematic diagram illustrating the generation of protection information by a DMA unit according to an embodiment of this application is shown;

[0094] Figure 9 A block diagram is shown according to yet another embodiment of this application;

[0095] Figure 10 A block diagram illustrating the processing of protection information according to yet another embodiment of this application is shown. Detailed Implementation

[0096] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0097] The control components of the storage device include a DMA unit for moving data between host memory and the storage device's cache. The DMA unit performs the data movement based on received DMA commands. The DMA commands indicate, for example, the source address, destination address, and / or length of the data to be moved.

[0098] According to embodiments of this application, protection information is processed during the data transfer process of the DMA unit. This includes checking whether the protection information is consistent with its corresponding data, adding protection information, and / or deleting protection information.

[0099] Figure 3 A block diagram illustrating the processing of protection information according to an embodiment of this application is shown.

[0100] The control components of the storage device include a processor (CPU), a DMA unit, and a media interface controller. It is also coupled to the host, the NVM chip, and the memory. The memory provides a cache to hold data obtained from the host via the DMA unit or data read from the NVM chip via the media interface.

[0101] Software or firmware running in the CPU generates one or more DMA commands (e.g., Figure 3 Command 0 and Command 1 are provided to the DMA unit to instruct the DMA unit to move data between the host and the cache according to the DMA command.

[0102] See Figure 3 The DMA unit retrieves data 0 and metadata 0 from the host according to DMA command 0, and retrieves data 1 and metadata 1 from the host according to DMA command 1. The metadata is associated with its corresponding data and carries protection information. Optionally, the metadata may also carry other information.

[0103] For example, only data retrieved from the host is written to the NVM chip, without storing the associated metadata. The DMA command provided by the CPU to the DMA unit indicates that metadata does not need to be stored. In response, during the process of moving data and metadata from the host to the cache according to the DMA command, the DMA unit retrieves the data and corresponding metadata from the host and discards the metadata internally. Figure 3 In the process, metadata 0 and metadata 1 were discarded, and only the data ( Figure 3 The example shows data 0 and data 1 being stored in the cache. Optionally, the storage space allocated in the cache to accommodate the moved data only needs to accommodate the data and does not need to reserve storage space for the corresponding metadata.

[0104] The media interface controller writes data 0 and data 1 from the buffer to the NVM chip to record data 0 and data 1 in the NVM chip.

[0105] In an optional implementation, the CPU provides a DMA command to the DMA unit, instructing the DMA unit to delete a specified portion of the received metadata, such as deleting one or more of the verification information, reference tags, and application tags from the protection information. The DMA unit then deletes the specified portion from the received metadata and writes the remaining portion of the metadata, associated with the corresponding data, into a cache.

[0106] In an optional implementation, the DMA command instructs the DMA unit to add one or more protection information to the received data. Optionally, the DMA command also instructs the DMA unit on parameters required to generate the protection information. For example, the DMA command may indicate the formula (index) used to generate the verification information and an optional random number seed, instruct the generation of a reference tag with the address corresponding to the data, and / or instruct the rules for generating the application tag.

[0107] In an optional implementation, the DMA command instructs the DMA unit to check one or more types of protection information, such as checking whether the data obtained from the host and the metadata satisfy a specified relationship. For example, the DMA command instructs the DMA unit to generate metadata based on the data obtained from the host, and to check the protection information by comparing the generated metadata with the metadata obtained from the host.

[0108] Figure 4A A schematic diagram illustrating the removal of reference tags from received data (and metadata) according to an embodiment of this application is shown.

[0109] For example, the protection information of the metadata received from the host includes verification data ( Figure 4A (Indicated by the horizontally shaded box), application label ( Figure 4A (indicated by the vertically shaded box) and reference tags ( Figure 4A(Indicated by the horizontal and vertical shaded boxes), while the DMA command indicates that the reference tag does not need to be retained. Therefore, the DMA unit discards the reference tag without writing it to the cache during the process of moving data and its metadata from the host to the cache. Furthermore, the DMA command indicates the storage address in the cache and the optional length of the data (including metadata) to be written to the cache based on the size of the metadata and corresponding data after the reference tag has been discarded.

[0110] Therefore, less data is written to the cache compared to the data and metadata received from the host, reducing the processing latency of moving data and metadata from the host to the cache, and correspondingly reducing the power consumption required for data movement.

[0111] Optionally, the DMA unit also checks whether a reference tag exists in the metadata received from the host. If the metadata received from the host does not contain a reference tag, the DMA unit writes the complete metadata received from the host along with the data to the cache.

[0112] Figure 4B A schematic diagram illustrating the removal of reference tags and application tags from received data (and metadata) according to an embodiment of this application is shown.

[0113] For example, the metadata protection information received from the host includes verification data, application tags, and reference tags, while the DMA command indicates that the reference tags and application tags do not need to be retained. Therefore, during the process of moving data and its metadata from the host to the cache, the DMA unit discards the reference tags and application tags without writing them to the cache. Furthermore, the DMA command indicates the storage address in the cache and, optionally, the length of the data (including metadata) to be written to the cache, based on the size of the metadata and corresponding data after discarding the reference tags and application tags.

[0114] Figure 4C This illustration shows a diagram of deleting verification data, reference tags, and application tags from received data (and metadata) according to an embodiment of this application.

[0115] For example, the metadata protection information received from the host includes checksum data, application tags, and reference tags. The DMA command indicates that the checksum data, reference tags, and application tags do not need to be retained. Therefore, during the process of moving data and its metadata from the host to the cache, the DMA unit discards the checksum data, reference tags, and application tags without writing them to the cache. Furthermore, the DMA command indicates the storage address in the cache and, optionally, the length of the data (including metadata) to be written to the cache, based on the size of the metadata and corresponding data after discarding the checksum data, reference tags, and application tags.

[0116] According to another embodiment of this application, during the process of the host reading data from the storage device, the data (and metadata) read from the NVM chip carries protection information. The DMA unit removes the protection information before sending the data (and metadata) to the host. The host indicates to the storage device that the protection information does not need to be transmitted, in order to improve IO command processing latency (by reducing the amount of data to be transmitted). In response, the control unit instructs the DMA unit to remove the protection information attached to the data to be transmitted. Optionally, the DMA unit verifies the data read from the NVM chip based on the protection information read from the NVM chip, and after the verification passes, sends the data and metadata with the protection information removed to the host. Since the host indicates that the protection information is not needed, if the verification fails, the storage device indicates to the host an error of other types besides the protection information verification error. This improves the reliability of the storage device.

[0117] Figure 5A A schematic diagram illustrating received data according to yet another embodiment of this application is shown. As an example, the data received from the host does not include protection information.

[0118] Figure 5B This application illustrates a method for directing data according to yet another embodiment. Figure 5A This is a diagram illustrating the addition of verification data to received data. The verification data is indicated by a horizontally shaded box.

[0119] The DMA unit generates corresponding checksum data based on the received data. For example, the DMA command received by the DMA unit may specify the formula used to generate the checksum data and an optional random number seed. As an example, checksum data is generated from the received data using CRC (Cyclic Redundancy Check). The generated checksum data is appended to the received data and stored in association with it.

[0120] Figure 5C This application illustrates a method for directing data according to yet another embodiment. Figure 5A This diagram illustrates the addition of verification data and application tags to received data. Verification data is indicated by a horizontal shaded box, and application tags are indicated by a vertical shaded box.

[0121] The DMA unit generates corresponding checksum data and application tags based on the received data. For example, the DMA command may specify the method for generating the application tag or the application tag to be used.

[0122] In existing technologies, application tags are generated by the host application and sent to the storage device along with the data to be written. Figure 5CIn one example, the host does not provide application tags to the storage device. The storage device generates application tags based on certain instructions. In one example, application tags are generated based on the identifier of the IO command provided by the host to the storage device, so that all data (if multiple copies) corresponding to the same IO command are attached with the same application tag, while data corresponding to different IO commands are attached with different application tags. In another example, application tags are generated based on the namespace accessed by the IO command provided by the host, so that all data corresponding to IO commands accessing the same namespace are attached with the same application tag, while data corresponding to IO commands in different namespaces are attached with different application tags. In yet another example, the processor labels the received IO command with a stream identifier and generates application tags based on the stream identifier, attaching them to the data corresponding to the IO command, so that the same stream identifier generates the same application tag, while different stream identifiers generate different application tags. Optionally, application tags may also be generated in other ways.

[0123] Figure 5D This application illustrates a method for directing data according to yet another embodiment. Figure 5A The illustration shows the received data with added verification data and application tags with reference tags. Verification data is indicated by horizontal shaded boxes, application tags by vertical shaded boxes, and reference tags by both horizontal and vertical shaded boxes.

[0124] The DMA unit generates corresponding checksum data, application tags, and reference tags based on the received data. For example, the DMA command may specify the method for generating the reference tags or the reference tags used. For instance, the logical address of the storage device or the host address corresponding to the transmitted data may be used as the reference tag.

[0125] In existing technology, the reference tag is generated by the host's operating system and sent to the storage device along with the data to be written to the storage device. Figure 5D In the example, the host does not provide a reference tag to the storage device. The storage device generates a reference tag based on certain instructions.

[0126] According to another embodiment of this application, the data (and metadata) stored in the NVM chip does not include protection information. During the process of the host reading data from the storage device, the data (and metadata) read from the NVM chip does not carry protection information. The DMA unit adds protection information before sending the data (and metadata) to the host. The host indicates to the storage that protection information needs to be transmitted to improve the reliability of IO commands. In response, the control unit instructs the DMA unit to add protection information to the data to be transmitted. The control unit knows the method used by the host to generate protection information and generates protection information for the data read from the NVM chip in the same way as the method used by the host. For example, for checksum data, the host uses a specified CRC algorithm; for reference tags, the host uses the logical address of the storage device corresponding to the data as the reference tag. In this case, the DMA unit uses the same CRC algorithm to generate checksum data for the data to be transmitted to the host and generates a reference tag based on the logical address of the data to be transmitted to the host.

[0127] According to another embodiment of this application, the host provides protection information when writing data to the storage device, and uses the protection information (e.g., checksum data) to check the correctness of the transmitted data during data transmission between the host and the storage device. The host also uses protection information when reading data from the storage device. When the DMA unit of the storage device receives the write data provided by the host, it deletes all or part of the protection information and writes the data (and metadata) with all or part of the protection information deleted to the NVM chip, thereby reducing the amount of data written to the NVM chip and lowering the processing latency of the write data. When the host reads data from the storage device, even if the data read from the NVM chip lacks protection information or the protection information is incomplete, the DMA unit generates protection information for the data to be sent to the host in the same way as the host generates the protection information, so that the host is unaware that the protection information it writes to the storage device has been deleted or adjusted.

[0128] Typically, protection information protects the data transmission path from the host to the storage device. However, the path from the interface coupling the host to the NVM chip within the storage device is short, resulting in an extremely low probability of data transmission errors. Therefore, even without protection information, a very high degree of data transmission accuracy can be achieved within the storage device. Thus, the method described above, which removes protection information for written data and adds it back for read data, saves storage space, improves the performance of I / O command processing, and does not sacrifice reliability.

[0129] Figure 6 The DMA commands provided to the DMA unit according to embodiments of this application are illustrated.

[0130] DMA commands instruct DMA units to perform data transfer. DMA commands include multiple fields, such as source address, destination address, length, checksum data, application tag, and / or reference tag, as well as optional checksum data configuration fields, application tag configuration fields, and / or reference tag configuration fields.

[0131] The source address field indicates the address where the data to be moved is stored, the destination address field indicates the address where the moved data is cached, and the length field indicates the length of the data to be moved. The length field indicates, for example, the total length of the data to be moved and its metadata. The validation data field indicates operations related to validation data, such as checking if the validation data matches the corresponding data, generating and adding validation data, and deleting validation data from received data and metadata. The validation data field also indicates address-related information, such as the location of the validation data in the received data and metadata, and the address where the generated validation data is stored. The application tag field indicates operations related to application tags, such as checking if the application tag matches the expectation, generating and adding application tags, and deleting application tags from received data and metadata. The application tag field also indicates address-related information, such as the location of the application tag in the received data and metadata, and the address where the generated application tag is stored. The reference tag field indicates operations related to reference tags, such as checking if the reference tag matches the expectation, generating and adding reference tags, and deleting reference tags from received data and metadata. The reference tag field also indicates address-related information, such as the location of the reference tag in the received data and metadata, and the address where the generated reference tag is stored.

[0132] The verification data configuration field indicates, for example, the method for generating verification data. This allows verification data to be generated based on the received data, and / or checks to ensure the received verification data corresponds to the received data, thus identifying any errors in the data transmission process. The application tag configuration field indicates, for example, the method for generating application tags. The reference tag configuration field indicates, for example, the method for generating reference tags.

[0133] Optionally, the DMA unit is configured with circuitry implementing one or more verification data generation methods, one or more application tag generation methods, and one or more reference tag generation methods. The verification data configuration field indicates the index and parameters of the verification data generation method used. The application tag configuration field indicates the index and parameters of the application tag generation method used. The reference tag configuration field indicates the index and parameters of the reference tag generation method used.

[0134] Figure 7A and 7BA schematic diagram illustrating a DMA unit utilizing protection information according to an embodiment of this application is shown. The DMA unit includes a command receiving unit, a protection information generation unit, and a comparison unit.

[0135] See Figure 7A The DMA command instructs the DMA unit to verify the transmitted data and metadata based on the verification information. The command receiving unit identifies the received DMA command and instructs the protection information generation unit to generate verification data (indicated by the shading box) based on the data moved by the DMA unit. It should be noted that the protection information generation unit generates verification data based on the data moved by the DMA unit without accessing the metadata moved by the DMA unit. Optionally, the command receiving unit also instructs the protection information generation unit on the method used to generate the verification data. The verification data generated by the protection information generation unit is provided to the comparison unit.

[0136] The verification data (indicated by the horizontal shading box) in the metadata moved by the DMA unit is provided to the comparison unit. The command receiving unit instructs the comparison unit to identify whether the verification data received from the protection information generation unit is consistent with the verification data obtained from the moved data, and outputs the verification result.

[0137] See Figure 7B The DMA command instructs the DMA unit to verify the transmitted data and metadata based on both the verification information and the application tag. The command receiving unit recognizes the received DMA command and instructs the protection information generation unit to generate verification data (indicated by the horizontal shading box) based on the data moved by the DMA unit, and also instructs the protection information generation unit to generate an application tag (indicated by the vertical shading box). The verification data and application tag generated by the protection information generation unit are provided to the comparison unit. Understandably, to generate the application tag, the protection information generation unit is aware of the method for generating the application tag in the data and metadata moved by the DMA unit, and generates the application tag using the same method as instructed by the command receiving unit.

[0138] The verification data (indicated by the horizontal shading box) and application tag (indicated by the vertical shading box) in the metadata moved by the DMA unit are also provided to the comparison unit. The command receiving unit instructs the comparison unit to identify whether the verification data and application tag received from the protection information generation unit are consistent with the verification data and application tag obtained from the moved data, and outputs the verification result.

[0139] Still optional, see also Figure 7A and Figure 7BThe metadata protection information moved by the DMA unit includes verification data, application tags, and reference tags. The DMA command instructs the DMA unit to check one or more, but not all, of the verification data, application tags, and reference tags. This provides flexibility in utilizing the protection information.

[0140] Figure 8A and 8B A schematic diagram illustrating the generation of protection information by a DMA unit according to an embodiment of this application is shown. The DMA unit includes a command receiving unit, a protection information generation unit, and a protection information adding unit.

[0141] See Figure 8A The DMA command instructs the DMA unit to generate protection information for the transmitted data. The command receiving unit identifies the received DMA command and instructs the protection information generation unit to generate verification data (indicated by the horizontal shading box) based on the data moved by the DMA unit, and provides it to the protection information adding unit.

[0142] The data moved by the DMA unit is recorded in a cache. The verification data received from the protection information generation unit by the protection information addition unit is also recorded in the cache. The moved data and its corresponding verification data are stored together in the cache.

[0143] See Figure 8B The DMA command instructs the DMA unit to generate verification information, application tags, and reference tags. The command receiving unit recognizes the received DMA command and instructs the protection information generation unit to generate verification data (indicated by the horizontal shading box) based on the data moved by the DMA unit, and also instructs the protection information generation unit to generate application tags (indicated by the vertical shading box) and reference tags (indicated by the horizontal and vertical shading boxes). The verification data, application tags, and reference tags generated by the protection information generation unit are provided to the protection information adding unit.

[0144] The data moved by the DMA unit is recorded in the cache. The protection information adding unit also records the verification data, application tags, and reference tags received from the protection information generating unit in the cache.

[0145] Figure 9 A block diagram is shown according to yet another embodiment of this application.

[0146] In addition to the DMA unit that moves data between the host and storage device caches, the storage device control unit also includes other DMA units (see...). Figure 9 This is used to move data between the cache and the NVM chip. The control components of the storage device include the CPU and the media interface controller, and are also coupled to the host, the NVM chip, and the memory. The media interface controller also includes a DMA unit.

[0147] The software or firmware running in the CPU generates one or more commands (e.g., Figure 9 Commands 0 and 1 are sent to the NVM chip and provided to the media interface controller, which instructs the media interface controller to move data between the NVM chip and the cache according to the commands. The media interface controller issues commands to the NVM chip to operate the NVM chip and operates its DMA unit to move data between the cache and the NVM chip.

[0148] See Figure 9 In response to command 0, the media interface controller instructs the DMA unit to move data 0 from the cache to the NVM chip, and in response to command 1, moves data 1 from the cache to the NVM chip. During the data transfer to the NVM chip, the media interface controller also generates metadata for the transferred data and writes it to the NVM chip along with the transferred data. For example, the metadata may be a checksum generated using Error Correction Code (ECC) technology for the transferred data, and may also include, for example, a randomization seed for randomizing the transferred data. Optionally, the metadata may also include protection information.

[0149] Optionally, Figure 9 The DMA unit of the media interface controller and the same Figure 3 The DMA unit shown or the DMA unit according to the embodiments described above in this application processes protection information in the same manner.

[0150] According to another embodiment of this application, the CPU sends a command to the media interface controller to read data from the NVM chip. The NVM chip stores the data and its corresponding metadata. For example, the metadata includes a checksum of the error correction code but does not include protection information. The DMA unit of the media interface controller receives the data and metadata from the NVM chip, and during the transfer process, performs verification or error correction on the data and metadata, records the data read from the NVM chip in a cache, and deletes part or all of the metadata read from the NVM chip.

[0151] Figure 10 A block diagram illustrating the processing of protection information according to yet another embodiment of this application is shown.

[0152] The control components of the storage device include multiple processors (CPU0 and CPU1), DMA unit 0, and a media interface controller, and are also coupled to the host, NVM chip, and memory. The media interface controller includes DMA unit 1.

[0153] Software or firmware running in CPU 0 generates one or more DMA commands (e.g., Figure 10Commands 0 and 1 in CPU 1 are generated and provided to DMA unit 0 to instruct DMA unit 0 to move data between the host and cache according to the DMA command. Software or firmware running in CPU 1 generates one or more commands (e.g., commands 0 and 1 in CPU 1). Figure 10 Commands 2 and 3 in the document provide a media interface controller to instruct the media interface controller to write data in the cache to the NVM chip or read data from the NVM chip and write it to the cache.

[0154] See Figure 10 DMA unit 0 retrieves data 0 and metadata 0 from the host according to DMA command 0, and retrieves data 1 and metadata 1 from the host according to DMA command 1.

[0155] exist Figure 10 In the example shown, DMA unit 0 only writes the data retrieved from the host to the cache, without writing the metadata retrieved from the host to the cache. DMA command 0 and DMA command 1 provided by CPU 0 to DMA unit 0 indicate that metadata does not need to be stored. In response, as DMA unit 0 moves data and metadata from the host to the cache according to the DMA commands, it retrieves the data and corresponding metadata from the host and discards the metadata within DMA unit 0.

[0156] Optionally, DMA unit 0 does not write metadata to the cache, but it also checks the data based on the metadata.

[0157] Alternatively, DMA unit 0 discards the metadata obtained from the host, but generates new metadata and records it in the cache.

[0158] According to the received command 2, the media interface controller writes data 0 from the buffer to the NVM chip, and according to the received command 3, writes data 1 from the buffer to the NVM chip.

[0159] In response to command 2, the media interface controller instructs DMA unit 1 to move data 0 from the cache to the NVM chip, and in response to command 3, it moves data 1 from the cache to the NVM chip. During the data transfer to the NVM chip, the media interface controller also generates metadata for the transferred data and writes it to the NVM chip along with the transferred data. Metadata 2 is generated for the transferred data 0, and metadata 3 is generated for the transferred data 1. Metadata 2 is different from metadata 0 obtained by DMA unit 0 from the host, and metadata 3 is different from metadata 1 obtained by DMA unit 0 from the host.

[0160] Optionally or further, Figure 10 DMA unit 1 and DMA unit 0 process protection information in the same way.

[0161] According to another embodiment of this application, CPU 1 sends a command to the media interface controller to read data 0 from the NVM chip. The NVM chip stores data 0 and its corresponding metadata 2. The DMA unit 1 of the media interface controller receives data 0 and metadata 2 from the NVM chip, and during the transfer process, performs verification or error correction on the data and metadata, and records data 0 in the cache while deleting part or all of the metadata 2 read from the NVM chip. Subsequently, CPU 0 sends a DMA command to DMA unit 0 to transfer data 0 to the host. CPU 0 also instructs DMA unit 0 to generate metadata 0 based on data 0, and transfers metadata 0 together with data 0 to the host. Thus, from the host's perspective, it writes data 0 and metadata 0 to the storage device and reads data 0 and metadata 0 from the storage device. As a result, less data is written to the cache and the NVM chip, improving the processing speed of IO commands.

[0162] Understandably, the DMA unit according to embodiments of this application provides multiple processing methods for the moved data and metadata, and can implement multiple processing methods in response to external commands. Thus, it can not only process protection information and delete metadata using data and metadata obtained from the host, and add metadata to data read from the NVM chip; it can also add metadata including protection information to data obtained from the host, and the media interface controller can use the added protection information to improve the reliability of data transmission within the control unit; and it can also delete the protection information added by the media interface controller from the data read from the NVM chip.

[0163] Those skilled in the art will also understand that there are many other ways to apply the embodiments of this application, and not limited to the specific implementation methods provided above.

[0164] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application. Clearly, those skilled in the art can make various alterations and variations to this application without departing from its spirit and scope. Thus, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A control component, characterized in that, Includes multiple processors and multiple DMA units; The processor provides one or more DMA commands to the DMA unit; The DMA unit moves data and metadata according to DMA commands; According to the instruction of the first DMA command, the DMA unit acquires data and metadata, and discards part or all of the acquired metadata, while storing only the acquired data; In this process, the first processor generates one or more DMA commands and provides them to the first DMA unit. During the process of moving data and metadata from the host to the cache according to the first DMA command, the first DMA unit obtains data and corresponding metadata from the host and writes the data obtained from the host into the cache. However, the metadata is discarded within the first DMA unit, but the data is still checked from the metadata. The second processor generates one or more DMA commands and provides them to the media interface controller. The second DMA unit in the media interface controller moves the data written to the cache by the first DMA unit to the NVM chip according to the DMA commands, and generates new metadata for the moved data. The new metadata is different from the metadata obtained by the first DMA unit from the host. In addition, the second processor sends a command to the media interface to read data from the NVM chip, the second DMA unit receives data and corresponding new metadata from the NVM chip, and performs verification or error correction on the data and new metadata during the transfer process, and deletes part or all of the new metadata. Subsequently, the first processor issues a DMA command to the first DMA unit to move the read data to the host; the first processor also instructs the first DMA unit to generate metadata based on the moved data, and move the metadata together with the data to the host.

2. The control component as described in claim 1, characterized in that, The first DMA command instructs the DMA unit to acquire the complete metadata and delete a specified portion of the acquired metadata, then writes the remaining portion of the metadata (with the specified portion deleted) into memory in association with the corresponding data. The metadata includes protection information; the first DMA command instructs the DMA unit to delete one or more of the verification information, reference tags, and application tags in the protection information of the metadata. In response, during the process of moving data and its metadata from the host to the memory, the DMA unit deletes one or more of the verification information, reference tags, and application tags according to the first DMA command. The deleted protection information is not written to the memory.

3. The control component as described in any one of claims 1-2, characterized in that, If the host instructs to read data from the storage device without transmitting protection information, the processor provides a second DMA command to the DMA unit instructing the deletion of the protection information carried in the data read from the non-volatile storage medium; In response to the second DMA command, the DMA unit verifies the data read from the non-volatile memory based on the protection information read from the non-volatile memory, and after the verification is successful, sends the data with the protection information deleted and the metadata to the host.

4. The control component as described in any one of claims 1-2, characterized in that, The processor provides a third DMA command to the DMA unit, instructing the DMA unit to add one or more protection information to the received data; The DMA unit generates corresponding verification data and application tags based on the received data. The third DMA command indicates the method for generating application tags or the application tags used. The third DMA command instructs the generation of application tags based on the identifiers of the I / O commands provided by the host. The processor labels the received I / O commands with stream identifiers, so that the same application tag is generated based on the same stream identifier, and different application tags are generated based on different stream identifiers.

5. The control component as described in claim 4, characterized in that, In response to the fact that the data and metadata stored in the non-volatile memory do not include protection information, and the host needs to read data from the storage device that carries protection information, the processor provides a fourth DMA command to the DMA unit, instructing the DMA unit to generate protection information and then send the data and protection information together with the data to the host.

6. The control component as claimed in claim 1, characterized in that, The DMA unit also includes a command receiving unit, a protection information generation unit, and a comparison unit; The command receiving unit identifies the received sixth DMA command and instructs the protection information generation unit to generate verification data based on the data moved by the DMA unit; the verification data generated by the protection information generation unit is provided to the comparison unit.

7. The control component as described in any one of claims 1-2, characterized in that, The media interface controller includes a second DMA unit for transferring data between memory and non-volatile memory; The processor generates one or more commands and provides them to the media interface controller to instruct the media interface controller to move data between the non-volatile memory and the memory according to the commands. The media interface controller issues commands to the non-volatile memory to operate the non-volatile memory and operates the second DMA unit of the media interface controller to move data between the memory and the non-volatile memory.

8. The control component as claimed in claim 7, characterized in that, The number of processors is multiple; the first processor among the multiple processors generates one or more DMA commands and provides them to the first DMA unit, and the first DMA unit obtains the corresponding data and metadata from the host according to the one or more DMA commands provided by the first processor; In response to a DMA command provided by the first processor to the first DMA unit, the first DMA unit retrieves data and corresponding metadata from the host during the process of moving data and metadata from the host to the memory according to the DMA command. It discards part or all of the metadata within the first DMA unit and writes the data retrieved from the host into the memory.

9. The control component as claimed in claim 8, characterized in that, The second processor among multiple processors generates one or more commands and provides a media interface controller to instruct the media interface controller to write data from memory to non-volatile memory or read data from non-volatile memory and write it to memory. During the process of moving data to non-volatile memory, the second DMA unit also generates metadata for the moved data and writes it into the non-volatile memory along with the moved data. The metadata generated by the second DMA unit for the transferred data is different from the metadata obtained by the first DMA unit from the host.

10. A storage device, characterized in that, Includes the control component as described in any one of claims 1-9.