CN113590032A - Method, device and equipment for creating name space of solid state disk and readable storage medium - Google Patents

Method, device and equipment for creating name space of solid state disk and readable storage medium Download PDF

Info

Publication number
CN113590032A
CN113590032A CN202110744599.XA CN202110744599A CN113590032A CN 113590032 A CN113590032 A CN 113590032A CN 202110744599 A CN202110744599 A CN 202110744599A CN 113590032 A CN113590032 A CN 113590032A
Authority
CN
China
Prior art keywords
solid state
state disk
target
name space
creating
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110744599.XA
Other languages
Chinese (zh)
Inventor
王萌萌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN202110744599.XA priority Critical patent/CN113590032A/en
Publication of CN113590032A publication Critical patent/CN113590032A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method for creating a name space of a solid state disk, which comprises the following steps: analyzing the received solid state disk name space creating request to obtain the target space size information of the target solid state disk name space to be created; calculating the target number of the preset solid state disk name space management basic units occupied by the target space size information; searching target solid state disk name space management basic units with the target number in an undivided state from a preset logical address bitmap; and establishing and obtaining the name space of the target solid state disk by using the name space management basic units of the target solid state disks. By applying the method for creating the name space of the solid state disk, the success rate of creating the name space of the solid state disk is greatly improved, and the utilization rate of the logic address of the solid state disk is improved. The invention also discloses a device, equipment and a storage medium for creating the name space of the solid state disk, and the device, the equipment and the storage medium have corresponding technical effects.

Description

Method, device and equipment for creating name space of solid state disk and readable storage medium
Technical Field
The present invention relates to the field of storage technologies, and in particular, to a method, an apparatus, a device, and a computer-readable storage medium for creating a name space of a solid state disk.
Background
Partitioning the solid state disk may be required when reading and writing data using the solid state disk, and creating a solid state disk name space (SSD NAMESPACE) when partitioning the solid state disk.
In the prior art, a solid state disk name space is created by using continuous solid state disk logical addresses (LBAs) in a solid state disk, and with the creation and deletion of the solid state disk, a plurality of discontinuous solid state disk logical addresses appear in the solid state disk, which easily causes low success rate of creating the solid state disk name space and low utilization rate of the solid state disk logical addresses.
In summary, how to effectively solve the problems of low success rate of creating the name space of the solid state disk, low utilization rate of the logical address of the solid state disk, and the like is a problem that needs to be solved urgently by those skilled in the art at present.
Disclosure of Invention
The invention aims to provide a method for creating a name space of a solid state disk, which greatly improves the success rate of creating the name space of the solid state disk and improves the utilization rate of a logic address of the solid state disk; another object of the present invention is to provide a device, an apparatus and a computer-readable storage medium for creating a namespace of a solid state disk.
In order to solve the technical problems, the invention provides the following technical scheme:
a method for creating a name space of a solid state disk comprises the following steps:
analyzing the received solid state disk name space creating request to obtain the target space size information of the target solid state disk name space to be created;
calculating the target number of the preset solid state disk name space management basic units occupied by the target space size information;
searching the target solid state disk name space management basic units with the target number in an undivided state from a preset logic address bitmap;
and establishing and obtaining the name space of the target solid state disk by using each name space management basic unit of the target solid state disk.
In a specific embodiment of the present invention, after creating and obtaining the target solid state disk name space by using each target solid state disk name space management basic unit, the method further includes:
and recording each target solid state disk name space management basic unit occupied by the target solid state disk name space by using the logical address bitmap.
In a specific embodiment of the present invention, recording, by using the logical address bitmap, each target solid state disk namespace management basic unit occupied by the target solid state disk namespace, includes:
setting a target array structure corresponding to the target solid state disk name space in the logical address bitmap as an enable bit to obtain a mapping relation between the target solid state disk name space and each solid state disk logical address;
and setting corresponding bits corresponding to the target solid state disk name space management basic units in the array occupied by the preset basic units in the logical address bitmap to be in a divided state.
In a specific embodiment of the present invention, after setting corresponding bits respectively corresponding to each of the target solid state disk namespace management basic units in a basic unit occupation array preset in the logical address bitmap to be in a divided state, the method further includes:
receiving an access request for the target solid state disk name space;
analyzing the access request to obtain a logical address of the target solid state disk to be accessed;
and searching the target solid state disk logic address according to the mapping relation in the target array structure, and performing access operation on the target solid state disk logic address.
In a specific embodiment of the present invention, after setting corresponding bits respectively corresponding to each of the target solid state disk namespace management basic units in a basic unit occupation array preset in the logical address bitmap to be in a divided state, the method further includes:
receiving a deleting instruction of the target solid state disk name space;
carrying out bit-by-bit negation on the enable bit in the target array structure to obtain a non-enable bit;
performing AND operation on the non-enabled bit and corresponding bits corresponding to the target solid state disk name space management basic units in the array occupied by the basic units to obtain an operation result;
and updating the array occupied by the basic unit according to the operation result.
An apparatus for creating a name space of a solid state disk, comprising:
the space size obtaining module is used for analyzing the received solid state disk name space creating request to obtain the target space size information of the target solid state disk name space to be created;
the basic unit number calculating module is used for calculating the target number of the preset solid state disk name space management basic units occupied by the target space size information;
the basic unit searching module is used for searching the name space management basic units of the target solid state disks, the number of which is in an undivided state, from a preset logic address bitmap;
and the name space creating module is used for creating the name space of the target solid state disk by using each name space management basic unit of the target solid state disk.
In one embodiment of the present invention, the method further comprises:
and the basic unit occupation recording module is used for recording each target solid state disk name space management basic unit occupied by the target solid state disk name space by using the logic address bitmap after the target solid state disk name space is created by using each target solid state disk name space management basic unit.
In an embodiment of the present invention, the basic unit occupation recording module includes:
a mapping relation obtaining submodule, configured to set a target array structure corresponding to the target solid state disk name space in the logical address bitmap as an enable bit, and obtain a mapping relation between the target solid state disk name space and each solid state disk logical address;
and the basic unit occupation array bit setting submodule is used for setting corresponding bits corresponding to each target solid state disk name space management basic unit in a preset basic unit occupation array in the logic address bitmap into a divided state.
A solid state disk name space creating device comprises:
a memory for storing a computer program;
and the processor is used for realizing the steps of the method for creating the name space of the solid state disk when executing the computer program.
A computer-readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the method for creating a namespace of a solid state disk as described above.
The method for creating the name space of the solid state disk comprises the steps of analyzing a received name space creating request of the solid state disk to obtain target space size information of a target name space of the solid state disk to be created; calculating the target number of the preset solid state disk name space management basic units occupied by the target space size information; searching target solid state disk name space management basic units with the target number in an undivided state from a preset logical address bitmap; and establishing and obtaining the name space of the target solid state disk by using the name space management basic units of the target solid state disks.
According to the technical scheme, the logic address bitmap is preset, the dividing state information of the solid state disk name space management basic units is recorded in the logic address bitmap, after the target number of the solid state disk name space management basic units required to be occupied by the target solid state disk name space to be created is obtained through calculation, the target solid state disk name space management basic units with the target number in an undivided state are searched from the logic address bitmap, and the target solid state disk name space is created by utilizing the target solid state disk name space management basic units, so that the discontinuous solid state disk logic addresses are effectively utilized, the success rate of creating the solid state disk name space is greatly improved, and the utilization rate of the solid state disk logic addresses is improved.
Correspondingly, the invention also provides a device, equipment and a computer readable storage medium for creating the name space of the solid state disk, which correspond to the method for creating the name space of the solid state disk, and the technical effects are achieved, and the description is omitted herein.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of an implementation of a method for creating a namespace of a solid state disk according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating another implementation of a method for creating a namespace of a solid state drive according to an embodiment of the present invention;
fig. 3 is a block diagram of a device for creating a namespace of a solid state disk according to an embodiment of the present invention;
fig. 4 is a block diagram of a device for creating a namespace of a solid state disk according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a device for creating a name space of a solid state disk according to this embodiment.
Detailed Description
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a flowchart of an implementation of a method for creating a namespace of a solid state disk in an embodiment of the present invention, where the method may include the following steps:
s101: and analyzing the received solid state disk name space creating request to obtain the size information of the target space of the target solid state disk name space to be created.
When the solid state disk name space is required to be created, if the solid state disk is required to be partitioned, a solid state disk name space creating request is generated, and the solid state disk name space creating request contains the size information of the target space of the target solid state disk name space to be created. And sending a solid state disk name space creating request to a solid state disk name space management center, receiving the solid state disk name space creating request by the solid state disk name space management center, and analyzing the received solid state disk name space creating request to obtain the target space size information of the target solid state disk name space to be created.
S102: and calculating the target number of the preset solid state disk name space management basic units occupied by the target space size information.
Dividing the solid state disk into a preset number of solid state disk name space management basic UNITs LBA _ UNIT, and storing the space size information of each solid state disk name space management basic UNIT in advance, after the solid state disk name space management center obtains the target space size information of the target solid state disk name space to be created through analysis, calculating the target number of the preset solid state disk name space management basic UNITs occupied by the target space size information.
For example, the solid state disk can be divided into 128 solid state disk namespace management basic units in advance, and a logical address bitmap array of 4 DWORDs is established to record the use condition of each solid state disk namespace management basic unit. And if the total space SIZE of the solid state disks is USER _ SIZE, the space SIZE of each solid state disk name space management basic unit is USER _ SIZE/128. After the obtained target space SIZE information NAMESPACE _ SIZE of the target solid state disk name space to be created is analyzed, the target number of the preset solid state disk name space management basic units occupied by the target space SIZE information is calculated and obtained in a round-up round (NAMESPACE _ SIZE, USER _ SIZE/128) mode.
S103: and searching target solid state disk name space management basic units with the target number in an undivided state from a preset logical address bitmap.
The logical address BITMAP LBA _ BITMAP records the division status information of the solid state disk namespace management basic units. After the target number of the preset solid state disk name space management basic units occupied by the target space size information is obtained through calculation, the target solid state disk name space management basic units of which the target number is in an undivided state (UNALLOC) are searched from a preset logic address bitmap. The searched target solid state disk name space management basic unit with the target number in the non-divided state can be composed of continuous solid state disk logic addresses or discontinuous solid state disk logic addresses.
S104: and establishing and obtaining the name space of the target solid state disk by using the name space management basic units of the target solid state disks.
And after the target solid state disk name space management basic units with the target number in the non-divided state are found, establishing and obtaining the target solid state disk name space by utilizing each target solid state disk name space management basic unit. The division state information of the solid state disk name space management basic units is recorded by presetting the logical address bitmap, so that when the target solid state disk name space is created, only a target number of target solid state disk name space management basic units which are not divided are selected from the logical address bitmap, and the continuity among the target solid state disk name space management basic units is not required to be considered, so that the discontinuous solid state disk logical addresses are effectively utilized, the success rate of creating the solid state disk name space is greatly improved, and the utilization rate of the solid state disk logical addresses is improved.
According to the technical scheme, the logic address bitmap is preset, the dividing state information of the solid state disk name space management basic units is recorded in the logic address bitmap, after the target number of the solid state disk name space management basic units required to be occupied by the target solid state disk name space to be created is obtained through calculation, the target solid state disk name space management basic units with the target number in an undivided state are searched from the logic address bitmap, and the target solid state disk name space is created by utilizing the target solid state disk name space management basic units, so that the discontinuous solid state disk logic addresses are effectively utilized, the success rate of creating the solid state disk name space is greatly improved, and the utilization rate of the solid state disk logic addresses is improved.
It should be noted that, based on the above embodiments, the embodiments of the present invention also provide corresponding improvements. In the following embodiments, steps that are the same as or correspond to those in the above embodiments may be referred to one another, and corresponding advantageous effects may also be referred to one another, which is not described in detail in the following modified embodiments.
Referring to fig. 2, fig. 2 is a flowchart of another implementation method of a method for creating a namespace of a solid state disk in an embodiment of the present invention, where the method may include the following steps:
s201: and analyzing the received solid state disk name space creating request to obtain the size information of the target space of the target solid state disk name space to be created.
S202: and calculating the target number of the preset solid state disk name space management basic units occupied by the target space size information.
S203: and searching target solid state disk name space management basic units with the target number in an undivided state from a preset logical address bitmap.
S204: and establishing and obtaining the name space of the target solid state disk by using the name space management basic units of the target solid state disks.
S205: and recording each target solid state disk name space management basic unit occupied by the target solid state disk name space by using the logical address bitmap.
After the target solid state disk name space is created and obtained, the logical address bitmap is used for recording each target solid state disk name space management basic unit occupied by the target solid state disk name space, and therefore the logical address bitmap can be updated timely according to the change of the division state of each target solid state disk name space management basic unit.
In one embodiment of the present invention, step S205 may include the following steps:
the method comprises the following steps: setting a target array structure corresponding to a target solid state disk name space in a logical address bitmap as an enable bit to obtain a mapping relation between the target solid state disk name space and each solid state disk logical address;
step two: and setting corresponding bits corresponding to the name space management basic units of each target solid state disk in the array occupied by the basic units preset in the logical address bitmap to be in a divided state.
For convenience of description, the above two steps may be combined for illustration.
The array structure of the logical address BITMAP is preset, for example, the array structure can be set to be 1+ MAX _ NAMESPACE arrays in total, the array LBA _ BITMAP [0] can be set as a basic unit occupation array, and the basic unit occupation array records the condition that all solid state disk name spaces use the solid state disk name space management basic unit. LBA _ BITMP [1] -LBA _ BITMP [ MAX _ NAMESPACE ] corresponds to the situation that each solid state disk name space uses the solid state disk name space management basic unit, and each bit of the array value represents whether the solid state disk name space management basic unit of the current serial number has been allocated and used by the solid state disk name space.
Therefore, after the target solid state disk name space is created and obtained, the target array structure corresponding to the target solid state disk name space in the logical address bitmap is set as an enable bit, and the mapping relation between the target solid state disk name space and the logical addresses of the solid state disks is obtained. And setting corresponding bits respectively corresponding to the target solid state disk name space management basic units in the array occupied by the preset basic units in the logical address bitmap as divided states (ALLOC), thereby realizing the recording of the target solid state disk name space management basic units occupied by the target solid state disk name space and realizing the timely and effective updating of the divided states of the solid state disk name space management basic units in the logical address bitmap.
In a specific embodiment of the present invention, after setting corresponding bits respectively corresponding to target solid state disk name space management basic units in a basic unit occupation array preset in a logical address bitmap to be in a divided state, the method may further include the following steps:
the method comprises the following steps: receiving an access request for a target solid state disk name space;
step two: analyzing the access request to obtain a logical address of the target solid state disk to be accessed;
step three: and searching a target solid state disk logic address according to the mapping relation in the target array structure, and performing access operation on the target solid state disk logic address.
For convenience of description, the above three steps may be combined for illustration.
When a target solid state disk name space created in advance needs to be accessed, for example, when the target solid state disk name space needs to be read or written, an access request to the target solid state disk name space is generated, the access request includes a logical address of the target solid state disk to be accessed, and the access request is sent to a solid state disk name space management center. And the solid state disk name space management center receives the access request and analyzes the access request to obtain a target solid state disk logic address to be accessed. And after the target solid state disk logical address to be accessed is obtained through analysis, the target solid state disk logical address is searched according to the mapping relation in the target array structure, and the target solid state disk logical address is accessed, so that the target solid state disk name space is effectively accessed.
In a specific embodiment of the present invention, after setting corresponding bits respectively corresponding to target solid state disk name space management basic units in a basic unit occupation array preset in a logical address bitmap to be in a divided state, the method may further include the following steps:
the method comprises the following steps: receiving a deleting instruction of a target solid state disk name space;
step two: carrying out bit-by-bit negation on an enable bit in the target array structure to obtain a non-enable bit;
step three: respectively and operating corresponding bits corresponding to the non-enabled bit and each target solid state disk name space management basic unit in the basic unit occupied array to obtain an operation result;
step four: and updating the array occupied by the basic unit according to the operation result.
For convenience of description, the above four steps may be combined for illustration.
When the pre-created target solid state disk name space needs to be deleted, bitwise negation is carried out on an enabling bit in the target array structure, and a non-enabling bit is obtained, wherein if the enabling bit is represented by 1, the non-enabling bit is represented by 0. And respectively carrying out AND operation on the non-enabled bit and corresponding bits corresponding to the target solid state disk name space management basic units in the basic unit occupied array to obtain an operation result, and updating the basic unit occupied array according to the operation result, so that the corresponding position of each target solid state disk name space management basic unit in the basic unit occupied array is 0, the target solid state disk name space is deleted, and the solid state disk logic address is recovered.
Corresponding to the above method embodiment, the present invention further provides a device for creating a name space of a solid state disk, and the device for creating a name space of a solid state disk described below and the method for creating a name space of a solid state disk described above may be referred to correspondingly.
Referring to fig. 3, fig. 3 is a block diagram of a device for creating a solid state disk name space according to an embodiment of the present invention, where the device may include:
a space size obtaining module 31, configured to analyze the received request for creating the name space of the solid state disk, so as to obtain target space size information of a target name space of the solid state disk to be created;
a basic unit number calculating module 32, configured to calculate a target number of a preset solid state disk name space management basic unit occupied by the target space size information;
a basic unit searching module 33, configured to search, from a preset logical address bitmap, a target solid state disk name space management basic unit whose target number is in an undivided state;
and a namespace creating module 34, configured to create a target solid state drive namespace by using each target solid state drive namespace management basic unit.
According to the technical scheme, the logic address bitmap is preset, the dividing state information of the solid state disk name space management basic units is recorded in the logic address bitmap, after the target number of the solid state disk name space management basic units required to be occupied by the target solid state disk name space to be created is obtained through calculation, the target solid state disk name space management basic units with the target number in an undivided state are searched from the logic address bitmap, and the target solid state disk name space is created by utilizing the target solid state disk name space management basic units, so that the discontinuous solid state disk logic addresses are effectively utilized, the success rate of creating the solid state disk name space is greatly improved, and the utilization rate of the solid state disk logic addresses is improved.
In one embodiment of the present invention, the apparatus may further include:
and the basic unit occupation recording module is used for recording the target solid state disk name space management basic units occupied by the target solid state disk name space by using the logical address bitmap after the target solid state disk name space is created by using the target solid state disk name space management basic units.
In one embodiment of the present invention, the basic unit occupation recording module includes:
the mapping relation obtaining submodule is used for setting a target array structure corresponding to the target solid state disk name space in the logic address bitmap as an enabling bit to obtain the mapping relation between the target solid state disk name space and each solid state disk logic address;
and the basic unit occupation array bit setting submodule is used for setting corresponding bits respectively corresponding to the target solid state disk name space management basic units in the basic unit occupation array preset in the logic address bitmap into a divided state.
In one embodiment of the present invention, the apparatus may further include:
the access request receiving module is used for receiving an access request to the name space of the target solid state disk after corresponding bits respectively corresponding to the name space management basic units of each target solid state disk in the array occupied by the basic units preset in the logical address bitmap are set to be in a divided state;
the logic address obtaining module is used for analyzing the access request to obtain a target solid state disk logic address to be accessed;
and the logical address access module is used for searching the logical address of the target solid state disk according to the mapping relation in the target array structure and performing access operation on the logical address of the target solid state disk.
In one embodiment of the present invention, the apparatus may further include:
a deleting instruction receiving module, configured to receive a deleting instruction for a target solid state disk name space after corresponding bits corresponding to each target solid state disk name space management basic unit in the array occupied by the basic unit preset in the logical address bitmap are set to be in a divided state;
the non-enable bit obtaining module is used for carrying out bit-by-bit negation on enable bits in the target array structure to obtain non-enable bits;
the operation result obtaining module is used for performing AND operation on the corresponding bits corresponding to the target solid state disk name space management basic units in the array occupied by the non-enabled bits and the basic units to obtain an operation result;
and the array updating module is used for updating the array occupied by the basic unit according to the operation result.
Corresponding to the above method embodiment, referring to fig. 4, fig. 4 is a schematic diagram of an apparatus for creating a solid state disk namespace provided by the present invention, where the apparatus may include:
a memory 332 for storing a computer program;
processor 322, configured to implement the steps of the method for creating a namespace of a solid state disk according to the above-described method embodiment when executing the computer program.
Specifically, referring to fig. 5, fig. 5 is a schematic diagram illustrating a specific structure of a device for creating a namespace of a solid state disk provided in this embodiment, where the device for creating a namespace of a solid state disk may generate a relatively large difference due to different configurations or performances, and may include a processor (CPU) 322 (e.g., one or more processors) and a memory 332, where the memory 332 stores one or more computer applications 342 or data 344. Memory 332 may be, among other things, transient or persistent storage. The program stored in memory 332 may include one or more modules (not shown), each of which may include a sequence of instructions operating on a data processing device. Still further, processor 322 may be configured to communicate with memory 332 to execute a series of instruction operations in memory 332 on solid state drive namespace creation device 301.
The solid state drive namespace creation device 301 may also include one or more power supplies 326, one or more wired or wireless network interfaces 350, one or more input-output interfaces 358, and/or one or more operating systems 341.
The steps in the method for creating a namespace of a solid state disk described above may be implemented by a structure of a device for creating a namespace of a solid state disk.
Corresponding to the above method embodiment, the present invention further provides a computer-readable storage medium having a computer program stored thereon, the computer program, when executed by a processor, implementing the steps of:
analyzing the received solid state disk name space creating request to obtain the target space size information of the target solid state disk name space to be created; calculating the target number of the preset solid state disk name space management basic units occupied by the target space size information; searching target solid state disk name space management basic units with the target number in an undivided state from a preset logical address bitmap; and establishing and obtaining the name space of the target solid state disk by using the name space management basic units of the target solid state disks.
The computer-readable storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
For the introduction of the computer-readable storage medium provided by the present invention, please refer to the above method embodiments, which are not described herein again.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device, the apparatus and the computer-readable storage medium disclosed in the embodiments correspond to the method disclosed in the embodiments, so that the description is simple, and the relevant points can be referred to the description of the method.
The principle and the implementation of the present invention are explained in the present application by using specific examples, and the above description of the embodiments is only used to help understanding the technical solution and the core idea of the present invention. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.

Claims (10)

1. A method for creating a name space of a solid state disk is characterized by comprising the following steps:
analyzing the received solid state disk name space creating request to obtain the target space size information of the target solid state disk name space to be created;
calculating the target number of the preset solid state disk name space management basic units occupied by the target space size information;
searching the target solid state disk name space management basic units with the target number in an undivided state from a preset logic address bitmap;
and establishing and obtaining the name space of the target solid state disk by using each name space management basic unit of the target solid state disk.
2. The method for creating the name space of the solid state disk according to claim 1, wherein after the target name space is created and obtained by using each target name space management basic unit, the method further comprises:
and recording each target solid state disk name space management basic unit occupied by the target solid state disk name space by using the logical address bitmap.
3. The method for creating the namespace of the solid state disk according to claim 2, wherein recording each of the target namespace management base units occupied by the target namespace of the solid state disk by using the logical address bitmap comprises:
setting a target array structure corresponding to the target solid state disk name space in the logical address bitmap as an enable bit to obtain a mapping relation between the target solid state disk name space and each solid state disk logical address;
and setting corresponding bits corresponding to the target solid state disk name space management basic units in the array occupied by the preset basic units in the logical address bitmap to be in a divided state.
4. The method for creating the namespace of the solid state disk according to claim 3, further comprising, after setting corresponding bits respectively corresponding to the target namespace management primitives in the array occupied by the primitives preset in the logical address bitmap to the divided state:
receiving an access request for the target solid state disk name space;
analyzing the access request to obtain a logical address of the target solid state disk to be accessed;
and searching the target solid state disk logic address according to the mapping relation in the target array structure, and performing access operation on the target solid state disk logic address.
5. The method for creating the namespace of the solid state disk according to claim 3, further comprising, after setting corresponding bits respectively corresponding to the target namespace management primitives in the array occupied by the primitives preset in the logical address bitmap to the divided state:
receiving a deleting instruction of the target solid state disk name space;
carrying out bit-by-bit negation on the enable bit in the target array structure to obtain a non-enable bit;
performing AND operation on the non-enabled bit and corresponding bits corresponding to the target solid state disk name space management basic units in the array occupied by the basic units to obtain an operation result;
and updating the array occupied by the basic unit according to the operation result.
6. An apparatus for creating a name space of a solid state disk, comprising:
the space size obtaining module is used for analyzing the received solid state disk name space creating request to obtain the target space size information of the target solid state disk name space to be created;
the basic unit number calculating module is used for calculating the target number of the preset solid state disk name space management basic units occupied by the target space size information;
the basic unit searching module is used for searching the name space management basic units of the target solid state disks, the number of which is in an undivided state, from a preset logic address bitmap;
and the name space creating module is used for creating the name space of the target solid state disk by using each name space management basic unit of the target solid state disk.
7. The apparatus for creating a name space of a solid state disk according to claim 6, further comprising:
and the basic unit occupation recording module is used for recording each target solid state disk name space management basic unit occupied by the target solid state disk name space by using the logic address bitmap after the target solid state disk name space is created by using each target solid state disk name space management basic unit.
8. The apparatus for creating a namespace of a solid state disk according to claim 7, wherein the base unit occupation recording module comprises:
a mapping relation obtaining submodule, configured to set a target array structure corresponding to the target solid state disk name space in the logical address bitmap as an enable bit, and obtain a mapping relation between the target solid state disk name space and each solid state disk logical address;
and the basic unit occupation array bit setting submodule is used for setting corresponding bits corresponding to each target solid state disk name space management basic unit in a preset basic unit occupation array in the logic address bitmap into a divided state.
9. An apparatus for creating a namespace of a solid state disk, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the method for creating a namespace of a solid state disk according to any of claims 1 to 5 when executing said computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when being executed by a processor, carries out the steps of the method for creating a name space of a solid state disk according to any one of claims 1 to 5.
CN202110744599.XA 2021-06-30 2021-06-30 Method, device and equipment for creating name space of solid state disk and readable storage medium Pending CN113590032A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110744599.XA CN113590032A (en) 2021-06-30 2021-06-30 Method, device and equipment for creating name space of solid state disk and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110744599.XA CN113590032A (en) 2021-06-30 2021-06-30 Method, device and equipment for creating name space of solid state disk and readable storage medium

Publications (1)

Publication Number Publication Date
CN113590032A true CN113590032A (en) 2021-11-02

Family

ID=78245655

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110744599.XA Pending CN113590032A (en) 2021-06-30 2021-06-30 Method, device and equipment for creating name space of solid state disk and readable storage medium

Country Status (1)

Country Link
CN (1) CN113590032A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024125444A1 (en) * 2022-12-16 2024-06-20 华为技术有限公司 Namespace management method and apparatus

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107291392A (en) * 2017-06-21 2017-10-24 郑州云海信息技术有限公司 A kind of solid state hard disc and its reading/writing method
CN107704199A (en) * 2017-09-07 2018-02-16 郑州云海信息技术有限公司 A kind of logical partition method and device of solid state hard disc
CN109491612A (en) * 2018-11-15 2019-03-19 苏州韦科韬信息技术有限公司 A kind of logical partition method and device of solid state hard disk
CN109815737A (en) * 2019-01-30 2019-05-28 山东华芯半导体有限公司 A kind of single-deck multi-user's physical isolation method based on address of cache
CN110427332A (en) * 2019-08-05 2019-11-08 上海兆芯集成电路有限公司 Data pre-fetching device, data prefetching method and microprocessor

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107291392A (en) * 2017-06-21 2017-10-24 郑州云海信息技术有限公司 A kind of solid state hard disc and its reading/writing method
CN107704199A (en) * 2017-09-07 2018-02-16 郑州云海信息技术有限公司 A kind of logical partition method and device of solid state hard disc
CN109491612A (en) * 2018-11-15 2019-03-19 苏州韦科韬信息技术有限公司 A kind of logical partition method and device of solid state hard disk
CN109815737A (en) * 2019-01-30 2019-05-28 山东华芯半导体有限公司 A kind of single-deck multi-user's physical isolation method based on address of cache
CN110427332A (en) * 2019-08-05 2019-11-08 上海兆芯集成电路有限公司 Data pre-fetching device, data prefetching method and microprocessor

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024125444A1 (en) * 2022-12-16 2024-06-20 华为技术有限公司 Namespace management method and apparatus

Similar Documents

Publication Publication Date Title
US9684462B2 (en) Method and apparatus utilizing non-uniform hash functions for placing records in non-uniform access memory
US10303600B2 (en) Method and storage device for collecting garbage data
US20220137849A1 (en) Fragment Management Method and Fragment Management Apparatus
CN109376123B (en) Method for managing files, distributed storage system and management node
CN108733306B (en) File merging method and device
CN103534688B (en) Data reconstruction method, memory device and storage system
CN104461390A (en) Method and device for writing data into imbricate magnetic recording SMR hard disk
US10976946B2 (en) Method and computer system for managing blocks
CN111782656B (en) Data reading and writing method and device
CN103761190A (en) Data processing method and apparatus
JP2005196769A (en) Data management device and method for flash memory
CN110147203B (en) File management method and device, electronic equipment and storage medium
CN103955433A (en) Shingled magnetic recording hard disk, and method and device for writing data in shingled magnetic recording hard disk
CN115657960B (en) Disk array initialization method, device, equipment and readable storage medium
WO2019084917A1 (en) Method and apparatus for calculating available capacity of storage system
CN113590032A (en) Method, device and equipment for creating name space of solid state disk and readable storage medium
CN116340198B (en) Data writing method and device of solid state disk and solid state disk
US20230142948A1 (en) Techniques for managing context information for a storage device
EP2381354A2 (en) Data recording device
CN115237351B (en) NAND block dynamic remapping and read-write command processing method and storage device
CN115562595A (en) Volume creating method and device, volume reading and writing method and device, and electronic equipment
CN107656697B (en) Method and device for operating data on storage medium
CN109002265B (en) Data processing method and related device
CN113986117A (en) File storage method, system, computing device and storage medium
CN107132996B (en) Intelligent thin provisioning-based storage method, module and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20211102