Power-on and power-off control method and device, dual-port SSD, and readable storage medium

By performing power-on and power-off preprocessing in the SSD front-end module and sending FTL power-on and power-off requests, the problem of mutual interference between power-on and power-off of dual-port SSDs is solved, and the execution efficiency of host power-on and power-off instructions and the stability of dual-port SSDs are improved.

CN115202585BActive Publication Date: 2025-10-21INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210904905.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-29
Publication Date
2025-10-21
Estimated Expiration
2042-07-29

AI Technical Summary

Technical Problem

The existing dual-port SSD power-on and power-off solution cannot effectively ensure that the two ports do not interfere with each other, affecting the stability of the user host.

Method used

By performing power-on and power-off preprocessing in the front-end module of the SSD, using the first port or the second port to send an FTL power-on and power-off request to the FTL, and after the FTL feedback is successful, at least one port sends a power-on and power-off success response message to the host, achieving isolation and stability between ports.

Benefits of technology

Improves the efficiency of host power-on and power-off commands, ensuring that when one port fails, the other port can still be used normally, and increases the stability of dual-port SSDs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115202585B_ABST
    Figure CN115202585B_ABST
Patent Text Reader

Abstract

The application discloses a power-on and power-off control method and device, a dual-port SSD and a readable storage medium. The method is applied to an SSD controller and comprises the following steps: receiving a power-on and power-off request sent by a host through a first port and a second port respectively; performing power-on and power-off preprocessing in a front-end module of the SSD; after the preprocessing is completed, sending an FTL power-on and power-off request to an FTL of the SSD through the first port or the second port; and after the FTL feeds back a power-on and power-off success, sending a power-on and power-off success response message to the host through the first port and / or the second port. The application belongs to the technical field of storage, and in the application, only one port is needed to send an FTL power-on and power-off request to the FTL, so that the execution efficiency of a host power-on and power-off instruction can be improved; at least one port is used to send a power-on and power-off success response message to the host, so that in the case that one of the ports fails, the normal use of the other port is not affected, and the stability of the dual-port SSD can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of storage technology, and in particular to a power-on and power-off control method and device, a dual-port SSD, and a readable storage medium. Background Art

[0002] An SSD (solid state disk) is a solid-state electronic storage array hard drive. A dual-port SSD, on the other hand, has two ports. Dual-port SSDs can effectively improve data storage efficiency and security.

[0003] Specifically, a dual-port SSD has two PCIe interface hardware units, which must be independent and non-interfering. This means that damage to one PCIe interface hardware unit will not affect the other port, thus ensuring the stability of the user's host. However, current dual-port power-on and power-off solutions cannot effectively ensure that the two ports do not interfere with each other.

[0004] In summary, how to effectively solve the problem of powering on and off of a dual-port SSD is a technical problem that currently needs to be solved urgently by those skilled in the art. Summary of the Invention

[0005] The purpose of this application is to provide a power-on and power-off control method, device, dual-port SSD and readable storage medium to solve the power-on and power-off problem of the dual-port SSD, increase the stability of the dual-port SSD, and improve the execution efficiency of the host power-on and power-off instructions.

[0006] To solve the above technical problems, this application provides the following technical solutions:

[0007] A power-on and power-off control method, applied to an SSD controller, includes:

[0008] Utilizing the first port and the second port to receive power on and off requests sent by the host respectively;

[0009] Perform power-on and power-off pre-processing in the SSD front-end module;

[0010] After the preprocessing is completed, using the first port or the second port to send an FTL power-on or power-off request to the FTL of the SSD;

[0011] After the FTL reports that the power on and power off are successful, it uses the first port and / or the second port to send a response message of successful power on and power off to the host.

[0012] Preferably, power-on and power-off pre-processing is performed in the front-end module of the SSD, including:

[0013] If the power-on and power-off request is a power-on request, initializing the first port and the second port; wherein the first port and the second port belong to the front-end module;

[0014] If the power-on / off request is a power-off request, power-off pre-processing is performed using the front-end module.

[0015] Preferably, initializing the first port and the second port includes:

[0016] Establish connections to the first port and the second port respectively, configure registers, and create an nvme admin queue.

[0017] Preferably, the front-end module is used to perform power-off pre-processing, including:

[0018] The nvme admin queues corresponding to the first port and the second port are deleted respectively.

[0019] Preferably, using the first port or the second port to send an FTL power-on and power-off request to the FTL of the SSD includes:

[0020] Sending the FTL power on and off request to the FTL using the first port;

[0021] If the FTL reports that the first port is powered on and off successfully, it is determined that both the first port and the second port are powered on and off successfully;

[0022] If the FTL reports that the power on and off of the first port fails, the second port is used to send the FTL power on and off request to the FTL.

[0023] Preferably, after the FTL reports that the power on and power off are successful, the FTL sends a response message of successful power on and power off to the host using the first port and / or the second port, including:

[0024] If the FTL reports that the first port is powered on and off successfully, the FTL uses the first port and the second port to send a successful power-on and power-off response message to the host respectively;

[0025] If the FTL reports that the first port fails to be powered on and off, but the second port is successfully powered on and off, the second port is used to send a response message of successful power on and off to the host, and the first port is used to send a response message of failed power on and off to the host.

[0026] Preferably, if the FTL reports that the first port fails to be powered on and off, and the second port fails to be powered on and off, the method further includes:

[0027] The first port and the second port are used to send a response message of the power on and power off failure to the host respectively.

[0028] A power-on and power-off control device, applied to an SSD controller, comprising:

[0029] A host request receiving unit, configured to receive power on and off requests sent by the host using the first port and the second port respectively;

[0030] A pre-processing unit is used to perform power-on and power-off pre-processing in the front-end module of the SSD;

[0031] A request sending unit, configured to send an FTL power-on and power-off request to the FTL of the SSD using the first port or the second port after the preprocessing is completed;

[0032] The response unit is configured to send a response message of successful power on and off to the host by using the first port and / or the second port after the FTL feeds back that the power on and off are successful.

[0033] A dual-port SSD comprising:

[0034] Storage unit and SSD controller;

[0035] Wherein, the dual-port controller includes a front-end module and an FTL; the front-end module includes a first port and a second port;

[0036] The dual-port SSD controller implements the steps of the above power-on and power-off control method when executing the computer program.

[0037] A readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned power on and off control method are implemented.

[0038] The method provided in the embodiment of the present application is applied to an SSD controller, including: using the first port and the second port to respectively receive power-on and power-off requests sent by the host; performing power-on and power-off preprocessing in the front-end module of the SSD; after the preprocessing is completed, using the first port or the second port to send an FTL power-on and power-off request to the FTL of the SSD; after the FTL feedback of successful power-on and power-off, using the first port and / or the second port to send a response message of successful power-on and power-off to the host.

[0039] When powering on and off a dual-port SSD, the first port and the second port respectively receive power-on and power-off requests sent by the host. Then, power-on and power-off preprocessing is performed in the front-end module. After the preprocessing is completed, one port can send an FTL power-on and power-off request to the FTL. When the FTL reports that the power-on and power-off is successful, at least one of the first and second ports is used to send a successful power-on and power-off response message to the host. The port sends a successful power-on and power-off response message to the host. If it is powered on, it indicates that the port has been powered on successfully and data access to the SSD can be performed; if it is powered off, it indicates that the port has been powered off successfully and the SSD has been removed. Since only one port is required to send the FTL power-on and power-off request to the FTL, the efficiency of executing the host power-on and power-off instructions can be improved. At the same time, at least one port sends a successful power-on and power-off response message to the host. In the event of a failure of one port, the normal use of the other port will not be affected, thereby increasing the stability of the dual-port SSD.

[0040] Accordingly, the embodiments of the present application also provide a power-on / off control device, a dual-port SSD, and a readable storage medium corresponding to the above-mentioned power-on / off control method, which have the above-mentioned technical effects and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0042] Figure 1 This is a flowchart of an implementation method of power on and off control in an embodiment of the present application;

[0043] Figure 2 This is a schematic diagram of the logical interaction of the firmware internal modules of a dual-port SSD according to an embodiment of the present application;

[0044] Figure 3 A schematic diagram of a power-on process of a power-on and power-off control method in an embodiment of the present application;

[0045] Figure 4 A schematic diagram of a power-off process of a power-on and power-off control method in an embodiment of the present application;

[0046] Figure 5 This is a structural diagram of a power-on and power-off control device in an embodiment of the present application;

[0047] Figure 6 This is a structural diagram of a dual-port SSD in an embodiment of the present application. DETAILED DESCRIPTION

[0048] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific embodiments. Obviously, the embodiments described are only some of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making any creative efforts are within the scope of protection of the present application.

[0049] Please refer to Figure 1 , Figure 1 This is a flow chart of a power-on and power-off control method according to an embodiment of the present application. The method can be applied to an SSD controller. The method includes the following steps:

[0050] S101: Receive power on and off requests sent by a host using a first port and a second port respectively.

[0051] It's important to note that the "first" and "second" in this document are used only to distinguish the two ports, and do not imply precedence or priority. If two ports are named "port0" and "port1," respectively, "first port" can correspond to either port 0 or port 1. Accordingly, "second port" is the other port name.

[0052] The power-on and power-off request refers to a power-on request or a power-off request.

[0053] Taking power-on as an example, when a dual-port SSD is inserted into a host and the host is powered on, the host can send power-on requests to the first port and the second port respectively. That is, the first port and the second port can respectively receive the power-on requests sent by the host. The host power-on process includes operations such as loading the driver and identifying the disk.

[0054] Taking power-off as an example, when the host is powered off, the host may send a power-off request to the first port and the second port respectively, that is, the first port and the second port may respectively receive the power-off request sent by the host.

[0055] S102: Perform power-on and power-off pre-processing in the front-end module of the SSD.

[0056] In this embodiment, the logic interaction of the internal modules of the dual-port SSD firmware is as follows: Figure 2As shown. Firmware is a program written into flash memory, EROM, EPROM (Programmable Read-Only Memory), or other memory within an application-specific integrated circuit (ASIC) or programmable logic device (PLD), i.e., fixed software. The firmware of a dual-port SSD corresponds to the SSD controller in this article. This dual-port SSD controller has two PCIe interface hardware units, namely the first port and the second port. The firmware is divided into two major modules: the front-end module (including the first and second ports) and the FTL module (herein referred to as FTL). The front-end module primarily performs PCIe and NVMe protocol functions, including initializing PCIe hardware units, configuring registers, and completing driver loading. The FTL module primarily processes host read and write data, ensuring data integrity. PCI-Express (Peripheral Component Interconnect Express) is a high-speed serial computer expansion bus standard; NVMe is a protocol designed specifically for flash storage based on the M.2 interface.

[0057] FTL, short for Flash Translation Layer, translates, or maps, the host's (or user's) logical address space to the flash memory's physical address space. Each time the SSD writes user logical data to the flash memory address space, it records the mapping between that logical address and the physical address. The next time the host wants to read that data, the SSD uses this mapping to retrieve the data from the flash memory and return it to the user. This mapping between the logical and physical address spaces is the most fundamental and original function of the FTL.

[0058] When the power-on / off request is a power-on request, power-on pre-processing is performed in the SSD's front-end module. When the power-on / off request is a power-off request, power-off pre-processing is performed in the SSD's front-end module. The specific operations of the power-on / off pre-processing and power-off pre-processing can be found in the SSD power-on / off related processes. In other words, the specific operations of the power-on / off pre-processing and power-off pre-processing are not limited in this embodiment.

[0059] In a specific embodiment of the present application, step S102 performs power-on and power-off pre-processing in the front-end module of the SSD, including:

[0060] Case 1: If the power-on and power-off request is a power-on request, initialization processing is performed on the first port and the second port; wherein the first port and the second port belong to the front-end module.

[0061] Specifically, initializing the first port and the second port includes: establishing connections to the first port and the second port respectively, configuring registers, and creating an nvme admin queue.

[0062] The establishing of the connection may specifically be processing pcie linkup, that is, establishing a PCIe connection.

[0063] That is, when the host is powered on, that is, after receiving the power-on request sent by the host, the front-end module will initialize the PCIe and NVMe layers of the two ports, mainly including processing PCIe linkup, configuring registers, creating NVMe admin queues, etc. Specifically, for how to process PCIe linkup, configure registers, create NVMe admin queues, etc., please refer to the specific implementation steps of the relevant technical solutions, and will not be repeated here.

[0064] Case 2: If the power-on / off request is a power-off request, the front-end module is used to perform power-off pre-processing.

[0065] Specifically, the front-end module is used to perform power-off pre-processing, including: deleting the nvme admin queues corresponding to the first port and the second port respectively.

[0066] That is, when the host is powered off, port0 and port1 will first perform front-end module processing, such as deleting the nvmeadmin queue, etc.

[0067] S103 : After the pre-processing is completed, the first port or the second port is used to send an FTL power-on or power-off request to the FTL of the SSD.

[0068] After completing the pre-processing for powering on or off, the FTL power-on or power-off request may be sent to the FTL via the first port or the second port.

[0069] That is, in this embodiment, under normal circumstances, only one port sends an FTL power-on / off request to the FTL to complete SSD power-on / off. Of course, in the event of a fault, there will be a situation involving two ports sending FTL power-on / off requests to the FTL in succession.

[0070] In some specific cases, the power-off request can be omitted to directly determine the result. For example, if port 1 does not send a power-off request to the FTL, it proves that the current FTL module is running, and port 0 can directly return a power-off success to the host.

[0071] In a specific embodiment of the present application, step S103 uses the first port or the second port to send an FTL power-on and power-off request to the FTL of the SSD, including:

[0072] Step 1: Send an FTL power-on and power-off request to the FTL using the first port;

[0073] Step 2: If the FTL reports that the first port is powered on and off successfully, it is determined that both the first port and the second port are powered on and off successfully;

[0074] Step 3: If the FTL reports that the power on and off of the first port fails, the second port is used to send an FTL power on and off request to the FTL.

[0075] For ease of description, the above three steps are combined and explained below.

[0076] The first port may be used to send an FTL power-on and power-off request to the FTL; after the FTL receives the FTL power-on and power-off request, the FTL may perform power-on and power-off operations.

[0077] When the FTL reports that the first port is powered on and off successfully, it can be directly determined that both the first port and the second port are powered on and off successfully. That is, at this time, the second port does not need to send an FTL power on and off request to the FTL.

[0078] When the FTL reports that the first port fails to be powered on or off, the second port may be used to initiate a power on or off request to the FTL.

[0079] That is, when the first port initiates a power-on / off request, the second port only needs to wait for the FTL to provide feedback before confirming that the first port's power-on / off failed. Once the first port's power-on / off is confirmed to be successful, the second port can determine that the power-on / off is successful and proceed to step S104. If the first port's power-on / off failure is confirmed, the second port initiates a power-on request to the FTL and receives feedback from the FTL.

[0080] S104 : After the FTL reports that the power on and power off are successful, it sends a response message of the power on and power off success to the host via the first port and / or the second port.

[0081] Because there are two ports, the power-on and power-off results are fed back to the host, with the first and second ports feeding back the corresponding power-on and power-off results. Accordingly, for power-on, if the port feeds back a successful power-on, the host can use that port to access the SSD; if the port feeds back a power-on failure, the host cannot use that port to access the SSD. For power-off, if the port feeds back a successful power-off, the host cannot use that port to access the SSD. If the port is unoccupied and feeds back a power-off failure, the host can continue to use that port to access the SSD.

[0082] That is, when the FTL reports a successful power on / off, it's possible that both the first and second ports succeeded, or that only one of them succeeded. Therefore, if both ports succeed, both the first and second ports send a successful power on / off response message to the host. If only one of the ports succeeds, the successful first or second port sends a successful power on / off response message to the host.

[0083] Specifically, in step S104, after the FTL feedback indicates that the power on and power off are successful, the FTL uses the first port and / or the second port to send a successful power on and power off response message to the host, including:

[0084] If the FTL reports that the first port is powered on and off successfully, it uses the first port and the second port to send a successful power-on and power-off response message to the host respectively;

[0085] If the FTL reports that the first port fails to power on and off but the second port succeeds, the FTL sends a power on and off success response message to the host via the second port and sends a power on and off failure response message to the host via the first port.

[0086] In addition, if the FTL reports that the first port fails to be powered on or off, and the second port fails to be powered on or off, the first port and the second port are used to send power on or off failure response messages to the host respectively.

[0087] When it is clear that the power on and off fails, the port that failed to power on and off will also feedback a response message of the power on and off failure to the host.

[0088] If the power-on / off request is a power-on request, the response message will specifically indicate whether the power-on was successful. If the power-on / off request is a power-off request, the response message will specifically indicate whether the power-off was successful. The content of the messages sent by the two ports depends on the success of the power-on / off. Both ports may return success response messages, both ports may return failure response messages, or one port may return a success response message and the other port may return a failure response message.

[0089] The method provided in the embodiment of the present application is applied to an SSD controller, including: using the first port and the second port to respectively receive power-on and power-off requests sent by the host; performing power-on and power-off preprocessing in the front-end module of the SSD; after the preprocessing is completed, using the first port or the second port to send an FTL power-on and power-off request to the FTL of the SSD; after the FTL feedback of successful power-on and power-off, using the first port and / or the second port to send a response message of successful power-on and power-off to the host.

[0090] When powering on and off a dual-port SSD, the first port and the second port respectively receive power-on and power-off requests sent by the host. Then, power-on and power-off preprocessing is performed in the front-end module. After the preprocessing is completed, one port can send an FTL power-on and power-off request to the FTL. When the FTL reports that the power-on and power-off is successful, at least one of the first and second ports is used to send a successful power-on and power-off response message to the host. The port sends a successful power-on and power-off response message to the host. If it is powered on, it indicates that the port has been powered on successfully and data access to the SSD can be performed; if it is powered off, it indicates that the port has been powered off successfully and the SSD has been removed. Since only one port is required to send the FTL power-on and power-off request to the FTL, the efficiency of executing the host power-on and power-off instructions can be improved. At the same time, at least one port sends a successful power-on and power-off response message to the host. In the event of a failure of one port, the normal use of the other port will not be affected, thereby increasing the stability of the dual-port SSD.

[0091] To facilitate those skilled in the art to better understand the power-on and power-off control method provided in the embodiment of the present application, the power-on and power-off control method is described in detail below using the specific implementation scenarios corresponding to power-on and power-off as an example.

[0092] Please refer to Figure 3 , Figure 3 The following is a schematic diagram of a power-on process of a power-on and power-off control method according to an embodiment of the present application.

[0093] When a dual-port SSD is inserted into a host and the host is powered on, when the two ports receive power-on requests from the host respectively, the front-end module will first initialize the PCIe and NVMe layers of the two ports, mainly including processing PCIe linkup, configuring registers, creating NVMe admin queues, etc.; after initialization is completed, it will send a power-on request to the FTL, where the two ports are named port0 and port1; when port0 is ready to send a power-on request to the FTL, it must first determine whether port 1 (port1) has sent a power-on request to the FTL. If port 1 has sent a power-on request, port0 waits for the result of the FTL power-on. If the FTL power-on is successful, port0 and port1 will update the power-on success status to the host; if the FTL power-on fails, port1 will update the power-on failure status to the host, and port0 will send a power-on request to the FTL again. If the FTL power-on is successful, port0 will update the power-on success status to the host, otherwise, port0 will update the power-on failure status to the host.

[0094] If port 1 does not send a power-on request to the FTL, port 0 will send a power-on request to the FTL, and the subsequent behavior of port 1 is consistent with the above behavior of port 0.

[0095] Please refer to Figure 4 , Figure 4 This is a schematic diagram of a power-off process of a power-on and power-off control method in an embodiment of the present application. The specific process is as follows:

[0096] When the host is powered off, both port0 and port1 first perform front-end module processing, such as deleting the nvme admin queue, and then initiate a power-off request to the FTL. When port0 is about to send a power-off request to the FTL, it first determines whether port1 has already sent a power-off request to the FTL. If port1 has already sent a power-off request to the FTL, port0 must wait for the FTL to receive the power-off result. If successful, both port0 and port1 will update the host with a power-off success status. If unsuccessful, both port0 and port1 will update the host with a power-off failure status. If port1 has not sent a power-off request to the FTL, it indicates that the FTL module is currently running, and port0 will directly return a power-off success message to the host.

[0097] The solution provided by the embodiments of the present application can achieve dual-port power-on and power-off isolation at the PCIe level (i.e., a port failure does not affect the use of the other port). The algorithm module FTL is shared, and each port can independently support host power-on and power-off, PCIe linkdown, and other commands without affecting the other port. It can quickly respond to host commands, and the dual-port system can ensure data protection.

[0098] Corresponding to the above method embodiment, the embodiment of the present application further provides an on / off power control device. The on / off power control device described below and the on / off power control method described above can refer to each other.

[0099] See also Figure 5 As shown, the device is applied to an SSD controller and includes the following modules:

[0100] The host request receiving unit 101 is used to receive power on and off requests sent by the host using the first port and the second port respectively;

[0101] A pre-processing unit 102 is used to perform power-on and power-off pre-processing in the front-end module of the SSD;

[0102] The request sending unit 103 is configured to send an FTL power-on / off request to the FTL of the SSD using the first port or the second port after the pre-processing is completed;

[0103] The response unit 104 is configured to send a response message of successful power on and off to the host via the first port and / or the second port after the FTL feedbacks that the power on and off is successful.

[0104] The device provided in the embodiment of the present application is applied to an SSD controller, including: using the first port and the second port to respectively receive power-on and power-off requests sent by the host; performing power-on and power-off preprocessing in the front-end module of the SSD; after the preprocessing is completed, using the first port or the second port to send an FTL power-on and power-off request to the FTL of the SSD; after the FTL feedback that the power-on and power-off is successful, using the first port and / or the second port to send a response message of the power-on and power-off success to the host.

[0105] When powering on and off a dual-port SSD, the first port and the second port respectively receive power-on and power-off requests sent by the host. Then, power-on and power-off preprocessing is performed in the front-end module. After the preprocessing is completed, one port can send an FTL power-on and power-off request to the FTL. When the FTL reports that the power-on and power-off is successful, at least one of the first and second ports is used to send a successful power-on and power-off response message to the host. The port sends a successful power-on and power-off response message to the host. If it is powered on, it indicates that the port has been powered on successfully and data access to the SSD can be performed; if it is powered off, it indicates that the port has been powered off successfully and the SSD has been removed. Since only one port is required to send the FTL power-on and power-off request to the FTL, the efficiency of executing the host power-on and power-off instructions can be improved. At the same time, at least one port sends a successful power-on and power-off response message to the host. In the event of a failure of one port, the normal use of the other port will not be affected, thereby increasing the stability of the dual-port SSD.

[0106] In a specific embodiment of the present application, the pre-processing unit 102 is specifically configured to perform initialization processing on the first port and the second port if the power-on and power-off request is a power-on request; wherein the first port and the second port belong to the front-end module;

[0107] If the power-on / off request is a power-off request, a front-end module is used to perform power-off pre-processing.

[0108] In a specific implementation of the present application, the pre-processing unit 102 is specifically configured to establish connections to the first port and the second port respectively, configure registers, and create an nvme admin queue.

[0109] In a specific implementation of the present application, the pre-processing unit 102 is specifically configured to delete the nvme admin queues corresponding to the first port and the second port, respectively.

[0110] In a specific embodiment of the present application, the request sending unit 103 is specifically configured to send an FTL power on / off request to the FTL using the first port;

[0111] If the FTL reports that the first port is powered on and off successfully, it is determined that both the first port and the second port are powered on and off successfully;

[0112] If the FTL reports that the power on and off of the first port fails, the second port is used to send an FTL power on and off request to the FTL.

[0113] In a specific embodiment of the present application, the response unit 104 is specifically configured to send a response message of successful power on and off to the host using the first port and the second port respectively if the FTL reports that the first port is powered on and off successfully;

[0114] If the FTL reports that the first port fails to power on and off but the second port succeeds, the FTL sends a power on and off success response message to the host via the second port and sends a power on and off failure response message to the host via the first port.

[0115] In a specific embodiment of the present application, the response unit 104 is configured to send power failure response messages to the host using the first port and the second port respectively if the FTL reports that the first port fails to power on and off and the second port fails to power on and off.

[0116] Corresponding to the above method embodiment, the embodiment of the present application further provides a dual-port SSD. The dual-port SSD described below and the power-up and power-down control method described above can be referenced to each other.

[0117] Please refer to Figure 6 , Figure 6 Schematic diagram of a dual-port SSD. The dual-port SSD includes:

[0118] Storage unit 100 and SSD controller 200;

[0119] The dual-port controller includes a front-end module 201 and an FTL 202; the front-end module includes a first port port0 and a second port port1;

[0120] When the dual-port SSD controller executes the computer program, the steps of the power-on and power-off control method in the above embodiment are implemented.

[0121] The storage unit may specifically be a FLASH chip or a DRAM chip.

[0122] Since the dual-port SSD controller can implement the steps of the power-on and power-off control method in the above embodiment, the dual-port SSD can quickly respond to the power-on and power-off of the host, and can use the other port normally when one port fails, with high data stability and security.

[0123] Corresponding to the above method embodiment, an embodiment of the present application further provides a readable storage medium. The readable storage medium described below and the power-up and power-down control method described above can refer to each other.

[0124] A readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the power-on and power-off control method of the above-mentioned method embodiment.

[0125] The readable storage medium may specifically be any readable storage medium that can store program code, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0126] Those skilled in the art may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the composition and steps of each example according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

Claims

1. A power on / off control method, characterized in that: Applied to SSD controllers, including: Utilizing the first port and the second port to receive power on and off requests sent by the host respectively; Perform power-on and power-off pre-processing in the SSD front-end module; After the preprocessing is completed, using the first port or the second port to send an FTL power-on or power-off request to the FTL of the SSD; After the FTL reports that the power on and power off are successful, it uses the first port and / or the second port to send a response message of successful power on and power off to the host.

2. The power on / off control method according to claim 1, characterized in that: Perform power-on and power-off preprocessing in the SSD front-end module, including: If the power-on and power-off request is a power-on request, initializing the first port and the second port; wherein the first port and the second port belong to the front-end module; If the power-on / off request is a power-off request, power-off pre-processing is performed using the front-end module.

3. The power on / off control method according to claim 2, characterized in that: Initializing the first port and the second port includes: Establish connections to the first port and the second port respectively, configure registers, and create an nvme admin queue.

4. The power on / off control method according to claim 3, characterized in that: The front-end module is used to perform power-off pre-processing, including: The nvme admin queues corresponding to the first port and the second port are deleted respectively.

5. The power on / off control method according to any one of claims 1 to 4, characterized in that: Using the first port or the second port, sending an FTL power-on and power-off request to the FTL of the SSD includes: Sending the FTL power on and off request to the FTL using the first port; If the FTL reports that the first port is powered on and off successfully, it is determined that both the first port and the second port are powered on and off successfully; If the FTL reports that the power on and off of the first port fails, the second port is used to send the FTL power on and off request to the FTL.

6. The power on / off control method according to claim 5, characterized in that: After the FTL reports that the power on and power off are successful, sending a power on and power off success response message to the host using the first port and / or the second port includes: If the FTL reports that the first port is powered on and off successfully, the FTL uses the first port and the second port to send a successful power-on and power-off response message to the host respectively; If the FTL reports that the first port fails to be powered on and off, but the second port is successfully powered on and off, the second port is used to send a response message of successful power on and off to the host, and the first port is used to send a response message of failed power on and off to the host.

7. The power on / off control method according to claim 5, characterized in that: If the FTL reports that the first port fails to be powered on and off, and the second port fails to be powered on and off, the method further includes: The first port and the second port are used to send a response message of the power on and power off failure to the host respectively.

8. A power on / off control device, characterized in that: Applied to SSD controllers, including: A host request receiving unit, configured to receive power on and off requests sent by the host using the first port and the second port respectively; A pre-processing unit is used to perform power-on and power-off pre-processing in the front-end module of the SSD; A request sending unit, configured to send an FTL power-on and power-off request to the FTL of the SSD using the first port or the second port after the preprocessing is completed; The response unit is configured to send a response message of successful power on and off to the host by using the first port and / or the second port after the FTL feeds back that the power on and off are successful.

9. A dual-port SSD, characterized in that: include: Storage unit and SSD controller; Wherein, the SSD controller includes a front-end module and an FTL; the front-end module includes a first port and a second port; When the SSD controller executes the computer program, the steps of the power-on and power-off control method according to any one of claims 1 to 7 are implemented.

10. A readable storage medium, characterized in that: The readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the power-on and power-off control method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Dual-port solid-state storage device and data processing method thereof

    CN110377221A

  • File system state monitoring method and device based on dual-port SSD and electronic equipment

    CN111639008A