Namespace management method and apparatus

By allocating physical blocks and managing address mappings in solid-state drives (SSDs) according to business type and reliability level, the problem of poor namespace compatibility of SSDs is solved, thereby improving data reliability and write efficiency.

CN118210430BActive Publication Date: 2025-11-28HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211626685.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-16
Publication Date
2025-11-28
Estimated Expiration
2042-12-16

AI Technical Summary

Technical Problem

In existing technologies, solid-state drives (SSDs) cannot provide matching namespaces for different data types when creating namespaces, resulting in poor data storage reliability and failing to meet the data protection needs of different business types.

Method used

By receiving creation requests, the system allocates physical blocks to the target namespace based on the target reliability level and flash translation layer size, creates disk arrays, and manages the mapping from logical addresses to physical addresses, thereby enabling flexible protection of data for different business types.

Benefits of technology

It achieves targeted data protection for different business data types, improves data reliability, and increases data writing efficiency and speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118210430B_ABST
    Figure CN118210430B_ABST
Patent Text Reader

Abstract

The application relates to a namespace management method and device, which comprises the following steps: receiving a creation request from a server, wherein the creation request carries target reliability levels, target flash translation layer sizes and space basic information of a target namespace to be created; allocating a plurality of physical blocks to the target namespace according to the target reliability levels and the space basic information, and creating a disk array of the target namespace according to the plurality of physical blocks; and managing the mapping between the logical address and the physical address of the target namespace according to the target flash translation layer sizes; wherein the data protection modes of different target reliability levels are different. The method can flexibly create disk arrays matching the reliability requirements of data of different business types, realizes targeted data protection for data of different business types, improves the data reliability, can finely manage the target flash translation layer sizes, and reduces the memory occupied by the flash translation layer.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computers, and in particular to a namespace management method and device. BACKGROUND

[0002] A solid state disk (SSD) uses a NAND flash storage medium to save data, and is free of mechanical components such as a magnetic head, a disk shaft, and a control motor of a mechanical hard disk. The solid state disk does not have a process of accelerating rotation of a motor, and is not subject to mechanical failure, and is not afraid of collision, impact, and vibration. Therefore, the solid state disk has absolute advantages in performance, reliability, energy consumption, and portability over the mechanical hard disk, and is widely used in fields such as military, military loading, industrial control, power, medical treatment, aviation, and navigation equipment.

[0003] However, in the related art, in the process of creating a namespace (NS) on a solid state disk, a matching namespace cannot be created for different data, the adaptability of the namespace to the data is poor, and reliable protection cannot be provided for data storage. SUMMARY

[0004] Therefore, a namespace management method and device are provided, which can achieve targeted data protection for different types of data and improve data write efficiency and speed.

[0005] In a first aspect, an embodiment of the present application provides a namespace management method applied to a controller in a solid state disk, and the method comprises the following steps:

[0006] receiving a creation request from a server, the creation request carrying target reliability level, target flash translation layer size, and space basic information of a target namespace to be created;

[0007] allocating a plurality of physical blocks for the target namespace according to the target reliability level and the space basic information, and creating a disk array of the target namespace according to the plurality of physical blocks;

[0008] managing mapping between a logical address and a physical address of the target namespace according to the target flash translation layer size;

[0009] wherein different data protection modes are used for different target reliability levels.

[0010] According to the namespace management method provided in the first aspect, the disk array matching the reliability requirement of the data of different service types can be flexibly created, the targeted data protection for the data of different service types is realized, and the data reliability is improved. In addition, the size of the target flash translation layer is finely managed, and the memory occupied by the flash translation layer is reduced.

[0011] In a possible implementation, the target reliability level is a reliability level selected by the server from the selectable reliability levels supported by the solid state disk and matching the reliability requirement of the data to be stored in the target namespace.

[0012] In a possible implementation, the reliability requirement of the data is determined by the server according to the service type corresponding to the data, and the data includes at least one of metadata, user data, and backup data.

[0013] In a possible implementation, the target reliability level includes a first quantity and a second quantity, the first quantity is used to indicate the number of physical blocks in the disk array, the second quantity is used to indicate the number of physical blocks for redundancy check in the physical blocks of the disk array, and the second quantities corresponding to different target reliability levels are different.

[0014] In a possible implementation, the target flash translation layer size is determined by the server according to the size of each write operation required by the target namespace and the selectable flash translation layer size supported by the solid state disk, and the target flash translation layer size is less than or equal to the size of a write operation in a preset proportion of multiple write operations.

[0015] In a second aspect, an embodiment of the present application provides a namespace management method applied to a server for issuing a creation request to a solid state disk, and the method includes the following steps.

[0016] Obtaining the selectable flash translation layer size and the selectable reliability level supported by the solid state disk for which a target namespace needs to be created;

[0017] According to the reliability requirement of the data to be stored in the target namespace, determining a target reliability level matching the reliability requirement from the selectable reliability levels, and the data protection manners of different target reliability levels are different;

[0018] According to the size of each write operation to be issued to the target namespace, determining a target flash translation layer size from the selectable flash translation layer size, and the target flash translation layer size is less than or equal to the size of a write operation in a preset proportion of multiple write operations;

[0019] generate a creation request according to the space basic information, the target reliability level and the target flash translation layer size required for creating the target namespace, and send the creation request to a controller of a corresponding solid state disk, the creation request carrying the space basic information, the target reliability level and the target flash translation layer size.

[0020] In a possible implementation, the method further includes:

[0021] According to a service type of data to be stored in the target namespace, a reliability requirement of the data is determined, the data including at least one of metadata, user data and backup data.

[0022] In a possible implementation, the target reliability level includes a first quantity and a second quantity, the first quantity being used to indicate a quantity of physical blocks in a disk array corresponding to the target namespace, and the second quantity being used to indicate a quantity of physical blocks used for redundancy check in the physical blocks of the disk array, the second quantities corresponding to different target reliability levels being different.

[0023] In a possible implementation, the optional flash translation layer size and the optional reliability level supported by the solid state disk requiring the target namespace to be created are acquired, including:

[0024] The optional flash translation layer size and the optional reliability level supported by the solid state disk are queried from controller data of the solid state disk requiring the target namespace to be created.

[0025] According to the namespace management method provided in the second aspect, the target reliability level matched with the reliability requirement of data can be flexibly set for data of different service types, so that targeted data protection for data of different service types is implemented. Meanwhile, the preset proportion is set, time is saved, and therefore the data writing efficiency and speed are improved.

[0026] In a third aspect, an embodiment of the present application provides a namespace management apparatus applied to a controller in a solid state disk, and the apparatus includes:

[0027] The request receiving module is configured to receive a creation request from a server, the creation request carrying a target reliability level, a target flash translation layer size and space basic information of a target namespace to be created.

[0028] The array creating module is configured to allocate a plurality of physical blocks for the target namespace according to the target reliability level and the space basic information, and create a disk array of the target namespace according to the plurality of physical blocks.

[0029] a mapping management module configured to manage mapping between logical addresses and physical addresses of the target namespace according to the target flash translation layer size;

[0030] Different target reliability levels have different data protection manners.

[0031] In a possible implementation, the target reliability level is a reliability level selected by the server from the optional reliability levels supported by the solid state disk, and the reliability level matches a reliability requirement of data to be stored in the target namespace.

[0032] In a possible implementation, the reliability requirement of data is determined by the server according to a service type corresponding to the data, and the data includes at least one of metadata, user data, and backup data.

[0033] In a possible implementation, the target reliability level includes a first quantity and a second quantity, the first quantity is used to indicate a number of physical blocks in the disk array, the second quantity is used to indicate a number of physical blocks used for redundancy check in the physical blocks of the disk array, and the second quantities corresponding to different target reliability levels are different.

[0034] In a possible implementation, the target flash translation layer size is determined by the server according to sizes of each write operation required by the target namespace and optional flash translation layer sizes supported by the solid state disk, and the target flash translation layer size is less than or equal to a size of a write operation in a preset proportion of a plurality of write operations.

[0035] The message delivery method provided in the third aspect and the possible implementation manners of the third aspect has the same beneficial effects as the message delivery system provided in the first aspect and the possible implementation manners of the first aspect, and is not redundant, and thus is not described here.

[0036] In a fourth aspect, an embodiment of the present application provides a namespace management apparatus applied to a server issuing a creation request to a solid state disk, and the apparatus comprises:

[0037] An acquisition information module is configured to acquire optional flash translation layer sizes and optional reliability levels supported by a solid state disk requiring a target namespace to be created;

[0038] A determination level module is configured to determine, according to a reliability requirement of data to be stored in the target namespace, a target reliability level matching the reliability requirement from the optional reliability levels, and different target reliability levels have different data protection manners.

[0039] The determining size module is configured to determine a target flash translation layer size from the selectable flash translation layer size according to a size of each write operation required to be issued to the target namespace, the target flash translation layer size being less than or equal to a size of a write operation in a preset proportion of the plurality of write operations.

[0040] The creating request module is configured to generate a creating request according to space basic information required for creating the target namespace, the target reliability level, and the target flash translation layer size, and send the creating request to a controller of a corresponding solid state disk, the creating request carrying the space basic information, the target reliability level, and the target flash translation layer size.

[0041] In a possible implementation, the apparatus further includes:

[0042] The requirement determining module is configured to determine a reliability requirement of data required to be stored in the target namespace according to a service type of the data, the data including at least one of metadata, user data, and backup data.

[0043] In a possible implementation, the target reliability level includes a first quantity and a second quantity, the first quantity being used to indicate a number of physical blocks in a disk array corresponding to the target namespace, and the second quantity being used to indicate a number of physical blocks used for redundancy check in the physical blocks of the disk array, the second quantity corresponding to different target reliability levels being different.

[0044] In a possible implementation, the selectable flash translation layer size and the selectable reliability level supported by the solid state disk required to create the target namespace are obtained by:

[0045] The selectable flash translation layer size and the selectable reliability level supported by the solid state disk are queried from controller data of the solid state disk required to create the target namespace.

[0046] The beneficial effects of the message delivery method provided in the fourth aspect and the various possible implementations of the fourth aspect correspond to those of the message delivery system provided in the second aspect and the various possible implementations of the second aspect, and are not redundant, and thus are not described herein.

[0047] In the fifth aspect, an embodiment of the present application provides a namespace management apparatus, including:

[0048] a processor;

[0049] a memory for storing processor-executable instructions;

[0050] The processor is configured to implement the namespace management method of the first aspect or one or more of the possible implementation manners of the first aspect, or implement the namespace management method of the second aspect or one or more of the possible implementation manners of the second aspect when the processor is configured to execute the instructions.

[0051] In a sixth aspect, an embodiment of the present application provides a non-transitory computer readable storage medium having computer program instructions stored thereon, the computer program instructions, when executed by a processor, implement the message delivery method of the first aspect or one or more of the possible implementation manners of the first aspect, or implement the namespace management method of the second aspect or one or more of the possible implementation manners of the second aspect.

[0052] In a seventh aspect, an embodiment of the present application provides a computer program product comprising computer readable code, or a non-transitory computer readable storage medium carrying computer readable code, when the computer readable code is run in an electronic device, a processor in the electronic device executes the message delivery method of the first aspect or one or more of the possible implementation manners of the first aspect, or implements the namespace management method of the second aspect or one or more of the possible implementation manners of the second aspect.

[0053] These and other aspects of the application will become more fully understood from the following (a few) embodiment descriptions. BRIEF DESCRIPTION OF DRAWINGS

[0054] The accompanying drawings, which are incorporated herein and form a part of the specification, illustrate exemplary embodiments, features, and aspects of the application and serve to explain the principles of the present application.

[0055] Figure 1 A scenario diagram showing application of the namespace management method according to an embodiment of the present application is shown.

[0056] Figure 2 A flowchart showing the namespace management method according to an embodiment of the present application is shown.

[0057] Figure 3 A diagram showing the namespace management method according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0058] Various exemplary embodiments, features, and aspects of the present application will be described in detail below with reference to the accompanying drawings. The same reference numbers in different drawings represent the same or similar elements or components. Although various aspects of the embodiments are illustrated in the drawings, the drawings are not necessarily drawn to scale unless otherwise specified, and are not intended to limit the scope of the application.

[0059] The term "exemplary" is used herein to mean "serving as an example, instance, or illustration." Any implementation described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other implementations.

[0060] In addition, for the purpose of convenience and brevity, detailed descriptions of well-known devices, methods, procedures, components, and circuits are not described in detail in order to avoid obscuring the subject matter of the present application.

[0061] To solve the above problems, the embodiments of the present application provide a namespace management method and device, which can flexibly create a disk array matching the reliability requirement of data of different service types, and realize targeted data protection for data of different service types, thereby improving the data reliability. In addition, the size of the target flash translation layer is finely managed, and the memory occupied by the flash translation layer is reduced. Figure 1 An application scenario diagram of the namespace management method according to an embodiment of the present application is shown. Figure 2 A flowchart of the namespace management method according to an embodiment of the present application is shown. As shown in Figure 1 , Figure 2 As shown, the server 100 is used to execute steps S101-S104 in the method. The controller 201 in the solid state disk 200 executes steps S201-S203.

[0062] In step S101, after determining that a target namespace needs to be created, the server acquires the optional flash translation layer size and the optional reliability level supported by the solid state disk that needs to create the target namespace.

[0063] In some embodiments, the server can determine that the target namespace needs to be created according to the service requirement and / or user request. In some embodiments, the server can query the optional flash translation layer size and the optional reliability level supported by the solid state disk in the identity controller data structure of the solid state disk that needs to create the target namespace.

[0064] In the embodiment, the data protection manners of different reliability levels (such as optional reliability levels, target reliability levels) are different. The reliability level can be described by means of N+M. Wherein, N represents a first quantity, and M represents a second quantity. The first quantity N is used to indicate the number of physical blocks in a disk array (Disk Array, which is a short form of Redundant Array of Independent Disk (RAID)) corresponding to a target namespace. The block is the smallest storage unit in an SSD, which can be a basic erasable unit on a NAND Flash. The second quantity M is used to indicate the number of physical blocks in the physical blocks of the disk array for redundancy check. The second quantity M blocks are used to store check data to realize redundancy check. The second quantities corresponding to different target reliability levels are different. For example, refer to Table 1 below. The greater the second quantity M is, the more blocks are used to store check data, and the higher the reliability of data storage is.

[0065] Table 1: Reliability level example

[0066]

[0067] In some embodiments, the “N+M” in the optional reliability level can be described by means of Table 1, and the value range of the first quantity N and the second quantity M can also be described. For example, N can be 8-128, and M can be 0-3.

[0068] In the embodiment, the optional flash translation layer size (also referred to as optional FTL size) of the solid state disk can refer to the size of the flash translation layer (Flash Translation Layer, FTL) that the solid state disk can support. The FTL is used to store the mapping relationship between the logical page address (Logical Page Address, LPA, which is used to manage 4KB or 8KB data) and the physical page number (Physical Page Number, PPN). For example, the optional FTL size of the solid state disk can be 4KB, 8KB, 16KB, 32KB, 64KB, 128KB, 256KB, 512KB, 1MB, etc., which is not limited in the present application.

[0069] In step S102, a target reliability level matching the reliability requirement of the data to be stored in the target namespace is determined from the selectable reliability levels according to the reliability requirement of the data to be stored in the target namespace, and the data protection manners of different target reliability levels are different. In this way, the target reliability level matching the reliability requirement of the data can be flexibly set for different service types of data, and targeted data protection can be realized for different service types of data.

[0070] In the embodiment, in step S102 or before step S102, the server can also determine the reliability requirement of the data according to the service type of the data to be stored in the target namespace. The service type can include metadata service, backup service, and video service. The data can include at least one of metadata, user data, and backup data. In some embodiments, the server itself or the server according to the user's setting can pre-set the correspondence between different service types of data and reliability requirements, and then the reliability requirement of the data can be determined according to the service type of the data in the target namespace. The reliability requirement can indicate the minimum reliability level or the minimum value of the second number M required to ensure the storage reliability in the data storage of the target namespace.

[0071] In the embodiment, after the server determines the reliability requirement of the data to be stored in the target namespace, one selectable reliability level with reliability equal to or higher than the reliability requirement can be directly determined as the target reliability level from the selectable reliability levels supported by the solid state disk. For example, assuming that the target namespace needs to store metadata and the corresponding reliability requirement is that the minimum value of the second number M is 2, and the selectable reliability levels are three with M values of 0, 1, and 2, the selectable reliability level with M = 2 can be directly determined as the target reliability level. In the case of three selectable reliability levels with M values of 0, 2, and 3, the selectable reliability level with M = 2 or M = 3 can be directly determined as the target reliability level.

[0072] In some embodiments, the server can also directly determine the target reliability level selected by the user from the selectable reliability levels according to the user's selection, realize the user's autonomous selection of the target reliability level, and increase the flexibility of the target reliability level setting. And through the user's setting of the target reliability level, the data can also be more appropriately protected, and the data reliability can be improved.

[0073] In step S103, the server determines a target flash translation layer size (also referred to as a target FTL size) from the selectable flash translation layer sizes according to the size of each write operation (i.e., write IO) to be issued to the target namespace, and the target flash translation layer size is less than or equal to the size of a preset proportion of the write operations.

[0074] In the embodiment, after the server determines the target namespace, the server further counts and predicts the sizes of the subsequent write IOs to be issued on the target namespace, and determines a target write IO size based on a preset proportion (e.g., 90%, 85%, etc.). The target write IO size is smaller than the write IO size of the preset proportion of the multiple write IOs to be issued on the target namespace. For example, if the preset proportion is 90%, at least 90% of the multiple write IOs to be issued on the target namespace have a size greater than the target write IO size. Then, the server selects an optional flash translation layer size greater than or equal to the target write IO size from the multiple optional flash translation layer sizes and determines the target flash translation layer size based on the target write IO size.

[0075] In some embodiments, the target flash translation layer size can also be determined based on a service type. For example, the target FTL size of metadata service can be set to 4 KB, the target FTL size of backup service can be set to 64 KB FTL, and the target FTL size of video service can be set to 1 MB. Those skilled in the art can set the determination manner of the target FTL size according to actual needs, which is not limited in the present application.

[0076] In the embodiment, the preset proportion is set to improve the data write efficiency and speed of the target namespace. For example, assuming that the target FTL size is 64 KB, if there is a write IO smaller than 64 KB to be issued to the corresponding target namespace, since the solid state disk performs data write in a granularity of 64 KB (the target FTL size) as a basic management unit, the solid state disk needs to read out all the 64 KB data at the corresponding position, merge the new write data with the original 64 KB data at the corresponding position, and then write the merged data to the solid state disk, otherwise the logical address to physical address mapping management cannot be completed. By setting the preset proportion, most write IOs issued to the target namespace do not need to perform the above-mentioned merging write operation, which saves time and improves the data write efficiency and speed.

[0077] In the embodiment, the table size of the mapping table of the FTL depends on the capacity of the solid state disk, and the table size of the FTL mapping table of the target namespace can be determined according to the size of the target namespace and the target FTL size. For example, if the target FTL size of the target namespace is 64 KB and the size of the target namespace is 64 GB, the table size of the FTL mapping table of the target namespace can be (64 GB / 64 KB)*4 B=4 MB. Here, 4 B means that in the FTL mapping table, 4 B is needed to save the corresponding physical address when 64 KB of data is mapped from a logical address to a physical address. The larger the granularity of the target FTL size, the smaller the memory occupied by the FTL mapping table, and the memory resource overhead can be reduced. Therefore, when selecting the target FTL size for the target namespace, a relatively large selectable FTL size can be selected as the target FTL size if permitted.

[0078] In the embodiment, step S102 and step S103 can be executed in the order of S102 followed by S103, or in the order of S103 followed by S102, or simultaneously, which can be set according to actual needs, and the present application does not limit this. Figure 2

[0079] In step S104, a creation request is generated according to the space basic information required for creating the target namespace, the target reliability level, and the target FTL size, and the creation request is sent to the controller of the corresponding solid state disk, wherein the creation request carries the space basic information, the target reliability level, and the target FTL size.

[0080] In the embodiment, the server can determine the space basic information of the target namespace based on user selection or task requirement after determining that the target namespace needs to be created. The space basic information can be basic information required for creating the target namespace, such as the size of the target namespace, the sector format, the data integrity protection format (DIF), etc., and the present application does not limit this. The DIF is used to protect the integrity and consistency of data by adding check data and other information to the data. The DIF is mainly used to prevent and detect static data damage, including data damage caused by hardware failure and software bug on the data channel, and data errors that cannot be detected and corrected by the disk, etc.

[0081] In step S201, the controller receives the creation request from the server, and then obtains the target reliability level, the target FTL size, and the space basic information of the target namespace in the creation request.

[0082] ​In the embodiment, after the controller receives the creation request sent by the server, it can be determined that a new namespace needs to be created, and then the space basic information, the target reliability level and the target flash translation layer size carried in the creation request are obtained.

[0083] In step S202, the controller allocates a plurality of physical blocks to the target namespace according to the target reliability level and the space basic information, and creates a disk array of the target namespace according to the plurality of physical blocks.

[0084] In the embodiment, the controller can allocate N+M physical blocks to the target namespace according to the target reliability level N+M and the space basic information. In the embodiment, the target reliability level is a reliability level selected by the server from the optional reliability levels supported by the solid state disk and matched with the reliability requirement of the data to be stored by the target namespace, and the determination process is described above in step S102. The controller can further create a disk array of the target namespace according to the N+M physical blocks, and in subsequent applications, the data write task issued to the target namespace can be written into the created disk array. In this way, the disk array matched with the reliability requirement of the data can be flexibly created for different types of data, the targeted data protection for different types of data is realized, and the data reliability is improved.

[0085] In step S203, the controller manages the mapping between the logical address and the physical address of the target namespace according to the target flash translation layer size.

[0086] In the embodiment, the mapping management of the logical address and the physical address of the target namespace according to the target flash translation layer size by the controller can mean that when the controller subsequently receives the write IO issued by the server, the data is written according to the target FTL size, and the corresponding mapping table is created or modified. If the size of the write IO is greater than the target FTL size, the data can be directly written; if the size of the write IO is less than the target FTL size, the data of the target FTL size at the corresponding position needs to be read out first, and then the new written data is merged (the data at the corresponding position of the original target FTL size is covered by the new written data), and then the merged data is written again.

[0087] In the embodiment, steps S202 and S203 can be executed synchronously or sequentially, and the execution order between S202 and S203 can be set by those skilled in the art according to actual needs, and the present application does not limit this.

[0088] For example, Figure 3A schematic diagram of a solid state disk namespace according to an embodiment of the present application is shown. The namespace management method provided by the embodiment of the present application can be used in the solid state disk shown in Figure 3 Different namespaces are created in the solid state disk shown. As shown in Figure 3 The solid state disk includes namespace 1, namespace 2, namespace 3, and so on, and different namespaces are provided with corresponding target reliability levels and target flash translation layer sizes. For example, the target flash translation layer size of namespace 1 is 4 KB, and the target reliability level is N+3; the target flash translation layer size of namespace 2 is 64 KB, and the target reliability level is N+1; and the target flash translation layer size of namespace 3 is 1 MB, and the target reliability level is N+0. Then, mapping of logical addresses to physical addresses is implemented respectively.

[0089] An embodiment of the present application provides a namespace management device, which is applied to a controller 201 in the solid state disk 200, and includes:

[0090] A request receiving module, configured to receive a creation request from a server, wherein the creation request carries a target reliability level, a target flash translation layer size, and space basic information of a target namespace to be created;

[0091] An array creating module, configured to allocate a plurality of physical blocks to the target namespace according to the target reliability level and the space basic information, and create a disk array of the target namespace according to the plurality of physical blocks;

[0092] A mapping management module, configured to manage mapping between logical addresses and physical addresses of the target namespace according to the target flash translation layer size;

[0093] Wherein, data protection manners of different target reliability levels are different.

[0094] In a possible implementation, the target reliability level is a reliability level selected by the server from optional reliability levels supported by the solid state disk, and the reliability level matches a reliability requirement of data to be stored by the target namespace.

[0095] In a possible implementation, the reliability requirement of data is determined by the server according to a service type corresponding to the data, and the data includes at least one of metadata, user data, and backup data.

[0096] In a possible implementation, the target reliability level includes a first quantity and a second quantity, the first quantity is used to indicate a quantity of physical blocks in the disk array, and the second quantity is used to indicate a quantity of physical blocks used for redundancy check in the physical blocks of the disk array, and different target reliability levels correspond to different second quantities.

[0097] In a possible implementation, the target flash translation layer size is determined by the server according to sizes of each write operation required by the target namespace and optional flash translation layer sizes supported by the solid state disk, and the target flash translation layer size is smaller than or equal to a size of a write operation in a preset proportion of multiple write operations.

[0098] The implementation manners and beneficial effects of the modules and sub-modules of the namespace management apparatus applied to the solid state disk controller provided by the embodiments of the present application can refer to the related descriptions of the corresponding steps in the above-mentioned namespace management method applied to the solid state disk controller, and are not described herein again to avoid redundancy.

[0099] The embodiments of the present application provide a namespace management apparatus applied to a server 100 issuing a creation request to a solid state disk 200, and the apparatus includes:

[0100] An information acquisition module is configured to acquire an optional flash translation layer size and an optional reliability level supported by a solid state disk requiring to create a target namespace;

[0101] A level determination module is configured to determine a target reliability level matched with a reliability requirement of data requiring to be stored in the target namespace from the optional reliability levels according to the reliability requirement, and different target reliability levels correspond to different data protection manners;

[0102] A size determination module is configured to determine a target flash translation layer size from the optional flash translation layer sizes according to sizes of each write operation requiring to be issued to the target namespace, and the target flash translation layer size is smaller than or equal to a size of a write operation in a preset proportion of multiple write operations;

[0103] A creation request module is configured to generate a creation request according to space basic information required for creating the target namespace, the target reliability level and the target flash translation layer size, and send the creation request to a controller of a corresponding solid state disk, and the creation request carries the space basic information, the target reliability level and the target flash translation layer size.

[0104] In a possible implementation, the apparatus further includes:

[0105] According to a business type of data stored into the target namespace as required, a reliability requirement of the data is determined, the data including at least one of metadata, user data, and backup data.

[0106] In a possible implementation, the target reliability level includes a first quantity and a second quantity, the first quantity is used to indicate a quantity of physical blocks in a disk array corresponding to the target namespace, and the second quantity is used to indicate a quantity of physical blocks used for redundancy check in the physical blocks of the disk array, and the second quantity corresponding to different target reliability levels is different.

[0107] In a possible implementation, the optional flash translation layer size and the optional reliability level supported by the solid state disk requiring to create the target namespace are acquired, including:

[0108] The optional flash translation layer size and the optional reliability level supported by the solid state disk requiring to create the target namespace are queried from controller data of the solid state disk.

[0109] The implementation manners and beneficial effects of the modules and sub-modules of the namespace management apparatus applied to the server provided by the embodiments of the present application can refer to the related descriptions of the corresponding steps in the above-mentioned namespace management method applied to the server, and are not redundant, and thus are not described herein.

[0110] The present application also provides a solid state disk, including a controller, the controller is used for executing the above-mentioned namespace management method executed by the controller.

[0111] The embodiments of the present application provide a namespace management apparatus, including a processor and a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement the above-mentioned method.

[0112] The embodiments of the present application provide a non-volatile computer readable storage medium, which stores computer program instructions, and the computer program instructions are executed by a processor to implement the above-mentioned method.

[0113] The embodiments of the present application provide a computer program product, including computer readable code or a non-volatile computer readable storage medium carrying computer readable code, when the computer readable code is run in a processor of an electronic device, the processor in the electronic device executes the above-mentioned method.

[0114] Computer readable storage media can be tangible storage devices that can retain and store instructions for use by an instruction execution device. Computer readable storage media can be, for example, but is not limited to, electronic storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer readable storage media include the following: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital video disc (DVD), a memory stick, a floppy disk, a mechanically encoded device such as punch-cards or raised structures in a groove having instructions recorded thereon, and any suitable combination of the foregoing. A computer readable storage medium can be any tangible storage device that can retain and store instructions for use by an instruction execution device.

[0115] Computer readable program instructions or code can be downloaded to a starting device, to another computer or device via a network, for example, the Internet, a local area network, a wide area network and / or a wireless network. The network can comprise copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers and / or edge servers. A remote server can store software programs, code or programs designed to carry out the processes described herein and provide the software to the user device(s) either for processing or installing.

[0116] Computer readable program instructions for carrying out operations of the present application can be assembly instructions, instruction-set-architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state-setting data, or either source code or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C++ or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer readable program instructions can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider). In some embodiments, electronic circuitry including, for example, programmable logic circuitry, field-programmable gate array (FPGA), or programmable logic array (PLA) can execute the computer readable program instructions by utilizing state information of the computer readable program instructions to personalize the electronic circuitry, in order to perform aspects of the present application.

[0117] The computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other device to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.

[0118] These computer readable program instructions can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks. These computer readable program instructions can also be stored in a computer readable storage medium that can include random access memory (RAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other data storage device. When the computer readable program instructions are loaded into the computer and other programmable data processing apparatus, a series of operational steps are implemented that provide processes such that the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.

[0119] The computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus or other device to produce a computer implemented process such that the instructions which execute on the computer, other programmable data processing apparatus, or other device implement the functions / acts specified in the flowchart and / or block diagram block or blocks.

[0120] The flow diagrams and the block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatuses, systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flow diagrams and the block diagrams can represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical functions (s). In some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks can sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and / or flowchart illustrations, and combinations of blocks in the block diagrams and / or flowchart illustrations, can be implemented by special purpose hardware-based systems that perform the specified functions or acts.

[0121] It is also noted that each of the blocks of the block diagrams and / or flowchart illustrations, and combinations of blocks in the block diagrams and / or flowchart illustrations, can be implemented by hardware, software, firmware, or a combination thereof, as appropriate. It is also noted that each of the blocks of the block diagrams and / or flowchart illustrations, and combinations of blocks in the block diagrams and / or flowchart illustrations, can be implemented by special purpose hardware-based systems that perform the specified functions or acts.

[0122] Although the present application has been described in connection with various embodiments thereof, those skilled in the art will understand that many modifications can be made thereto without departing from the application as set forth in the claims. In the claims, the word "comprising" does not exclude other elements or steps, and the indefinite articles "a" or "an" do not exclude a plurality. A single processor or other unit can fulfil the functions of several items recited in the claims. The mere fact that certain measures are recited in mutually different dependent claims does not indicate that a combination of these measures cannot be used to advantage. The reference signs in the claims should not be construed as limiting the scope of the application.

[0123] Having described various embodiments of the application, it is to be understood that the above description is meant not to limit and not to encompass all of the possible embodiments. Many modifications and variations of this application can be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. It is intended that the scope of the application be defined by the scope of the patent and by the claims as allowed by the patent office, which can include adaptations based on the description, equivalents, and / or substitutions of elements individually or collectively to the entire disclosure.

Claims

1. A namespace management method characterized by, The method applied to a controller in a solid state disk comprises: receiving a creation request from a server, the creation request carrying a target reliability level, a target flash translation layer size and space basic information of a target namespace to be created; allocating a plurality of physical blocks to the target namespace according to the target reliability level and the space basic information, and creating a disk array of the target namespace according to the plurality of physical blocks; managing mapping between logical addresses and physical addresses of the target namespace according to the target flash translation layer size; wherein data protection manners of different target reliability levels are different.

2. The method of claim 1, wherein, The target reliability level is a reliability level selected by the server from optional reliability levels supported by the solid state disk and matching a reliability requirement of data to be stored in the target namespace.

3. The method of claim 2, wherein, The reliability requirement of the data is determined by the server according to a service type of the data, and the data comprises at least one of metadata, user data and backup data.

4. The method of claim 1, wherein, The target reliability level comprises a first quantity and a second quantity, the first quantity is used to indicate a quantity of physical blocks in the disk array, and the second quantity is used to indicate a quantity of physical blocks for redundancy check in the physical blocks of the disk array, and the second quantity corresponding to different target reliability levels is different.

5. The method of claim 1, wherein, The target flash translation layer size is determined by the server according to a size of each write operation required by the target namespace and optional flash translation layer sizes supported by the solid state disk, and the target flash translation layer size is less than or equal to a size of a write operation of a preset proportion in a plurality of write operations.

6. A namespace management method characterized by comprising: The method applied to a server for issuing a creation request to a solid state disk comprises: obtaining optional flash translation layer sizes and optional reliability levels supported by a solid state disk requiring to create a target namespace; determining a target reliability level matching a reliability requirement of data to be stored in the target namespace from the optional reliability levels according to the reliability requirement, and data protection manners of different target reliability levels are different; determining a target flash translation layer size from the optional flash translation layer sizes according to a size of each write operation to be issued to the target namespace, and the target flash translation layer size is less than or equal to a size of a write operation of a preset proportion in a plurality of write operations; generating a creation request according to space basic information required for creating the target namespace, the target reliability level and the target flash translation layer size, and sending the creation request to a controller of a corresponding solid state disk, the creation request carrying the space basic information, the target reliability level and the target flash translation layer size.

7. The method of claim 6, wherein, The method further comprises: determining the reliability requirement of the data according to a service type of the data to be stored in the target namespace, and the data comprises at least one of metadata, user data and backup data.

8. The method of claim 6, wherein, The target reliability level includes a first quantity and a second quantity, the first quantity is used to indicate a quantity of physical blocks in a disk array corresponding to the target namespace, and the second quantity is used to indicate a quantity of physical blocks used for redundancy check in the physical blocks of the disk array, and the second quantities corresponding to different target reliability levels are different.

9. The method of claim 6, wherein, The optional flash translation layer size and the optional reliability level supported by the solid state disk requiring the target namespace to be created are acquired, including: The optional flash translation layer size and the optional reliability level supported by the solid state disk requiring the target namespace to be created are queried from controller data of the solid state disk.

10. A namespace management apparatus characterized by comprising: The controller applied in the solid state disk includes: A request receiving module is configured to receive a creation request from a server, the creation request carrying a target reliability level, a target flash translation layer size and space basic information of a target namespace requiring to be created; An array creating module is configured to allocate a plurality of physical blocks for the target namespace according to the target reliability level and the space basic information, and create a disk array of the target namespace according to the plurality of physical blocks; A mapping management module is configured to manage mapping between a logical address and a physical address of the target namespace according to the target flash translation layer size. The data protection manners of different target reliability levels are different.

11. The apparatus of claim 10, wherein, The target reliability level is a reliability level selected by the server from the optional reliability levels supported by the solid state disk and matched with a reliability requirement of data to be stored in the target namespace.

12. The apparatus of claim 11, wherein, The reliability requirement of the data is determined by the server according to a business type corresponding to the data, and the data includes at least one of metadata, user data and backup data.

13. The apparatus of claim 10, wherein, The target reliability level includes a first quantity and a second quantity, the first quantity is used to indicate a quantity of physical blocks in a disk array corresponding to the target namespace, and the second quantity is used to indicate a quantity of physical blocks used for redundancy check in the physical blocks of the disk array, and the second quantities corresponding to different target reliability levels are different.

14. The apparatus of claim 10, wherein, The target flash translation layer size is determined by the server according to a size of each write operation required by the target namespace and the optional flash translation layer sizes supported by the solid state disk, and the target flash translation layer size is less than or equal to a size of a write operation of a preset proportion in a plurality of write operations.

15. A namespace management apparatus characterized by comprising: The server applied to issue a creation request to a solid state disk includes: An acquisition information module is configured to acquire an optional flash translation layer size and an optional reliability level supported by a solid state disk requiring a target namespace to be created; A determination level module is configured to determine a target reliability level matched with a reliability requirement of data to be stored in the target namespace from the optional reliability levels according to the reliability requirement, and data protection manners of different target reliability levels are different. The determining size module is configured to determine a target flash translation layer size from the selectable flash translation layer size according to a size of each write operation required to be issued to the target namespace, the target flash translation layer size being less than or equal to a size of a preset proportion of write operations in the plurality of write operations. The creating request module is configured to generate a creating request according to space basic information required for creating the target namespace, the target reliability level, and the target flash translation layer size, and send the creating request to a controller of a corresponding solid state disk, the creating request carrying the space basic information, the target reliability level, and the target flash translation layer size.

16. The apparatus of claim 15, wherein, The apparatus further includes: The requirement determining module is configured to determine a reliability requirement of data required to be stored in the target namespace according to a service type of the data, the data including at least one of metadata, user data, and backup data.

17. The apparatus of claim 15, wherein, The target reliability level includes a first number and a second number, the first number being used to indicate a number of physical blocks in a disk array corresponding to the target namespace, and the second number being used to indicate a number of physical blocks used for redundancy check in the physical blocks of the disk array, the second number being different for different target reliability levels.

18. The apparatus of claim 15, wherein, The selectable flash translation layer size and the selectable reliability level supported by the solid state disk required to create the target namespace are obtained by: The selectable flash translation layer size and the selectable reliability level supported by the solid state disk are queried from controller data of the solid state disk required to create the target namespace.

19. A namespace management apparatus characterized by comprising: The apparatus includes: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to implement the method of any one of claims 1-5, or implement the method of any one of claims 6-9 when executing the instructions.

20. A non-transitory computer readable storage medium having stored thereon computer program instructions, wherein, The computer program instructions, when executed by the processor, implement the method of any one of claims 1-5, or implement the method of any one of claims 6-9.

21. A computer program product comprising computer readable code, or a non-transitory computer readable storage medium having computer readable code embodied thereon, the computer readable code comprising instructions for causing a computer to perform the method of any one of claims 1 to 20. When the computer readable code is running in the electronic device, the processor in the electronic device executes the method of any one of claims 1-5, or implements the method of any one of claims 6-9.

Citation Information

Patent Citations

  • Method for providing different data protection levels for multiple namespaces and storage device

    CN113051189A

  • Policy-driven file system with integrated RAID functionality

    US20050132212A1