Providing a Multi-Stream Storage Device Using a Virtual Checksum Data Cache

Through the virtual verification data cache method, the problem of inefficient writing of storage devices in a multi-stream environment is solved, efficient verification data cache management is realized, and write speed and reliability are improved.

CN111752862BActive Publication Date: 2025-08-05MEMBLAZE TECH BEIJING
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201910247630.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-03-28
Publication Date
2025-08-05
Estimated Expiration
2039-03-28

AI Technical Summary

Technical Problem

In the prior art, when processing write commands, storage devices lack an effective virtual verification data cache mechanism, resulting in low data writing efficiency, especially in a multi-stream storage environment, it is difficult to efficiently manage verification data cache resources.

Method used

The virtual verification data cache method is adopted, by obtaining and managing the index of the virtual verification data cache unit, using the verification data cache table to record its status and association relationship, dynamically allocating and releasing cache resources, ensuring that the verification data can be efficiently calculated and written when writing commands.

Benefits of technology

It improves the writing efficiency of storage devices in a multi-stream environment, optimizes the management of verification data cache, and improves the speed and reliability of data writing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111752862B_ABST
    Figure CN111752862B_ABST
Patent Text Reader

Abstract

The present application discloses a method for virtual verification data caching of a multi-stream storage device. The method comprises: obtaining a write command; obtaining an index of a verification data cache unit associated with the stream ID according to the write command; calculating verification data for data to be written by the write command using the verification data cache unit corresponding to the index of the verification data cache unit; and writing the data to be written and / or the verification data in the verification cache to a storage medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to storage technology, and in particular, to providing a multi-stream storage device using a virtual parity cache. Background Art

[0002] Figure 1 A block diagram of a solid-state storage device is shown. A solid-state storage device 102 is coupled to a host to provide storage capabilities for the host. The host and solid-state storage device 102 can be coupled in a variety of ways, including but not limited to connecting the host and solid-state storage device 102 via, 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), NVMe (NVM Express), Ethernet, Fibre Channel, wireless communication networks, and the like. The host can be an information processing device capable of communicating with the storage device in the above manner, such as a personal computer, tablet computer, server, portable computer, network switch, router, cellular phone, personal digital assistant, and the like. The storage device 102 includes an interface 103 , a control component 104 , one or more NVM chips 105 , and a 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] The interface 103 may be adapted to exchange data with the host via, for example, SATA, IDE, USB, PCIE, NVMe, SAS, Ethernet, Fibre Channel, or the like.

[0005] The control component 104 is used to control data transmission between the interface 103, the NVM chip 105 and the DRAM 110, and is also used for storage management, mapping of host logical addresses to flash physical addresses, erase leveling, bad block management, etc. The control component 104 can be implemented in a variety of ways such as software, hardware, firmware or a combination thereof. For example, the control component 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 component 104 can also include a processor or a controller, in which software is executed to manipulate the hardware of the control component 104 to process IO (Input / Output) commands. The control component 104 can also be coupled to the DRAM 110 and can access data in the DRAM 110. The FTL table and / or cached IO command data can be stored in the DRAM.

[0006] The control unit 104 includes a flash memory interface controller (also known as a media interface, media interface controller, or flash memory lane controller). The flash memory interface controller 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 command execution results output from the NVM chip 105. Known NVM chip interface protocols include "Toggle" and "ONFI."

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

[0008] The table structure that stores the mapping information from logical addresses to physical addresses is called an FTL table. The FTL table is important metadata in solid-state storage devices. Typically, an FTL table entry records the address mapping relationship in units of data pages in the storage device.

[0009] In some storage devices, the FTL is provided by the host to which the storage device is coupled. The host's memory stores the FTL table, and the host's CPU executes software to provide the FTL. In other cases, the FTL is provided by a storage management device located between the host and the storage device. In these cases, the read / write commands received by the storage device specify physical addresses.

[0010] The host may provide a command to the storage device that accesses the logical address space corresponding to one or more entries in the FTL table. The control unit may also modify the form of the command received from the interface 103 (e.g., split the command according to the size of the logical address space corresponding to the FTL entry) and process the modified form of the command.

[0011] A storage device includes multiple NVM chips. Each NVM chip includes one or more die (DIEs) or logic units (LUNs). The die or logic units can respond to read and write operations in parallel. Multiple read, write, or erase operations on the same die or logic unit are performed sequentially.

[0012] Figure 2 A schematic diagram of a large block is shown. The large block includes physical blocks from each of a plurality of logical units. Preferably, each logical unit provides a physical block for the large block. As an example, a large block is constructed on every 16 logical units (LUNs). Each large block includes 16 physical blocks from each of the 16 logical units (LUNs). Figure 2 In the example of , chunk 0 includes physical block 0 from each of the 16 logical units (LUNs), and chunk 1 includes physical block 1 from each logical unit (LUN). There are many other ways to structure chunks.

[0013] As an optional way, page stripes are constructed in large blocks, and physical pages with the same physical address in each logical unit (LUN) constitute a "page stripe". Figure 2 In the example, physical pages P0-0, P0-1, ..., and P0-x form page stripe 0, where physical pages P0-0, P0-1, ..., and P0-14 are used to store user data, and physical pages P0-x are used to store parity data calculated based on all user data in the stripe. Similarly, Figure 2 In FIG, physical page P2-0, physical page P2-1, ... and physical page P2-x constitute page stripe 2. Optionally, the physical page for storing parity data may be located at any position in the page stripe.

[0014] To write data to a page stripe, the control unit (104) of the solid-state storage device (see Figure 1) provides a verification data generation unit. Taking the calculation of verification data using an exclusive OR operation as an example, for a page stripe including N+1 (N=15) physical pages, the user data of the N physical pages is calculated with an exclusive OR (for example, (P0-0)XOR(P0-1)XOR(P0-2)XOR…XOR(P0-(N-1))), and the calculation result is written as a physical page (for example, P0-x) storing verification data for the page stripe. Optionally, a plurality of verification data generation units (for example, M) are provided in the control component (104) to simultaneously write data to the M page stripes. The verification data generation unit includes a verification data cache for storing intermediate results or final results of the verification data calculation process. A verification data calculator (i.e., a verification data generation unit) is provided in the Chinese patent application with application number 201710326110.0 and invention name as data organization of page stripes and method and device for writing data to page stripes. Summary of the Invention

[0015] According to the first aspect of the present application, a first method for providing a virtual check data cache according to the first aspect of the present application is provided, including: obtaining a request for a unit to allocate a virtual check data cache; obtaining a first unit of an available virtual check data cache; obtaining a first unit of an available check data cache, and recording an association between the obtained first unit of the virtual check data cache and the first unit of the check data cache; and responding to the request for a unit to allocate a virtual check data cache with the first unit of the virtual check data cache and / or the first unit of the check data cache.

[0016] According to the first method of providing a virtual verification data cache according to the first aspect of the present application, a second method of providing a virtual verification data cache according to the first aspect of the present application is provided, using a virtual verification data cache table to record the association relationship between the units of the virtual verification data cache and the units of the verification data cache; the virtual verification data cache table includes multiple entries, each entry associatively records the status of the units of the virtual verification data cache identified by each index of the virtual verification data cache and the index of the unit of the verification data cache associated with it or the external data cache unit.

[0017] According to the first or second method of providing a virtual check data cache of the first aspect of the present application, there is provided a third method of providing a virtual check data cache according to the first aspect of the present application, wherein the unit states of the virtual check data cache include unallocated, allocated and in use and / or allocated and suspended; the virtual check cache in the unallocated state can be allocated to process write commands; the virtual check cache in the allocated and in use or allocated and suspended state can no longer be allocated to process write commands.

[0018] According to one of the first to third methods of providing a virtual check data cache in accordance with the first aspect of the present application, a fourth method of providing a virtual check data cache in accordance with the first aspect of the present application is provided, wherein available check data cache units are obtained through a check data cache table, wherein the check data cache table records whether each unit of the check data cache has an associated virtual check data cache unit.

[0019] According to one of the first to fourth methods of providing a virtual check data cache according to the first aspect of the present application, a fifth method of providing a virtual check data cache according to the first aspect of the present application is provided, which also includes, in response to there being no available units of the check data cache, moving data of the second unit of the used check data cache to an external data cache so that the second unit of the check data cache becomes available.

[0020] According to the third method of providing a virtual verification data cache according to the first aspect of the present application, a sixth method of providing a virtual verification data cache according to the first aspect of the present application is provided, which also includes, in response to the virtual verification data cache table indicating that the first unit of the virtual verification data cache is in an allocated and suspended state, obtaining the third unit of the available verification data cache, moving the data of its corresponding external data cache unit to the third unit of the available verification data cache, and providing the index of the first unit of the virtual verification data cache and / or the index of the third unit of the verification data cache to the verification data calculation request unit.

[0021] According to the sixth method of the first aspect of the present application, a method of providing a virtual verification data cache is provided. According to the seventh method of the first aspect of the present application, a virtual verification data cache table is also updated to record that the first unit of the virtual verification data cache is allocated and in use, and is associated with the index of the third unit of the available verification data cache.

[0022] According to one of the first to seventh methods of providing a virtual check data cache of the first aspect of the present application, a method of providing a virtual check data cache according to the eighth method of the first aspect of the present application is provided, which also includes requesting to use the index of the first unit of the virtual check data cache or the index of the first unit of the check data cache to calculate the check data.

[0023] According to the eighth aspect of the first aspect of the present application, a method for providing virtual verification data cache is provided. According to the ninth aspect of the first aspect of the present application, a method for providing virtual verification data cache is provided, which also includes obtaining data to be written, using the first unit of the verification data cache to calculate verification data for the data to be written, and writing the data to be written to a storage medium.

[0024] According to the eighth aspect of the first aspect of the present application, a method for virtual verification data caching is provided. According to the tenth aspect of the first aspect of the present application, a method for virtual verification data caching is provided, using the index of the first unit of the virtual verification data cache to obtain the index of the first unit of the verification data cache associated with the index of the first unit of the virtual verification data cache from the virtual verification data cache table.

[0025] According to the tenth method of the first aspect of the present application, a method of providing a virtual verification data cache is provided according to the eleventh method of the first aspect of the present application, which also includes, if the virtual verification data cache table indicates that the first unit of the virtual verification data cache is in an allocated and suspended state, obtaining the available fourth unit of the verification data cache, moving the data of the external data cache unit corresponding to the first unit of the virtual verification data cache to the fourth unit of the verification data cache, and requesting to use the index of the fourth unit of the verification data cache to calculate the verification data.

[0026] According to one of the methods for providing a virtual verification data cache in the eighth to eleventh aspects of the first aspect of the present application, there is provided a method for providing a virtual verification data cache in the twelfth aspect of the first aspect of the present application, in response to obtaining a data move request message, moving data between a unit of the verification data cache and an external data cache.

[0027] According to one of the methods of providing virtual verification data cache in the eighth to eleventh aspects of the first aspect of the present application, a method of providing virtual verification data cache in the thirteenth aspect of the first aspect of the present application is provided, in response to obtaining a request to calculate verification data, using a unit of the verification data cache to calculate verification data for the data to be written.

[0028] According to one of the methods for providing a virtual verification data cache, first to thirteenth according to the first aspect of the present application, a method for providing a virtual verification data cache according to the fourteenth of the first aspect of the present application is provided, and the request for allocating a unit of the virtual verification data cache also indicates a stream ID, and the stream ID identifies a stream of a multi-stream storage device.

[0029] According to the fourteenth aspect of the first aspect of the present application, a method for virtual check data caching is provided, and according to the fifteenth aspect of the first aspect of the present application, a method for virtual check data caching is provided, wherein the entries of the virtual check data cache table record the stream ID in association with the index of the unit of the virtual check data cache to indicate the index of one or more virtual check cache units used for each stream.

[0030] According to the fourteenth or fifteenth aspect of the first aspect of the present application, a method for providing virtual verification data cache is provided. According to the sixteenth aspect of the first aspect of the present application, a method for providing virtual verification data cache is provided. When obtaining the index of the unit of the available virtual verification data cache, the same unit index of the virtual verification data cache is allocated to the request for allocating the unit of the virtual verification data cache with the same stream ID.

[0031] One of the methods for providing a virtual verification data cache according to the fourteenth to sixteenth aspects of the first aspect of the present application is provided, and a method for providing a virtual verification data cache according to the seventeenth aspect of the first aspect of the present application is provided, when an index of a unit of the virtual verification data cache is allocated to a request for a unit of the virtual verification data cache having a stream ID, the index of the allocated unit of the virtual verification data cache is also recorded in a virtual verification data cache table in association with the stream ID.

[0032] According to the fourteenth to seventeenth methods of the first aspect of the present application, one of the methods of providing virtual verification data caching is provided, and according to the eighteenth method of the first aspect of the present application, a relationship of 1 to N between the stream ID and the index of the unit of the virtual verification data cache is provided, where N is an integer greater than 1.

[0033] One of the methods for providing a virtual verification data cache according to the fourteenth to eighteenth aspects of the first aspect of the present application is provided, and a method for providing a virtual verification data cache according to the nineteenth aspect of the first aspect of the present application is provided, obtaining the index and stream ID of the unit of the associated verification data cache from the received message, and obtaining the data to be written with the same stream ID, and using the unit of the verification data cache to calculate verification data for the data to be written with the stream ID.

[0034] One of the methods for providing a virtual check data cache according to the fourteenth to nineteenth aspects of the first aspect of the present application is provided, and a method for providing a virtual check data cache according to the twentieth aspect of the first aspect of the present application is provided, wherein a request for allocating a unit of the virtual check data cache generated for each write command includes a stream ID associated with the write command, and an index of a unit of the virtual check data cache corresponding to the stream ID and available and / or an index of a unit of the available check data cache is obtained in response to the request for allocating a unit of the virtual check data cache.

[0035] One of the methods for providing a virtual check data cache according to the fourteenth to twentieth aspects of the first aspect of the present application is provided, and a method for providing a virtual check data cache according to the twenty-first aspect of the first aspect of the present application is provided, wherein the request for allocating a unit of the virtual check data cache generated for each write command also includes the context of the write command.

[0036] According to the twenty-first aspect of the first aspect of the present application, a method for providing virtual verification data caching is provided. According to the twenty-second aspect of the first aspect of the present application, a method for providing virtual verification data caching is provided, and verification data is calculated for the data corresponding to the write command using a unit of the verification data cache corresponding to the index of the unit of the virtual verification data cache, wherein the unit of the virtual verification data cache is associated with the same stream ID as the write command.

[0037] One of the methods for providing a virtual verification data cache according to the first to twenty-second aspects of the first aspect of the present application is provided, and a method for providing a virtual verification data cache according to the twenty-third aspect of the first aspect of the present application is provided, and a flow ID mapping table is also maintained, in which the correspondence between the flow ID and the index of the unit of the virtual verification data cache is recorded in an associative manner.

[0038] According to the twenty-third aspect of the first aspect of the present application, a method for virtual verification data caching is provided, and according to the twenty-fourth aspect of the first aspect of the present application, a method for virtual verification data caching is provided. In the stream ID mapping table, a stream ID is associated with the index of one or more units of the virtual verification data cache.

[0039] A method for providing a virtual check data cache according to the twenty-third or twenty-fourth aspect of the first aspect of the present application is provided, and a method for providing a virtual check data cache according to the twenty-fifth aspect of the first aspect of the present application is provided, accessing a stream ID mapping table, identifying the index of a unit of the virtual check data cache associated with the stream ID of a write command, and using the unit of the check data cache corresponding to the index of the unit of the virtual check data cache to calculate check data for the data corresponding to the write command.

[0040] According to the twenty-fifth aspect of the first aspect of the present application, a method for providing virtual verification data caching is provided; according to the twenty-sixth aspect of the first aspect of the present application, a method for providing virtual verification data caching is provided. If the stream ID of the write command is not recorded in the stream ID mapping table, the index of the unit of the available virtual verification data cache is also specified for the stream ID and recorded in the stream ID mapping table.

[0041] One of the methods for providing virtual verification data caching according to the twenty-third to twenty-sixth aspects of the first aspect of the present application is provided, and a method for providing virtual verification data caching according to the twenty-seventh aspect of the first aspect of the present application is provided, in which verification data for data to be written having the same stream ID is calculated using one or more verification data cache units associated with the same stream ID.

[0042] According to one of the methods for providing a virtual verification data cache according to the first to twenty-seventh aspects of the first aspect of the present application, a method for providing a virtual verification data cache according to the twenty-eighth aspect of the first aspect of the present application is provided. If a flow ID is obtained from a request for allocating a unit of a virtual verification data cache, if there is an index of a unit of a virtual verification data cache that is allocated and in use and is associated with the flow ID, the index of the unit of the virtual verification data cache is preferentially selected to respond to the request message; or the index of a unit of a virtual verification data cache that is not associated with the flow ID is selected.

[0043] According to one of the methods for providing a virtual verification data cache according to the first to twenty-seventh aspects of the first aspect of the present application, there is provided a method for providing a virtual verification data cache according to the twenty-ninth aspect of the first aspect of the present application, if the request for allocating a unit of the virtual verification data cache does not contain an index of a unit of the virtual verification data cache that is associated with a stream ID, the index of a unit of the virtual verification data cache that is in an unallocated state is preferentially allocated to it, or the index of a unit of the virtual verification data cache that is not associated with a stream ID is allocated to it.

[0044] According to the twenty-eighth or twenty-ninth method of the first aspect of the present application, a method for providing a virtual verification data cache is provided. According to the thirty-th method of the first aspect of the present application, the index and write command context of the unit of the verification data cache are obtained from the received message, and the unit of the verification data cache is used to calculate verification data for the data to be written by the write command.

[0045] One of the methods for providing a virtual check data cache according to the twenty-eighth to thirtieth of the first aspect of the present application is provided, and a method for providing a virtual check data cache according to the thirty-first aspect of the first aspect of the present application is provided, in response to completing the calculation of the check data of the corresponding page stripe using the index of the unit of the virtual check data cache, the index of the unit of the virtual check data cache is also released.

[0046] One of the methods for providing a virtual verification data cache according to the twenty-eighth to thirty-first aspects of the first aspect of the present application is provided, and a method for providing a virtual verification data cache according to the thirty-second aspect of the first aspect of the present application is provided, and the virtual verification data cache table is updated to record that the units of the released virtual verification data cache are in an unused state.

[0047] According to one of the first to thirty-second methods of providing virtual verification data cache in the first aspect of the present application, a method of providing virtual verification data cache in accordance with the thirty-third method of the first aspect of the present application is provided, providing a virtual verification data cache table for each stream ID.

[0048] One of the methods for providing a virtual verification data cache according to the first to thirty-third aspects of the first aspect of the present application is provided, and a method for providing a virtual verification data cache according to the thirty-fourth aspect of the first aspect of the present application is provided, in which an index of a unit of the virtual verification data cache is assigned to the stream ID for backup even if no pending write command has appeared.

[0049] One of the methods for providing a virtual check data cache according to the thirty-third or thirty-fourth aspect of the first aspect of the present application is provided, and a method for providing a virtual check data cache according to the thirty-fifth aspect of the first aspect of the present application is provided, the check data cache table includes multiple entries, each entry associatively records the index of the unit of the check data cache, its status, and the index of the unit of the virtual check data cache.

[0050] According to the thirty-fifth aspect of the first aspect of the present application, a method for providing a virtual check data cache is provided; according to the thirty-sixth aspect of the first aspect of the present application, a method for providing a virtual check data cache is provided, wherein the status of the index of the unit of the check data cache includes occupied and unoccupied; for the index of the unit of the check data cache in the occupied state, the unit of the check data cache is changed to the unoccupied state by moving the data of the check data cache unit corresponding to the index of the unit of the check data cache to the external data cache; the index of the unit of the check data cache in the unoccupied state can be allocated to respond to a write command.

[0051] A method for providing a virtual check data cache is provided according to the thirty-fifth or thirty-sixth aspect of the first aspect of the present application, and a method for providing a virtual check data cache is provided according to the thirty-seventh aspect of the first aspect of the present application. A second virtual check data cache table is also maintained to record the index of the check data cache unit or the index of the external data unit corresponding to the index of each virtual check data cache unit.

[0052] One of the methods for providing a virtual verification data cache according to items 33 to 37 of the first aspect of the present application is provided, and a method for providing a virtual verification data cache according to item 38 of the first aspect of the present application is provided, obtaining the index of the unit of the available verification data cache and the write command context, obtaining the index of the unit of the virtual verification data cache corresponding to the same stream ID according to the stream ID of the received write command context, and using the unit of the verification data cache to calculate verification data for the write command context.

[0053] One of the methods for providing virtual verification data cache according to the thirty-third to thirty-eighth aspects of the first aspect of the present application is provided, and a method for providing virtual verification data cache according to the thirty-ninth aspect of the first aspect of the present application is provided, which counts the amount of data written using the index of each unit of the virtual verification data cache to identify when the verification data corresponding to the index of the unit of the virtual verification data cache is calculated.

[0054] One of the methods for providing a virtual verification data cache according to the thirty-third to thirty-ninth aspects of the first aspect of the present application is provided, and a method for providing a virtual verification data cache according to the fortieth aspect of the first aspect of the present application is provided, obtaining a stream ID from the acquired message and assigning an index of a unit of the verification data cache associated with the stream ID to the message.

[0055] One of the methods for providing a virtual check data cache according to the thirty-third to fortieth of the first aspect of the present application, a method for providing a virtual check data cache according to the forty-first of the first aspect of the present application is provided, by searching for the index of the unit of the virtual check data cache associated with the stream ID in the check data cache table, and providing the index of the unit of the check data cache associated with the index of the unit of the virtual check data cache together with the write command context to the check data calculation request unit.

[0056] One of the methods for providing a virtual check data cache according to the thirty-third to fortieth of the first aspect of the present application is provided, and a method for providing a virtual check data cache according to the forty-second of the first aspect of the present application is provided. In response to not finding the index of the unit of the virtual check data cache associated with the stream ID, the index of the unit of the check data cache in an unoccupied state is obtained and provided to the check data calculation request unit.

[0057] According to the forty-second aspect of the first aspect of the present application, a method for providing a virtual check data cache is provided; according to the forty-third aspect of the first aspect of the present application, a method for providing a virtual check data cache is provided; in response to not finding the index of a unit of the check data cache in an unoccupied state, the unit of the check data cache is changed to an unoccupied state by moving the data of the check data cache unit corresponding to the index of the unit of the check data cache to an external data cache.

[0058] One of the methods for providing virtual verification data cache according to items 41 to 43 of the first aspect of the present application is provided, and a method for providing virtual verification data cache according to item 44 of the first aspect of the present application is provided, wherein the verification data calculation request unit obtains the index of the unit of the virtual verification data cache corresponding to the stream ID of the received write command context based on the stream ID, and uses the unit of the verification data cache to calculate the verification data for the write command context.

[0059] According to the second aspect of the present application, a first method for processing a write command according to the second aspect of the present application is provided, including: obtaining a write command; obtaining an index of a unit of a verification data cache associated with the stream ID based on the stream ID of the write command; using the unit of the verification data cache corresponding to the index of the unit of the verification data cache to calculate verification data for the data to be written by the write command; and writing the data to be written and / or the verification data in the verification cache into a storage medium.

[0060] According to the first method for processing write commands according to the second aspect of the present application, a second method for processing write commands according to the second aspect of the present application is provided, which binds the index of the unit of the virtual verification data cache to the stream ID.

[0061] According to the first or second method for processing write commands according to the second aspect of the present application, a third method for processing write commands according to the second aspect of the present application is provided, by obtaining the index of the unit of the virtual check data cache associated with the stream ID, and obtaining the index of the unit of the check data cache associated with the index of the unit of the virtual check data cache, as the index of the unit of the check data cache associated with the stream ID.

[0062] According to the third method for processing write commands according to the second aspect of the present application, a fourth method for processing write commands according to the second aspect of the present application is provided. If the index of the unit of the virtual check data cache associated with the stream ID has no associated unit of the check data cache, then the unit of the check data cache in an unoccupied state is obtained, and the index of the unit of the check data cache in an unoccupied state is used as the index of the unit of the check data cache associated with the stream ID.

[0063] According to the fourth method for processing write commands according to the second aspect of the present application, a fifth method for processing write commands according to the second aspect of the present application is provided. If there is no unit of the verification data cache in an unoccupied state, the unit of the verification data cache is made unoccupied by moving the data of the verification data cache unit to an external data cache.

[0064] According to the fourth method for processing write commands according to the second aspect of the present application, a sixth method for processing write commands according to the second aspect of the present application is provided. In response to assigning the index of the unit of the verification data cache to the write command, the verification data cache allocation unit also updates the verification data cache table to record therein the index of the allocated unit of the verification data cache associated with the index of the unit of the virtual verification data cache associated with the stream ID of the write command.

[0065] According to the third aspect of the present application, a first method for processing a write command according to the third aspect of the present application is provided, including: obtaining a write command; obtaining an index of a unit of a virtual check data cache associated with the stream ID based on the stream ID of the write command; obtaining an available check data cache unit; using the obtained check data cache unit to calculate check data for the data to be written by the write command; and writing the data to be written and / or the check data in the check cache into a storage medium.

[0066] According to the first method for processing write commands according to the third aspect of the present application, a second method for processing write commands according to the third aspect of the present application is provided, and the available verification data cache unit obtained is a verification data cache unit associated with the index of the virtual verification data cache unit.

[0067] According to the second method for processing write commands according to the third aspect of the present application, a third method for processing write commands according to the third aspect of the present application is provided. If there is no unit of the verification data cache associated with the index of the unit of the virtual verification data cache, a unit of the verification data cache is also selected, and the verification data associated with the index of the unit of the virtual verification data cache is moved to the selected unit of the verification data cache, so that the selected unit of the verification data cache becomes an available unit of the verification data cache.

[0068] According to one of the first to third methods of processing write commands according to the third aspect of the present application, a fourth method of processing write commands according to the third aspect of the present application is provided, which also includes: binding the index of the unit of the virtual verification data cache to the stream ID.

[0069] According to one of the first to fourth methods for processing write commands according to the third aspect of the present application, a fifth method for processing write commands according to the third aspect of the present application is provided, which also includes: statistically obtaining the data volume of the write command corresponding to the index of the unit of the virtual verification data cache associated with the stream ID, and if the data volume has reached a threshold, releasing the index of the unit of the virtual verification data cache associated with the stream ID.

[0070] According to the fourth aspect of the present application, a first information processing device according to the fourth aspect of the present application is provided, comprising a memory, a processor, and a program stored on the memory and executable on the processor, wherein when the processor executes the program, one of the methods for information processing devices according to the first aspect, second aspect, or third aspect of the present application is implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0072] Figure 1 shows a block diagram of a solid-state storage device;

[0073] Figure 2 A schematic diagram of the bulk is shown;

[0074] Figure 3A block diagram of a storage device and a portion related to a verification data cache according to an embodiment of the present application is shown;

[0075] Figure 4 A block diagram of a storage device and a portion related to a verification data cache according to another embodiment of the present application is shown;

[0076] Figure 5 A block diagram showing a storage device and a portion related to a verification data cache according to another embodiment of the present application is shown;

[0077] Figure 6 A flowchart of using verification data cache according to an embodiment of the present application is shown;

[0078] Figure 7 A block diagram of a storage device and a portion related to a verification data cache according to another embodiment of the present application is shown;

[0079] Figure 8 A block diagram of a storage device and a portion related to a verification data cache according to yet another embodiment of the present application is shown;

[0080] Figure 9 A flowchart of using verification data cache according to yet another embodiment of the present application is shown. DETAILED DESCRIPTION

[0081] The following is a clear and complete description of the technical solutions in the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative efforts are within the scope of protection of this application.

[0082] Figure 3 A block diagram of a storage device and parts related to verification data cache according to an embodiment of the present application is shown.

[0083] The control component of the storage device receives IO commands sent by the host to the storage device. For write commands, the data corresponding to the write command is written to the NVM chip via the media interface 380. After performing a series of processing on the write command, the control component obtains the data to be written to the NVM chip and the address (physical address) indicating the storage location of the data in the NVM chip. It is understood that the control component may split a single write command into multiple sub-write commands. For simplicity, the write command and sub-commands are collectively referred to as a write command.

[0084] To calculate the check data for the data corresponding to the write command, an available check data buffer must be obtained. Virtual check data request unit 310 requests allocation of a virtual check data buffer. Virtual check data request unit 310 generates a virtual check data buffer request message and adds it to message queue 312. Optionally, the generated virtual check data buffer request message includes the context of the write command.

[0085] The virtual parity data cache allocation unit 320 obtains a message from the message queue 312 and accesses the virtual parity data cache table 350 to obtain an available virtual parity data cache. A virtual parity data cache is identified by a virtual parity data cache ID.

[0086] The virtual check data cache table 350 includes a plurality of entries, each of which records the status of one of the virtual check data caches identified by the virtual check data cache ID and the check data cache ID or external data cache unit associated therewith. The status of the virtual check data cache indicates whether the corresponding virtual check data cache (or virtual check data cache ID) is available. The status of the virtual check data cache includes unallocated, allocated and in use, and / or allocated and suspended. A virtual check cache in an unused state can be allocated to process a write command. A virtual check cache in an allocated and in use or allocated and suspended state can no longer be allocated to process a write command. A virtual check cache in an allocated and in use state is associated with a corresponding check data cache (identified by the check data cache ID), and a virtual check cache in an allocated and suspended state is associated with an external data cache unit. An external data cache is a memory outside of a control component, for example, for temporarily storing data in a check data cache.

[0087] The check data generation unit 370 includes a check data cache 376. The check data cache 376 includes multiple cells (378, 379), each of which is identified by a check data cache ID. The check data generation unit 370 can move data from cells in its check data cache 376 to the external data cache 340, and can also move data from cells in the external data cache 340 to the check data cache 376.

[0088] It is understandable that the virtual check data cache table 350 can be stored in other data structures to record the virtual check data cache ID, its status, and its associated check data cache ID / external data cache unit. An available virtual check data cache ID pool can also be used to record available virtual check data cache IDs.

[0089] In response to receiving a virtual parity data cache request message from the message queue 312, the virtual parity data cache allocation unit 320 accesses the virtual parity data cache table 350 to find an available virtual parity data cache ID. The virtual parity data cache allocation unit 320 also obtains an available parity data cache ID (representing an available parity data cache unit), records the found available virtual parity data cache ID and the obtained available parity data cache ID in the virtual parity data cache table 350, and updates the status of the available virtual parity data cache ID to "allocated and in use." The available virtual parity cache ID is provided to the parity data calculation request unit 360 as a result of processing the virtual parity data cache request message. Optionally, the virtual parity data cache allocation unit 320 also provides the obtained available parity data cache ID along with the available virtual parity cache ID to the parity data calculation request unit 360. Thus, by using the virtual parity cache ID, the parity data generation process for the page stripe is maintained, and the parity data cache ID is used to operate the parity data generation unit 370 to calculate parity data.

[0090] Optionally, a verification data cache table is also maintained, which records whether each unit of the verification data cache has an associated virtual verification data cache ID. Units of the verification data cache that are not associated with a virtual verification data cache ID are available. It will be appreciated that other data structures can be used to record the usage status of each unit of the data verification cache, or available verification data cache IDs can be obtained by excluding the units recorded in the virtual verification data cache table 350 from all units of the verification data cache.

[0091] In some cases, there are no available cells in the parity data cache. The virtual parity data cache allocation unit 320 also moves data from a used cell (e.g., cell 378) of the parity data cache 376 to the external data cache 340, making the parity data cache cell 378 available. Optionally, the virtual parity data cache allocation unit 320 sends a data move request to the parity data generation unit 370, indicating the parity data cache cell 378 to be moved and the cell in the external data cache 340 to which the data is to be moved. The virtual parity data cache allocation unit 320 also updates the index of the parity data cache cell 378 in the virtual parity data cache table 350 to the cell of the external data cache 340, and updates the status of the virtual parity data cache ID associated with the parity data cache cell 378 to allocated and pending.

[0092] In an optional embodiment, after obtaining a virtual check data cache request message indicating a virtual check data cache ID from the message queue 312, the virtual check data cache allocation unit 320 obtains the check data cache ID corresponding to the virtual check data cache ID from the virtual check data cache table 350 and provides the virtual check data cache ID and / or the check data cache ID to the check data calculation request unit 360. If the virtual check data cache table 350 indicates that the virtual check data cache ID is in an allocated and pending state, the virtual check data cache unit 320 further obtains an available check data cache unit, moves the data of the corresponding external data cache unit to the available check data cache unit, and provides the virtual check data cache ID and / or the check data cache ID to the check data calculation request unit 360. Furthermore, the virtual check data cache table 350 is updated to record that the virtual check data cache ID is allocated and in use and is associated with the available check data cache unit.

[0093] The check data calculation request unit 360 instructs the check data generation unit 370 to calculate check data using the virtual check data cache ID or the check data cache ID.

[0094] In one embodiment, the check data calculation request unit 360 uses a check data cache ID. The check data cache ID is included in a check data calculation request message and provided to the check data generation unit 370. The check data calculation request message also indicates the address of the data to be written. The check data generation unit 370 obtains the data to be written, calculates check data for the data to be written using the check data cache unit indicated by the check data cache ID, and writes the data to be written to the NVM storage medium through the media interface 380.

[0095] In another embodiment, the check data calculation request unit 360 uses a virtual check data cache ID. The check data cache ID corresponding to the virtual check data cache ID is obtained from, for example, the virtual check data cache table 350, and the check data cache ID is added to a check data calculation request message provided to the check data generation unit 370. If the virtual check data cache table 350 indicates that the virtual check data cache ID is in an allocated and pending state, an available check data cache unit is obtained, the data of the corresponding external data cache unit is moved to the available check data cache unit, and the check data cache ID indicating the available check data cache unit is added to the check data calculation request message provided to the check data generation unit 370. Furthermore, the virtual check data cache table 350 is updated to record that the virtual check data cache ID is in an allocated and in-use state and is associated with the check data cache ID.

[0096] Optionally, the verification data generation unit 370 includes message queues (372, 374). The message queue 372 is used to receive data move request messages, and the message queue 374 is used to receive calculation verification data requests. In response to receiving the data move request message from the message queue 372, data is moved between the verification data cache units (378, 379) and the external data cache 340. In response to receiving the calculation verification data request from the message queue 374, verification data is calculated for the data to be written using the verification data cache units.

[0097] Figure 4 A block diagram of a storage device and parts related to a verification data cache according to another embodiment of the present application is shown.

[0098] same Figure 3 Compared with the embodiment of Figure 4 In this embodiment, the virtual parity data cache request message generated by the virtual parity data request unit 410 further indicates a stream ID. The stream ID identifies a stream of a multi-stream storage device. Each entry in the virtual parity data cache table 450 also records the stream ID in association with the virtual parity data cache ID, indicating one or more virtual parity cache IDs for each stream.

[0099] according to Figure 4 In this embodiment, when allocating virtual parity data cache IDs in response to a virtual parity data cache request message, the virtual parity data cache allocation unit 420 strives to allocate the same virtual parity data cache ID to the same stream ID. When allocating an unallocated virtual parity data cache ID to a stream ID, the allocated virtual parity data cache ID is recorded in the virtual parity data cache table 450 in association with the stream ID.

[0100] Optionally, the relationship between the flow ID and the virtual verification data cache ID is 1 to N, where N is an integer greater than 1. Thus, multiple virtual verification data cache IDs are allocated to the same flow.

[0101] Furthermore, the message provided by the virtual check data cache allocation unit 420 to the check data calculation request unit 460 also indicates a stream ID. Thus, the check data calculation request unit 460 can obtain the check data cache ID and the stream ID from the message indicated by the virtual check data cache allocation unit 420, obtain the data to be written having the same stream ID, and instruct the check data generation unit to use the check data cache ID to calculate check data for the data to be written having the stream ID.

[0102] As well as putting data from the same stream into the same chunk.

[0103] In one embodiment, the virtual parity data request unit 410 allocates a virtual parity data buffer for each write command request. The virtual parity data buffer request message generated by the virtual parity data request unit 410 for each write command includes a stream ID associated with the write command.

[0104] The virtual verification data cache allocation unit 420 obtains a message from the message queue 412 , accesses the virtual verification data cache table 450 , and obtains an available virtual verification data cache ID corresponding to the stream ID and an ID of an available verification data cache.

[0105] Optionally, the message obtained by the virtual verification data cache allocation unit 420 from the message queue 412 also includes the context of the write command, and the write command context, stream ID, available virtual verification data cache ID and available verification data cache ID are provided to the verification data calculation request unit 460, so that the verification data calculation request unit 460 obtains the data to be written of the write command according to the received write command context, and instructs the verification data generation unit to use the verification data cache ID specified in the message to calculate the verification data for the data to be written.

[0106] In another embodiment, the virtual check data request unit 410 requests allocation of a virtual check data cache, which will be used for a group of write commands. The virtual check data cache request message includes a stream ID associated with the group of write commands. Each write command is provided to the check data calculation request unit 460. The virtual check data cache allocation unit 420 obtains an available virtual check data cache ID and an available check data cache ID based on the stream ID, and provides the stream ID, the available virtual check data cache ID, and the available check data cache ID to the check data calculation request unit 460. In response to receiving the write command and the available virtual check data cache ID (and the available check data cache ID), the check data calculation request unit 460 instructs the check data generation unit 370 to use the check data cache unit corresponding to the virtual check data cache ID to calculate check data for the data corresponding to the write command, wherein the virtual check data cache ID and the write command are associated with the same stream ID.

[0107] Figure 5 A block diagram of a storage device and parts related to verification data cache according to another embodiment of the present application is shown.

[0108] Figure 5 Embodiment Figure 3 The embodiments are the same or substantially the same as those of Figure 3 Compared with the embodiment of Figure 5In the embodiment, a flow ID mapping table 464 is further maintained, in which the flow ID and the virtual check data cache ID are recorded in association. Optionally, in the flow ID mapping table 464, the flow ID is associated with one or more virtual check data cache IDs.

[0109] The check data calculation request unit 465 obtains the virtual check data cache ID and, optionally, the physical check data cache ID provided by the virtual check data cache allocation unit 320. The check data calculation request unit 465 also obtains a write command carrying a stream ID from the message queue 462. The check data calculation request unit 465 accesses the stream ID mapping table 464, identifies the virtual check data cache ID associated with the stream ID of the write command, and instructs the check data generation unit 370 to use the unit of the check data cache corresponding to the virtual check data cache ID to calculate check data for the data corresponding to the write command. If there is no record in the stream ID mapping table 464 for a particular stream ID of a write command obtained from the message queue 462, an available virtual check data cache ID is assigned to the stream ID and recorded in the stream ID mapping table 464.

[0110] Thus, the verification data calculation request unit 465 calculates verification data for the to-be-written data having the same stream ID using one or more verification data cache units associated with the same stream ID.

[0111] Optionally, the available virtual parity data cache IDs (and / or available parity data cache IDs) are recorded in the stream ID mapping table 464. The parity data calculation request unit 465 allocates an available virtual parity data cache to the stream ID based on the stream ID indicated by the write command, and records the allocated virtual parity data cache in the stream ID mapping table 464. Upon receiving a subsequent write command with a stream ID, the unit retrieves the virtual parity data cache ID (and / or available parity data cache ID) associated with the same stream ID from the stream ID mapping table 464 based on the stream ID of the write command.

[0112] Figure 6 A flowchart of using verification data cache according to an embodiment of the present application is shown.

[0113] The virtual parity data cache request unit applies for a virtual parity data cache from the virtual parity data cache allocation unit (610).

[0114] In one embodiment, the virtual check data cache request unit applies for a virtual check data cache for each write command. In another example, the virtual check data cache request unit applies for a virtual check data cache for a group of write commands. In still another example, the virtual check data cache request unit proactively applies for a virtual check data cache, independent of whether a pending write command exists.

[0115] The virtual parity data cache allocation unit allocates an available virtual parity data cache ID to the request in response to the request (620).

[0116] In one embodiment, the virtual parity data cache allocation unit allocates a virtual parity data cache ID in an unused state. In another embodiment, the virtual parity data cache allocates a virtual parity data cache ID that is allocated and in use or allocated and suspended. In still another embodiment, the virtual parity data cache allocation unit selects the virtual parity data cache ID to allocate based on the instructions of the received request. If the received request indicates allocation of a virtual parity data cache in an unused state or a virtual parity data cache in a used state, the virtual parity data cache allocation unit extracts a flow ID from the received request and allocates the virtual parity data cache ID based on the flow ID.

[0117] The virtual parity data cache allocation unit also obtains an available parity data cache unit (indicated by the parity data cache ID) (630).

[0118] If the virtual verification data cache table records the verification data cache ID corresponding to the virtual verification data cache ID obtained in step 620, the verification data cache ID is used as an available verification data cache unit. If the virtual verification data cache table records the virtual verification data cache ID obtained in step 620 corresponding to the external data cache unit or the virtual verification data cache ID in an unused state, an available verification data cache unit is also allocated. As an example, the virtual verification data cache allocation unit maintains the status of each verification data cache unit to identify the available verification data cache units. If there is no available verification data cache unit, one of the verification data cache units is also selected, and the data therein is moved to the external data cache, so that the verification data cache unit becomes an available verification data cache.

[0119] The virtual parity data cache allocation unit provides the available virtual parity data cache ID, the available parity data cache ID, the stream ID and / or the write command context to the parity data calculation request unit.

[0120] The verification data calculation request unit instructs the verification data generation unit to calculate verification data for the data to be written by the write command using the verification data cache corresponding to the verification data cache ID, and initiates a program operation (640).

[0121] In one embodiment, the check data calculation request unit obtains a write command context and a check data cache ID from a message provided by a virtual check data cache allocation unit, and instructs the check data generation unit to use the check data cache corresponding to the check data cache ID to calculate check data for the data to be written by the write command. In another embodiment, the check data calculation request unit obtains the check data cache ID from a message provided by the virtual check data cache allocation unit, and separately receives a write command context, and instructs the check data generation unit to use the check data cache corresponding to the check data cache ID to calculate check data for the data to be written by the write command. In another embodiment, the check data calculation request unit further obtains a stream ID associated with the virtual check data cache ID from the message provided by the virtual check data cache allocation unit, and, based on the stream ID indicated by the write command context, instructs the check data generation unit to use a check data cache corresponding to a check data cache ID having the same stream ID as the stream ID indicated by the write command to calculate check data for the data to be written by the write command.

[0122] The verification data generation unit calculates verification data for the data to be written indicated in the message using the verification data buffer specified in the message according to the message provided by the verification data calculation request unit (650), and writes the data to be written or the verification data in the verification buffer into the NVM storage medium using the medium interface of the control component (660).

[0123] Figure 7 A block diagram of a storage device and parts related to verification data cache according to another embodiment of the present application is shown.

[0124] same Figure 3 Compared with the embodiment of Figure 7 In the embodiment, the virtual verification data request unit 710 generates a virtual verification data cache request message to request a virtual verification data cache, and provides the message to the virtual verification data cache allocation unit 720.

[0125] The virtual parity data cache allocation unit 720 accesses the virtual parity data cache table 750 to obtain an available virtual parity data cache ID.

[0126] The virtual check data cache table 750 includes multiple entries, each of which is associated with a virtual check data cache ID and also records the check data cache ID or the index of an external data cache unit. If an entry in the virtual check data cache table 750 records the check data cache ID, it indicates that the virtual check data cache ID of the entry is allocated and in use. If an entry in the virtual check data cache table 750 records the index of an external data cache unit, it indicates that the virtual check data cache ID of the entry is allocated and suspended. If an entry in the virtual check data cache table 750 records neither the check data cache ID nor the index of an external data cache unit, it indicates that the virtual check data cache ID of the entry is unallocated.

[0127] If the available virtual parity data cache ID found is already associated with the parity data cache ID, the virtual parity data cache allocation unit 720 provides the virtual parity data cache ID and the parity data cache ID to the parity data calculation request unit 760. If the available virtual parity data cache ID found is not already associated with the parity data cache ID, the virtual parity data cache allocation unit 720 provides the available virtual parity data cache ID to the parity data cache allocation unit 725 to obtain an available parity data cache ID.

[0128] For example, in response to a request for an available check data cache ID, the check data cache allocation unit 725 selects a cell of the check data cache 776, for example, cell 778, and moves the data of cell 778 of the check data cache 776 to the external data cache 740, thereby making cell 778 of the check data cache 776 available. The check data calculation request unit 760 may then transmit the received available virtual check data cache ID along with the check data cache ID associated with cell 778 of the check data cache 776. The virtual check data cache table 750 is also updated to record that the virtual check data cache ID originally associated with cell 778 is now associated with a cell of the external data cache 740.

[0129] The check data request unit 760 uses the check data cache ID received from the virtual check data cache allocation unit 720 or the check data cache allocation unit 725 to instruct the check data generation unit 770 to calculate check data for data to be written to the NVM storage medium.

[0130] Optionally, when allocating a virtual parity data cache ID in response to a virtual parity data cache request message, the virtual parity data cache allocation unit 720 strives to allocate the same virtual parity data cache ID to virtual parity data cache request messages with the same stream ID. When allocating an unallocated virtual parity data cache ID to a stream ID, the allocated virtual parity data cache ID is recorded in the virtual parity data cache table 750 in association with the stream ID.

[0131] In one embodiment, the virtual verification data request unit 710 requests a virtual verification data cache for each write command, and generates a virtual verification data cache request message, in which the stream ID corresponding to the write command is also indicated. The request message also indicates the write command context. The virtual verification data cache allocation unit 720 obtains the stream ID from the received request message and selects a virtual verification data cache ID based on the stream ID (from the virtual verification data cache table 750). For example, if the stream ID S1 is obtained from the request message, if there is a virtual verification data cache ID that is already allocated and in use and associated with the stream ID S1, then the virtual verification data cache ID is preferentially selected to respond to the request message; or the virtual verification data cache ID that is already associated with the stream ID S1 is selected. If there is no virtual verification data cache ID that is already associated with the stream ID S1, then a virtual verification data cache ID that is in an unallocated state is preferentially assigned to it, or a virtual verification data cache ID that is not associated with the stream ID S1 is assigned to it.

[0132] The virtual parity data cache allocation unit 720 provides the obtained available virtual parity data cache ID and the parity data cache ID to the parity data calculation request unit 760 , or requests the parity data cache allocation unit 725 to obtain an available parity data cache ID if there is no parity data cache ID.

[0133] The verification data calculation request unit 760 obtains the verification data cache ID and the write command context from the received message, and instructs the verification data generation unit 770 to use the verification data cache ID to calculate verification data for the data to be written by the write command.

[0134] Furthermore, in response to completing the calculation of the parity data of the corresponding page stripe using the virtual parity data cache ID, the virtual parity data cache request unit 710 also generates a message indicating the release of the virtual parity data cache ID and provides the message to the virtual parity data cache allocation unit 720. Accordingly, the virtual parity data cache allocation unit 720 updates the virtual parity data cache table 750 to record that the released virtual parity data cache ID is in an unused state.

[0135] Figure 8A block diagram of a storage device and parts related to a verification data cache according to yet another embodiment of the present application is shown.

[0136] according to Figure 8 In the embodiment, the virtual check data cache allocation unit 820 allocates a virtual check data cache ID to each flow and provides the virtual check data cache ID to the check data calculation request unit 860.

[0137] In one example, after the storage device is initialized, the virtual parity data cache allocation unit 820 establishes a binding relationship between the virtual parity data cache ID and the flow ID, and records the binding relationship in the virtual parity data cache table 850. The virtual parity data cache table 850 includes multiple entries, each of which records the virtual parity data cache ID and the flow ID associated therewith.

[0138] In another example, the virtual parity data cache allocation unit 820 maintains a dynamic association between a virtual parity data cache ID and a flow ID. In response to a message received from the message queue 812 allocating a virtual parity data cache ID for a specified flow ID, the unit obtains an available virtual parity data cache ID and records it in the virtual parity data cache table 850 in association with the flow ID. In response to a message received from the message queue 812 releasing a virtual parity data cache ID, the unit clears the association between the virtual parity data cache ID and the flow ID recorded in the virtual parity data cache table 850.

[0139] Optionally, in Figure 8 In this embodiment, a virtual check data cache table is provided for each flow ID. For example, virtual check data cache table 850 is used for flow ID 1, virtual check data cache table 852 is used for flow ID 2, and virtual check data cache table 854 is used for flow ID 3. If a message obtained from message queue 812 specifies that a virtual check data cache ID be allocated for flow ID 1, virtual check data cache table 850 is accessed to obtain an available virtual check data cache ID.

[0140] The allocation of a virtual check data cache ID to a stream ID may not depend on receipt of a write command. Even if a pending write command has not yet occurred, a virtual check data cache ID is allocated to the stream ID for backup.

[0141] Write commands are provided to the parity data cache allocation unit 825 via message queues (826, 827, 828). The messages in the message queues (826, 827, 828) indicate the context of the write command and the stream ID associated with the write command. Optionally, write commands with different stream IDs are provided to different message queues. For example, a write command with stream ID 1 is provided to message queue 826, a write command with stream ID 2 is provided to message queue 827, and a write command with stream ID 3 is provided to message queue 828.

[0142] The verification data cache unit 825 obtains messages from the message queues (826, 827, 828) and allocates an available verification data cache ID to the messages.

[0143] In one embodiment, the verification data cache allocation unit 825 maintains a verification data cache table 862. The verification data cache table 826 includes a plurality of entries, each entry recording a verification data cache ID, its status, and a virtual verification data cache ID in association. The status of the verification data cache ID includes, for example, occupied and unoccupied. A verification data cache ID in an unoccupied state can be allocated to respond to a write command. For a verification data cache ID in an occupied state, optionally, the verification data cache ID is changed to an unoccupied state by moving the data of the verification data cache unit corresponding to the verification data cache ID to the external data cache 840. A second virtual verification data cache table 864 is also maintained to record the verification data cache ID or the index of the external data unit corresponding to each virtual verification data cache ID.

[0144] The parity data cache allocation unit 825 provides the available parity data cache ID and write command context to the parity data calculation request unit 860. Based on the stream ID of the received write command context, the parity data calculation request unit 860 obtains the virtual parity data cache ID corresponding to the stream ID and instructs the parity data generation unit 870 to calculate parity data for the write command context using the parity data cache ID. The parity data calculation request unit 860 also counts the amount of data written using each virtual parity data cache ID to identify when parity data corresponding to the virtual parity data cache ID has been calculated.

[0145] Optionally or further, the message obtained from the message queue (826, 827, 828) also indicates a stream ID, such as stream ID 1. The check data cache allocation unit 825 allocates a check data cache ID associated with stream ID 1 to the message. The check data cache table 862 searches for a virtual check data cache ID associated with stream ID 1, and the check data cache ID associated with the virtual check data cache ID is provided to the check data calculation request unit 860 along with the write command context. If no virtual check data cache ID associated with stream ID 1 is found, an unoccupied check data cache ID is obtained and provided to the check data calculation request unit 860. If no unoccupied check data cache ID is found, the check data cache ID is made unoccupied by moving the data of the check data cache unit corresponding to the check data cache ID to the external data cache 840. The verification data calculation request unit 860 obtains the virtual verification data cache ID corresponding to the received stream ID of the write command context, and instructs the verification data generation unit 870 to calculate verification data for the write command context using the verification data cache ID.

[0146] Figure 9 A flowchart of using verification data cache according to yet another embodiment of the present application is shown.

[0147] The virtual parity data cache allocation unit binds the virtual parity data cache ID to the stream ID (910), so that write commands with the same stream ID are processed using the same virtual parity data cache ID.

[0148] In one example, after the storage device is initialized, the virtual check data cache allocation unit establishes a binding relationship between the virtual check data cache ID and the flow ID and records it in the virtual check data cache table. In another example, the virtual check data cache allocation unit maintains a dynamic association relationship between the virtual check data cache ID and the flow ID.

[0149] The check data cache allocation unit receives a write command, which indicates a stream ID (920). The check data cache allocation unit obtains a check data cache ID (924) associated with the stream ID indicated by the write command. For example, the check data cache allocation unit searches for a virtual check data cache ID associated with the stream ID indicated by the write command, and allocates the check data cache ID associated with the virtual check data cache ID in the check data cache table (862) to the write command. If there is no record of the virtual check data cache ID associated with the stream ID indicated by the write command in the check data cache table (862), an unoccupied check data cache ID is obtained and allocated to the write command. If an unoccupied check data cache ID is not found, the check data cache ID is changed to an unoccupied state by moving the data of the check data cache unit corresponding to the check data cache ID to an external data cache (922). In response to the check data cache ID being allocated to the write command, the check data cache table (862) is also updated to record therein the allocated check data cache ID associated with the virtual check data cache ID associated with the stream ID of the write command.

[0150] The virtual check data cache allocation unit provides the binding relationship between the virtual check data cache ID and the stream ID to the check data calculation request unit. The check data cache allocation unit provides the check data cache ID indicating the allocated check data cache unit to the check data calculation request unit.

[0151] The verification data request unit instructs the verification data generation unit to calculate verification data for the data to be written by the write command using the verification data cache corresponding to the verification data cache ID, and initiates a programming operation (930). The amount of verification data calculated using each virtual verification data cache ID is also counted to identify when the verification data corresponding to the virtual verification data cache ID has been calculated.

[0152] The verification data generating unit calculates verification data for the data to be written indicated in the message using the verification data cache unit specified in the message according to the message provided by the verification data calculation request unit (940), and writes the data to be written or the verification data in the verification cache into the NVM storage medium using the medium interface of the control component (950).

[0153] Although preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they are aware of the basic inventive concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of this application. Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if such changes and modifications fall within the scope of the claims of this application and their equivalents, then this application is intended to include such changes and modifications.

Claims

1. A method for processing a write command, characterized in that: include: Get write command; According to the stream ID of the write command, an index of a unit of the check data cache associated with the stream ID is obtained, where the stream ID identifies a stream of the multi-stream storage device; Calculate verification data for the data to be written corresponding to the write command using the unit of the verification data cache corresponding to the index of the unit of the verification data cache; Writing the data to be written and the verification data in the verification data cache into the storage medium; wherein, the index of the unit of the virtual check data cache associated with the stream ID is obtained, and the index of the unit of the check data cache associated with the index of the unit of the virtual check data cache is obtained as the index of the unit of the check data cache associated with the stream ID; The virtual verification data cache is identified by a virtual verification data cache ID; each unit of the verification data cache is identified by a verification data cache ID.

2. The method according to claim 1, wherein Also includes: The index of the cell of the virtual parity data cache is bound to the stream ID.

3. The method according to claim 1, wherein If the index of the unit of the virtual check data cache associated with the stream ID has no associated unit of the check data cache, then obtain the unit of the check data cache in an unoccupied state, and use the index of the unit of the check data cache in an unoccupied state as the index of the unit of the check data cache associated with the stream ID.

4. The method according to claim 3, wherein If there is no unit of the verification data cache in an unoccupied state, the unit of the verification data cache is made unoccupied by moving the data of the unit of the verification data cache to an external data cache.

5. The method according to claim 3, wherein In response to assigning the index of the unit of the check data cache to the write command, the check data cache allocation unit also updates the check data cache table to record therein the index of the assigned unit of the check data cache associated with the index of the unit of the virtual check data cache associated with the stream ID of the write command.

6. A method for processing a write command, characterized in that: include: Get write command; According to the stream ID of the write command, an index of a unit of the virtual parity data cache associated with the stream ID is obtained, where the stream ID identifies a stream of the multi-stream storage device; Obtaining a unit of the verification data cache corresponding to the index of the unit of the verification data cache; Calculate verification data for the data to be written corresponding to the write command using the obtained verification data cache unit; Writing the data to be written and the verification data in the verification data cache into the storage medium; wherein, the index of the unit of the virtual check data cache associated with the stream ID is obtained, and the index of the unit of the check data cache associated with the index of the unit of the virtual check data cache is obtained as the index of the unit of the check data cache associated with the stream ID; The virtual verification data cache is identified by a virtual verification data cache ID; each unit of the verification data cache is identified by a verification data cache ID.

7. The method according to claim 6, wherein Also includes: The index of the cell of the virtual parity data cache is bound to the stream ID.

8. The method according to claim 6 or 7, wherein: Also includes: The data volume of the write command corresponding to the index of the unit of the virtual verification data cache associated with the stream ID is obtained by counting and, if the data volume has reached a threshold, the index of the unit of the virtual verification data cache associated with the stream ID is released.

9. An information processing device comprising a memory, a processor, and a program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method for processing a write command according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Method and apparatus for organizing page strip data and writing data to page strips

    CN108877862B

  • IO command processing method and medium interface controller

    CN108153482A