Data storage processing method, system and equipment and computer readable storage medium
By determining the abnormal SBlk and target zone in the solid state drive and performing data storage and transfer operations, the data storage problem of solid state drive failure after ZNS technology is solved, and the usability rate of solid state drives is improved.
Patent Information
- Application Number
- CN202311485379.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-08
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2043-11-08
AI Technical Summary
The prior art is difficult to effectively solve the data storage problem when solid-state drives fail after ZNS technology processing, resulting in a decrease in the usability rate of solid-state drives.
By determining the sblk that an abnormality occurs in the solid-state drive, determining its corresponding target zone, storing the abnormal data and target data to the normal second sblk, and moving the data in the first sblk and the second sblk to the third sblk, and modifying the write sblk of the target zone to the third sblk.
It ensures data storage integrity of the target zone when the SSD fails and improves the useability of the SSD.
Smart Images

Figure CN119960661A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of solid-state hard disks, and more specifically, to a data storage processing method, system, electronic device, and computer-readable storage medium. Background Art
[0002] Currently, in the application process of Solid State Disk (SSD), the SSD can be processed based on ZNS technology before use. However, when the SSD processed based on ZNS technology fails, it is difficult to continue to use the SSD for accurate data storage, which reduces the availability of the SSD.
[0003] In summary, how to ensure the availability of solid state drives is an urgent problem to be solved by those skilled in the art. Summary of the invention
[0004] The purpose of the present application is to provide a data storage processing method, which can solve the technical problem of how to ensure the availability of solid state hard disks to a certain extent. The present application also provides a data storage processing system, an electronic device and a computer-readable storage medium.
[0005] In order to achieve the above objectives, this application provides the following technical solutions:
[0006] A data storage and processing method, applied to a ZNS solid state drive, comprising:
[0007] Determine the first sblk in the SSD where the abnormality occurs;
[0008] Determine a target zone corresponding to the first sblk;
[0009] Store the abnormal data and the target data from the target zone into a normal second sblk;
[0010] Move the data in the first sblk and the second sblk to a normal third sblk;
[0011] Modify the write sblk of the target zone to the third sblk;
[0012] Here, sblk includes a set of blocks with the same ID in the solid state drive.
[0013] Preferably, after modifying the write sblk of the target zone to the third sblk, the method further includes:
[0014] Obtaining sblk Id information of the third sblk;
[0015] Obtain super page ID information of the third sblk, where super page represents a superset of pages with the same page ID within the sblk;
[0016] Acquire Au off information of the third sblk, where the Au off information represents a position offset of Au in the super page;
[0017] Determine a target Pma address of the third sblk based on the sblk Id information, the super page Id information, and the Au off information;
[0018] The L2P relationship of the target zone is updated based on the target Pma address.
[0019] Preferably, the Lma addresses of the zones of the solid state drive are continuous, the Pma addresses within a single super page are continuous, and the Pma addresses between adjacent super pages are continuous, and further comprising:
[0020] Determine the first Lma address of the data to be written;
[0021] Determine a known second Lma address and its corresponding second Pma address;
[0022] Determine offset information between the first Lma address and the second Lma address;
[0023] Determine a first Pma address corresponding to the first Lma address based on the second Pma address, the offset information and the Pma address continuity mode;
[0024] The correspondence between the first Lma address and the first Pma address is updated.
[0025] Preferably, the Pma address continuity mode includes sequentially increasing the Pma address;
[0026] The determining, based on the second Pma address, the offset information and the Pma address continuity mode, a first Pma address corresponding to the first Lma address includes:
[0027] The second Pma address is added to the offset information to obtain the first Pma address corresponding to the first Lma address.
[0028] Preferably, after modifying the corresponding sblk of the target zone to the third sblk, the method further includes:
[0029] The Au Done Cnt information of the third sblk is recorded, where the Au Done Cnt information represents the amount of data completed by the program.
[0030] Preferably, the step of moving the data in the first sblk and the second sblk to a normal third sblk includes:
[0031] If the first sblk and the second sblk have data being written, the current count value is assigned to the amount of data being written; otherwise, the current count value is assigned to 0;
[0032] respectively counting the amount of data in the first sblk, the second sblk, and the third sblk;
[0033] Moving a first number of data in the first sblk to the third sblk;
[0034] Moving a second amount of data in the second sblk to the third sblk;
[0035] If the third number of data in the third sblk is equal to the sum of the first number of data and the second number of data and the current count value is 0, the migration is completed.
[0036] Preferably, after the data in the first sblk and the second sblk are moved to the normal third sblk, the method further includes:
[0037] Format the first sblk and the second sblk.
[0038] A data storage and processing system, applied to a ZNS solid state drive, comprising:
[0039] A first determination module, used to determine a first sblk in which an abnormality occurs in the solid state drive;
[0040] A second determining module is used to determine a target zone corresponding to the first sblk;
[0041] A first storage module is used to store the abnormal data and the target data from the target zone into a normal second sblk;
[0042] A second storage module, used for moving the data in the first sblk and the second sblk to a normal third sblk;
[0043] A first modification module, configured to modify the write sblk of the target zone to the third sblk;
[0044] Here, sblk includes a set of blocks with the same ID in the solid state drive.
[0045] An electronic device, comprising:
[0046] Memory for storing computer programs;
[0047] A processor is used to implement the steps of any of the above data storage processing methods when executing the computer program.
[0048] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above data storage and processing methods are implemented.
[0049] The present application provides a data storage processing method, which is applied to a ZNS solid-state drive, to determine the first sblk in which an abnormality occurs in the solid-state drive; determine the target zone corresponding to the first sblk; store the abnormal data and the target data from the target zone in the normal second sblk; move the data in the first sblk and the second sblk to the normal third sblk; modify the write sblk of the target zone to the third sblk; wherein the sblk includes a set of blocks with the same ID in the target solid-state drive. The present application divides blocks with the same ID into sblks, and when an abnormality occurs in the first sblk, uses the normal second sblk and the third sblk to store the data of the target zone, and moves the data in the first sblk and the second sblk to the normal third sblk, and modifies the write sblk of the target zone to the third sblk, which not only ensures the data storage integrity of the target zone, but also ensures the availability of the solid-state drive. The present application provides a data storage processing system, an electronic device, and a computer-readable storage medium that also solves corresponding technical problems. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0051] Figure 1 A first flow chart of a data storage and processing method provided in an embodiment of the present application;
[0052] Figure 2 This is a schematic diagram of the zone;
[0053] Figure 3It is a schematic diagram of sblk in this application;
[0054] Figure 4 This is the first schematic diagram of data transfer on sblk;
[0055] Figure 5 The second schematic diagram of data transfer on sblk;
[0056] Figure 6 A second flow chart of a data storage and processing method provided in an embodiment of the present application;
[0057] Figure 7 is a schematic diagram of Mpp;
[0058] Figure 8 is a schematic diagram of Pma;
[0059] Fig. 9 A schematic diagram showing how to use Fly cnt to determine whether all data in the first sblk and the second sblk have been moved to the third sblk;
[0060] Fig.10 It is an overall schematic diagram of the data storage and processing method;
[0061] Fig.11 It is an operation flow chart of the data storage processing method;
[0062] Fig.12 A data flow diagram for data storage and processing methods;
[0063] Fig.13 A structural diagram of a data storage and processing system provided in an embodiment of the present application;
[0064] Fig.14 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0065] Fig.15 Another structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0066] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only 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 ordinary technicians in this field without creative work are within the scope of protection of this application.
[0067] See also Figure 1 , Figure 1 A first flow chart of a data storage and processing method provided in an embodiment of the present application.
[0068] A data storage processing method provided in an embodiment of the present application, applied to a ZNS solid state drive, may include the following steps:
[0069] Step S101: Determine the first sblk in which an abnormality occurs in the solid state drive.
[0070] In practical applications, the first sblk in which an exception occurs in the solid-state drive can be determined first. The cause of the sblk exception can be determined according to the application scenario, such as program fail, wear leveling, read disturb avoidance, read error, etc. In addition, the zone may not be closed for a long time after activation, and the number of erase times of a block in the sblk reaches the wear leveling threshold, so the sblk cannot continue to be written.
[0071] It should be noted that the SSD in this application refers to the SSD processed by ZNS technology. The principle of ZNSSSD is to divide the namespace space into multiple zone spaces. Each zone can be read in any order, but must be written in order, such as Figure 2 In this context, the LBs (logic blocks) in each zone are continuous and are required to be written to the nand flash in sequence. In addition, the sblk in this application refers to a set of blocks with the same ID in the solid-state drive, such as Figure 3 As shown, sblk is a physical concept, corresponding to a real block superset, and has real properties, including but not limited to erase counts, remap, bad block management, etc. Zone is a logical space concept, which only needs to write data and record data write points. In the case of data storage overload, in the FW of ZNS, FE (FrontEnd) implements zone mapping and maps the host's application data to different zones according to lba (LB address). After FTL conversion, BE (BackEnd) writes the data in the zone to different blocks in different sblks in sequence.
[0072] In specific application scenarios, sblk can be set according to the relationship of zone:sblk=1:1, so as to achieve high-speed writing through the parallel program of the nand array. The design of sblk and zone corresponds one to one to ensure the parallel program when multiple zones are written concurrently, ensuring that the ZNS solid-state drive has high write performance. It should be noted that when it is necessary to determine the sblk capacity, the Channel, ce, lun, and plane solidified at the time of nand leaving the factory can be multiplied to obtain the number of blocks in the horizontal nand, and the number of vertical rows in a block can be determined based on the page solidified at the time of nand leaving the factory. Combining the two, the capacity of an sblk can be calculated.
[0073] Step S102: Determine the target zone corresponding to the first sblk.
[0074] In actual applications, due to the failure of the first sblk, for example, after a program fail occurs on a die on the sblk, due to the electrical characteristics of the nand, the subsequent page program in the block will have a high probability of failure, affecting the write IO performance. If the subsequent super page write of the sblk skips the faulty die, this solution will make the management of the sblk meta data (metadata) more complicated. The meta data will be inconsistent before and after the prgram fail occurs, increasing the requirements of the meta data on the DDR. In order to avoid this situation, the first sblk needs to be prohibited from continuing to store data, that is, the data transmitted by the data source of the first sblk needs to be transferred and moved to other sblks. In other words, the data transmitted by the target zone corresponding to the first sblk needs to be transferred and moved to other sblks, so the target zone corresponding to the first sblk needs to be determined first.
[0075] Step S103: Store the abnormal data and the target data from the target zone into the normal second sblk.
[0076] Step S104: Move the data in the first sblk and the second sblk to the normal third sblk.
[0077] Step S105: modify the write sblk of the target zone to a third sblk; wherein the sblk includes a set of blocks with the same ID in the solid state drive.
[0078] In practical applications, after determining the target zone corresponding to the first sblk, the abnormal data and the target data from the target zone can be stored in the normal second sblk; the data in the first sblk and the second sblk can be moved to the normal third sblk; and the write sblk of the target zone can be modified to the third sblk.
[0079] For ease of understanding, Figure 4 and Figure 5 As shown, in Figure 4 In the example, if sblk1 bound to user Application 2 fails and cannot / should not continue the nand proagram, close sblk1; at this time, the subsequent data of the zone is programmed on sblk 3; move the data on sblk1 and sblk3 to sblk4; bind sblk4 to the zone, release sblk1 and sblk3; the subsequent data of the zone is programmed on sblk4. Figure 5 In the example, when a program fail occurs on sblkA, the data of the program fail is reWr (re-Write) to sblkB; all subsequent hostWrs in the same zone are written to sblkB; at the same time, the data on sblkA and sblkB are moved to sblkC in sequence; after all the data is moved, the write point of the zone is switched to sblkC, and all subsequent writes in the zone fall on sblkC. In this process, sblkB is defined as a coWr (cooperate write) resource for sblkA.
[0080] In a specific application scenario, in order to facilitate the selection of a normal sblk, the information of the normal sblk can be placed in the resource pool. When the normal sblk is needed later, it is only necessary to read the sblk from the resource pool. In addition, after the data in the first sblk and the second sblk are moved to the normal third sblk, in order to allow the first sblk and the second sblk to continue to store data, the first sblk and the second sblk can also be formatted.
[0081] A data storage processing method provided by the present application is applied to a ZNS solid-state drive, and determines the first sblk in which an abnormality occurs in the solid-state drive; determines the target zone corresponding to the first sblk; stores the abnormal data and the target data from the target zone in a normal second sblk; moves the data in the first sblk and the second sblk to a normal third sblk; modifies the write sblk of the target zone to the third sblk; wherein the sblk includes a set of blocks with the same ID in the solid-state drive. The present application divides blocks with the same ID into sblks, and when an abnormality occurs in the first sblk, uses the normal second sblk and the third sblk to store the data of the target zone, and moves the data in the first sblk and the second sblk to the normal third sblk, and modifies the write sblk of the target zone to the third sblk, which not only ensures the data storage integrity of the target zone, but also ensures the availability of the solid-state drive.
[0082] See also Figure 6 , Figure 6 A second flow chart of a data storage and processing method provided in an embodiment of the present application.
[0083] A data storage processing method provided in an embodiment of the present application, applied to a ZNS solid state drive, may include the following steps:
[0084] Step S201: Determine the first sblk in which an abnormality occurs in the solid state drive.
[0085] Step S202: Determine the target zone corresponding to the first sblk.
[0086] Step S203: Store the abnormal data and the target data from the target zone into the normal second sblk.
[0087] Step S204: Move the data in the first sblk and the second sblk to the normal third sblk.
[0088] Step S205: modify the write sblk of the target zone to a third sblk; wherein the sblk includes a set of blocks with the same ID in the solid state drive.
[0089] Step S206: Obtain sblk Id information of the third sblk.
[0090] Step S207: Obtain super page ID information of the third sblk, where super page represents a superset of pages with the same page ID within the sblk.
[0091] Step S208: Obtain Au off information of the third sblk, where the Au off information represents the position offset of Au in the super page.
[0092] Step S209: Determine the target Pma address of the third sblk based on the sblk Id information, the super page Id information, and the Au off information.
[0093] Step S210: Update the L2P relationship of the target zone based on the target Pma address.
[0094] In practical applications, in order to facilitate the conversion of logical addresses to physical addresses of solid-state drives, Mpp (media program point, nand programming location) virtualization technology can be designed in FTL. Figure 7 As shown, Mpp records the following data (including but not limited to): sblk Id, super Page Off, Au off, Au Done Cnt, Fly Cnt; sblkId can be indexed to sblk. When the host activates the zone, Mpp comprehensively selects an sblk from the perspectives of wear leveling and bad block management, and records it in Mpp, which represents the sblk being programmed; each nand block has multiple pages, one page has 4 Au, each Au is 4k, and the super page is a superset of pages with the same page Id in the sblk; super page off represents that the current sblk is written to the super page position; Au off (Address unit off, the minimum read and write unit of nand) represents the position offset of Au in the super page, which is composed of die Id and auOff in the die; Au DoneCnt represents the amount of data completed by the program, the Au granularity; Fly cnt represents the statistics of the program in progress after the program request is sent to nand.
[0095] In actual application scenarios, in order to facilitate the determination of Pma (physical mapping address), Pma can be set to consist of sblk Id, super page Id, and Au off. Accordingly, after the corresponding sblk of the target zone is modified to the third sblk, the sblk Id information of the third sblk can also be obtained; the super page Id information of the third sblk is obtained, and the super page represents the superset of pages with the same page ID inside the sblk; the Au off information of the third sblk is obtained, and the Au off information represents the position offset of Au in the super page; the target Pma address of the third sblk is determined based on the sblk Id information, the super page Id information, and the Au off information; the L2P relationship of the target zone is updated based on the target Pma address, and the L2P relationship is also the mapping relationship between Lma (logic mapping address) and Pma. In addition, after the corresponding sblk of the target zone is modified to the third sblk, the Au Done Cnt information of the third sblk can also be recorded, and the AuDone Cnt information represents the amount of data completed by the program. It should be noted that the Pma address of the sblk in this application can be determined based on its own sblk Id information, super page Id information, and Au off information, and this application does not make any specific limitations here.
[0096] In actual application scenarios, the Lma address of the zone of the target solid-state hard disk can be set to be continuous, the Pma address within a single super page can be continuous, and the Pma address between adjacent super pages can be continuous. The address continuity method can be determined according to the application scenario, such as being able to increase in sequence according to a fixed value, etc. Correspondingly, the present application can also directly determine the Pma address based on the Lma address, that is, to determine the first Lma address of the current data to be written; determine the known second Lma address and the second Pma address corresponding to the second Lma address; determine the offset information between the first Lma address and the second Lma address; determine the first Pma address corresponding to the first Lma address based on the second Pma address, the offset information and the Pma address continuity method; update the correspondence between the first Lma address and the first Pma address. In this way, the Lma in the zone is continuous, the Pma in the sblk is also continuous, and the Lma and Pma correspond continuously. For each host data, the real physical nand position can be directly inferred based on the logical position offset, without the need to maintain the L2P (Lma to Pma) / P2L (Pma to Lma) mapping relationship, reducing the capacity of DRAM and alleviating the pressure of data flushing during abnormal power failure. In addition, in actual applications, Lma can be set to 4k units, LB can be merged into Lma, and data movement of SSDs with 4k / 512Byte sectors can be processed without distinction.
[0097] In specific application scenarios, based on the above Pma addressing method, Lma is continuous within the zone, and Pma is applied continuously during program to ensure the continuity of L2P. Each read and write IO can calculate a one-to-one corresponding nand address through lba. The mapping of L2P can be calculated in real time. For example, the Pma address continuity method can include sequential increments of the Pma address, that is, increments by 1 each time. At this time, in the process of determining the first Pma address corresponding to the first Lma address based on the second Pma address, offset information and Pma address continuity method, the second Pma address can be added to the offset information to obtain the first Pma address corresponding to the first Lma address. Figure 8 As shown, Pma is continuously addressed in the super page. When switching super pages, the last Pma in the previous row is continuous with the Pma in the next row. Lma calculates the logical offset in the zone. The super page Id and Au off of Pma in sblk can be obtained through this offset, and then the real nand position can be determined.
[0098] In specific application scenarios, in order to balance the ZNS read and write performance and DDR space, this application designs a processing method: the L2P of the open zone (the ZNS protocol stipulates that there are Maximum Open Resources open zones on the ZNS solid-state drive) is fully maintained in the DDR, and the L2P of the non-open zone is calculated in real time through the above-mentioned continuous mapping relationship, and the L2P mapping relationship in the DDR is updated when each program is completed.
[0099] In actual applications, in the process of transferring and moving the data in the first sblk and the second sblk to the normal third sblk, in order to facilitate determining whether the data in the first sblk and the second sblk have all been transferred and moved to the third sblk, it is possible to determine whether there is data being written to the first sblk and the second sblk. If so, the current count value (i.e., Fly cnt) is assigned as the amount of data being written, otherwise the current count value is assigned as 0. The amount of data in the first sblk, the second sblk, and the third sblk is counted separately, that is, the data in the first sblk is defined as the first number of data, the data moved from the second sblk is defined as the second number of data, and the data moved from the first sblk and the second sblk to the third sblk is defined as the third number of data. If the third number of data in the third sblk is equal to the sum of the first number of data and the second number of data and the current count value is 0, the transfer is completed. At this time, the judgment process can be as follows: Fig. 9 shown.
[0100] It should be noted that the real-time process of the data storage and processing method provided in this application can be determined according to the application scenario, for example, Fig.10 , Fig.11 , Fig.12As shown, move refers to the movement of data programmed to nand. When moving open zone data, you can sequentially traverse the Lma offset of the zone, query the L2P in DDR, index to the corresponding Pma, read data on nand, and write the read data sequentially to the move destination sblk. During the move process, moveWr is to update L2P after all programmed data in the zone is moved. hostWr / coWr is to update the L2P of the current Lma when each write completes the program. When a read occurs at this time, the content on the nand of the hostWr / coWr sblk will be read through L2P, and the content on moveWr will not be read. In addition, considering the extreme scenario where the data in the zone continuously hits program fail, and using sow, Sequence of write to define the resources of each write, without distinguishing the specific nand particles, the processing flow is as follows:
[0101] Normal host Wr, the first write, open host Wr sblk, apply for sow; subsequent writes, apply for sow in hostWrsblk in turn;
[0102] Program fail is hit, host Wr sblk is closed; coWr mpp1 is applied, coWr sblk1 is opened, and sow is applied on coWr sblk1; for subsequent writes, sow is applied on coWr sblk1 in turn;
[0103] If program fail is hit continuously, host Wr sblk and coWr sblk1 are both closed; apply for coWr mpp2, open coWr sblk2, and apply sow on coWr sblk2; for subsequent writes, apply sow on coWr sblk2 in turn; hit program fail again, apply for coWr mpp3, open coWr sblk3, and repeat this step.
[0104] See also Fig.13 , Fig.13 A structural schematic diagram of a data storage and processing system provided in an embodiment of the present application.
[0105] A data storage processing system provided in an embodiment of the present application is applied to a ZNS solid state drive and may include:
[0106] A first determining module 101 is used to determine a first sblk in which an abnormality occurs in the solid state drive;
[0107] A second determination module 102 is used to determine a target zone corresponding to the first sblk;
[0108] The first storage module 103 is used to store the abnormal data and the target data from the target zone into a normal second sblk;
[0109] The second storage module 104 is used to move the data in the first sblk and the second sblk to a normal third sblk;
[0110] A first modification module 105, configured to modify the write sblk of the target zone into a third sblk;
[0111] Among them, sblk includes a set of blocks with the same ID in the solid state drive.
[0112] A data storage processing system provided in an embodiment of the present application may further include:
[0113] A first acquisition module is used to acquire sblk Id information of the third sblk after the first modification module modifies the write sblk of the target zone into the third sblk;
[0114] The second acquisition module is used to obtain the super page ID information of the third sblk, where the super page represents a superset of pages with the same page ID in the sblk;
[0115] A third acquisition module is used to acquire Au off information of a third sblk, where the Au off information represents a position offset of Au in the superpage;
[0116] A third determination module, configured to determine a target Pma address of a third sblk based on the sblk Id information, the super page Id information, and the Au off information;
[0117] The first updating module is used to update the L2P relationship of the target zone based on the target Pma address.
[0118] The data storage and processing system provided by the embodiment of the present application, wherein the LMA addresses of the zones of the solid state drive are continuous, the PMA addresses within a single super page are continuous, and the PMA addresses between adjacent super pages are continuous, may also include:
[0119] A fourth determining module, used to determine a first Lma address of data to be written currently;
[0120] A fifth determining module, used to determine a known second Lma address and its corresponding second Pma address;
[0121] A sixth determining module, used to determine the offset information between the first Lma address and the second Lma address;
[0122] A seventh determination module, configured to determine a first Pma address corresponding to the first Lma address based on the second Pma address, the offset information and the Pma address continuity mode;
[0123] The second updating module is used to update the corresponding relationship between the first Lma address and the first Pma address.
[0124] In a data storage processing system provided by an embodiment of the present application, the Pma address continuity mode includes the Pma address increasing sequentially;
[0125] The seventh determination module may be specifically configured to: add the second Pma address to the offset information to obtain the first Pma address corresponding to the first Lma address.
[0126] A data storage processing system provided in an embodiment of the present application may further include:
[0127] The first recording module is used to record Au Done Cnt information of the third sblk after the first modification module modifies the corresponding sblk of the target zone into the third sblk, where the Au Done Cnt information represents the amount of data completed by the program.
[0128] In a data storage and processing system provided by an embodiment of the present application, the second storage module can be specifically used to: determine whether the first sblk and the second sblk have data being written, and if so, assign the current count value (Fly cnt) to the amount of data being written, otherwise assign the current count value to 0. Count the amount of data in the first sblk, the second sblk, and the third sblk respectively, that is, define the data moved from the first sblk to the third sblk as the first number of data, define the data moved from the second sblk to the third sblk as the second number of data, and define the data moved from the first sblk and the second sblk to the third sblk as the third number of data. If the third number of data in the third sblk is equal to the sum of the first number of data and the second number of data and the current count value is 0, the move is completed.
[0129] A data storage processing system provided in an embodiment of the present application may further include:
[0130] The first formatting module is used to format the first sblk and the second sblk after the second storage module moves the data in the first sblk and the second sblk to the normal third sblk.
[0131] The present application also provides an electronic device and a computer-readable storage medium, both of which have the corresponding effects of a data storage and processing method provided in an embodiment of the present application. Fig.14 , Fig.14 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0132] An electronic device provided in an embodiment of the present application includes a memory 201 and a processor 202. The memory 201 stores a computer program. When the processor 202 executes the computer program, the steps of the data storage processing method described in any of the above embodiments are implemented.
[0133] See also Fig.15 , another electronic device provided in the embodiment of the present application may also include: an input port 203 connected to the processor 202, for transmitting commands input from the outside to the processor 202; a display unit 204 connected to the processor 202, for displaying the processing results of the processor 202 to the outside; a communication module 205 connected to the processor 202, for realizing communication between the electronic device and the outside. The display unit 204 can be a display panel, a laser scanning display, etc.; the communication method adopted by the communication module 205 includes but is not limited to mobile high-definition link technology (Mobile High-Definition Link, MHL), Universal Serial Bus (Universal Serial Bus, USB), High-Definition Multimedia Interface (High-Definition Multimedia Interface, HDMI), wireless connection: wireless fidelity technology (WIreless Fidelity, WiFi), Bluetooth communication technology, low-power Bluetooth communication technology, and communication technology based on IEEE802.11s.
[0134] An embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of the data storage processing method described in any of the above embodiments are implemented.
[0135] The computer-readable storage medium involved in this application includes random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs (Compact Disc Read-Only Memory), or any other form of storage medium known in the technical field.
[0136] For the description of the relevant parts of the data storage and processing system, electronic device, and computer-readable storage medium provided in the embodiments of the present application, please refer to the detailed description of the corresponding parts in the data storage and processing method provided in the embodiments of the present application, which will not be repeated here. In addition, the parts of the above-mentioned technical solutions provided in the embodiments of the present application that are consistent with the implementation principles of the corresponding technical solutions in the prior art are not described in detail to avoid excessive elaboration.
[0137] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0138] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A data storage and processing method, characterized in that: Applied to ZNS solid state drives, including: Determine the first sblk in the SSD where the abnormality occurs; Determine a target zone corresponding to the first sblk; Store the abnormal data and the target data from the target zone into a normal second sblk; Move the data in the first sblk and the second sblk to a normal third sblk; Modify the write sblk of the target zone to the third sblk; Here, sblk includes a set of blocks with the same ID in the solid state drive.
2. The method according to claim 1, characterized in that After the writing sblk of the target zone is modified to the third sblk, the method further includes: Obtaining sblk Id information of the third sblk; Obtain super page ID information of the third sblk, where super page represents a superset of pages with the same page ID within the sblk; Acquire Au off information of the third sblk, where the Au off information represents a position offset of Au in the super page; Determine a target Pma address of the third sblk based on the sblk Id information, the super page Id information, and the Au off information; The L2P relationship of the target zone is updated based on the target Pma address.
3. The method according to claim 2, characterized in that The Lma addresses of the zones of the solid state drive are continuous, the Pma addresses within a single super page are continuous, and the Pma addresses between adjacent super pages are continuous, and further comprising: Determine the first Lma address of the data to be written; Determine a known second Lma address and its corresponding second Pma address; Determine offset information between the first Lma address and the second Lma address; Determine a first Pma address corresponding to the first Lma address based on the second Pma address, the offset information and the Pma address continuity mode; The correspondence between the first Lma address and the first Pma address is updated.
4. The method according to claim 3, characterized in that The Pma address continuous mode includes Pma addresses increasing in sequence; The determining, based on the second Pma address, the offset information and the Pma address continuity mode, a first Pma address corresponding to the first Lma address includes: The second Pma address is added to the offset information to obtain the first Pma address corresponding to the first Lma address.
5. The method according to claim 2, characterized in that: After the corresponding sblk of the target zone is modified to the third sblk, the method further includes: The Au Done Cnt information of the third sblk is recorded, where the Au Done Cnt information represents the amount of data completed by the program.
6. The method according to claim 1, characterized in that The step of moving the data in the first sblk and the second sblk to a normal third sblk includes: If the first sblk and the second sblk have data being written, the current count value is assigned to the amount of data being written; otherwise, the current count value is assigned to 0; respectively counting the amount of data in the first sblk, the second sblk, and the third sblk; Moving a first number of data in the first sblk to the third sblk; Moving a second amount of data in the second sblk to the third sblk; If the third number of data in the third sblk is equal to the sum of the first number of data and the second number of data and the current count value is 0, the migration is completed.
7. The method according to claim 1, characterized in that After the data in the first sblk and the second sblk are moved to the normal third sblk, the method further includes: Format the first sblk and the second sblk.
8. A data storage and processing system, characterized in that: Applied to ZNS solid state drives, including: A first determination module, used to determine a first sblk in which an abnormality occurs in the solid state drive; A second determining module is used to determine a target zone corresponding to the first sblk; A first storage module is used to store the abnormal data and the target data from the target zone into a normal second sblk; A second storage module, used for moving the data in the first sblk and the second sblk to a normal third sblk; A first modification module, configured to modify the write sblk of the target zone to the third sblk; Here, sblk includes a set of blocks with the same ID in the solid state drive.
9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the data storage and processing method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the data storage and processing method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Flash memory exception processing method and system and storage medium
CN115826856A
Memory system and operating method thereof
CN116301569A
Memory and management method thereof
CN116881184A
Remote direct memory access (RDMA)-based recovery of dirty data in remote memory
US11436112B1
Memory system and refresh control method
US20220405008A1