An operation control method, apparatus, electronic device, and storage medium

By using Lockdown operation technology to disable target commands in parallel operations, SSD data consistency and security are ensured in multi-user or process environments, thus solving anomaly issues in shared storage.

CN116301600BActive Publication Date: 2025-11-14INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310120395.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-15
Publication Date
2025-11-14
Estimated Expiration
2043-02-15

AI Technical Summary

Technical Problem

In shared storage scenarios, it is difficult to maintain data consistency when multiple users or processes operate in parallel, leading to SSD anomalies such as resource contention and data loss, especially due to the lack of restrictions on controller-level Admin commands.

Method used

By responding to user operation locking commands, the target operation command is disabled, and when receiving and executing user commands, operation commands from other users or processes are blocked. The target operation command is then enabled after the user command is completed. Lockdown operation locking technology is used to restrict Admin, IO, and out-of-band management commands.

Benefits of technology

It effectively avoids SSD anomalies caused by parallel operations, ensures data consistency and resource safety, and avoids the execution of unwanted operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116301600B_ABST
    Figure CN116301600B_ABST
Patent Text Reader

Abstract

This invention provides an operation control method, apparatus, electronic device, and storage medium. The method includes: a host disabling a target operation command in response to an operation lock command issued by a user; receiving the operation command issued by the user and sending it to an SSD; while the SSD is executing the user-issued operation command, if the SSD receives an operation command from another user or process that is the target operation command, then the operation command from the other user or process is not executed; after the user-issued operation command is executed, the target operation command is enabled in response to an operation unlock command issued by the user. This invention first disables the target operation command, then executes the user-issued operation command, and finally enables the previously disabled target operation after the operation command is executed. This allows users to avoid other users or processes executing unwanted operations when using the SSD, thereby avoiding the problem of SSD malfunction caused by parallel operations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to an operation control method, an operation control method apparatus, an electronic device, and a computer-readable storage medium. Background Technology

[0002] With the continuous development of SSD (Solid State Disk) technology, the performance and functions of SSDs have been gradually enhanced and expanded. With the rise of big data and cloud computing, the scale of data centers is also expanding, and the requirements for the performance and functions of storage devices are becoming increasingly higher.

[0003] To improve storage device availability, multiple users may share the same SSD; for the same user, multiple task processes may simultaneously access the same SSD. However, parallel operations in shared storage environments can easily lead to SSD anomalies such as difficulty maintaining data consistency, resource contention, and data loss due to accidental operations. Summary of the Invention

[0004] In view of the above problems, embodiments of the present invention are proposed to provide an operation control method, an operation control method apparatus, an electronic device, and a computer-readable storage medium that overcome or at least partially solve the above problems.

[0005] To address the aforementioned problems, this invention discloses an operation control method applied to a host computer, which is communicatively connected to a solid-state drive (SSD). The method includes:

[0006] In response to a user-issued operation lock command, disable the target operation command;

[0007] Receive operation commands issued by the user and send the operation commands issued by the user to the SSD;

[0008] When the SSD executes the operation command issued by the user, if the operation command issued by other users or other processes received by the SSD is the target operation command, then the operation command issued by other users or other processes will not be executed.

[0009] After the user-issued operation command is executed, the target operation command is enabled in response to the user-issued operation enable command.

[0010] Optionally, the operation lock command includes parameters of the command to be disabled. These parameters include the command set containing the command to be disabled, the command identifier of the command to be disabled, and the permission settings corresponding to the command to be disabled. The permission settings include disabling settings. The step of disabling the target operation command in response to the user-issued operation lock command includes:

[0011] Based on the command set to which the command to be disabled belongs, the command identifier of the command to be disabled, and the disabling settings corresponding to the command to be disabled, determine whether the command to be disabled is a command that the SSD supports disabling.

[0012] If the command to be disabled is a command that the SSD supports disabling, then the command to be disabled is disabled.

[0013] Optionally, the method further includes:

[0014] If the command to be disabled is one that the SSD does not support disabling, an operation lock command error message will be returned.

[0015] Optionally, after the operation commands issued by the other user or other process are not executed, the method further includes:

[0016] The system receives information from the SSD indicating that operation commands issued by other users or processes are disabled.

[0017] Optionally, the operation lock command includes parameters of the command to be enabled. These parameters include the command set containing the command to be enabled, the command identifier of the command to be enabled, and the permission settings corresponding to the command to be enabled. The permission settings include enabling settings. The step of enabling the target operation command in response to an operation unlock command issued by the user after the user-issued operation command has been executed includes:

[0018] After the user-issued operation command is executed, the command to be enabled is activated according to the command set to which the command to be enabled belongs, the command identifier of the command to be enabled, and the activation settings corresponding to the command to be enabled.

[0019] Optionally, before disabling the target operation command in response to a user-issued operation lock command, the method further includes:

[0020] Receive a user-sent command to view disableable commands, and send the disableable command view command to the SSD;

[0021] The system receives a list of disableable commands that support operation locking commands returned by the SSD, so that the user can issue an operation locking command for the disableable commands based on the list of disableable commands.

[0022] Optionally, before disabling the target operation command in response to a user-issued operation lock command, the method further includes:

[0023] Receive a user-sent command to view disabled commands, and send the command to the SSD;

[0024] The system receives a list of disabled commands returned by the SSD, allowing the user to view the disabled commands based on this list.

[0025] This invention also discloses an operation control device, which is applied to a host computer and is communicatively connected to a solid-state drive (SSD). The device includes:

[0026] The disable module is used to disable the target operation command in response to a user-issued operation lock command;

[0027] The dispatch module is used to receive operation commands issued by the user and dispatch the operation commands issued by the user to the SSD;

[0028] The execution module is configured to, when the SSD executes the operation command issued by the user, not execute the operation command issued by other users or other processes received by the SSD as the target operation command;

[0029] The enabling module is used to enable the target operation command in response to the operation opening command issued by the user after the operation command issued by the user has been executed.

[0030] Optionally, the operation locking command includes parameters of the command to be disabled. The parameters of the command to be disabled include the command set to which the command to be disabled belongs, the command identifier of the command to be disabled, and the permission settings corresponding to the command to be disabled. The permission settings include disabling settings. The disabling module includes:

[0031] The disable judgment submodule is used to determine whether the command to be disabled is a command that the SSD supports disabling, based on the command set where the command to be disabled belongs, the command identifier of the command to be disabled, and the disable settings corresponding to the command to be disabled.

[0032] The command disable submodule is used to disable the command to be disabled if it is a command that the SSD supports disabling.

[0033] Optionally, the device further includes:

[0034] The error message return module is used to return an operation lock command error message if the command to be disabled is a command that the SSD does not support for disabling.

[0035] Optionally, after the operation commands issued by the other user or other process are not executed, the device further includes:

[0036] The information receiving module has been disabled, which is used to receive information returned by the SSD indicating that operation commands issued by other users or other processes are in a disabled state.

[0037] Optionally, the operation locking command includes parameters of the command to be enabled. These parameters include the command set to which the command to be enabled belongs, the command identifier of the command to be enabled, and the permission settings corresponding to the command to be enabled. The permission settings include enabling settings. The enabling module includes:

[0038] The command activation submodule is used to activate the command to be activated after the operation command issued by the user has been executed, based on the command set to which the command to be activated belongs, the command identifier of the command to be activated, and the activation settings corresponding to the command to be activated.

[0039] Optionally, before disabling the target operation command in response to a user-issued operation lock command, the method further includes:

[0040] The disableable command viewing module is used to receive disableable command viewing commands issued by the user and send the disableable command viewing commands to the SSD;

[0041] The disableable command list receiving module is used to receive the disableable command list returned by the SSD, which supports operation locking commands, so that the user can issue operation locking commands for the disableable commands according to the disableable command list.

[0042] Optionally, before disabling the target operation command in response to a user-issued operation lock command, the method further includes:

[0043] The disabled command viewing module is used to receive the disabled command viewing command issued by the user and send the disabled command viewing command to the SSD;

[0044] The disabled command list receiving module is used to receive the disabled command list returned by the SSD, so that the user can view the disabled commands according to the disabled command list.

[0045] This invention also discloses an electronic device, including: a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the steps of the operation control method described above.

[0046] This invention also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the operation control method described above.

[0047] The embodiments of the present invention have the following advantages:

[0048] In this embodiment of the invention, in response to a user-issued operation lock command, the target operation command can be disabled; the user-issued operation command can be received and sent to the SSD; while the SSD is executing the user-issued operation command, if the SSD receives an operation command from another user or other process that is the target operation command, then the operation command from the other user or other process will not be executed; after the user-issued operation command is executed, in response to a user-issued operation unlock command, the target operation command can be enabled. This embodiment of the invention, by first disabling the target operation command, then executing the user-issued operation command, and finally enabling the previously disabled target operation after the user-issued operation command is executed, allows users to avoid other users or other processes executing unwanted operations when using the SSD, thereby avoiding the problem of SSD malfunctions caused by some parallel operations. Attached Figure Description

[0049] Figure 1 This is a flowchart of the operation control method provided in an embodiment of the present invention;

[0050] Figure 2 This is a flowchart of another operation control method provided in an embodiment of the present invention;

[0051] Figure 3 This is a flowchart illustrating a method of locking using a Lockdown operation, as provided in an embodiment of the present invention.

[0052] Figure 4 This is a structural block diagram of an operation control device provided in an embodiment of the present invention. Detailed Implementation

[0053] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0054] To improve storage device availability, multiple users may share the same SSD; for the same user, multiple task processes may simultaneously access the same SSD. However, parallel operations in shared storage environments can easily lead to SSD anomalies such as difficulty maintaining data consistency, resource contention, and data loss due to accidental operations.

[0055] Currently, to address the aforementioned issues with shared storage, multiple namespaces (a unit of independent read and write operations for an SSD) can be used to divide the storage space into multiple subspaces and assign different subspaces to different users, ensuring independent read and write operations for each subspace. Alternatively, reservation technology can be employed, where multiple users sharing the same namespace can obtain read and write permissions by reserving a specific permission; users without reservations cannot read or write to the namespace. However, current methods primarily restrict user data read / write paths and command permissions, lacking restrictions on controller-level Admin commands. For example, two users might attempt to format or set features on the same SSD.

[0056] One of the core concepts of this invention is that it can disable a target operation command in response to a user-issued operation lock command; receive the user-issued operation command and send it to the SSD; while the SSD is executing the user-issued operation command, if the SSD receives an operation command from another user or other process that is the target operation command, then the operation command from the other user or other process will not be executed; after the user-issued operation command is executed, it enables the target operation command in response to a user-issued operation unlock command. This invention, by first disabling the target operation command, then executing the user-issued operation command, and finally enabling the previously disabled target operation after the user-issued operation command is executed, allows users to avoid other users or other processes executing unwanted operations when using the SSD, thereby avoiding the problem of SSD malfunctions caused by some parallel operations.

[0057] Reference Figure 1 The diagram illustrates a flowchart of an operation control method according to an embodiment of the present invention. The method is applied to a host computer, which is communicatively connected to a solid-state drive (SSD). The method may specifically include the following steps:

[0058] Step 101: In response to the operation lock command issued by the user, disable the target operation command.

[0059] In a specific implementation, the operation lock command can refer to the Lockdown command. The user can issue a Lockdown command, and the host can respond to the Lockdown command issued by the user to disable the target operation command, that is, the command sent to the controller or management endpoint of the NVM (Non-volatile memory) subsystem (which can refer to an SSD disk).

[0060] The types of disabled target operation commands can include Admin Command Set (SSD management command set), Feature Identifier of “set feature”, Management Interface Command Set (out-of-band management interface command set), and IO (Input / Output) Command Set (SSD read / write command set).

[0061] In this embodiment of the invention, a Lockdown operation command is used. The host can actively disable and re-enable some Admin management commands, IO read / write commands, and out-of-band management commands. Users can disable commands they do not want to be executed when using the SSD, thereby avoiding SSD disk anomalies caused by some parallel operations. Using the operation locking command can avoid some dangerous operations, such as SSD reset operations during formatting, and formatting operations during IO read / write operations.

[0062] Step 102: Receive the operation command issued by the user and send the operation command issued by the user to the SSD.

[0063] After disabling the target operation command, the user can issue operation commands, the host can receive the operation commands issued by the user, and then send the operation commands issued by the user to the SSD.

[0064] Step 103: When the SSD executes the operation command issued by the user, if the operation command issued by other users or other processes received by the SSD is the target operation command, then the operation command issued by other users or other processes will not be executed.

[0065] In practical implementation, when commands in the aforementioned command sets are defined as disabled by the Lockdown command, if the SSD receives disabled commands from other users or processes while executing user-issued operation commands, it can choose not to execute those other user or process commands. It should be noted that the Lockdown command itself belongs to the Admin Command Set, and it can be pre-configured so that the Lockdown command itself cannot be disabled.

[0066] Step 104: After the operation command issued by the user is executed, the target operation command is enabled in response to the operation enable command issued by the user.

[0067] In practical implementation, the operation opening command can refer to the Lockdown command. It should be noted that disabling and enabling a command can use different parameters of the same command. After the user-issued operation command is executed, the target operation command can be enabled in response to the user-issued Lockdown command.

[0068] In this embodiment of the invention, in response to a user-issued operation lock command, the target operation command can be disabled; the user-issued operation command can be received and sent to the SSD; while the SSD is executing the user-issued operation command, if the SSD receives an operation command from another user or other process that is the target operation command, then the operation command from the other user or other process will not be executed; after the user-issued operation command is executed, in response to a user-issued operation unlock command, the target operation command can be enabled. This embodiment of the invention, by first disabling the target operation command, then executing the user-issued operation command, and finally enabling the previously disabled target operation after the user-issued operation command is executed, allows users to avoid other users or other processes executing unwanted operations when using the SSD, thereby avoiding the problem of SSD malfunctions caused by some parallel operations.

[0069] Reference Figure 2 The diagram illustrates a flowchart of another operation control method provided by an embodiment of the present invention. The method is applied to a host computer, which is communicatively connected to a solid-state drive (SSD). The method may specifically include the following steps:

[0070] Step 201: Receive the user's command to view the disableable commands, and send the command to the SSD.

[0071] The command to view which commands can be disabled is the Supported Lockdown Log Page command. Users can use the Supported Lockdown Log Page command to see which commands in the current command set can be disabled.

[0072] In its implementation, the Supported Lockdown log page command, as a subcommand of the standard get log page command, can use the new log page id 14h. Specifically, in DW10 (Adobe Dreamweaver, a code editing software), bits 07:00 can be used to specify the log page id 14h, bits 11:08 can be used to specify the returned command set opcode, and other bytes can remain consistent with the standard get log page command.

[0073] Step 202: Receive the list of disabled commands that support operation locking commands returned by the SSD, so that the user can issue an operation locking command for the disabled commands according to the list of disabled commands.

[0074] In its implementation, when the Supported Lockdown log page command is successfully executed, it returns a list of commands that support Lockdown. See Table 1 for the data structure returned by the Supported Lockdown log page command.

[0075] Bytes name describe 0 Command type Indicates the type of command set returned. 1 Length This indicates the length of the returned data, i.e., there are n commands below. 3:2 Reserved fields / n+3:4 command and feature ID This indicates the command ID that supports Lockdown.

[0076] Table 1

[0077] As an example, the return result after executing the Supported Lockdown log page command can be as follows:

[0078] root@lihanqing-MS-7C82: / home / lhq / ms#. / inspurLli supported-lockdown-log / dev / nvme0

[0079] Supported Lockdown Log Page

[0080] request command type:0-Admin Command

[0081] command id(0):0x8

[0082] command id(1):0x9

[0083] command id(2):0xc

[0084] command id(3):0x10

[0085] command id(4):0x11

[0086] command id(5):0x14

[0087] command idi6):0x18

[0088] command id(7):0x1d

[0089] command id(8):0x1e

[0090] Step 203: In response to the operation lock command issued by the user, disable the target operation command.

[0091] In an optional embodiment, the operation locking command includes parameters of the command to be disabled. The parameters of the command to be disabled include the command set to which the command to be disabled belongs, the command identifier of the command to be disabled, and the permission settings corresponding to the command to be disabled. The permission settings include a disable setting. Step 203 may include the following sub-steps S11-S12:

[0092] Sub-step S11: Based on the command set to which the command to be disabled belongs, the command identifier of the command to be disabled, and the disabling settings corresponding to the command to be disabled, determine whether the command to be disabled is a command that the SSD supports disabling.

[0093] Sub-step S12: If the command to be disabled is a command that the SSD supports disabling, then disable the command to be disabled.

[0094] In its implementation, the Lockdown command, as a command in the Admin Command Set, can use the standard Admin command format. In this embodiment of the invention, when a command needs to be disabled, DW10 can be used to specify various parameters. Table 2 shows the parameters in the Lockdown command when a command needs to be disabled. Among them, Command opcode is used to represent the command identifier of the command to be disabled, Command type is used to represent the command set to which the command to be disabled belongs, and disable is used to represent the permission settings corresponding to the command to be disabled.

[0095]

[0096] Table 2

[0097] In this embodiment of the invention, the Command opcode, disable, and Command type parameters in the Lockdown command can be used to determine whether the command to be disabled is one that the SSD supports disabling. If the command to be disabled is one that the SSD supports disabling, then the command to be disabled can be disabled.

[0098] In an optional embodiment, the method may further include: if the command to be disabled is a command that the SSD does not support for disabling, then return an operation lock command error message.

[0099] In this embodiment of the invention, if the command to be disabled is one that the SSD does not support, then Lockdown is invalid and returns a command error. As an example, when the command opcode in DW10 specifies an unsupported opcode or id, the Lockdown command returns a "Prohibition of Command Execution Not Supported" error status. As another example, if the Command type field is set to 2h, and the NVM subsystem does not support MI functionality, the Lockdown command returns an "invalid field" error status.

[0100] It should be noted that the Lockdown command can be executed normally when it is used to disable a command that has been disabled or to re-enable a command that has been enabled.

[0101] Step 204: Receive the operation command issued by the user and send the operation command issued by the user to the SSD.

[0102] Step 205: When the SSD executes the operation command issued by the user, if the operation command issued by another user or another process received by the SSD is the target operation command, then the operation command issued by the other user or another process will not be executed.

[0103] In an optional embodiment, after the operation command issued by the other user or other process is not executed, the method may further include: receiving information returned by the SSD that the operation command issued by the other user or other process is in a disabled state.

[0104] In this embodiment of the invention, if the SSD receives an operation command from another user or other process issued by the host that is a disabled command, it will not execute the operation command, but will return information that the operation command is in a disabled state.

[0105] Step 206: After the operation command issued by the user is executed, in response to the operation enable command issued by the user, enable the target operation command.

[0106] In an optional embodiment, the operation lock command includes parameters of the command to be enabled. The parameters of the command to be enabled include the command set in which the command to be enabled is located, the command identifier of the command to be enabled, and the permission settings corresponding to the command to be enabled. The permission settings include an enable setting. Step 206 may include: after the operation command issued by the user is executed, enabling the command to be enabled according to the command set in which the command to be enabled is located, the command identifier of the command to be enabled, and the enable setting corresponding to the command to be enabled.

[0107] In this embodiment of the invention, after the operation command issued by the user is executed, the command that has been disabled can be re-enabled in response to the operation enable command issued by the user. At this time, DW10 can be used to specify each parameter. Table 3 shows the parameters in the Lockdown command when the command needs to be re-enabled.

[0108]

[0109] Table 3

[0110] In this embodiment of the invention, after the user-issued operation command is executed, the command to be enabled can be activated according to the Command opcode, disable, and Command type parameters in the Lockdown command.

[0111] In an optional embodiment, before disabling the target operation command in response to the operation lock command issued by the user, the method may further include: receiving a disabled command viewing command issued by the user and sending the disabled command viewing command to the SSD; receiving a list of disabled commands returned by the SSD so that the user can view the disabled commands according to the list of disabled commands.

[0112] The command to view disabled commands can be the Locked Log Page command. Users can use the Locked Log Page command to see which commands are currently disabled.

[0113] In its implementation, the Locked Log Page command can return a list of commands that have been locked, serving as a subcommand of the standard get log page command. It can use the new log page ID 15h. Specifically, you can specify the log page ID 14h using bits 07:00 in DW10, and specify the returned command set opcode using bits 11:08. Other bytes can remain consistent with the standard get log page command. It should be noted that the data structure returned by the Locked Log Page command can be the same as the data structure returned by the Supported Lockdown Log Page command.

[0114] In this embodiment of the invention, in response to a user-issued operation lock command, the target operation command can be disabled; the user-issued operation command can be received and sent to the SSD; while the SSD is executing the user-issued operation command, if the SSD receives an operation command from another user or other process that is the target operation command, then the operation command from the other user or other process will not be executed; after the user-issued operation command is executed, in response to a user-issued operation unlock command, the target operation command can be enabled. This embodiment of the invention, by first disabling the target operation command, then executing the user-issued operation command, and finally enabling the previously disabled target operation after the user-issued operation command is executed, allows users to avoid other users or other processes executing unwanted operations when using the SSD, thereby avoiding the problem of SSD malfunctions caused by some parallel operations.

[0115] To enable those skilled in the art to better understand the embodiments of the present invention, the description is specifically based on the format command. The format command can modify the attribute information of the controller and namespace, and the format command takes a certain amount of time to execute. Therefore, during the execution of the format command, it is necessary to prevent other commands that may modify the controller and namespace from being executed to avoid causing confusion. The Lockdown command can be used to achieve the above effect.

[0116] Reference Figure 3This document provides a flowchart illustrating the use of a Lockdown operation for locking, as provided in an embodiment of the present invention. Before executing the `format` command, related I / O (Input / Output) services can be stopped. The Lockdown command is used to disable I / O commands, namespace management-related creation, deletion, detach, attach commands, and other related commands. Then, the `format` command is executed. After `format` completes, the controller and namespace attribute information is identified through re-enumeration (identify) or re-initialization (reset). Finally, the Lockdown command is used to enable the previously disabled commands.

[0117] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.

[0118] Reference Figure 4 The diagram illustrates a structural block diagram of an operation control device according to an embodiment of the present invention. The device is applied to a host computer, which is communicatively connected to a solid-state drive (SSD). Specifically, it may include the following modules:

[0119] The disabled module 401 is used to disable the target operation command in response to the operation lock command issued by the user;

[0120] The sending module 402 is used to receive operation commands sent by the user and send the operation commands sent by the user to the SSD;

[0121] The execution module 403 is configured to, when the SSD executes the operation command issued by the user, not execute the operation command issued by other users or other processes received by the SSD as the target operation command;

[0122] The enable module 404 is used to enable the target operation command in response to the operation enable command issued by the user after the operation command issued by the user has been executed.

[0123] In an optional embodiment, the operation locking command includes parameters of the command to be disabled. The parameters of the command to be disabled include the command set to which the command to be disabled belongs, the command identifier of the command to be disabled, and the permission settings corresponding to the command to be disabled. The permission settings include disabling settings. The disabling module includes:

[0124] The disable judgment submodule is used to determine whether the command to be disabled is a command that the SSD supports disabling, based on the command set where the command to be disabled belongs, the command identifier of the command to be disabled, and the disable settings corresponding to the command to be disabled.

[0125] The command disable submodule is used to disable the command to be disabled if it is a command that the SSD supports disabling.

[0126] In an optional embodiment, the device further includes:

[0127] The error message return module is used to return an operation lock command error message if the command to be disabled is a command that the SSD does not support for disabling.

[0128] In an optional embodiment, after the operation commands issued by the other user or other process are not executed, the device further includes:

[0129] The information receiving module has been disabled, which is used to receive information returned by the SSD indicating that operation commands issued by other users or other processes are in a disabled state.

[0130] In an optional embodiment, the operation locking command includes parameters of a command to be enabled. These parameters include the command set containing the command to be enabled, the command identifier of the command to be enabled, and the permission settings corresponding to the command to be enabled. The permission settings include enabling settings. The enabling module includes:

[0131] The command activation submodule is used to activate the command to be activated after the operation command issued by the user has been executed, based on the command set to which the command to be activated belongs, the command identifier of the command to be activated, and the activation settings corresponding to the command to be activated.

[0132] In an optional embodiment, before disabling the target operation command in response to a user-issued operation lock command, the method further includes:

[0133] The disableable command viewing module is used to receive disableable command viewing commands issued by the user and send the disableable command viewing commands to the SSD;

[0134] The disableable command list receiving module is used to receive the disableable command list returned by the SSD, which supports operation locking commands, so that the user can issue operation locking commands for the disableable commands according to the disableable command list.

[0135] In an optional embodiment, before disabling the target operation command in response to a user-issued operation lock command, the method further includes:

[0136] The disabled command viewing module is used to receive the disabled command viewing command issued by the user and send the disabled command viewing command to the SSD;

[0137] The disabled command list receiving module is used to receive the disabled command list returned by the SSD, so that the user can view the disabled commands according to the disabled command list.

[0138] In this embodiment of the invention, in response to a user-issued operation lock command, the target operation command can be disabled; the user-issued operation command can be received and sent to the SSD; while the SSD is executing the user-issued operation command, if the SSD receives an operation command from another user or other process that is the target operation command, then the operation command from the other user or other process will not be executed; after the user-issued operation command is executed, in response to a user-issued operation unlock command, the target operation command can be enabled. This embodiment of the invention, by first disabling the target operation command, then executing the user-issued operation command, and finally enabling the previously disabled target operation after the user-issued operation command is executed, allows users to avoid other users or other processes executing unwanted operations when using the SSD, thereby avoiding the problem of SSD malfunctions caused by some parallel operations.

[0139] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0140] This invention also provides an electronic device, comprising:

[0141] It includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, it implements the various processes of the above-described operation control method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0142] This invention also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the above-described operation control method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0143] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0144] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0145] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0146] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0147] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0148] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.

[0149] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0150] The above provides a detailed description of the operation control method, device, electronic device, and storage medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. An operation control method, characterized in that, The method is applied to a host computer that is communicatively connected to a solid-state drive (SSD), and the method includes: In response to a user-issued operation lock command, disable the target operation command; Receive operation commands issued by the user and send the operation commands issued by the user to the SSD; When the SSD executes the operation command issued by the user, if the operation command issued by other users or other processes received by the SSD is the target operation command, then the operation command issued by other users or other processes will not be executed. After the user-issued operation command is executed, the target operation command is enabled in response to the user-issued operation enable command.

2. The method according to claim 1, characterized in that, The operation lock command includes parameters of the command to be disabled. These parameters include the command set containing the command, the command identifier of the command, and the permission settings corresponding to the command. The permission settings include disabling settings. The process of disabling the target operation command in response to the user-issued operation lock command includes: Based on the command set to which the command to be disabled belongs, the command identifier of the command to be disabled, and the disabling settings corresponding to the command to be disabled, determine whether the command to be disabled is a command that the SSD supports disabling. If the command to be disabled is a command that the SSD supports disabling, then the command to be disabled is disabled.

3. The method according to claim 2, characterized in that, The method further includes: If the command to be disabled is one that the SSD does not support disabling, an operation lock command error message will be returned.

4. The method according to claim 1, characterized in that, After the operation commands issued by the other user or other process are not executed, the method further includes: The system receives information from the SSD indicating that operation commands issued by other users or other processes are disabled.

5. The method according to claim 1, characterized in that, The operation lock command includes parameters for the command to be enabled. These parameters include the command set containing the command, the command identifier of the command, and the permission settings corresponding to the command. The permission settings include enabling settings. After the user-issued operation command is executed, in response to a user-issued operation unlock command, enabling the target operation command includes: After the user-issued operation command is executed, the command to be enabled is activated according to the command set to which the command to be enabled belongs, the command identifier of the command to be enabled, and the activation settings corresponding to the command to be enabled.

6. The method according to claim 1, characterized in that, Before disabling the target operation command in response to a user-issued operation lock command, the method further includes: Receive a command from the user to view the disableable commands, and send the command to the SSD; The system receives a list of disableable commands that support operation locking commands returned by the SSD, so that the user can issue an operation locking command for the disableable commands based on the list of disableable commands.

7. The method according to claim 1, characterized in that, Before disabling the target operation command in response to a user-issued operation lock command, the method further includes: Receive a user-sent command to view disabled commands, and send the command to the SSD; The system receives a list of disabled commands returned by the SSD, allowing the user to view the disabled commands based on this list.

8. An operation control device, characterized in that, The device is used in a host computer, which is communicatively connected to a solid-state drive (SSD). The device includes: The disable module is used to disable the target operation command in response to a user-issued operation lock command; The dispatch module is used to receive operation commands issued by the user and dispatch the operation commands issued by the user to the SSD; The execution module is configured to, when the SSD executes the operation command issued by the user, not execute the operation command issued by other users or other processes received by the SSD as the target operation command; The enabling module is used to enable the target operation command in response to the operation opening command issued by the user after the operation command issued by the user has been executed.

9. An electronic device, characterized in that, include: A processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the steps of the operation control method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the steps of the operation control method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Processing node, computer system and method for affair conflict detection

    CN107025130A

  • Data operation method, device and equipment and computer readable storage medium

    CN111580756A