Data storage method and device of super block, electronic equipment and storage medium

By obtaining the mapping relationship between faulty storage blocks and system partitions, the problem of superblocks being unable to form a full DIE due to faulty storage blocks was solved, enabling normal data processing and efficiency improvement of degraded superblocks.

CN120832069APending Publication Date: 2025-10-24BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410459232.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-16
Publication Date
2025-10-24

AI Technical Summary

Technical Problem

When the firmware is powered on for the first time, the presence of faulty storage blocks in the memory module prevents the superblock from forming a full DIE, leading to data storage problems and increased wear leveling pressure.

Method used

By obtaining the mapping relationship between the faulty storage block and the storage block in the system partition, the storage block in the system partition is used to replace the faulty storage block for data read and write processing, ensuring that the data storage of the degraded superblock is carried out normally.

Benefits of technology

It enables normal data processing of faulty storage blocks in degraded superblocks, reduces data storage problems and wear leveling pressure, and improves data processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120832069A_ABST
    Figure CN120832069A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and discloses a data storage method and device for a super block, electronic equipment and a storage medium, the method comprises the following steps: obtaining a data processing instruction for a degraded super block in a data partition, the degraded super block comprising an available storage block and a fault storage block; obtaining a mapping relation between the fault storage block and the storage block in the system partition; and processing the data processing instruction based on the mapping relation and the degraded super block to obtain a data processing result. According to the method, when data read-write processing is carried out, normal processing of data storage related to the degraded super block can be ensured through the storage block represented by the mapping relation and the available storage block in the degraded super block.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of computer, in particular to a data storage method and device of super block, electronic equipment and storage medium. BACKGROUND

[0002] One memory module in memory can contain one or more chips (DIE), and each DIE has a lot of storage blocks. The data writing is managed by super block (sblk) in firmware. One sblk is composed of one block selected from each DIE. When the firmware is powered on for the first time, it will try to form a full DIE sblk with maximum capacity. However, as the memory is used, some faulty storage blocks may be generated inside, and some sblks cannot form a full DIE, which will cause problems in data storage of sblk. SUMMARY

[0003] Therefore, the present disclosure provides a data storage method and device of super block, electronic equipment and storage medium to solve the problem of data storage of sblk.

[0004] In a first aspect, the present disclosure provides a data storage method of super block, comprising:

[0005] obtaining a data processing instruction for a degraded super block in a data partition, wherein the degraded super block comprises available storage blocks and faulty storage blocks;

[0006] obtaining a mapping relationship between the faulty storage blocks and storage blocks in a system partition;

[0007] processing the data processing instruction based on the mapping relationship and the degraded super block to obtain a data processing result.

[0008] In a second aspect, the present disclosure provides a data storage device of super block, comprising:

[0009] a data processing instruction obtaining module configured to obtain a data processing instruction for a degraded super block in a data partition, wherein the degraded super block comprises available storage blocks and faulty storage blocks;

[0010] a mapping relationship obtaining module configured to obtain a mapping relationship between the faulty storage blocks and storage blocks in a system partition;

[0011] a data processing module configured to process the data processing instruction based on the mapping relationship and the degraded super block to obtain a data processing result.

[0012] In a third aspect, the present disclosure provides an electronic device, comprising a memory and a processor, which are communicatively connected with each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the data storage method of the super block according to the first aspect or any one of the corresponding embodiments thereof.

[0013] In a fourth aspect, the present disclosure provides a computer readable storage medium, which stores computer instructions for causing a computer to perform the data storage method of the super block according to the first aspect or any one of the corresponding embodiments thereof.

[0014] The data storage method of the super block provided by the embodiments of the present disclosure obtains the data processing instruction for the degraded super block in the data partition. Since the degraded super block includes the available storage block and the faulty storage block, when the data processing instruction involves the degraded super block, the faulty storage block cannot perform data read-write processing. Based on this, by obtaining the mapping relationship between the faulty storage block and the storage block in the system partition, the mapping of the faulty storage block in the system partition is obtained, that is, there is a storage block corresponding to the faulty storage block in the system partition. When performing data read-write processing, the storage block represented by the mapping relationship and the available storage block in the degraded super block can ensure the normal processing of the data storage involving the degraded super block. BRIEF DESCRIPTION OF DRAWINGS

[0015] In order to more clearly illustrate the technical solutions in the specific embodiments or related art of the present disclosure, the drawings needed to be used in the specific embodiments or related art description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present disclosure, and those skilled in the art can also obtain other drawings according to these drawings without creative labor.

[0016] Figure 1 is a structure diagram of the memory in the related art;

[0017] Figure 2 is a flowchart of the data storage method of the super block according to an embodiment of the present disclosure;

[0018] Figure 3 is a flowchart of another data storage method of the super block according to an embodiment of the present disclosure;

[0019] Figure 4 is a mapping diagram of the faulty storage block according to an embodiment of the present disclosure;

[0020] Figure 5 is a structure block diagram of the data storage device of the super block according to an embodiment of the present disclosure;

[0021] Figure 6 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0022] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be described below in a clear and complete manner with reference to the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are some but not all of the embodiments of the present disclosure. Based on the embodiments in the present disclosure, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present disclosure.

[0023] It can be understood that, before using the technical solutions disclosed in the embodiments of the present disclosure, the type, use range, use scenario, and the like of personal information involved in the present disclosure should be informed to the user and the authorization of the user should be obtained through a proper manner according to relevant laws and regulations.

[0024] For example, in response to receiving an active request of a user, prompt information is sent to the user to explicitly prompt the user that the operation requested to be performed will need to obtain and use personal information of the user. Thus, the user can autonomously select whether to provide personal information to the software or hardware such as an electronic device, an application program, a server, or a storage medium, and the like performing the operation of the technical solutions of the present disclosure according to the prompt information.

[0025] As an optional but non-limiting implementation manner, in response to receiving an active request of a user, the manner of sending prompt information to the user may, for example, be a pop-up window manner, and the prompt information may, for example, be presented in a text manner in the pop-up window. In addition, the pop-up window may, for example, carry a selection control for the user to select “agree” or “disagree” to provide personal information to the electronic device.

[0026] It can be understood that the above notification and obtaining of authorization of the user are only illustrative, and do not limit the implementation manners of the present disclosure, and other manners meeting relevant laws and regulations may also be applied to the implementation manners of the present disclosure.

[0027] It can be understood that the data (including but not limited to the data itself, acquisition or use of the data) involved in the present technical solution should comply with the requirements of relevant laws and regulations and relevant provisions.

[0028] In the related art, when the firmware is powered on for the first time, it will try to form a super block containing all the DIEs with the maximum capability, but due to the existence of faulty storage blocks, there are different numbers of backup storage blocks on each DIE. For example, Figure 1An example of available storage blocks and failed storage blocks on four DIEs is shown. There are 900 available storage blocks and 200 replacement storage blocks in DIE0, 900 available storage blocks and 100 replacement storage blocks in DIE1, 900 available storage blocks and 0 replacement storage blocks in DIE2, and 1200 available storage blocks and 300 replacement storage blocks in DIE3. Since no more replacement storage blocks can be provided for the failed storage blocks in DIE2, the superblock corresponding to DIE2 can be marked as a degraded superblock.

[0029] A superblock is composed of a plurality of storage blocks, and each storage block corresponds to a DIE. That is, one storage block is selected from each DIE to form a superblock. The selected storage block in each DIE can be different in physical location.

[0030] There is also a concept of zone in the memory, and each zone is a continuous logical address range. Each zone is associated with a superblock in the memory. In the initial state, the capacity of each zone is the same, for example, each zone is composed of 32 DIEs, and one storage block is selected from each DIE to form a superblock, that is, the superblock includes 32 storage blocks. However, as the memory is used, some failed storage blocks are generated in the superblock, which causes some superblocks to be unable to form a full DIE, and the number of available storage blocks in the superblock can be 31, that is, corresponding to 31 DIEs. This can cause some problems, for example, when data migration occurs in the memory, if there is no full-DIE superblock, the migration cannot be performed. This is because the degraded superblock has a failed storage block, and the data of the failed storage block cannot be processed. For another example, when the memory is abnormally powered off and recovered, a full-DIE superblock can not be selected. For another example, the full-DIE superblock and the degraded superblock are physically divided into two groups in the management of the superblock, which can cause relatively large pressure on wear leveling.

[0031] Based on this, the embodiment of the present disclosure provides a data storage method of a superblock to solve the data storage problem of a degraded superblock.

[0032] According to the embodiment of the present disclosure, a data storage method of a superblock is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0033] In this embodiment, a data storage method of a superblock is provided, which can be used in electronic devices such as computers, servers, etc.Figure 2 is a flowchart of a data storage method of a super block according to an embodiment of the present disclosure, as shown in the figure, the flow includes the following steps: Figure 2

[0034] Step S201, obtaining a data processing instruction for a degraded super block in a data zone.

[0035] The degraded super block includes available storage blocks and faulty storage blocks.

[0036] There are two types of access inside the firmware, namely the data zone (user zone) and the system zone (syszone). Among them, the data storage capacity of the data zone is greater than that of the system zone. The system zone generally uses a single-layer cell (Single Level Cell, SLC) mode, which has relatively high data reliability and is not prone to data read / write errors, and is often used to store metadata. The data zone is used to store a large amount of read / write data. The concept of super block exists in both the data zone and the system zone, but the super block in the system zone is smaller.

[0037] The data processing instruction is for the degraded super block in the data zone. The degraded super block includes available storage blocks and faulty storage blocks, and the faulty storage blocks do not have corresponding replacement storage blocks, so the super block is marked as a degraded super block. Among them, whether the super block is a degraded super block can be distinguished by different values of the identifier. For example, if the identifier split_flag = 1, it indicates that the super block is a degraded super block; if the identifier split_flag = 0, it indicates that the super block is a normal super block, i.e. a full DIE working super block.

[0038] Specifically, when there is a faulty storage block in a super block, a new mapping will be made in the DIE where the faulty storage block is located. If the mapping fails, the super block will be marked as a degraded super block. At this time, the degraded super block contains faulty storage blocks that cannot be processed.

[0039] The data processing instruction includes the degraded super block corresponding to the data to be processed, which may also be another super block to be processed in the data zone. If the data processing instruction is used to implement data migration within the data zone, it will involve two super blocks in the data zone, one is a degraded super block and the other is a super block to be processed; if the data processing instruction is used to implement data processing between the outside and the degraded super block, it may only involve the degraded super block.

[0040] Step S202, obtaining a mapping relationship between the faulty storage block and the storage block in the system zone.

[0041] ​In the degraded super block, the faulty storage block has a mapping relationship with the storage block in the system partition. That is, the faulty storage block is mapped to a storage block in the system partition, so that when data is read and written to the faulty storage block, the storage block in the system partition is used to replace the faulty storage block for processing by using the mapping relationship. That is, if data needs to be written to the faulty storage block, the data is written to the storage block in the system partition, and the mapping relationship between the faulty storage block and the storage block in the system partition is established; if data needs to be read from the faulty storage block, the corresponding storage block in the system partition is determined by using the mapping relationship, and the data is read from the storage block.

[0042] The mapping relationship can be stored in the form of a data table, for example, a data partition corresponds to a data table, and the data table is used to represent the mapping relationship between all faulty storage blocks in the data partition and corresponding storage blocks in the system partition. Alternatively, the mapping relationship can also be represented in other forms, which is not limited herein and can be set according to actual needs.

[0043] In step S203, the data processing instruction is processed based on the mapping relationship and the degraded super block to obtain a data processing result.

[0044] Due to the mapping relationship, the faulty storage block in the degraded super block has a corresponding storage block in the system partition. Based on this, the storage block with the mapping relationship in the system partition can replace the faulty storage block for data read and write processing.

[0045] The data processing instruction represents a processing mode, and the mapping relationship and the degraded super block are combined to process the data processing instruction to obtain a corresponding data processing result. In the degraded super block, the faulty storage block is replaced by the corresponding storage block in the system partition.

[0046] The data storage method of the super block provided in this embodiment obtains a data processing instruction for a degraded super block in a data partition. Since the degraded super block includes available storage blocks and faulty storage blocks, when the data processing instruction involves the degraded super block, the faulty storage block cannot perform data read and write processing. Therefore, by obtaining the mapping relationship between the faulty storage block and the storage block in the system partition, the mapping of the faulty storage block in the system partition is obtained, that is, there is a storage block corresponding to the faulty storage block in the system partition. When data read and write processing is performed, the storage block represented by the mapping relationship and the available storage block in the degraded super block can ensure normal processing of data storage involving the degraded super block.

[0047] In this embodiment, a data storage method of a super block is provided, which can be used in electronic devices such as computers, servers, and the like, Figure 3is a flowchart of a data storage method of a super block according to an embodiment of the present disclosure, as shown in Figure 3 The flowchart includes the following steps:

[0048] In step S301, a data processing instruction for a degraded super block in a data partition is obtained.

[0049] The degraded super block includes available storage blocks and faulty storage blocks. For details, refer to the description of step S201 of the embodiment shown in Figure 2 The description of step S201 of the embodiment shown in

[0050] In step S302, a mapping relationship between the faulty storage blocks and the storage blocks in a system partition is obtained.

[0051] Specifically, step S302 includes the following steps:

[0052] In step S3021, a storage block mapping table is obtained.

[0053] The storage block mapping table is used to represent the mapping relationship between the faulty storage blocks in the data partition and the storage blocks in the system partition.

[0054] After the data read / write processing of the faulty storage blocks, the storage mapping table can be updated. If the data storage instruction involves writing data into the faulty storage blocks, the data is actually written into the storage blocks in the system partition. Based on this, the storage mapping table needs to be updated before or after writing the data, to record the mapping relationship between the faulty storage blocks and the storage blocks in the system partition. If the data storage instruction involves moving the data in the faulty storage blocks to other super blocks in the data partition, the storage mapping table needs to be updated after the data is moved, to invalidate the mapping relationship between the faulty storage blocks and the storage blocks in the system partition.

[0055] Of course, the update timing of the storage block mapping table is not limited to the above, and other update timings can also exist, which can be set according to actual needs, and no limitation is made herein.

[0056] In step S3022, based on the faulty storage blocks in the degraded super block, the storage block mapping table is queried to obtain the mapping relationship between the faulty storage blocks in the degraded super block and the storage blocks in the system partition.

[0057] In the storage block mapping table, each faulty storage block has a corresponding unique identifier. By querying the storage block mapping table through the unique identifier of the faulty storage block in the degraded super block, the mapping relationship between the faulty storage blocks in the degraded super block and the storage blocks in the system partition can be obtained.

[0058] The mapping relationship is represented in the form of a storage block mapping table, and when data storage processing is performed, the mapping relationship can be efficiently obtained by querying the storage block mapping table, thereby improving the efficiency of data processing.

[0059] In step S303, the data processing instruction is processed based on the mapping relationship and the degraded super block, and a data processing result is obtained.

[0060] The type of the data processing instruction is obtained by analyzing the data processing instruction. For example, by analyzing the source corresponding to the data processing instruction, it can be determined whether the degraded super block is processed by an external terminal or a super block inside the memory.

[0061] Specifically, the above step S303 includes:

[0062] In step S3031, if the data processing instruction is an external read instruction, first data is read from the available storage block.

[0063] The external read instruction is used to indicate that data needs to be read from the degraded super block at this time, wherein the degraded super block includes the available storage block and the faulty storage block. When data is read, the first data is read from the available storage block.

[0064] In step S3032, the storage block in the system partition is determined based on the mapping relationship.

[0065] Since the faulty storage block in the degraded super block has a mapping relationship with the storage block in the system partition, that is, the data in the faulty storage block is actually stored in the storage block in the system partition. Based on this, the storage block actually storing data in the system partition can be obtained through the mapping relationship.

[0066] In step S3033, second data is read from the storage block in the system partition.

[0067] The data processing result of the external read instruction includes the first data and the second data.

[0068] After the storage block is determined, the second data is read from the storage block in the system partition. At this time, all data of the degraded super block is read out, and the data processing result of the external read instruction is obtained. The data processing result includes the first data in the available storage block and the second data in the storage block of the system partition.

[0069] In step S3034, if the data processing instruction is an external write instruction, the storable data size corresponding to the available storage block is obtained.

[0070] The external write instruction is used to indicate that data from outside needs to be written into the degraded super block at this time, wherein the available storage blocks in the degraded super block are directly writable, and the faulty storage block is not writable. Based on this, for the degraded super block, the directly writable data size is the size of the data that can be stored in the available storage blocks.

[0071] For example, the size of each storage block is fixed, and by counting the number of available storage blocks in the degraded super block, in combination with the size of each storage block, the size of the data that can be stored is obtained.

[0072] Step S3035, based on the size of the data that can be stored, write data into the degraded super block to obtain the data processing result corresponding to the external write instruction.

[0073] After learning the size of the data that can be stored, the outside writes data of this size into the degraded super block. If there is still data to be written from the outside, the selection of the super block needs to be performed again, and then the data is continuously written into the super block selected again.

[0074] Step S3036, if the data processing instruction is an internal migration instruction, determine the to-be-processed super block corresponding to the degraded super block based on the internal migration instruction.

[0075] The internal migration instruction is used to indicate that data migration needs to be performed between super blocks in the data partition at this time, and the to-be-processed super block and the degraded super block are involved in the data migration. Specifically, by analyzing the internal migration instruction, the two parties involved in the data migration are obtained. The process of data migration includes migrating data in the to-be-processed super block to the degraded super block, or migrating data in the degraded super block to the to-be-processed super block. The to-be-processed super block can be a full-DIE super block or a degraded super block.

[0076] Step S3037, based on the mapping relationship, perform data migration between the degraded super block and the to-be-processed super block to obtain a data processing result.

[0077] In the foregoing, it is described that the mapping relationship represents the relationship between the faulty storage block in the degraded super block and the storage block in the system partition. Due to the setting of the mapping relationship, the data of the faulty storage block is actually processed by the corresponding storage block in the system partition. Based on this, the mapping relationship can be used to perform data migration between the degraded super block and the to-be-processed super block to obtain a data processing result.

[0078] In some optional embodiments, the above step S3037 includes:

[0079] Step a1: If the super block to be processed is a normal super block and is the target super block for data migration, the data of the available storage blocks are sequentially migrated to the super block to be processed.

[0080] Step a2: determining a storage block in the system partition based on the mapping relationship.

[0081] Step a3: sequentially move the data of the storage blocks in the system partition to the super block to be processed, and invalidate the mapping relationship to obtain a data processing result.

[0082] A normal Superblock indicates that the pending Superblock is a full DIE Superblock, indicating that the data in the degraded Superblock needs to be moved to the pending Superblock. The data in the degraded Superblock is stored in two parts: one in the available storage blocks of the data partition and the other in the storage blocks of the system partition. Therefore, the data in the available storage blocks can be sequentially moved to the pending Superblock. Since there is a one-to-one correspondence between the available storage blocks and the storage blocks in the pending Superblock, data is moved sequentially.

[0083] For the data in the storage blocks of the system partition, the mapping relationship is used to locate the data in the storage blocks of the system partition first, and then the data is moved from the storage blocks of the system partition to the super blocks to be processed in sequence.

[0084] Since the data in the degraded superblock has been moved to the pending superblock, the storage resources of the degraded superblock can be released for subsequent reuse. Similarly, the storage resources of the storage blocks in the system partition corresponding to the faulty storage blocks in the degraded superblock can also be released.

[0085] Specifically, the mapping relationship is first invalidated, indicating that the faulty storage block has no corresponding storage block in the system partition. For storage resources in the system partition that previously had a mapping relationship but no longer have one, the storage resources can be released at an appropriate time. For example, after all storage blocks in the system partition have been used, storage resources can be released at preset time intervals, and so on.

[0086] The timing of releasing storage resources in the system partition is set according to actual needs and is not limited here.

[0087] For example, Figure 4 As shown, the data partition includes multiple zones, each zone corresponds to a one-to-one super block. Similarly, each zone in the system partition also has a one-to-one corresponding super block. Figure 4 Shown are examples of the structures of Super Block 0 in the data partition and Super Block 0 in the system partition.

[0088] In the super block 0 of the data partition, n+1 pages are included, and the super block includes the storage blocks in the N DIEs. Wherein, there is a failure storage block in the super block 0, so that the super block 0 is marked as a degraded super block. For the failure storage block in the degraded super block, the mapping relationship between the failure storage block and the storage blocks in the system partition is represented in the form of a storage block mapping table. When the data in the failure storage block is moved, or the failure storage block is externally written, etc., the storage block mapping table needs to be updated to ensure the accuracy of the mapping relationship and timely release of the storage resources.

[0089] If the data is moved from the degraded super block to the normal super block, the data is moved from the available storage block in sequence first, and then the corresponding storage block of the failure storage block in the system partition is determined by using the mapping relationship, and then the data in the storage block is moved to the to-be-processed super block, so that the normal processing of the data movement is ensured.

[0090] In some optional embodiments, the above step S3037 includes:

[0091] Step b1, if the to-be-processed super block is a normal super block and is a source super block of data movement, the data in the to-be-processed super block is sequentially moved to the available storage block.

[0092] Step b2, the current available storage block in the system partition is obtained.

[0093] Step b3, the remaining data in the to-be-processed super block is moved to the current available storage block in the system partition, and the mapping relationship between the failure storage block and the current available storage block is recorded, to obtain a data processing result.

[0094] If the current data movement is from the to-be-processed super block to the degraded super block, since the to-be-processed super block is full DIE, and the degraded super block is not full DIE, it is necessary to actually move the data of the failure storage block moved to the degraded super block to the storage block in the system partition.

[0095] Specifically, the data in the to-be-processed super block is sequentially moved to the available storage block. There is a data pointer in the system partition, which is used to indicate the current available storage block. Accordingly, the remaining data in the to-be-processed super block is moved to the current available storage block in the system partition. Since the data is actually stored in the system partition, it is necessary to record the mapping relationship between the failure storage block and the current available storage block, to obtain a data processing result.

[0096] If the data is moved from a normal super block to a degraded super block, since the failed storage block in the degraded super block cannot process data, the current available storage block in the system partition is obtained, the data is written into the current available storage block, and the mapping relationship between the failed storage block and the current available storage block is recorded, so that the normal data movement is realized.

[0097] The data storage method of the super block provided in the embodiment can indicate that the external needs to read data from the degraded super block when the data processing instruction is an external read instruction. Based on this, the first data is read from the available storage block, and the storage block in the system partition is determined in combination with the mapping relationship. Since the storage block corresponds to the failed storage block, the data in the failed storage block is equivalent to being stored in the storage block. Therefore, the second data is read from the storage block in the system partition, that is, the first data and the second data form the data processing result of the external read instruction. When the data processing instruction is an external write instruction, the size of the storable data corresponding to the available storage block in the degraded super block is the size of the current writable data. That is, when data is written, the data is written according to the size of the storable data, so that the degraded super block can normally write data from the external. When the data processing instruction is an internal movement instruction, the data movement between the to-be-processed super block and the degraded super block in the data partition is performed, and the corresponding data processing result is obtained by processing in combination with the mapping relationship, so that the data movement involving the degraded super block can be normally processed. Since the mapping relationship is stored, the to-be-processed super block and the degraded super block do not need to be placed in different processing pools for processing, and the management modes of the two types of super blocks are the same.

[0098] In some optional embodiments, the step S303 includes: if the data processing instruction is a reset instruction, resetting the degraded super block and invalidating the mapping relationship to obtain a data processing result. The reset instruction is used to reset the degraded super block and release the storage resource. At this time, the mapping relationship corresponding to the degraded super block needs to be invalidated to obtain the corresponding processing result. When the data processing instruction is the reset instruction, the mapping relationship is invalidated so as to be reused in the subsequent system partition.

[0099] As a specific application example of the embodiments of the present disclosure, if the full DIE superblock is a storage block included in 32 DIEs. If the current data write is from the outside to the degraded superblock, only the data of the size of the degraded superblock is written. If the data migration occurs internally in the memory, the data on one superblock needs to be migrated to another superblock, and the physical locations need to be one-to-one corresponding. If the destination superblock is a degraded superblock, when the migration occurs, the data of the storage blocks of the first 31 DIEs in the to-be-processed superblock is all migrated to the available storage blocks of the degraded superblock. For the data of the storage block of the 32th DIE in the to-be-processed superblock, it needs to be written to the storage block of the system partition first, and the storage block mapping table is updated.

[0100] It should be noted that the first 31 DIEs and the 32th DIE here are described from the perspective of logical addresses, rather than the perspective of physical addresses. Therefore, when actually processing, the mapping of logical addresses and physical addresses also needs to be combined.

[0101] If the data migration internally in the memory is to migrate the data in the degraded superblock to the full DIE superblock, then the data of the storage blocks of the first 31 DIEs of the degraded superblock needs to be migrated to the storage blocks of the first 31 DIEs of the to-be-processed superblock, and the data of the storage block in the system partition is migrated to the storage block of the 32th DIE of the to-be-processed superblock. At the same time, the data of the storage block in the system partition is invalidated, and the identification of the degraded superblock is cleared.

[0102] If the data migration internally in the memory is between two degraded superblocks, then only the data migration of the storage blocks of the first 31 DIEs is needed, and the data migration of the storage block in the system partition is not needed, and only the mapping relationship needs to be updated.

[0103] In the embodiments, a data storage device of a superblock is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and details are not repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware is also possible and contemplated.

[0104] The embodiments provide a data storage device of a superblock, as shown in Figure 5 The data storage device includes:

[0105] The data processing instruction obtaining module 501 is configured to obtain a data processing instruction for a degraded superblock in a data partition, and the degraded superblock includes available storage blocks and faulty storage blocks.

[0106] The mapping relationship obtaining module 502 is configured to obtain a mapping relationship between the failed storage block and a storage block in the system partition.

[0107] The data processing module 503 is configured to process the data processing instruction based on the mapping relationship and the degraded super block, and obtain a data processing result.

[0108] In some optional embodiments, the data processing module 503 includes:

[0109] The first data reading unit is configured to read first data from the available storage block if the data processing instruction is an external reading instruction.

[0110] The storage block determining unit is configured to determine the storage block in the system partition based on the mapping relationship.

[0111] The second data reading unit is configured to read second data from the storage block in the system partition, and the data processing result of the external reading instruction includes the first data and the second data.

[0112] In some optional embodiments, the data processing module 503 includes:

[0113] The storable data size obtaining unit is configured to obtain a storable data size corresponding to the available storage block if the data processing instruction is an external writing instruction.

[0114] The data writing unit is configured to write data into the degraded super block based on the storable data size, and obtain a data processing result corresponding to the external writing instruction.

[0115] In some optional embodiments, the data processing module 503 includes:

[0116] The to-be-processed super block determining unit is configured to determine a to-be-processed super block corresponding to the degraded super block based on the internal moving instruction if the data processing instruction is an internal moving instruction.

[0117] The data moving unit is configured to move data between the degraded super block and the to-be-processed super block based on the mapping relationship, and obtain the data processing result.

[0118] In some optional embodiments, the data moving unit includes:

[0119] The first moving subunit is configured to sequentially move data of the available storage block to the to-be-processed super block if the to-be-processed super block is a normal super block and is a destination super block of the data moving.

[0120] The storage block determining subunit is configured to determine the storage block in the system partition based on the mapping relationship.

[0121] The second moving sub-unit is configured to sequentially move data of the storage block in the system partition to the super block to be processed, and invalidate the mapping relationship, to obtain the data processing result.

[0122] In some optional embodiments, the data moving unit comprises:

[0123] The third moving sub-unit is configured to sequentially move data in the super block to be processed to the available storage block, if the super block to be processed is a normal super block and is a source super block of the data moving.

[0124] The current available storage block obtaining sub-unit is configured to obtain a current available storage block in the system partition.

[0125] The fourth moving sub-unit is configured to move remaining data in the super block to be processed to the current available storage block in the system partition, and record the mapping relationship between the failed storage block and the current available storage block, to obtain the data processing result.

[0126] In some optional embodiments, the data processing module 503 comprises:

[0127] The storage block resetting unit is configured to reset the degraded super block and invalidate the mapping relationship, if the data processing instruction is a resetting instruction, to obtain the data processing result.

[0128] In some optional embodiments, the mapping relationship obtaining module 502 comprises:

[0129] The storage block mapping table obtaining unit is configured to obtain a storage block mapping table, the storage block mapping table being configured to represent the mapping relationship between the failed storage block in the data partition and the storage block in the system partition.

[0130] The mapping relationship querying unit is configured to query the storage block mapping table based on the failed storage block in the degraded super block, to obtain the mapping relationship between the failed storage block in the degraded super block and the storage block in the system partition.

[0131] The data storage device of the super block in the embodiment is in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and a memory executing one or more software or fixed programs, and / or other devices that can provide the above functions.

[0132] Further function descriptions of the above modules and units are the same as those of the above corresponding embodiments, and will not be described here.

[0133] The embodiment of the present disclosure further provides an electronic device with the above Figure 5 The data storage device of the super block shown in the embodiment.

[0134] Referring to Figure 6 , Figure 6 is a structural schematic diagram of an electronic device provided by an optional embodiment of the present disclosure, as Figure 6 shown, the electronic device includes one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are communicatively connected to each other by different buses, and can be mounted on a common mainboard or in other ways as needed. The processor can process instructions executed within the electronic device, including instructions stored in the memory or on the memory to display graphical information of a GUI on an external input / output device, such as a display device coupled to the interface. In some optional embodiments, multiple processors and / or multiple buses can be used with multiple memories and multiple memory, if necessary. Also, multiple electronic devices can be connected, each providing part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 6 In the following description, the processor 10 is taken as an example.

[0135] The processor 10 can be a central processor, a network processor, or a combination thereof. The processor 10 can further include a hardware chip. The hardware chip can be an application specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device can be a complex programmable logic device, a field programmable logic gate array, a generic array logic, or any combination thereof.

[0136] The memory 20 stores instructions executable by the at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiments.

[0137] The memory 20 can include a program storage area and a data storage area. The program storage area can store an operating system and application programs required by at least one function; the data storage area can store data created according to the use of the electronic device, etc. In addition, the memory 20 can include a high-speed random access memory, and can also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some optional embodiments, the memory 20 can optionally include a memory remotely disposed relative to the processor 10, which can be connected to the electronic device through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0138] The memory 20 can include a volatile memory, such as a random access memory; the memory can also include a non-volatile memory, such as a flash memory, a hard disk, or a solid state disk; the memory 20 can also include a combination of the above kinds of memories.

[0139] The electronic device also includes a communication interface 30 for the electronic device to communicate with other devices or communication networks.

[0140] The embodiments of the present disclosure further provide a computer readable storage medium, the method according to the embodiments of the present disclosure can be implemented in hardware, firmware, or be implemented as computer code recorded in a storage medium, or be implemented through network downloading and originally stored in a remote storage medium or a non-transitory machine readable storage medium and to be stored in a local storage medium, so that the method described herein can be processed by such software on a storage medium using a general purpose computer, a special purpose processor or programmable or special purpose hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk or a solid state disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that the computer, processor, microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code, when the software or computer code is accessed and executed by the computer, processor or hardware, the method shown in the above embodiments is implemented.

[0141] Although the embodiments of the present disclosure are described in conjunction with the accompanying drawings, various modifications and changes can be made by those skilled in the art without departing from the spirit and scope of the present disclosure, and such modifications and changes fall within the scope defined by the appended claims.

Claims

1. A data storage method of a superblock, characterized by, The method comprises: obtaining a data processing instruction of a degraded super block in a data partition, the degraded super block comprising an available storage block and a faulty storage block; obtaining a mapping relationship between the faulty storage block and a storage block in a system partition; processing the data processing instruction based on the mapping relationship and the degraded super block to obtain a data processing result.

2. The method of claim 1, wherein, The processing of the data processing instruction based on the mapping relationship and the degraded super block to obtain a data processing result comprises: if the data processing instruction is an external read instruction, reading first data from the available storage block; determining a storage block in the system partition based on the mapping relationship; reading second data from the storage block in the system partition, and the data processing result of the external read instruction comprising the first data and the second data.

3. The method of claim 1, wherein, The processing of the data processing instruction based on the mapping relationship and the degraded super block to obtain a data processing result comprises: if the data processing instruction is an external write instruction, obtaining a storable data size corresponding to the available storage block; writing data into the degraded super block based on the storable data size to obtain a data processing result corresponding to the external write instruction.

4. The method of claim 1, wherein, The processing of the data processing instruction based on the mapping relationship and the degraded super block to obtain a data processing result comprises: if the data processing instruction is an internal migration instruction, determining a to-be-processed super block corresponding to the degraded super block based on the internal migration instruction; performing data migration between the degraded super block and the to-be-processed super block based on the mapping relationship to obtain the data processing result.

5. The method of claim 4, wherein, The performing of data migration between the degraded super block and the to-be-processed super block based on the mapping relationship to obtain the data processing result comprises: if the to-be-processed super block is a normal super block and is a destination super block of data migration, sequentially migrating data of the available storage block to the to-be-processed super block; determining a storage block in the system partition based on the mapping relationship; sequentially migrating data of the storage block in the system partition to the to-be-processed super block and invalidating the mapping relationship to obtain the data processing result.

6. The method of claim 4, wherein, The performing of data migration between the degraded super block and the to-be-processed super block based on the mapping relationship to obtain the data processing result comprises: if the to-be-processed super block is a normal super block and is a source super block of data migration, sequentially migrating data in the to-be-processed super block to the available storage block; obtaining a current available storage block in the system partition; migrating remaining data in the to-be-processed super block to the current available storage block in the system partition and recording a mapping relationship between the faulty storage block and the current available storage block to obtain the data processing result.

7. The method of claim 1, wherein, The processing of the data processing instruction based on the mapping relationship and the degraded super block to obtain a data processing result comprises: If the data processing instruction is a reset instruction, the degraded super block is reset and the mapping relationship is invalidated, and the data processing result is obtained.

8. The method according to any one of claims 1 to 7, characterized in that, The mapping relationship between the failed storage block and the storage block in the system partition is obtained by: Obtaining a storage block mapping table, the storage block mapping table being used to represent the mapping relationship between the failed storage block in the data partition and the storage block in the system partition; Based on the failed storage block in the degraded super block, the storage block mapping table is queried to obtain the mapping relationship between the failed storage block in the degraded super block and the storage block in the system partition.

9. A data storage device of superblocks, characterized by The device comprises: A data processing instruction acquisition module is configured to acquire a data processing instruction for a degraded super block in a data partition, the degraded super block comprising available storage blocks and failed storage blocks; A mapping relationship acquisition module is configured to acquire a mapping relationship between the failed storage block and the storage block in the system partition; A data processing module is configured to process the data processing instruction based on the mapping relationship and the degraded super block, and obtain a data processing result.

10. An electronic device, characterized in that: Comprise: A memory and a processor, the memory and the processor are connected with each other and communicate with each other, the memory stores computer instructions, and the processor executes the computer instructions to execute the super block data storage method in any one of claims 1 to 8.

11. A computer readable storage medium, characterized in that, The computer readable storage medium stores computer instructions, and the computer instructions are used to make the computer execute the super block data storage method in any one of claims 1 to 8.