CN114415974B - Method and device for operating logic space by SSD, storage medium and SSD device - Google Patents

Method and device for operating logic space by SSD, storage medium and SSD device Download PDF

Info

Publication number
CN114415974B
CN114415974B CN202210312338.5A CN202210312338A CN114415974B CN 114415974 B CN114415974 B CN 114415974B CN 202210312338 A CN202210312338 A CN 202210312338A CN 114415974 B CN114415974 B CN 114415974B
Authority
CN
China
Prior art keywords
configuration information
host
operated
command
ssd
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.)
Active
Application number
CN202210312338.5A
Other languages
Chinese (zh)
Other versions
CN114415974A (en
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.)
Beijing Dera Technology Co Ltd
Original Assignee
Beijing Dera 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 Beijing Dera Technology Co Ltd filed Critical Beijing Dera Technology Co Ltd
Priority to CN202210312338.5A priority Critical patent/CN114415974B/en
Publication of CN114415974A publication Critical patent/CN114415974A/en
Application granted granted Critical
Publication of CN114415974B publication Critical patent/CN114415974B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/0608Saving storage space on 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/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • G06F3/0611Improving I/O performance in relation to response time
    • 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/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0652Erasing, e.g. deleting, data cleaning, moving of data to a wastebasket
    • 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/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0658Controller construction arrangements
    • 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)
  • Memory System Of A Hierarchy Structure (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to the technical field of data storage, and provides a method, a device, a storage medium and SSD equipment for operating a logic space by an SSD, wherein the method comprises the following steps: receiving a host command which is sent by a host and used for operating the logic space NS, setting a host data cache address in the host command as a cache address of configuration information of the NS to be operated, and setting a function self-defined field in the host command as an operation type and the number of the NS to be operated; determining the data length of the configuration information required to be read from the host according to the number of the NS to be operated; reading the configuration information from the cache address of the configuration information of the NS to be operated according to the data length; and creating or deleting the NS according to the operation type of the NS to be operated and the read configuration information. The invention can greatly reduce the interaction process of the host and the equipment in the process of creating and deleting the NS, and save the time for configuring the NS.

Description

Method and device for operating logic space by SSD, storage medium and SSD device
Technical Field
The present invention relates to the field of data storage technologies, and in particular, to a method and an apparatus for operating a logical space in an SSD, a storage medium, and an SSD device.
Background
One NVMe (Non-Volatile Memory Express) SSD is mainly composed of an SSD controller, a flash Memory space, and a PCIe interface. The NVMe protocol supports a host to manage a flash memory space via an SSD controller using several independent logical spaces, and each of the divided logical spaces is called ns (namespace).
With the popularity of NVMe SSD hard disks, more and more SSDs support multiple types of NS due to the diversity of SSD requirements and usage scenarios by users. Management commands for the NS are also defined in the protocol of NVMe SSD to implement creation, deletion and use of the NS. When creating and deleting the NS, the SSD device and the host may be required to perform multiple interactions, and at least two commands are usually issued to implement the creation or deletion of one NS. In some custom scenarios or test scenarios, creating tens of NSs requires a significant amount of host drive and SSD device interaction time due to the wide variety of NSs. And the host driver needs to support the NS management command, which requires additional development cost if the host driver does not support it.
Currently, in a multi-NS environment, existing methods for creating and deleting NS all use two NS management commands defined in NVMe SSD protocol, which are NS management and NS attach, respectively. The NS management is used to create or delete an NS, the created NS cannot be used, and the NS needs to be bound with a controller by using an NS attach command, and the process of creating the NS is shown in fig. 1. When the NS is deleted, the host needs to send an NS attach command to release the binding between the NS and the controller, and then send an NS management command to delete the NS. When there are a plurality of NSs created or deleted, the above operation needs to be performed a plurality of times.
Since only one NS can be created or deleted at a time, it is inevitable that data mapping and management logic needs to be implemented inside the SSD. As the number of created NS increases, the number of management nodes increases, the time for each mapping setup increases, the management complexity also increases, and the time for creating or deleting NS increases. Moreover, each NS creation and deletion operation involves space management and data management within the SSD device, which increases the complexity of SSD data and space management in a multi-NS environment. Therefore, in a scenario that the NS configuration needs to be changed frequently, the existing implementation manner may greatly increase the time of the NS configuration, and at the same time, increase the development cost of the SSD device.
Disclosure of Invention
In view of the above, the present invention has been made to provide a method, apparatus, storage medium and SSD device of operating logical space that overcome or at least partially solve the above-mentioned problems.
In one aspect of the present invention, a method of operating a logical space in an SSD is provided, the method comprising:
receiving a host command which is sent by a host and used for operating a logical space (NS), wherein a host data cache address in the host command is set as a cache address of configuration information of the NS to be operated, a function self-defined field in the host command is set as control information of the NS to be operated, and the control information comprises an operation type and a number;
determining the data length of the configuration information required to be read from the host according to the number of the NS to be operated;
reading the configuration information from the cache address of the configuration information of the NS to be operated according to the data length;
and creating or deleting the NS according to the operation type of the NS to be operated and the read configuration information.
Further, the data length of the configuration information of each NS to be operated is fixed.
Further, the configuration information of a plurality of to-be-operated NSs is continuously arranged in the data cache of the host.
Further, the receiving the host sent the Vendor command for operating the logical space NS includes:
and receiving a Vendor command sent by the host through a management command transparent transmission interface of the driver.
Further, the reading of the configuration information from the cache address of the configuration information of the NS to be operated according to the data length includes:
and reading the configuration information from the host cache through a management command transparent transmission interface of the driver.
Further, when the operation type in the control information is to create the NS, the configuration information includes an attribute configuration of the NS to be created;
the creating of the NS according to the operation type of the NS to be operated and the read configuration information comprises the following steps:
analyzing attribute configuration in the configuration information, counting the capacity of all NS to be created according to the number of the NS to be created, and planning an internal space according to a counting result;
and determining the type of each NS to be created according to the attribute configuration of each NS to be created, and creating the NS.
Further, when the operation type in the control information is to delete the NS, the configuration information is an ID of the NS to be deleted;
the deleting the NS according to the operation type of the NS to be operated and the read configuration information comprises the following steps:
resolving the ID of the NS to be deleted in the configuration information, counting the capacity of the NS to be recovered according to the number of the NS to be deleted, and deleting the NS according to the ID of the NS to be deleted;
and planning the internal space according to the recycled NS capacity.
Further, the configuration information further includes extension data, and the extension data is used for configuring the security attribute implemented inside the SSD.
In a second aspect, the present invention also provides an apparatus for operating a logical space in an SSD, the apparatus comprising:
the command receiving module is used for receiving a host command which is sent by a host and used for operating a logical space (NS), wherein a host data cache address in the host command is set as a cache address of configuration information of the NS to be operated, a function self-defined field in the host command is set as control information of the NS to be operated, and the control information comprises operation types and number;
the calculation module is used for determining the data length of the configuration information required to be read from the host according to the number of the NS to be operated;
the acquisition module is used for reading the configuration information from the cache address of the configuration information of the NS to be operated according to the data length;
and the execution module is used for creating or deleting the NS according to the operation type of the NS to be operated and the read configuration information.
In a third aspect, the present invention also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method of operating a logical space as described above in an SSD.
In a fourth aspect, the present invention also provides an SSD device comprising a storage controller, the storage controller comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method of operating a logical space as above the SSD when executing the computer program.
According to the method, the device, the storage medium and the SSD device for operating the logic space by the SSD, provided by the embodiment of the invention, the use and the distribution of the internal space can be globally coordinated by configuring a plurality of NS in the Vendor command, and the simultaneous creation or deletion of a plurality of NS by one command is realized, so that the interaction process of a host and the device in the process of creating and deleting the NS is greatly reduced, and the time for configuring the NS is saved.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a flow chart of a method for implementing logical space operations based on the NVMe SSD protocol in the prior art;
FIG. 2 is a flow chart of a method for operating a logical space of an SSD according to an embodiment of the present invention;
fig. 3 is a block diagram of an apparatus for operating a logical space in an SSD according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
To accommodate the demands of different customers for SSD storage data, SSD devices need to support multiple NS formats simultaneously, including different LBA sizes, meta sizes, pi (protection information) types, and so on, which are often up to tens or even hundreds of combinations. In the product development and test process of the SSD, all NS formats that can be supported by the product need to be verified, and a large pressure scenario in which multiple NS formats coexist and are accessed in parallel needs to be verified. If the NS creating and deleting method defined by the protocol is adopted, the NS needs to be created and deleted frequently, so that not only is the complexity of the test case increased, but also a large amount of host interaction time is needed. Therefore, the invention provides a method for operating a logical space by an SSD, which can quickly and efficiently create and delete NS.
FIG. 1 schematically illustrates a flow diagram of a method of operating a logical space of an SSD in accordance with one embodiment of the present invention. Referring to fig. 1, the method for operating a logical space in an SSD according to the embodiment of the present invention specifically includes the following steps:
and S11, receiving a Vendor command which is sent by the host and used for operating the logical space NS. And setting a host data cache address in the Vendor command as a cache address of configuration information of the NS to be operated, setting a function self-defined field in the Vendor command as control information of the NS to be operated, wherein the control information comprises operation types and number.
A supplier (Vendor) can customize some commands in an NVMe SSD protocol, and the invention is realized by adding a Vendor command and adding commands for creating and deleting two operation logic spaces of NS in the Vendor command.
Specifically, the Vendor command defined by the NVMe protocol contains an operation Code (Op Code) of the current command, an address of the host data cache, and some fields that can be customized. The SSD device side realizes that the Vendor command supports two operations of creating the NS and deleting the NS through the following settings, and the method specifically comprises the following steps: transmitting some control information by using the custom field in the Vendor command to indicate whether the operation type of the operation is to create NS or delete NS and the number of the NS; and setting the host data cache address in the Vendor command as the cache address of the configuration information of the NS to be operated.
The SSD device can receive a Vendor command sent by the host through an admin passthrough interface of the driver.
And S12, determining the data length of the configuration information required to be read from the host according to the number of the NS to be operated.
And S13, reading the configuration information from the cache address of the configuration information of the NS to be operated according to the data length. Specifically, the SSD device may read the configuration information from the host cache through an admin command transparent interface of the driver, i.e., an admin passthrough interface. Wherein, the data length of the configuration information of each NS to be operated is fixed. Further, the configuration information of a plurality of to-be-operated NSs is continuously arranged in the data cache of the host. The management command transparent transmission interface is an interface which is provided by a driver, the user layer specifies command content, and the driver does not check the command content and is mainly used for sending commands which are not supported by the user-defined driver.
In this embodiment, when the NS is created or deleted, the host writes configuration information of the NS to be operated into the data cache, and sends a Vendor command and data to the SSD device through the management command transparent interface of the driver.
Specifically, in the data, the configuration information of one NS is represented by a fixed length, and the configuration information of a plurality of NS is continuously arranged in the data cache. The data size required to be transmitted can be calculated in the SSD device according to the number of NS required to be created in the command and the length of each NS configuration information, all the configuration information is read into the SSD device through the host data cache address in the Vendor command, and the purpose of simultaneously transmitting a plurality of NS configurations is achieved.
And S14, creating or deleting the NS according to the operation type of the NS to be operated and the read configuration information.
According to the method for operating the logic space by the SSD, provided by the embodiment of the invention, the use and distribution of the internal space can be globally coordinated by configuring the plurality of NS in the Vendor command, and the simultaneous creation or deletion of the plurality of NS by one command is realized, so that the interaction process of a host and equipment in the process of creating and deleting the NS is greatly reduced, and the time for configuring the NS is saved.
In the embodiment of the present invention, when the operation type in the control information is to create the NS, the configuration information includes an attribute configuration of the NS to be created.
Further, a specific implementation manner of creating the NS according to the operation type of the NS to be operated and the read configuration information is as follows: analyzing attribute configuration in the configuration information, counting the capacity of all NS to be created according to the number of the NS to be created, and planning an internal space according to a counting result; and determining the type of each NS to be created according to the attribute configuration of each NS to be created, and creating the NS.
Specifically, when the NS is created, the configuration information of each NS includes attribute configurations such as NS size, command set and LBA format, controller ID, lbs tm, NVM set ID, and enable Group ID. In addition to the attribute configuration of the NS, extension data is included in the configuration information. The extension data is used for definition of other attributes of the NS, and can be used for definition of security attributes related to the implementation method inside the SSD.
In this embodiment, the SSD device may globally orchestrate the use and allocation of the internal space by configuring the plurality of NSs in the Vendor command, and implement a method in which one command creates the plurality of NSs at the same time. The data structure transmitted in the Vendor command, where the extension data is used for configuration of the NS other attributes, may be used for definitions relating to the security attributes implemented inside the SSD.
In the embodiment of the present invention, when the operation type in the control information is to delete the NS, the configuration information is an ID of the NS to be deleted.
Further, a specific implementation manner of deleting the NS according to the operation type of the NS to be operated and the read configuration information is as follows: resolving the ID of the NS to be deleted in the configuration information, counting the capacity of the NS to be recovered according to the number of the NS to be deleted, and deleting the NS according to the ID of the NS to be deleted; and planning the internal space according to the recycled NS capacity.
Specifically, when the NS is deleted, the configuration information of each NS in the data cache only needs to give the ID of the NS that needs to be deleted, the IDs of multiple NS are stored continuously, and the remaining bytes are filled with a preset known data sequence, for example, 0 may be used in one specific example.
In this embodiment, after receiving the command, the SSD device determines the length of data read from the host according to the NS creation or deletion operation and the number of NS, parses the data after receiving the data, counts the size and format of all NS to be created or deleted, re-plans the internal space, and then creates or deletes NS according to NS configuration in the data. And finally, the SSD equipment returns a command execution result to the host.
Compared with the NS creating and deleting method defined by the protocol, the method for operating the logical space by the SSD provided by the embodiment of the invention has the advantage that when the NS is created or deleted, the configuration of the NS informs the SSD device through the data of the Vendor command. The NS to be created or deleted in the operation is given in the Vendor command, the number of the NS to be created or deleted is given at the same time, the configuration of the NS to be created or the ID of the NS to be deleted is given in the data of the Vendor command, the interaction times of the device and the host can be greatly reduced, and the time for creating and deleting the NS can be shortened.
In addition, the method defined by the protocol can only create or delete one NS at a time, because the next operation is not determined, space fragmentation may be caused or data migration is triggered when the NS is created or deleted, and multiple creation or deletion of the NS may trigger more operations for internal space management of the SSD. According to the method for operating the logic space by the SSD, the SSD device can uniformly plan the internal space and the data according to the configuration of the NS after receiving all NS information needing to be operated once, and does not need to search a proper residual space every time the NS is created, recover the space and perform defragmentation when the NS is deleted, so that the complexity of the SSD for managing the internal space and the data is reduced, and the problems of space fragmentation, data migration and the like caused by frequently creating and deleting the NS are avoided.
For simplicity of explanation, the method embodiments are described as a series of acts or combinations, but those skilled in the art will appreciate that the embodiments are not limited by the order of acts described, as some steps may occur in other orders or concurrently with other steps in accordance with the embodiments of the invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Fig. 3 schematically shows a structural diagram of an apparatus for operating a logical space of an SSD according to an embodiment of the invention. Referring to fig. 3, the apparatus of the SSD operation logical space in the embodiment of the present invention specifically includes a command receiving module 201, a calculating module 202, an obtaining module 203, and an executing module 204, wherein:
a command receiving module 201, configured to receive a host command for operating a logical space NS sent by a host, where a host data cache address in the host command is set as a cache address of configuration information of an NS to be operated, a function customization field in the host command is set as control information of the NS to be operated, and the control information includes an operation type and a number;
a calculating module 202, configured to determine a data length of configuration information that needs to be read from a host according to the number of to-be-operated NS;
an obtaining module 203, configured to read configuration information from a cache address of configuration information of an NS to be operated according to the data length;
and the execution module 204 is configured to create or delete the NS according to the operation type of the NS to be operated and the read configuration information.
In this embodiment of the present invention, the command receiving module 201 specifically receives a Vendor command sent by the host through a management command transparent interface of the driver.
In this embodiment of the present invention, the obtaining module 203 specifically reads the configuration information from the host cache through a management command transparent interface of the driver.
In the embodiment of the present invention, when the operation type in the control information is to create an NS, the configuration information includes an attribute configuration of the NS to be created. Further, the execution module 204 is specifically configured to analyze the attribute configuration in the configuration information, count the capacity of all the NS to be created according to the number of the NS to be created, and plan the internal space according to the statistical result; and determining the type of each NS to be created according to the attribute configuration of each NS to be created, and creating the NS.
In the embodiment of the present invention, when the operation type in the control information is to delete the NS, the configuration information is an ID of the NS to be deleted. Further, the execution module 204 is specifically configured to parse the ID of the NS to be deleted in the configuration information, count the NS capacity to be recovered according to the number of the NS to be deleted, and delete the NS according to the ID of the NS to be deleted; and planning the internal space according to the recycled NS capacity.
For the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and reference may be made to the partial description of the method embodiment for relevant points.
Furthermore, an embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps of the method for operating a logical space of an SSD as described above.
In this embodiment, the method for operating the logical space in the SSD, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
In addition, an embodiment of the present invention further provides an SSD device, which includes a storage controller, where the storage controller includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the program, the steps of the method for operating a logical space in the SSD are implemented. Such as steps S11-S14 shown in FIG. 2. Alternatively, the processor implements the functions of each module/unit in the above device embodiment of the SSD operation logical space when executing the computer program, for example, the command receiving module 201, the calculating module 202, the obtaining module 203 and the executing module 204 shown in fig. 3.
According to the method, the device, the storage medium and the SSD device for operating the logical space of the SSD, the use and the distribution of the internal space can be comprehensively and comprehensively planned by configuring the plurality of NS in the Vendor command, and one command can be used for creating or deleting the plurality of NS simultaneously, so that the interaction process of a host and the device in the process of creating and deleting the NS is greatly reduced, the time for configuring the NS is saved, meanwhile, the method provided by the embodiment of the invention can help the SSD device to better plan the internal space and data when the NS is created and deleted, the space fragment generated when the NS is created and deleted every time is prevented, the complexity of mapping management of the internal space and the LBA is reduced, and the development cost of the SSD device is reduced.
Furthermore, those skilled in the art will appreciate that while some embodiments herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, any of the claimed embodiments may be used in any combination.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A method of SSD operating a logical space, the method comprising:
receiving a host command which is sent by a host and used for operating a logical space (NS), wherein a host data cache address in the host command is set as a cache address of configuration information of the NS to be operated, a function self-defined field in the host command is set as control information of the NS to be operated, and the control information comprises an operation type and a number;
determining the data length of the configuration information required to be read from the host according to the number of the NS to be operated;
reading the configuration information from the cache address of the configuration information of the NS to be operated according to the data length;
and creating or deleting the NS according to the operation type of the NS to be operated and the read configuration information.
2. The method of claim 1, wherein the configuration information of each NS to be operated has a fixed data length, and the configuration information of each NS to be operated is continuously arranged in a data cache of the host.
3. The method of claim 1, wherein receiving a host-sent Vendor command for operating a logical space (NS) comprises:
and receiving a Vendor command sent by the host through a management command transparent transmission interface of the driver.
4. The method of claim 1, wherein the reading configuration information from a cache address of configuration information of an NS to be operated according to the data length comprises:
and reading the configuration information from the host cache through a management command transparent transmission interface of the driver.
5. The method according to any one of claims 1 to 4, wherein, when the operation type in the control information is to create an NS, the configuration information includes an attribute configuration of the NS to be created;
the creating of the NS according to the operation type of the NS to be operated and the read configuration information comprises the following steps:
analyzing attribute configuration in the configuration information, counting the capacity of all NS to be created according to the number of the NS to be created, and planning an internal space according to a counting result;
and determining the type of each NS to be created according to the attribute configuration of each NS to be created, and creating the NS.
6. The method according to any one of claims 1 to 4, wherein, when the operation type in the control information is deleting the NS, the configuration information is an ID of the NS to be deleted;
the deleting the NS according to the operation type of the NS to be operated and the read configuration information comprises the following steps:
resolving the ID of the NS to be deleted in the configuration information, counting the capacity of the NS to be recovered according to the number of the NS to be deleted, and deleting the NS according to the ID of the NS to be deleted;
and planning the internal space according to the recycled NS capacity.
7. The method of claim 6, wherein the configuration information further comprises extension data for configuration of security attributes implemented internally in the SSD.
8. An apparatus of an SSD operating a logical space, the apparatus comprising:
the command receiving module is used for receiving a host command which is sent by a host and used for operating a logical space (NS), wherein a host data cache address in the host command is set as a cache address of configuration information of the NS to be operated, a function self-defined field in the host command is set as control information of the NS to be operated, and the control information comprises operation types and number;
the calculation module is used for determining the data length of the configuration information required to be read from the host according to the number of the NS to be operated;
the acquisition module is used for reading the configuration information from the cache address of the configuration information of the NS to be operated according to the data length;
and the execution module is used for creating or deleting the NS according to the operation type of the NS to be operated and the read configuration information.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
10. An SSD device, comprising a storage controller comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor when executing the computer program implementing the steps of the method of any of claims 1 to 7.
CN202210312338.5A 2022-03-28 2022-03-28 Method and device for operating logic space by SSD, storage medium and SSD device Active CN114415974B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210312338.5A CN114415974B (en) 2022-03-28 2022-03-28 Method and device for operating logic space by SSD, storage medium and SSD device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210312338.5A CN114415974B (en) 2022-03-28 2022-03-28 Method and device for operating logic space by SSD, storage medium and SSD device

Publications (2)

Publication Number Publication Date
CN114415974A CN114415974A (en) 2022-04-29
CN114415974B true CN114415974B (en) 2022-06-03

Family

ID=81263465

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210312338.5A Active CN114415974B (en) 2022-03-28 2022-03-28 Method and device for operating logic space by SSD, storage medium and SSD device

Country Status (1)

Country Link
CN (1) CN114415974B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114996172B (en) * 2022-08-01 2022-11-01 北京得瑞领新科技有限公司 Method and system for accessing host memory based on SSD

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106095329A (en) * 2016-05-27 2016-11-09 浪潮电子信息产业股份有限公司 Management method of Intel SSD (solid State disk) based on NVME (network video management entity) interface
CN110770710A (en) * 2017-05-03 2020-02-07 艾德蒂克通信公司 Apparatus and method for controlling data acceleration
CN111722786A (en) * 2019-03-21 2020-09-29 阿里巴巴集团控股有限公司 Storage system based on NVMe equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10509698B2 (en) * 2018-02-27 2019-12-17 Goke Us Research Laboratory Method and apparatus for data encoding and decoding using a standardized data storage and retrieval protocol

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106095329A (en) * 2016-05-27 2016-11-09 浪潮电子信息产业股份有限公司 Management method of Intel SSD (solid State disk) based on NVME (network video management entity) interface
CN110770710A (en) * 2017-05-03 2020-02-07 艾德蒂克通信公司 Apparatus and method for controlling data acceleration
CN111722786A (en) * 2019-03-21 2020-09-29 阿里巴巴集团控股有限公司 Storage system based on NVMe equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Bruce J. Nikkel.NVM Express Drives and Digital Forensics.《Digital Investigation》.2016, *

Also Published As

Publication number Publication date
CN114415974A (en) 2022-04-29

Similar Documents

Publication Publication Date Title
US8239648B2 (en) Reclamation of thin provisioned disk storage
US8521949B2 (en) Data deleting method and apparatus
US9880759B2 (en) Metadata for data storage array
US8595456B1 (en) Techniques for integrating backup modules with virtualized storage
JP3522250B2 (en) Partition creation method and deletion method, recording medium recording program, and information processing apparatus
EP2511814A1 (en) Method of implementing array of disk and method and device of reading/writing data
US8285749B2 (en) Computer system and recording medium
US11604599B2 (en) Methods and apparatus for use in sanitizing a network of non-volatile memory express devices
CN107947799B (en) Data compression method and device
US8131743B1 (en) Object searching in data storage systems
CN109491606B (en) Full flash memory space management method, system, equipment and computer medium
CN114415974B (en) Method and device for operating logic space by SSD, storage medium and SSD device
US20180275888A1 (en) Data Collation Method, Storage Device, Storage Controller, and Storage Array
WO2024113717A1 (en) Zns ssd-based file system control method, apparatus and device
US20170177602A1 (en) Compressed data layout with variable group size
CN114691020A (en) ZNS standard based data compression storage device and method thereof
CN110147203A (en) A kind of file management method, device, electronic equipment and storage medium
CN116257460B (en) Trim command processing method based on solid state disk and solid state disk
CN107526533B (en) Storage management method and equipment
CN114385069B (en) Method, apparatus and computer program product for storage management
WO2024119760A1 (en) Volume creation method and apparatus, volume read-write method and apparatus, and electronic device
US10235089B2 (en) Storage control device, method and storage system to backup data using allocation information
US20220155974A1 (en) Device with flash memory and method for writing/erasing/updating data in flash memory thereof
CN114706526A (en) Automatic capacity expansion method, system and equipment for cloud native storage data volume
CN112732176A (en) SSD (solid State disk) access method and device based on FPGA (field programmable Gate array), storage system and storage medium

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
GR01 Patent grant
GR01 Patent grant