A flexible data placement static mapping method, device, medium and product

By using a static mapping table to map data to the physical write unit handles and data reclamation groups of solid-state drives based on the target address and range information of write commands in the RAID controller, the complexity of mapping management in RAID controllers when applying FDP is solved, achieving efficient data storage and extending the lifespan of SSDs.

CN120909954BActive Publication Date: 2026-01-23SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511405525.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-29
Publication Date
2026-01-23
Estimated Expiration
2045-09-29

AI Technical Summary

Technical Problem

RAID controllers face mapping management complexity issues when applying Flexible Data Placement (FDP), making it difficult to issue RUH/RG tags to FDP-enabled solid-state drives (SSDs), resulting in high system upgrade costs.

Method used

By implementing a flexible static mapping method for data placement in the RAID controller, the target namespace is determined in the namespace based on the target address and range information of the write command. Then, using a pre-established static mapping table, business data and verification data are mapped to the physical write unit handle and data recycling group of the solid-state drive, avoiding host-side adaptation and modification.

Benefits of technology

It reduced system modification costs, indirectly achieved the FDP effect, and improved data storage efficiency and SSD lifespan.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120909954B_ABST
    Figure CN120909954B_ABST
Patent Text Reader

Abstract

The application discloses a flexible data placement static mapping method, device, medium and product, and relates to the technical field of data center storage. When a RAID controller receives a write command from a host side, the target namespace corresponding to the write command can be determined in each namespace based on the target address and range information in the write command, and the first strip unit for storing corresponding service data and the second strip unit for storing corresponding check data can be determined in each strip. Finally, the host side namespace and data are associated with the RUH and RG of a solid state disk through the static mapping rule in the static mapping table, the whole process does not need to be adapted and modified for the FDP by the host side, the FDP effect is indirectly realized through the internal logic mapping of the RAID controller, and the system modification cost is greatly reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data center storage, and in particular to a flexible data placement static mapping method, device, medium and product. BACKGROUND

[0002] Flexible data placement (FDP) is an advanced function introduced by the Non-Volatile Memory Express (NVMe) host controller interface specification, which allows the host to participate in the internal data layout management of the Solid State Drive (SSD), and realizes data classification storage, reduces effective data migration during garbage collection, reduces write amplification, improves service quality, and prolongs the service life of the SSD through physical write unit handle (Reclaim Unit Handle, RUH), data reclaim group (Reclaim Group, RG) and write instruction extension.

[0003] However, the traditional data management strategy of the Redundant Array of Independent Disks (RAID) controller may conflict with the optimization goal of FDP, because its distributed storage strategy may destroy the controllable data layout of FDP. When applying FDP, the RAID controller faces the problem of mapping management complexity, which is embodied in that the NVMe standard does not define the related collaborative management protocol, and manufacturers need to customize private solutions, and most current NVMe RAID cards do not implement FDP instruction transparent transmission or analysis, and cannot directly issue RUH / RG tags to SSDs supporting FDP.

[0004] In view of the above, how to solve the problem that the current RAID controller faces mapping management complexity when applying FDP and is difficult to issue RUH / RG tags to SSDs supporting FDP is a problem that technicians in the field need to solve. SUMMARY

[0005] The present application provides a flexible data placement static mapping method, device, medium and product to at least solve the problem that the current RAID controller faces mapping management complexity when applying FDP and is difficult to issue RUH / RG tags to SSDs supporting FDP.

[0006] The present application provides a flexible data placement static mapping method, which is applied to a Redundant Array of Independent Disks controller; the method comprises:

[0007] When receiving a write command on the host side, obtaining the target address and range information in the write command;

[0008] Determine a target namespace in each namespace based on the target address and range information, and determine a first strip unit and a second strip unit in each strip under the target namespace; wherein the first strip unit stores service data, and the second strip unit stores check data;

[0009] Map the target namespace, data of the first strip unit and data of the second strip unit to the target physical write unit handle and the target data recycling group of each solid state disk based on the pre-established static mapping table.

[0010] The static mapping table contains all mapping relationships of mapping data of each namespace and each strip unit to each physical write unit handle and each data recycling group of each solid state disk.

[0011] The application further provides an electronic device, comprising a memory for storing a computer program, and a processor for executing the computer program to implement the steps of any of the flexible data placement static mapping methods.

[0012] The application further provides a computer readable storage medium, which stores a computer program, wherein the computer program is executed by a processor to implement the steps of any of the flexible data placement static mapping methods.

[0013] The application further provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement the steps of any of the flexible data placement static mapping methods.

[0014] The application has the beneficial effect that when the RAID controller receives a write command from the host side, the target namespace corresponding to the write command can be determined in each namespace based on the target address and range information in the write command, and the first strip unit storing corresponding service data and the second strip unit storing corresponding check data can be determined in each strip; finally, the host side namespace and data are associated with the RUH and RG of the solid state disk through the static mapping rule in the static mapping table, the whole process does not need to be adapted and modified for the FDP on the host side, the FDP effect is indirectly realized through the internal logic mapping of the RAID controller, and the system modification cost is greatly reduced.

[0015] In addition, the application further provides an electronic device, medium and product, and the effects are the same as above. BRIEF DESCRIPTION OF DRAWINGS

[0016] In order to more clearly illustrate the embodiments of the application, the drawings needed in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative labor.

[0017] Figure 1 A flow chart of a flexible data placement static mapping method provided for an embodiment of the present application is shown in FIG. 1;

[0018] Figure 2 A schematic diagram of a strip arrangement definition based on RAID5 provided for an embodiment of the present application is shown in FIG. 2;

[0019] Figure 3 A schematic diagram of a strip arrangement definition based on RAID6 provided for an embodiment of the present application is shown in FIG. 3;

[0020] Figure 4 A schematic diagram of a FDP static mapping principle based on a RAID controller provided for an embodiment of the present application is shown in FIG. 4;

[0021] Figure 5 A schematic diagram of a static mapping rule Type1 provided for an embodiment of the present application is shown in FIG. 5;

[0022] Figure 6 A schematic diagram of a namespace mapping to a physical write unit handle provided for an embodiment of the present application is shown in FIG. 6;

[0023] Figure 7 A schematic diagram of a data mapping to a data recycling group provided for an embodiment of the present application is shown in FIG. 7;

[0024] Figure 8 A schematic diagram of a static mapping rule Type2 provided for an embodiment of the present application is shown in FIG. 8;

[0025] Figure 9 A schematic diagram of a namespace mapping to a data recycling group provided for an embodiment of the present application is shown in FIG. 9;

[0026] Figure 10 A schematic diagram of a data mapping to a physical write unit handle provided for an embodiment of the present application is shown in FIG. 10;

[0027] Figure 11 A schematic diagram of a flexible data placement static mapping device provided for an embodiment of the present application is shown in FIG. 11. DETAILED DESCRIPTION

[0028] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the protection scope of the present application.

[0029] It should be noted that in the description of the present application, the terms "comprising", "containing" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or equipment including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such a process, method, article or equipment. The terms "first", "second" and the like in the present application are used to distinguish similar objects, not to describe a specific order or sequence.

[0030] In order to enable those skilled in the art to better understand the present application, the present application will be further described in detail below in combination with the drawings and specific embodiments.

[0031] Currently, the traditional data management strategy of the RAID controller can conflict with the optimization goal of the FDP, because the distributed storage strategy can destroy the controllable data layout of the FDP. When the FDP is applied, the RAID controller faces the mapping management complexity problem, which is specifically embodied in that the NVMe standard does not define the related collaborative management protocol, the manufacturer needs to customize the private scheme, and most of the current NVMe RAID cards do not realize the transparent transmission or analysis of the FDP instruction, and cannot directly issue the RUH / RG label to the SSD supporting the FDP. Therefore, in order to solve the above problems, the present application provides a flexible data placement static mapping method, which is applied to the RAID controller.

[0032] Figure 1 A flowchart of a flexible data placement static mapping method provided by an embodiment of the present application is shown in FIG. 1. Figure 1 As shown in FIG. 1, the method comprises the following steps.

[0033] S10: When receiving the write command of the host side, obtaining the target address and range information in the write command.

[0034] Specifically, the RAID controller continuously monitors the write command of the host side to each disk in the RAID. When receiving the write command of the host side, the target address and range information in the write command are obtained. It should be noted that the target address and range information are used to specifically specify the specific position and quantity of data writing, which can specifically include the start address, i.e. the start position of data writing, include the range information, i.e. indicate the amount of data to be written, and can also include other information, which together ensures that the data can be accurately written to the expected position and range. The specific content of the target address and range information in the present embodiment is not limited.

[0035] S11: Based on the target address and range information, determining the target namespace in each namespace, and determining the first strip unit and the second strip unit in each strip under the target namespace.

[0036] The first strip unit stores service data, and the second strip unit stores verification data.

[0037] It's important to note that in RAID levels employing striping technology (such as RAID 0, RAID 5, and RAID 6), data is horizontally divided into multiple stripes, which are evenly distributed across all member disks of the RAID array. A stripe cell refers to the portion of data within a stripe that is stored contiguously on a single disk. Parity data is redundant information used for data fault tolerance and recovery. In RAID levels with redundancy, such as RAID 5 and RAID 6, parity data is stored on the disks along with the actual data. When a disk fails, the RAID controller can use the parity data and data from the remaining healthy disks to reconstruct the lost data. RAID 0 does not include a parity block, RAID 5 uses one parity block, while RAID 6 uses two parity blocks to provide higher fault tolerance.

[0038] Figure 2 This is a schematic diagram illustrating the stripe layout definition based on RAID5, provided as an embodiment of the present invention. Figure 2 As shown, in this embodiment, the stripe units within a strip are defined laterally as D1, D2, ..., D... N-1 There are N categories, such as P, and different categories are actually different stripe units. When the parity data block P shifts left (or right) sequentially within an adjacent stripe, the data block to the right of the parity data block is always D1, and so on, with N adjacent stripes forming a layout cycle. Simultaneously, this embodiment uses a global stripe index and a local loop stripe index to indicate the absolute sequence position of a stripe in the entire RAID array and its relative sequence position in a certain layout cycle, respectively. Stripes with the same loop index have the same stripe layout classification definition. Further, the RAID storage array is divided into one or more logical volumes, i.e., the corresponding namespaces (NS) on the host side, which are the logical storage units presented externally by the RAID array. These logical volumes appear as one or more independent storage devices in the host operating system, and the host's I / O instructions carry specific namespace identifiers (Namespace ID, NSID). Figure 3 This is a schematic diagram illustrating the stripe layout definition based on RAID6, provided as an embodiment of the present invention. Similar to RAID5, it can also be... Figure 3 The RAID 6 stripe layout is shown below; each stripe contains two adjacent parity data stripe units, P and Q. The remaining stripe unit layouts are similar to RAID 5.

[0039] Therefore, in order to execute the IO write command on the host side, in the embodiment, the target namespace corresponding to the target address and range information is determined in each namespace NS based on the target address and range information, and the first strip unit and the second strip unit are determined in each strip under the target namespace. It should be noted that the first strip unit stores service data, and the second strip unit stores check data. For example, for RAID5, the first strip unit is D1, D2, …, D N-1

[0040] S12: Based on the pre-established static mapping table, the target namespace, the data of the first strip unit and the data of the second strip unit are mapped to the target physical write unit handle and the target data recycling group of each solid state disk.

[0041] Finally, based on the pre-established static mapping table, the target namespace, the data of the first strip unit and the data of the second strip unit are mapped to the target RUH and the target RG of each SSD. It should be noted that the static mapping table contains all mapping relationships of the mapping of each namespace NS and the data of each strip unit to each RUH and each RG of each SSD. Based on the static mapping table, the namespace and the strip unit data can be accurately mapped to the RUH and the RG of the SSD. The static mapping table can be flexibly configured by software according to the characteristics of the host application and the hard disk condition (the number of RGs / RUHs), and the combination of the RG and the RUH is determined based on the type of the IO and the NS calculated by the hardware, and is sent to the disk side with the IO instruction. Specifically, for each RAID group member disk, the mapping table structure can be shared or specified separately. The mapping process of the namespace and the data in the embodiment is not limited, and is determined according to the specific implementation condition.

[0042] In the embodiment, when the RAID controller receives the write command on the host side, the target namespace corresponding to the write command can be determined in each namespace based on the target address and range information in the write command, and the first strip unit storing the corresponding service data and the second strip unit storing the corresponding check data are determined in each strip. Finally, the host side namespace and data are associated with the RUH and the RG of the solid state disk through the static mapping rule in the static mapping table, the whole process does not need to be adapted and modified for the FDP on the host side, the FDP effect is indirectly realized through the internal logic mapping of the RAID controller, and the system modification cost is greatly reduced.

[0043] On the basis of the above embodiment, in some embodiments, the target namespace is determined in each namespace based on the target address and range information, including:

[0044] ​S101: Determine the namespace identifier according to the target address and range information.

[0045] S102: Determine the target namespace in each namespace according to the namespace identifier.

[0046] In order to realize accurate mapping of the namespace NS, it is necessary to accurately determine the target namespace specified by the write command on the host side. Specifically, the target address and range information contained in the write command issued by the host side carries a specific NSID; because the identifiers of different namespaces are different, such as NS0, NS1, NS2, etc., the target namespace can be accurately determined in each namespace NS according to the NSID, so as to accurately perform mapping on the target namespace subsequently.

[0047] On the basis of the above-mentioned embodiments, in some embodiments, based on the target address and range information, the first strip unit and the second strip unit are determined in each strip under the target namespace, comprising:

[0048] S111: Determine the starting logical block address according to the target address and range information.

[0049] S112: Determine the strip unit size, the number of strip units of a single strip, and the Redundant Array of Independent Disks level.

[0050] S113: Determine the first strip unit and the second strip unit according to the starting logical block address, the strip unit size, the number of strip units, and the Redundant Array of Independent Disks level.

[0051] On the basis of containing the NSID, the target address and range information of the write command on the host side also contains the starting logical block address (Start Logical Block Address, SLBA), specifically the starting logical block address SLBA on the host side Host . SLBA is an address used to identify the starting position of data in a storage device. It indicates from which position in the logical block address space of the storage device to read or write data. The logical block is the basic unit of data management in the storage device, usually in sectors. SLBA helps the operating system and the storage device accurately locate the starting point of data, so as to realize efficient data access and management.

[0052] Meanwhile, the stripe unit size ChunkSize in the striped RAID, the number of stripe units N in a single stripe, and the RAID level are determined. It should be noted that the stripe unit size ChunkSize refers to the size of the data unit stored continuously on a single disk in each stripe in the RAID array, usually in bytes. It determines the granularity of data distribution on the disk. The number of stripe units N indicates how many stripe units a complete stripe is composed of, which is equal to the number of disks in the RAID array. For example, in a RAID0 containing 4 disks, a stripe contains 4 stripe units, each located on a different disk. The RAID level defines the configuration and data protection strategy of the RAID array. Different RAID levels provide different performance, fault tolerance capability, and storage efficiency. For example, RAID0 does not contain a check block, RAID5 uses one check block, and RAID6 uses two check blocks to provide higher fault tolerance capability.

[0053] Finally, the starting logical block address SLBA Host and the stripe unit size ChunkSize determine the starting position of data on the first disk, and in combination with the number of stripe units N and the data distribution strategy of the RAID level, the specific positions of the first stripe unit and the second stripe unit corresponding to the write command in the RAID array can be accurately calculated for subsequent accurate mapping.

[0054] On the basis of the above embodiment, in some embodiments, according to the starting logical block address, the stripe unit size, the number of stripe units, and the RAID level, the first stripe unit and the second stripe unit are determined, comprising:

[0055] S121: determining the stripe size according to the stripe unit size, the number of stripe units, and the RAID level.

[0056] In order to determine the first stripe unit and the second stripe unit, it is necessary to first determine the stripe size StripeSize. In this embodiment, the stripe size StripeSize is determined according to the stripe unit size ChunkSize, the number of stripe units N, and the RAID level.

[0057] Specifically, when the RAID level is a distributed parity stripe, i.e., RAID5, the number of stripe units N is reduced by 1, and the product of the reduced number of stripe units and the stripe unit size is determined to determine the stripe size, and the formula is as follows:

[0058] StripeSzie RAID5 = ChunkSize × (N-1).

[0059] When the RAID level is double distributed parity stripe, i.e. RAID6, the number of stripe units N is reduced by 2, and the product of the number of stripe units after reduction by 2 and the size of stripe unit is determined to determine the size of stripe, and the formula is as follows:

[0060] StripeSzie RAID5 = ChunkSize x (N-2).

[0061] S122: Determine the stripe index and stripe offset according to the starting logical block address and the size of stripe.

[0062] Subsequently, the stripe index StripeIndex and the stripe offset StripeOffset are determined according to the starting logical block address SLBA Host and the size of stripe StripeSize. It should be noted that the stripe index StripeIndex is the absolute sequence position of the stripe in the entire RAID array; the stripe offset StripeOffset is the starting stripe unit in a stripe from which SLBA Host starts.

[0063] Specifically, first, the quotient of the starting logical block address SLBA Host and the size of stripe StripeSize is determined, and the quotient is rounded down to determine the stripe index StripeIndex, and the formula is as follows:

[0064] ;

[0065] At the same time, the modulo operation is performed on the starting logical block address SLBA Host and the size of stripe StripeSize to determine the stripe offset StripeOffset, and the formula is as follows:

[0066] .

[0067] S123: Determine the local loop stripe index according to the stripe index and the number of stripe units, and determine the business data disk position number of the disk where the first stripe unit is located according to the stripe offset and the size of stripe unit.

[0068] Further, the local loop stripe index LoopIndex is determined according to the stripe index StripeIndex and the number of stripe units N, and the business data disk position number DriveNumberD of the disk where the first stripe unit is located is determined according to the stripe offset StripeOffset and the size of stripe unit ChunkSize. It can be understood that the local loop stripe index LoopIndex represents the relative sequence position of a stripe in a certain arrangement loop of the entire RAID array.

[0069] Specifically, a modulo operation is performed on the stripe index StripeIndex and the stripe unit number N to determine the local loop stripe index LoopIndex, and the formula is as follows:

[0070] ;

[0071] Meanwhile, the quotient of the stripe offset StripeOffset and the stripe unit size ChunkSize is determined, and the quotient is rounded down to determine the service data disk position number DriveNumberD, and the formula is as follows:

[0072] .

[0073] S124: According to the stripe unit number, the local loop stripe index, and the RAID level, the parity data disk position number of the disk where the second stripe unit is located is determined.

[0074] Subsequently, according to the stripe unit number N, the local loop stripe index LoopIndex and the RAID level, the parity data disk position number of the disk where the second stripe unit is located is determined. It should be noted that since there are various RAID levels, the number and calculation method of the parity data disk position number under different RAID levels are different. For example, RAID5 uses one parity block, which corresponds to one parity data disk position number; RAID6 uses two parity blocks, which corresponds to two parity data disk position numbers.

[0075] Specifically, when the RAID level is distributed parity stripe, that is, RAID5, the stripe unit number N is reduced by 1, and the difference between the reduced stripe unit number and the local loop stripe index LoopIndex is determined to determine the parity data disk position number, and the formula is as follows:

[0076] ;

[0077] It can be understood that DriveNumberP RAID5 is the parity data disk position number corresponding to RAID5.

[0078] When the RAID level is double distributed parity stripe, that is, RAID6, the stripe unit number N is reduced by 2, and the difference between the reduced stripe unit number and the local loop stripe index LoopIndex is determined to determine the first parity data disk position number, and the formula is as follows:

[0079] ;

[0080] DriveNumberP = (N - 1) - LoopIndex RAID6 is the first parity disk position number corresponding to the RAID6.

[0081] Meanwhile, the number of stripe units N is reduced by 1, and the difference between the number of stripe units N after the reduction and the local cyclic stripe number LoopIndex is determined to determine the second parity disk position number, and the formula is as follows:

[0082] ;

[0083] DriveNumberQ = (N - 1) - LoopIndex RAID6 is the second parity disk position number corresponding to the RAID6.

[0084] S125: Determine the type identifier of the first stripe unit according to the business data disk position number, the number of stripe units, the local cyclic stripe number, and the RAID level.

[0085] Finally, the type identifier of the first stripe unit TYPEID is determined according to the business data disk position number DriveNumberD, the number of stripe units N, the local cyclic stripe number LoopIndex, and the RAID level. It can be understood that the type identifier TYPEID of the first stripe unit is used to indicate the first stripe unit in each stripe unit in the stripe.

[0086] Specifically, when the RAID level is distributed parity stripe, that is, RAID5, it is judged whether the sum of the business data disk position number DriveNumberD and the local cyclic stripe number LoopIndex is not greater than the number of stripe units N minus 2, that is., it is judged whether (DriveNumberD + LoopIndex) ≤ (N - 2) is established.

[0087] If (DriveNumberD + LoopIndex) ≤ (N - 2) is confirmed, the sum of the local cyclic stripe number LoopIndex and the business data disk position number DriveNumberD is added by 1 to determine the first value, and the first value is determined as the type identifier TYPEID of the first stripe unit, and the formula is as follows:

[0088] ;

[0089] If it is confirmed that (DriveNumberD+LoopIndex)>(N-2), then the sum of the local loop stripe number LoopIndex and the service data disk location number DriveNumberD is added by 2 to determine a second value, and a modulo operation is performed on the second value and the stripe unit quantity N to determine the type identifier TYPEID of the first stripe unit, and the formula is as follows:

[0090] .

[0091] When the RAID level is a double distributed parity stripe, that is, RAID6, it is judged whether the sum of the service data disk location number DriveNumberD and the local loop stripe number LoopIndex is not greater than the stripe unit quantity N minus 3, that is., whether (DriveNumberD+LoopIndex)≤(N-3) is established.

[0092] If it is confirmed that (DriveNumberD+LoopIndex)≤(N-3), then the sum of the local loop stripe number LoopIndex and the service data disk location number DriveNumberD is added by 1 to determine a first value, and the first value is determined as the type identifier TYPEID of the first stripe unit, and the formula is as follows:

[0093] ;

[0094] If it is confirmed that (DriveNumberD+LoopIndex)>(N-3), then the sum of the local loop stripe number LoopIndex and the service data disk location number DriveNumberD is added by 3 to determine a third value, and a modulo operation is performed on the third value and the value of the stripe unit quantity N minus 1 to determine the type identifier TYPEID of the first stripe unit, and the formula is as follows:

[0095] .

[0096] In this way, the first stripe unit and the second stripe unit are accurately determined, so as to facilitate mapping of data in the first stripe unit and the second stripe unit.

[0097] On the basis of the above-mentioned embodiments, in some embodiments, after obtaining the target address and range information in the write command, before determining the target namespace in each namespace based on the target address and range information, the method further includes:

[0098] S131: determining the number of logical blocks of continuous writing according to the target address and range information, and determining the input / output size according to the number of logical blocks of continuous writing.

[0099] S132: Determine whether the difference between the strip offset and the input / output size is less than 0; if yes, proceed to step S133; if no, proceed directly to step S11.

[0100] S133: Split the write command into multiple subcommands at the stripe boundary and process each subcommand separately.

[0101] In addition to NSID and SLBA, the target address and range information of the host write command also includes the number of consecutive logical blocks to be written. Therefore, in practical implementation, to avoid write commands that cross stripe boundaries, after determining the target address and range information in the write command, it is also necessary to determine the number of consecutive logical blocks to be written based on the target address and range information, and then determine the input / output (I / O) size based on the number of consecutive logical blocks to be written.

[0102] Further determine if the difference between the stripe offset and the IO size is less than 0. If so, the current write command is considered to cross stripes, and it needs to be split into multiple sub-commands at the stripe boundary, with each sub-command processed separately. If not, the current write command is considered not to cross stripes, and the target namespace can be determined within each namespace based on the target address and range information. In this way, by splitting the host-side write IO into multiple write IOs at the stripe boundary according to the IO size in the write command, it ensures that each split IO is fully aligned to the RAID array stripes, thereby reducing cross-strip writes, improving write performance, and reducing the complexity of updating parity data.

[0103] Figure 4 This is a schematic diagram illustrating the FDP static mapping principle based on a RAID controller, provided as an embodiment of the present invention. Figure 4 As shown, in order to associate the host-side namespace and data with the RUH and RG of the solid-state drive, this invention provides two different static mapping rules, Type 1 and Type 2, to establish the host-side namespace (NS) / data (D1 / ... / D...) through differentiation. N The binding mapping relationship between the verification data (P) and RUH / RG enables data layout optimization to support FDP within the NVMe RAID controller. The following details the two different mapping methods:

[0104] (1) Static mapping rule Type 1;

[0105] Figure 5 This is a schematic diagram of static mapping rule Type 1 provided in an embodiment of the present invention. Based on the above embodiments, in some embodiments, such as... Figure 5As shown, based on the pre-established static mapping table, the target namespace, the data of the first strip unit and the data of the second strip unit are mapped to the target physical write unit handle of each solid state disk and the target data recycling group, including:

[0106] S141: mapping the target namespace to the target physical write unit handle of each solid state disk.

[0107] S142: mapping the data of the first strip unit to the first target data recycling group of each solid state disk, and mapping the data of the second strip unit to the second target data recycling group of each solid state disk.

[0108] Specifically, the Type1 type mapping ensures that the data of the same NS is stored in the continuous physical area of the SSD by mapping the target namespace on the host side to the target RUH of each SSD. At the same time, the data of the first strip unit is mapped to the first target RG of each SSD, and the data of the second strip unit is mapped to the second RG of each SSD, so as to realize independent processing of garbage collection. It should be noted that when performing the mapping of NS to RUH, the number relationship between NS and RUH needs to be considered, and when performing the mapping of data to RG, the number relationship between data (D and P) and RG also needs to be considered.

[0109] Figure 6 A schematic diagram of mapping a namespace to a physical write unit handle is provided for an embodiment of the present application. In the process of mapping the target namespace to the target RUH of each solid state disk, when the number of RUH in the SSD is not less than the number of namespaces NS, based on the corresponding one-to-one mapping relationship, that is, the one-to-one relationship between RUH and NS, the target namespace is mapped to the target RUH of each SSD. When the number of RUH in the SSD is less than the number of namespaces, as shown in Figure 6 based on the corresponding many-to-one mapping relationship, that is, the relationship that one RUH corresponds to multiple NS, the target namespace is mapped to the target RUH of each SSD. It should be noted that in addition to the pre-set many-to-one mapping relationship, in the specific implementation, in order to realize the mapping of multiple NS to RUH, each NS can also be classified according to the application scene corresponding to each NS, the order / random characteristics of write IO, the hot / cold characteristics of data storage, or the similarity of data life cycle, and the NS is respectively mapped to different RUH.

[0110] Figure 7A schematic diagram of data mapping to a data recycling group is provided for an embodiment of the present application. In the process of performing data mapping to the RG, when the number of RGs in the SSD is not less than the number of SSDs, the data of the first strip unit is mapped to the first target RG of each SSD based on the corresponding one-to-one mapping relationship, and the data of the second strip unit is mapped to the second target RG of each SSD based to the corresponding one-to-one mapping relationship, thereby strictly guaranteeing the independence of data D and check P in RG mapping. When the number of RGs in the SSD is less than the number of SSDs, as shown in Figure 7 the data of the first strip unit is mapped to the first target RG of each SSD based on the corresponding many-to-one mapping relationship, and the data of the second strip unit is mapped to the second target RG of each SSD based on the corresponding many-to-one mapping relationship, that is, the data D and the check P are respectively mapped to different RGs, thereby realizing the independence of data D and check P in RG mapping as much as possible.

[0111] In summary, the static mapping rule Type1 reduces the block merging frequency inside the SSD by reducing random writes across physical areas, thereby alleviating the write amplification effect. On the other hand, the data types are isolated (such as the frequently updated check data P and the higher stability user data D), thereby avoiding effective data migration during mixed recycling and significantly improving the garbage collection efficiency. The mapping rule scheme is particularly suitable for scenarios where the data life cycle difference between NSs is significant, for example, mapping the log NS with high frequency of writing and the backup NS with long-term staticity to independent RUH and RG respectively, thereby optimizing the storage performance and prolonging the SSD life.

[0112] (2) Static mapping rule Type2;

[0113] Figure 8 A schematic diagram of the static mapping rule Type2 provided for an embodiment of the present application. Based on the above embodiment, in some embodiments, as shown in Figure 8 the target namespace, the data of the first strip unit and the data of the second strip unit are mapped to the target physical write unit handle and the target data recycling group of each solid state disk based on a pre-established static mapping table, including:

[0114] S151: mapping the target namespace to the target data recycling group of each solid state disk.

[0115] S152: mapping the data of the first strip unit to the first target physical write unit handle of each solid state disk, and mapping the data of the second strip unit to the second target physical write unit handle of each solid state disk.

[0116] Specifically, the static mapping rule Type2 stores the data of the same NS in the adjacent physical area of the SSD by mapping the target namespace to the target RG of each SSD; meanwhile, the data of the first strip unit is mapped to the first target RUH of each SSD, and the data of the second strip unit is mapped to the second target RUH of each SSD, so as to realize the physical isolation of the write path. It should be noted that when performing the mapping of the NS to the RG, the number relationship between the NS and the RG needs to be considered, and when performing the mapping of the data to the RUH, the number relationship between the data (D and P) and the RUH also needs to be considered.

[0117] Figure 9 A schematic diagram of mapping a namespace to a data recycling group is provided for the embodiment of the application. In the process of mapping the target namespace to the target RG of each SSD, when the number of RGs in the SSD is not less than the number of namespaces NS, based on the corresponding one-to-one mapping relationship between the RG and the NS, the target namespace is mapped to the target RG of each SSD. When the number of RGs in the SSD is less than the number of namespaces, as shown in Figure 9 , based on the corresponding many-to-one mapping relationship, that is, the relationship that multiple NSs correspond to one RG, the target namespace is mapped to the target RG of each SSD. It should be further noted that in addition to the pre-set many-to-one mapping relationship, in the specific implementation, in order to realize the mapping of multiple NSs to the RG, the NSs can also be classified according to the similarity of the application scene corresponding to each NS, the order / random characteristics of the write IO, the hot / cold characteristics of the data storage, or the data life cycle, and the NSs are respectively mapped to different RGs.

[0118] Figure 10 A schematic diagram of mapping data to a physical write unit handle is provided for the embodiment of the application. In the process of mapping the data of the first strip unit to the first target RUH of each SSD, and mapping the data of the second strip unit to the second target RUH of each SSD, when the number of RUHs in the SSD is not less than the number of SSDs, based on the corresponding one-to-one mapping relationship, the data of the first strip unit is mapped to the first target RUH of each SSD, and based on the corresponding one-to-one mapping relationship, the data of the second strip unit is mapped to the second target RUH of each SSD, so as to strictly guarantee the independence between the data D and the check P in the RUH mapping. When the number of RUHs in the SSD is less than the number of SSDs, as shown in Figure 10 , based on the corresponding many-to-one mapping relationship, the data of the first strip unit is mapped to the first target RUH of each SSD, and based on the corresponding many-to-one mapping relationship, the data of the second strip unit is mapped to the second target RUH of each SSD, that is, the data D and the check P are respectively mapped to different RUHs, so as to realize the independence between the data D and the check P in the RUH mapping as much as possible.

[0119] In summary, the static mapping rule Type2 reduces invalid migration caused by data dispersion by centrally managing data garbage collection of the same NS, thereby reducing the recovery overhead. On the other hand, the write path of D / P is separated to avoid the access interference of the frequently-updated check data P on the main data D, thereby ensuring the stable performance of the key business. The mapping rule is particularly suitable for the scenario where the data types in the NS are complex and need to be physically isolated. By differentially allocating D / P to the independent RUH, the concurrent write efficiency is optimized and the overall storage throughput is improved.

[0120] Through the description of the above implementation, those skilled in the art can clearly understand that the method according to the above embodiment can be realized by means of software and the necessary general hardware platform, of course, it can also be realized by hardware, but in many cases, the former is a better implementation.

[0121] Figure 11 A schematic diagram of a flexible data placement static mapping device provided by an embodiment of the application. The device is applied to a redundant array of independent disks controller; as shown in the figure, the device comprises: Figure 11 As shown in the figure, the device comprises:

[0122] The acquisition module 10 is configured to acquire the target address and range information in the write command when receiving the write command of the host side.

[0123] The determination module 11 is configured to determine the target namespace in each namespace based on the target address and range information, and determine the first strip unit and the second strip unit in each strip under the target namespace; wherein the first strip unit stores business data, and the second strip unit stores check data.

[0124] The mapping module 12 is configured to map the target namespace, the data of the first strip unit and the data of the second strip unit to the target physical write unit handle of each solid state disk and the target data recovery group based on the pre-established static mapping table.

[0125] The static mapping table contains all mapping relationships of the data of each namespace and each strip unit to each physical write unit handle and each data recovery group of each solid state disk.

[0126] In some embodiments, the determination module 11 comprises:

[0127] The first determination submodule is configured to determine the namespace identifier according to the target address and range information.

[0128] The second determination submodule is configured to determine the target namespace in each namespace according to the namespace identifier.

[0129] In some embodiments, the determining module 11 comprises:

[0130] a third determining submodule, configured to determine a starting logical block address according to the target address and the range information;

[0131] a fourth determining submodule, configured to determine a stripe unit size, a number of stripe units of a single stripe, and a redundant array of independent disks level;

[0132] a fifth determining submodule, configured to determine a first stripe unit and a second stripe unit according to the starting logical block address, the stripe unit size, the number of stripe units, and the redundant array of independent disks level.

[0133] In some embodiments, the fifth determining submodule comprises:

[0134] a sixth determining submodule, configured to determine a stripe size according to the stripe unit size, the number of stripe units, and the redundant array of independent disks level;

[0135] a seventh determining submodule, configured to determine a stripe number and a stripe offset according to the starting logical block address and the stripe size;

[0136] an eighth determining submodule, configured to determine a local cyclic stripe number according to the stripe number and the number of stripe units, and determine a service data disk location number of a disk where the first stripe unit is located according to the stripe offset and the stripe unit size;

[0137] a ninth determining submodule, configured to determine a check data disk location number of a disk where the second stripe unit is located according to the number of stripe units, the local cyclic stripe number, and the redundant array of independent disks level;

[0138] a tenth determining submodule, configured to determine a type identifier of the first stripe unit according to the service data disk location number, the number of stripe units, the local cyclic stripe number, and the redundant array of independent disks level.

[0139] In some embodiments, the sixth determining submodule comprises:

[0140] a first calculating module, configured to, when the redundant array of independent disks level is a distributed parity stripe, subtract 1 from the number of stripe units, and determine a product of the number of stripe units after the subtraction and the stripe unit size, to determine the stripe size;

[0141] a second calculating module, configured to, when the redundant array of independent disks level is a double distributed parity stripe, subtract 2 from the number of stripe units, and determine a product of the number of stripe units after the subtraction and the stripe unit size, to determine the stripe size.

[0142] In some embodiments, the seventh determining submodule comprises:

[0143] The third calculating module is configured to determine a quotient value of the starting logical block address and the size of the stripe, and to round down the quotient value to determine a stripe number;

[0144] The fourth calculating module is configured to perform a modulo operation on the starting logical block address and the size of the stripe to determine a stripe offset.

[0145] In some embodiments, the eighth determining submodule comprises:

[0146] The fifth calculating module is configured to perform a modulo operation on the stripe number and the number of stripe units to determine a local cyclic stripe number;

[0147] The sixth calculating module is configured to determine a quotient value of the stripe offset and the size of the stripe unit, and to round down the quotient value to determine a service data disk location number.

[0148] In some embodiments, the ninth determining submodule comprises:

[0149] The seventh calculating module is configured to, when the RAID level is a distributed parity stripe, subtract 1 from the number of stripe units, and determine a difference between the number of stripe units after the subtraction and the local cyclic stripe number to determine a check data disk location number;

[0150] The eighth calculating module is configured to, when the RAID level is a double distributed parity stripe, subtract 2 from the number of stripe units, and determine a difference between the number of stripe units after the subtraction and the local cyclic stripe number to determine a first check data disk location number;

[0151] The ninth calculating module is configured to subtract 1 from the number of stripe units, and determine a difference between the number of stripe units after the subtraction and the local cyclic stripe number to determine a second check data disk location number.

[0152] In some embodiments, the tenth determining submodule comprises:

[0153] The first judging module is configured to, when the RAID level is a distributed parity stripe, judge whether a sum of the service data disk location number and the local cyclic stripe number is greater than the number of stripe units minus 2; if yes, the tenth calculating module is triggered; if no, the eleventh calculating module is triggered;

[0154] The tenth calculating module is configured to add 1 to a sum of the local cyclic stripe number and the service data disk location number to determine a first value; and determine the first value as a type identifier of the first stripe unit.

[0155] The eleventh computing module is configured to add 2 to the sum of the local cyclic stripe number and the service data disk position number to determine a second value; and perform a modulo operation on the second value and the number of stripe units to determine the type identifier of the first stripe unit.

[0156] In some embodiments, the tenth determining submodule comprises:

[0157] The second judging module is configured to, when the RAID level is a double distributed parity stripe, judge whether the sum of the service data disk position number and the local cyclic stripe number is greater than the number of stripe units minus 3; if yes, trigger the twelfth computing module; if no, trigger the thirteenth computing module.

[0158] The twelfth computing module is configured to add 1 to the sum of the local cyclic stripe number and the service data disk position number to determine a first value; and determine the first value as the type identifier of the first stripe unit.

[0159] The thirteenth computing module is configured to add 3 to the sum of the local cyclic stripe number and the service data disk position number to determine a third value; and perform a modulo operation on the third value and the number of stripe units minus 1 to determine the type identifier of the first stripe unit.

[0160] In some embodiments, the method further comprises:

[0161] The eleventh determining submodule is configured to determine the number of logical blocks for continuous writing according to the target address and the range information, and determine the input / output size according to the number of logical blocks for continuous writing.

[0162] The third judging module is configured to judge whether the difference between the stripe offset and the input / output size is less than 0; if yes, split the write command at the stripe boundary into a plurality of sub-commands, and process each sub-command respectively; if no, directly trigger the determining module 11.

[0163] In some embodiments, the mapping module 12 comprises:

[0164] The first mapping submodule is configured to map the target namespace to the target physical write unit handle of each solid state disk.

[0165] The second mapping submodule is configured to map the data of the first stripe unit to the first target data recycling group of each solid state disk, and map the data of the second stripe unit to the second target data recycling group of each solid state disk.

[0166] In some embodiments, the first mapping submodule comprises:

[0167] the third mapping submodule is configured to map the target namespace to the target physical write unit handle of each solid state disk based on a corresponding one-to-one mapping relationship when the number of physical write unit handles in the solid state disk is less than the number of namespaces.

[0168] the fourth mapping submodule is configured to map the target namespace to the target physical write unit handle of each solid state disk based on a corresponding many-to-one mapping relationship when the number of physical write unit handles in the solid state disk is less than the number of namespaces.

[0169] In some embodiments, the second mapping submodule comprises:

[0170] the fifth mapping submodule is configured to map the data of the first stripe unit to the first target data recycling group of each solid state disk based on a corresponding one-to-one mapping relationship, and map the data of the second stripe unit to the second target data recycling group of each solid state disk based on a corresponding one-to-one mapping relationship when the number of data recycling groups in the solid state disk is not less than the number of solid state disks.

[0171] the sixth mapping submodule is configured to map the data of the first stripe unit to the first target data recycling group of each solid state disk based on a corresponding many-to-one mapping relationship, and map the data of the second stripe unit to the second target data recycling group of each solid state disk based on a corresponding many-to-one mapping relationship when the number of data recycling groups in the solid state disk is less than the number of solid state disks.

[0172] In some embodiments, the mapping module 12 comprises:

[0173] the seventh mapping submodule is configured to map the target namespace to the target data recycling group of each solid state disk.

[0174] the eighth mapping submodule is configured to map the data of the first stripe unit to the first target physical write unit handle of each solid state disk, and map the data of the second stripe unit to the second target physical write unit handle of each solid state disk.

[0175] In some embodiments, the seventh mapping submodule comprises:

[0176] the ninth mapping submodule is configured to map the target namespace to the target data recycling group of each solid state disk based on a corresponding one-to-one mapping relationship when the number of data recycling groups in the solid state disk is not less than the number of namespaces.

[0177] the tenth mapping submodule is configured to map the target namespace to the target data recycling group of each solid state disk based on a corresponding many-to-one mapping relationship when the number of data recycling groups in the solid state disk is less than the number of namespaces.

[0178] In some embodiments, the eighth mapping submodule comprises:

[0179] The eleventh mapping submodule is configured to, when the number of physical write unit handles in the solid state disks is not less than the number of the solid state disks, map the data of the first stripe unit to the first target physical write unit handle of each solid state disk based on the corresponding one-to-one mapping relationship, and map the data of the second stripe unit to the second target physical write unit handle of each solid state disk based on the corresponding one-to-one mapping relationship.

[0180] The twelfth mapping submodule is configured to, when the number of physical write unit handles in the solid state disks is less than the number of the solid state disks, map the data of the first stripe unit to the first target physical write unit handle of each solid state disk based on the corresponding many-to-one mapping relationship, and map the data of the second stripe unit to the second target physical write unit handle of each solid state disk based on the corresponding many-to-one mapping relationship.

[0181] The features of the embodiments of the flexible data placement static mapping device can be referred to the related descriptions of the embodiments of the flexible data placement static mapping method, which will not be repeated here.

[0182] The embodiments of the present application further provide an electronic device, comprising a memory and a processor, the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any of the above-mentioned embodiments of the flexible data placement static mapping method.

[0183] The embodiments of the present application further provide a computer readable storage medium, which stores a computer program, wherein the computer program is configured to execute the steps in any of the above-mentioned embodiments of the flexible data placement static mapping method when running.

[0184] In an exemplary embodiment, the above-mentioned computer readable storage medium can include but is not limited to: a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store computer programs.

[0185] The embodiments of the present application further provide a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement the steps in any of the above-mentioned embodiments of the flexible data placement static mapping method.

[0186] The embodiment of the present application further provides another computer program product, comprising a nonvolatile computer readable storage medium, the nonvolatile computer readable storage medium stores a computer program, the computer program is executed by a processor to implement the steps in any of the above flexible data placement static mapping method embodiments.

[0187] Those skilled in the art will further appreciate that the functions of the examples described herein-based units and algorithm steps can be implemented using electronic hardware, computer software, or any combination thereof. To clearly illustrate this interchangeability of hardware and software, various examples have been described herein in terms of their general functionality. Whether such functionality is implemented as hardware or software depends on the particular application and design constraints imposed on the overall system. Skilled artisans can implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.

[0188] The above describes in detail the flexible data placement static mapping method, device, medium and product provided by the present application. The principles and implementation modes of the present application are described herein by applying specific examples, and the above description of the examples is only applicable to help understand the method of the present application and its core idea. It should be pointed out that, for those skilled in the art, some improvements and modifications can be made to the present application without departing from the principles of the present application, and these improvements and modifications also fall within the protection scope of the present application.

Claims

1. A flexible data placement static mapping method, characterized in that, The application is applied to a redundant array of independent disks controller; the method comprises: When a host-side write command is received, target address and range information in the write command are acquired; Based on the target address and range information, a target namespace is determined in each namespace, and a first strip unit and a second strip unit are determined in each strip under the target namespace; wherein the first strip unit stores service data, and the second strip unit stores check data; Based on a pre-established static mapping table, the target namespace, data of the first strip unit and data of the second strip unit are mapped to a target physical write unit handle and a target data recycling group of each solid state disk according to a mapping rule; the mapping rule comprises: the target namespace is mapped to the target data recycling group of each solid state disk; data of the first strip unit is mapped to a first target physical write unit handle of each solid state disk, and data of the second strip unit is mapped to a second target physical write unit handle of each solid state disk; The static mapping table contains all mapping relationships of data of each namespace and each strip unit to each physical write unit handle and each data recycling group of each solid state disk.

2. The flexible data placement static mapping method of claim 1, wherein, Based on the target address and range information, the target namespace is determined in each namespace, comprising: A namespace identifier is determined according to the target address and range information; The target namespace is determined in each namespace according to the namespace identifier.

3. The flexible data placement static mapping method of claim 1, wherein, Based on the target address and range information, the first strip unit and the second strip unit are determined in each strip under the target namespace, comprising: A starting logical block address is determined according to the target address and range information; A strip unit size, a strip unit number of a single strip and a redundant array of independent disks level are determined; The first strip unit and the second strip unit are determined according to the starting logical block address, the strip unit size, the strip unit number and the redundant array of independent disks level.

4. The flexible data placement static mapping method of claim 3, wherein, The first strip unit and the second strip unit are determined according to the starting logical block address, the strip unit size, the strip unit number and the redundant array of independent disks level, comprising: A strip size is determined according to the strip unit size, the strip unit number and the redundant array of independent disks level; A strip number and a strip offset are determined according to the starting logical block address and the strip size; A local cyclic strip number is determined according to the strip number and the strip unit number, and a service data disk position number of a disk where the first strip unit is located is determined according to the strip offset and the strip unit size; A check data disk position number of a disk where the second strip unit is located is determined according to the strip unit number, the local cyclic strip number and the redundant array of independent disks level; A type identifier of the first strip unit is determined according to the service data disk position number, the strip unit number, the local cyclic strip number and the redundant array of independent disks level.

5. The flexible data placement static mapping method of claim 4, wherein, Determining a stripe size according to the stripe unit size, the stripe unit quantity and the RAID level, comprising: When the RAID level is distributed parity stripe, reducing the stripe unit quantity by 1, and determining the product of the stripe unit quantity after being reduced by 1 and the stripe unit size, to determine the stripe size; When the RAID level is double distributed parity stripe, reducing the stripe unit quantity by 2, and determining the product of the stripe unit quantity after being reduced by 2 and the stripe unit size, to determine the stripe size.

6. The flexible data placement static mapping method of claim 4, wherein, Determining a stripe number and a stripe offset according to the start LBA and the stripe size, comprising: Determining the quotient of the start LBA and the stripe size, and rounding down the quotient to determine the stripe number; Performing modulo operation on the start LBA and the stripe size to determine the stripe offset.

7. The flexible data placement static mapping method of claim 4, wherein, Determining a local cyclic stripe number according to the stripe number and the stripe unit quantity, and determining the service data disk location number of the disk where the first stripe unit is located according to the stripe offset and the stripe unit size, comprising: Performing modulo operation on the stripe number and the stripe unit quantity to determine the local cyclic stripe number; Determining the quotient of the stripe offset and the stripe unit size, and rounding down the quotient to determine the service data disk location number.

8. The flexible data placement static mapping method of claim 4, wherein, Determining the check data disk location number of the disk where the second stripe unit is located according to the stripe unit quantity, the local cyclic stripe number and the RAID level, comprising: When the RAID level is distributed parity stripe, reducing the stripe unit quantity by 1, and determining the difference between the stripe unit quantity after being reduced by 1 and the local cyclic stripe number, to determine the check data disk location number; When the RAID level is double distributed parity stripe, reducing the stripe unit quantity by 2, and determining the difference between the stripe unit quantity after being reduced by 2 and the local cyclic stripe number, to determine the first check data disk location number; Reducing the stripe unit quantity by 1, and determining the difference between the stripe unit quantity after being reduced by 1 and the local cyclic stripe number, to determine the second check data disk location number.

9. The flexible data placement static mapping method of claim 4, wherein, Determining the type identification of the first stripe unit according to the service data disk location number, the stripe unit quantity, the local cyclic stripe number and the RAID level, comprising: When the RAID level is distributed parity stripe, judging whether the sum of the service data disk location number and the local cyclic stripe number is not greater than the stripe unit quantity minus 2; If yes, adding 1 to the sum of the local cyclic stripe number and the service data disk location number to determine a first value; Determining the first value as the type identification of the first stripe unit; If no, adding 2 to the sum of the local cyclic stripe number and the service data disk location number to determine a second value; Determining the second value as the type identification of the first stripe unit. Performing a modulo operation on the second numerical value and the number of strip units to determine the type identifier of the first strip unit.

10. The flexible data placement static mapping method of claim 4, wherein, According to the service data disk position number, the number of strip units, the local cyclic strip number and the RAID level, the type identifier of the first strip unit is determined, comprising: When the RAID level is a double distributed parity strip, it is judged whether the sum of the service data disk position number and the local cyclic strip number is not greater than the number of strip units minus 3; If yes, the sum of the local cyclic strip number and the service data disk position number is added by 1 to determine a first numerical value; The first numerical value is determined as the type identifier of the first strip unit; If no, the sum of the local cyclic strip number and the service data disk position number is added by 3 to determine a third numerical value; Performing a modulo operation on the third numerical value and the number of strip units minus 1 to determine the type identifier of the first strip unit.

11. The flexible data placement static mapping method of claim 4, wherein, Before determining the target namespace in each namespace based on the target address and range information, after obtaining the target address and range information in the write command, further comprising: According to the target address and range information, the number of logical blocks for continuous writing is determined, and the input / output size is determined according to the number of logical blocks for continuous writing; It is judged whether the difference between the strip offset and the input / output size is less than 0; If yes, the write command is split into multiple sub-commands at the strip boundary, and each sub-command is processed respectively; If no, directly enter the step of determining the target namespace in each namespace based on the target address and range information.

12. The flexible data placement static mapping method of claim 1, wherein, Mapping the target namespace to the target data recycling group of each solid state disk, comprising: When the number of data recycling groups in the solid state disk is not less than the number of namespaces, the target namespace is mapped to the target data recycling group of each solid state disk based on the corresponding one-to-one mapping relationship; When the number of data recycling groups in the solid state disk is less than the number of namespaces, the target namespace is mapped to the target data recycling group of each solid state disk based on the corresponding many-to-one mapping relationship.

13. The flexible data placement static mapping method of claim 1, wherein, Mapping the data of the first strip unit to the first target physical write unit handle of each solid state disk, and mapping the data of the second strip unit to the second target physical write unit handle of each solid state disk, comprising: When the number of physical write unit handles in the solid state disk is not less than the number of solid state disks, the data of the first strip unit is mapped to the first target physical write unit handle of each solid state disk based on the corresponding one-to-one mapping relationship, and the data of the second strip unit is mapped to the second target physical write unit handle of each solid state disk based on the corresponding one-to-one mapping relationship; When the number of physical write unit handles in the solid state disks is less than the number of the solid state disks, the data of the first strip unit is mapped to the first target physical write unit handle of each solid state disk based on a corresponding many-to-one mapping relationship, and the data of the second strip unit is mapped to the second target physical write unit handle of each solid state disk based on a corresponding many-to-one mapping relationship.

14. The flexible data placement static mapping method of claim 1, wherein, The mapping rule further comprises: mapping the target namespace to the target physical write unit handle of each solid state disk; mapping the data of the first strip unit to a first target data recycling group of each solid state disk and mapping the data of the second strip unit to a second target data recycling group of each solid state disk; mapping the target namespace to the target physical write unit handle of each solid state disk comprises: when the number of physical write unit handles in the solid state disks is not less than the number of the namespaces, mapping the target namespace to the target physical write unit handle of each solid state disk based on a corresponding one-to-one mapping relationship; when the number of physical write unit handles in the solid state disks is less than the number of the namespaces, mapping the target namespace to the target physical write unit handle of each solid state disk based on a corresponding many-to-one mapping relationship; mapping the data of the first strip unit to a first target data recycling group of each solid state disk and mapping the data of the second strip unit to a second target data recycling group of each solid state disk comprises: when the number of data recycling groups in the solid state disks is not less than the number of the solid state disks, mapping the data of the first strip unit to the first target data recycling group of each solid state disk based on a corresponding one-to-one mapping relationship and mapping the data of the second strip unit to the second target data recycling group of each solid state disk based on a corresponding one-to-one mapping relationship; when the number of data recycling groups in the solid state disks is less than the number of the solid state disks, mapping the data of the first strip unit to the first target data recycling group of each solid state disk based on a corresponding many-to-one mapping relationship and mapping the data of the second strip unit to the second target data recycling group of each solid state disk based on a corresponding many-to-one mapping relationship.

15. An electronic device, comprising: comprise: a memory for storing a computer program; a processor for implementing the steps of the flexible data placement static mapping method according to any one of claims 1 to 14 when executing the computer program.

16. A computer-readable storage medium, characterized in that, The computer program is stored in the computer readable storage medium and is executed by the processor to implement the steps of the flexible data placement static mapping method according to any one of claims 1 to 14.

17. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the flexible data placement static mapping method according to any one of claims 1 to 14.

Citation Information

Patent Citations

  • Managing data placement for direct assigned virtual machines in a memory sub-system

    US20240320029A1

  • Raid region alignment for FDP compliant SSD

    US20250053509A1