WO2017071373A1 - Control method for operating storage device and storage device - Google Patents

Control method for operating storage device and storage device Download PDF

Info

Publication number
WO2017071373A1
WO2017071373A1 PCT/CN2016/095534 CN2016095534W WO2017071373A1 WO 2017071373 A1 WO2017071373 A1 WO 2017071373A1 CN 2016095534 W CN2016095534 W CN 2016095534W WO 2017071373 A1 WO2017071373 A1 WO 2017071373A1
Authority
WO
WIPO (PCT)
Prior art keywords
request
management node
storage device
sends
authority
Prior art date
Application number
PCT/CN2016/095534
Other languages
French (fr)
Chinese (zh)
Inventor
邱鑫
吴登奔
陈立钢
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2017071373A1 publication Critical patent/WO2017071373A1/en
Priority to US15/965,132 priority Critical patent/US10656874B2/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0659Command handling arrangements, e.g. command buffers, queues, command scheduling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus
    • G06F13/1605Handling requests for interconnection or transfer for access to memory bus based on arbitration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0637Permissions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]

Definitions

  • the present invention relates to the field of dynamic databases, and in particular, to a control method and a storage device for operating a storage device.
  • the non-volatile storage (Non-Volatile Memory Express, NVMe) protocol supports device management commands and can directly operate the storage device. This prevents the existing baseboard management controller (BMC) from directly operating on the storage device. Problem, but because the NVMe protocol can support multi-channel management, for example, the NVMe Management Interface (NVMe-MI) protocol can support Inter-Integrated Circuit (IIC or I2C), external Multi-channel, such as the Peripheral Component Interconnect Express (PCIE), manages the Management Component Transport Protocol (MCTP) at the same time.
  • the management node sends a management command to the storage device through the NVMe management interface.
  • the administrative command can be an operation command to read or write to the storage device.
  • the storage device may include multiple management interfaces. When multiple management nodes send management commands through multiple management interfaces, there may be a problem that multiple management nodes access the storage device at the same time.
  • An embodiment of the present invention provides a method, a storage device, and a management node for operating a storage device, by which one of a plurality of management nodes that request permission to apply for an operation authority is operated, and the operation is sent according to the management node having the operation authority. Requesting to perform the corresponding operation avoids conflicts between multiple management nodes operating the storage device at the same time.
  • an embodiment of the present invention provides a method for controlling a storage device, where the method includes: receiving a request sent by at least one management node, determining a type of the received request; and when the request is a request permission request, according to the current permission status Determining whether to grant the operation authority of the management node that sends the request permission request; when the request is an operation request, determining the tube for sending the operation request according to the current permission status Whether the node has the operation authority, and when it is determined that the management node that sends the operation request has the operation authority, the operation is performed according to the operation request.
  • the current privilege state records the state of the privilege granted by the access interface and the state of the execution request.
  • the current privilege state may be implemented by querying the state table, or may be implemented by other means.
  • the status table is updated, and the status table is used to pass the status table. It is determined whether the management node that sends the application permission request can give the operation authority, or whether the management node that sends the operation request has the operation authority to determine the operation authority and legality of the multiple management node.
  • the management node operation authority of the at least one management node that sends the request permission request is updated, and after updating the state table, The management node that sends the request for permission to send the response message is sent, so that the management node that requests the permission request sends an operation request to the storage device according to the response message.
  • determining, by the state table, whether the management node that sends the operation request has the operation authority includes: whether the management node with the operation authority marked in the query status table is sent The management node that operates the request, when the management node with the operation authority marked in the status table is the management node that sends the operation request, determines that the management node that sends the operation request has the operation authority.
  • the method further includes a release operation. Permissions to give this action permission to the tube that sends other requests Node.
  • the method further includes serializing the received request for use according to a chronological order of receiving the request Receive requests in turn.
  • the embodiment of the present invention provides a control method for operating a storage device, where the method includes: sending a request permission request to a storage device, where the storage device grants a management node operation permission to send an application permission request according to the application permission request. And sending a response message to the management node; receiving a response message sent by the storage device; and sending an operation request to the storage device according to the response message, so that the storage device performs an operation according to the operation request.
  • the operation authority before the operation of the storage device, the operation authority is first applied to the storage device, and in the case of having the operation authority, the operation request is sent, so that the storage device performs the operation according to the operation request. Avoid conflicts caused by multiple operation requests simultaneously performing operations on the storage device.
  • an embodiment of the present invention provides a storage device, where the storage device includes: a receiving module and a processing module, where the receiving module is configured to receive a request sent by at least one management node; and the processing module is configured to determine a type of the request, when the request is When requesting the permission request, determining whether to grant the operation authority of the management node that sends the request permission request; when the request is an operation request, determining whether the management node that sends the operation request has the operation authority, when the management node that sends the operation request has the operation authority, according to The operation requests an action.
  • the processing module may determine, by the state table, whether to grant the management node operation authority for transmitting the application permission request, or determine whether the management node that sends the operation request has the operation authority according to the state table.
  • the conflict problem caused by the plurality of management nodes performing the operation can be avoided.
  • the processing module is further configured to: When the management node operation authority for transmitting the application permission request is given, the status table is updated for determining whether the management node that sends the application permission request can give the operation authority through the status table, or whether the management node that sends the operation request has the operation authority It is used to judge the operation authority and legality of multiple management nodes.
  • the storage device further includes a sending module, configured to send a response message to the management node that sends the request permission request, in a second possible implementation manner of the third aspect, The management node for requesting the permission request sends an operation request to the storage device according to the response message.
  • the processing module is configured to query whether the management node marked in the status table is a management node that sends an operation request; when the management node marked in the status table is sent When the requested management node is operated, it is determined that the management node that sent the operation request has the operation authority.
  • the storage device further includes a release module, configured to release the operation authority, so as to send the operation authority to the sending Other requested management nodes.
  • the processing module is further configured to serialize the request to facilitate parsing in chronological order based on the received request.
  • an embodiment of the present invention provides a management node, where the management node includes a sending module and a receiving module, and the sending module is configured to send an application permission request to the storage device, where the storage device is used to perform an operation according to the received application permission request.
  • the receiving module sends a response message to the management node that sends the request permission request; the receiving module is configured to receive the response message sent by the storage device; and the sending module sends an operation request to the storage device according to the response message, where the storage device performs the operation according to the operation request.
  • an embodiment of the present invention provides a storage device, where the storage device includes at least one access Question interfaces, such as: service access interfaces, management interfaces, memory, and processors;
  • a memory for storing instructions and permission states
  • an embodiment of the present invention provides a non-transitory computer readable storage medium storing one or more programs, wherein the one or more programs include instructions that, when executed by a storage device, cause the storage device Perform the following events:
  • the current privilege state is the state in which the privilege recorded in the memory is granted the privilege and the state in which the request is executed when the request is received.
  • the permission status can be expressed in the form of a status table or in other logical ways.
  • the storage device operates the permission by one of the plurality of management nodes that are requested to apply for the permission, and according to the operation authority
  • the operation request sent by the management node performs the corresponding operation, which avoids the conflict of multiple management nodes simultaneously operating the storage device, and avoids the problem that the serial serial operation is interrupted.
  • FIG. 1 is a layered diagram of a NVME management system in the prior art
  • FIG. 2 is a schematic structural diagram of an NVME management subsystem in the prior art
  • FIG. 3 is a schematic flowchart of a method for controlling a storage device according to an embodiment of the present disclosure
  • FIG. 4 is a schematic diagram of a state table according to an embodiment of the present invention.
  • FIG. 5 is a schematic flowchart of a method for controlling a storage device according to another embodiment of the present invention.
  • FIG. 6 is a schematic flowchart of a method for controlling a storage device according to an embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of a storage device according to an embodiment of the present disclosure.
  • FIG. 8 is a schematic structural diagram of a storage device according to another embodiment of the present invention.
  • FIG. 9 is a schematic structural diagram of a management node according to an embodiment of the present invention.
  • FIG. 10 is a schematic structural diagram of a storage device according to another embodiment of the present invention.
  • the method, management node and storage device provided by the embodiments of the present invention are applied to a non-volatile storage (Non-Volatile Memory Express, NVMe) protocol, and the NVMe can reduce data read and write delays and provide higher performance.
  • the NVMe can support the device management command and directly operate the storage device.
  • the storage device can receive the operation request sent by multiple management nodes at the same time.
  • the management node can be a Baseboard Management Controller (BMC) or a host.
  • BMC Baseboard Management Controller
  • the request may be a read or write operation command.
  • the operation request causes a problem that the serial serial operation is interrupted.
  • the storage device first assigns the authority to perform the operation to a management node before the operation is performed, and the storage device sends the information according to the management node having the authority.
  • the operation request performs the corresponding operation, and after the execution is completed, the authority is released for other management nodes to perform other operations.
  • the storage device is a device for storing information
  • the device may be a hard disk, and includes: a solid state hard disk (for example, an SSD disk), a mechanical hard disk (HDD traditional hard disk), and the like having a device for storing information.
  • a solid state hard disk for example, an SSD disk
  • a mechanical hard disk HDD traditional hard disk
  • FIG. 3 is a schematic flowchart of a method for controlling a storage device according to an embodiment of the present invention.
  • an execution entity of the method 100 is a storage storage device, and the method 100 includes:
  • one of the at least one request is a request permission request, determine, according to the current permission status, whether to grant the operation authority of the management node that sends the application permission request;
  • one of the at least one request is an operation request
  • the storage device is a device for storing information, and the device may be a hard disk including: a solid state hard disk (such as an SSD disk), a mechanical hard disk (HDD traditional hard disk), or the like, and may also have other storage information.
  • the management node can be a host or a BMC.
  • the storage device receives a request sent by multiple management nodes, where the request may be an application permission request or an operation request; the storage device sequentially determines the type of the received request, and determines whether the received request is an application permission request or an operation request.
  • the storage device determines, according to the current permission status, whether there is a right to the management node that sends the request permission request.
  • the current permission status may be determined by querying the status table to determine whether there is an operation authority assigned to the management node that sends the application permission request, or whether the current status is performing an operation.
  • the storage device may further determine the current permission state according to a logical manner of other predetermined settings.
  • the current permission state is stored in the request for receiving the request. time.
  • the status table can be divided into two groups, one group is a permission status group, the other group is a request execution status group, the authority status group is used to indicate the operation authority of each management node, and the execution request status group is used. Whether the record storage device is performing the request operation.
  • the privilege status group the privilege status corresponding to the management node indicates that there is an operation authority with "1", and "0" indicates that the corresponding management node does not have operation authority.
  • the storage device When the storage device does not currently perform an operation and does not assign the operation authority to other management nodes, as shown in A of FIG. 4, the permission status of each management node in the authority status group and the status of the request execution status group are respectively “0”. At this time, the storage device can assign the operation authority to the management node that sends the request permission request. During the same period of time, the storage device allows a management node to obtain the operation authority. When the storage device receives the management node, for example, the application permission command sent by the BMC0, the storage device can assign the operation authority to the management node BMC0, as shown in B of FIG.
  • the authority status flag BMC0 has an operation authority, which is denoted as "1", and a management node that does not have an operation authority, for example, BMC1, BMC2, and BMC3 are respectively marked and designated as "0".
  • the management node with the operation authority is the same management node.
  • each management node has a unique identifier or name to ensure that the management node with operation authority recorded in the status table is The management node that sends the operation request is the same management node.
  • the storage device determines that the management node that sends the operation request is the same management node as the management node that has the operation authority recorded in the state table, performs a corresponding operation according to the operation request, where the operation is a read or write performed by the management node on the storage device. operating.
  • the storage device can automatically update the state table and set the state table to the execution state, that is, as shown in C of FIG. 4, the state of the request execution state group is updated from the unexecuted operation state "0" to the execution state.
  • the storage device receives the operation request sent by other management nodes, for example, BMC1, BMC2, and BMC3, the operation is no longer performed according to the corresponding operation request, thereby preventing the storage device from executing multiple tubes at the same time.
  • the problem that the operation request sent by the node is mutually exclusive and the operation requests sent by the multiple management nodes are mutually exclusive can also prevent the serial operation from being interfered or interrupted by the operation request sent by other management nodes.
  • the storage device After the management node BMC0 performs the corresponding operation, the storage device automatically marks the execution request status table in the status table as “0”, indicating that the operation status is not performed, and the status table is as shown in D of FIG. 4 .
  • the operation request may be a read operation, a write operation, or other operations.
  • the storage device performs the operation authority of the management node by assigning one of the plurality of management nodes requesting the application authority, and executes the corresponding operation according to the operation request sent by the management node having the operation authority.
  • the operation avoids the conflict of multiple management nodes operating the storage device at the same time, and avoids the problem that the serial serial operation is interrupted.
  • the request may be a predefined set of requests, and when the storage device performs a partial predefined request, the storage device performs other predefined requests.
  • the privilege state group may also indicate that the corresponding management node has the operation authority with "0", the corresponding management node does not have the operation authority with "1”, or the privilege state group may be according to the computer.
  • the other hexadecimal numbers used to indicate that the management node has the operation authority are not limited in the embodiment of the present invention.
  • the data definition of the state table is extensible, and is not limited to the data of the state table provided by the embodiment of the present invention.
  • determining, according to the state table, whether a management node that sends an operation request has an operation right includes:
  • the management node marked in the status table is the management node that sends the operation request, it is determined that the management node that sends the operation request has the operation authority.
  • each management node may be recorded in the status table and the operation authority of each management node is marked, and the storage device allows only one management node to have the operation right in the same time period.
  • Limit, and mark the management node in the status table with operational permissions other management nodes have no operational permissions, and mark the tokens that do not have operational permissions.
  • the management node with the operation authority is marked in the storage device query status table, and it is determined that the management node with the operation authority marked in the status table and the management node that sends the operation authority are the same management node, it is determined that the management node that sends the operation request has an operation. Permissions, the storage device can perform the corresponding operations according to the operation request.
  • the storage device queries each management node and the permission status stored in the status table, determines that the management node with the operation authority marked in the status table is BMC0, and the management node that sends the operation request is also BMC0, then determines The management node BMC0 has an operation authority, and the storage device can perform a corresponding operation according to an operation request sent by the management node BMC0.
  • one of the plurality of management nodes requesting the application authority is given the operation authority of the management node, and the corresponding operation is performed according to the operation request sent by the management node having the operation authority,
  • the problem that multiple management nodes operate the storage device at the same time is avoided, and the serial operation of one management node is interrupted.
  • the management node that sends the operation request is legal, and the serial operation is prevented from being interfered and interrupted by the operation request of other management nodes.
  • the method 100 further includes:
  • the permission status of the management node is marked in the state table, and the query is used after the storage device receives the application permission request sent by the other management node.
  • the status table determines whether the management node operation authority for sending the application permission is given.
  • the storage device when a certain management node has been marked with the operation authority in the status table, the storage device does not assign the operation authority of the management node that sends the request permission request, and returns the application authority to the management node that sends the application permission request. Response message.
  • the method 100 further includes:
  • the status table is updated, and a response message for successfully applying the permission is sent to the management node that gives the operation authority, so that the management node receives the response message. Thereafter, an operation request is sent to the storage device.
  • the storage device may immediately receive the operation request sent by the management node and process the operation request; the storage device may also send the operation request to the management node.
  • the response message to the operation authority is successfully received, the operation permission request sent by the management node is received before the storage device processes the operation request sent by the management node.
  • Each of the previously requested application permission requests needs to be processed, and a response message for requesting permission failure is returned to the corresponding management node, and then the corresponding operation is performed according to the received operation request sent by the management node.
  • the method 100 further includes:
  • the storage device releases the operation authority, updates the state table, and marks the permission state of the management node BMC0 in the state table as “0”, and the state table is as shown in FIG. 4
  • other management nodes may request a corresponding management node for a transmission operation that has just been performed by the storage device, or may be Any other management node other than this management node.
  • the method 100 after receiving the at least one request sent by the at least one management node, the method 100 further includes:
  • the request is serialized for parsing in accordance with the order in which the request was received.
  • the storage device can receive the request sent by multiple management nodes at the same time.
  • the storage device serializes the received request, and the received request is stored in the storage device.
  • the stored requests are parsed in turn and restored to the original request.
  • one of the plurality of management nodes requesting the application authority is given the operation authority of the management node, and the corresponding operation is performed according to the operation request sent by the management node having the operation authority,
  • the problem that multiple management nodes operate the storage device at the same time is avoided, and the serial operation of one management node is interrupted.
  • the management node that sends the operation request is legal, and the serial operation is prevented from being interfered or even interrupted by the operation request of other management nodes.
  • FIG. 6 is a flowchart of a method for controlling a storage device according to another embodiment of the present invention. The method is performed by the method 400.
  • the method 400 includes:
  • Step 410 Send an application permission request to the storage device, where the storage device grants an operation permission for the management node that sends the application permission request according to the application permission request, and sends a response message to the management node;
  • the management node sends an application permission request to the storage device, so that when the storage device assigns the operation authority to the management node, the response message for successfully requesting the permission is sent to the management node; After the response message sent by the storage device, the operation request is sent to the storage device according to the response message, so that the storage device can perform the corresponding operation according to the operation request.
  • the management node firstly stores the storage device When the operation permission is applied, the operation request is sent to the storage device to perform the corresponding operation according to the operation request, thereby avoiding the mutual exclusion of operation requests caused by multiple management nodes accessing one storage device at the same time. It effectively guarantees the continuous execution of serial commands.
  • FIG. 7 is a schematic structural diagram of a storage device according to an embodiment of the present invention. As shown in FIG. 7, the storage device 500 includes a receiving module 510 and a processing module 520.
  • the receiving module 510 is configured to receive at least one request sent by the at least one management node
  • the processing module 520 is configured to determine, when one of the at least one request is a request permission request, whether to grant the operation authority of the management node that sends the request permission request;
  • the processing module 520 is further configured to: when one of the at least one request is an operation request, determine whether the management node that sends the operation request has an operation authority, and when the management node that sends the operation request has the operation authority, perform an operation according to the operation request.
  • the receiving module 510 receives a request sent by multiple management nodes, where the request may be an application permission request or an operation request; the processing module 520 sequentially determines the received request, and determines whether the received request is an application permission request or an operation request. .
  • the processing module 520 may determine, according to the current state authority, whether the authority has been granted to the management node that sends the request permission request, and the current permission status may be determined by querying the status table, and the storage device according to the status table. Determining whether the current state is performing an operation. When the storage device does not currently perform an operation and does not assign the operation authority to another management node, the operation authority is assigned to the management node that sends the request permission request.
  • the processing module 520 may determine the current privilege state by using other logical modes that are preset, which is not limited in the embodiment of the present invention.
  • the operation request may be a read operation, a write operation, or other operations.
  • the request may be a predefined set of requests, and when the storage device performs a partial predefined request, the storage device performs other predefined requests.
  • the storage device performs the operation authority of the management node by assigning one of the plurality of management nodes requesting the application authority, and executes the corresponding operation according to the operation request sent by the management node having the operation authority.
  • the operation avoids the conflict of multiple management nodes operating the storage device at the same time, and avoids the problem that the serial serial operation is interrupted.
  • the processing module 520 is further configured to: when the management node that sends the request permission request is given the operation authority, update the state table.
  • the processing module 520 assigns one of the plurality of management nodes to the operation authority, the authority status of the management node is marked in the status table, and the receiving module 510 receives the application permission request sent by the other management node.
  • the processing module 520 queries the status table to determine whether to grant the operation authority of the management node that sends the application permission.
  • the processing module 520 does not assign the operation authority of the management node that sends the request permission request, and returns the application authority to the management node that sends the application permission request. Response message.
  • the storage device 500 further includes a sending module 530, configured to send a response message to the management node that is given the request for sending the permission, so as to facilitate the management node that requests the permission request.
  • An operation request is sent to the storage device according to the response message.
  • the status table is updated, and a response message for successfully applying the permission is sent to the management node that gives the operation authority, so that the management node receives the response message. Thereafter, an operation request is sent to the storage device.
  • the receiving module 510 may immediately receive an operation request sent by the management node after the sending module 530 sends a response message to the management node, and process the operation request; the receiving module 510 may also After the sending module 530 sends the response message indicating that the operation authority is successful to the management node, after receiving the application permission request sent by the plurality of other management nodes, the operation request sent by the management node is received, and the processing module 520 processes the management node. Before sending an operation request, it is necessary to process each request permission request received before, and to The responding management node returns a response message that the application authority fails, and performs corresponding operations according to the received operation request sent by the management node.
  • the processing module 520 is specifically configured to:
  • the management node marked in the status table is the management node that sends the operation request, it is determined that the management node that sent the operation request has an operation authority.
  • each management node may be recorded in the status table and the operation authority of each management node may be marked, and the storage device allows one management node to have operation authority in the same time period, and marks the management in the status table. Nodes have operational privileges, and other management nodes have no operational permissions and mark tokens that do not have operational permissions.
  • the processing module 520 queries the management node with the operation authority in the status table, and determines that the management node with the operation authority marked in the status table and the management node that sends the operation authority are the same management node, the management node that determines the sending operation request has The operation authority, the processing module 520 can perform a corresponding operation according to the operation request.
  • the storage device 500 further includes a release module 540, configured to release the operation authority after the operation is completed according to the operation request.
  • the operation authority is released, the status table is updated, and the permission status flag of the management node in the status table is modified to be a flag that does not have the operation authority, and is used for other management nodes.
  • the send operation requests the corresponding action.
  • the processing module 520 is further configured to serialize the request for parsing according to an order of receiving the request.
  • the receiving module 510 can simultaneously receive the request sent by multiple management nodes.
  • the processing module 520 serializes the received request, and stores the received request. In the storage device, the stored requests are sequentially parsed and restored to the original request.
  • the operation authority of the management node is given by one of the plurality of management nodes that request the application permission, and the operation is sent according to the management node having the operation authority.
  • the request to perform the corresponding operation avoids the conflict that multiple management nodes operate the storage device at the same time, and the serial operation of one management node is interrupted.
  • the serial operation is prevented from being interfered or even interrupted by the operation request of other management nodes.
  • FIG. 9 is a management node according to an embodiment of the present invention.
  • the management node 700 includes: a sending module 710 and a receiving module 720.
  • the sending module 710 is configured to send a request permission request to the storage device, where the storage device grants the operation authority of the management node that sends the request permission request according to the application permission request, and sends a response message to the management node;
  • the receiving module 720 is configured to receive a response message sent by the storage device.
  • the sending module 710 is further configured to send an operation request to the storage device according to the response message, for the storage device to perform an operation according to the operation request.
  • the sending module 710 sends an application permission request to the storage device, so that when the storage device assigns the operation authority to the management node, the response message for successfully requesting the permission is sent to the management node; and the receiving module 720 After receiving the response message sent by the storage device, the operation request is sent to the storage device according to the response message, so that the storage device can perform the corresponding operation according to the operation request.
  • the management node first applies for the operation authority to the storage device, and when the operation authority is available, sends an operation request to the storage device to perform corresponding operations according to the operation request, thereby avoiding multiple management nodes simultaneously. Access to a storage device caused by the mutual exclusion of operation requests, while effectively ensuring the continuous execution of serial commands.
  • the management node 700 is in accordance with an embodiment of the present invention.
  • the above and other operations and/or functions of the respective modules are respectively implemented in order to implement the corresponding processes of the respective methods in FIG. 5, and are not described herein again for brevity.
  • the storage device 800 includes a memory 810, a processor 820, multiple access interfaces 830, multiple management interfaces 840, and a communication bus system. 850.
  • the memory 810, the processor 820, the plurality of access interfaces 830, and the plurality of management interfaces 840 are connected by a communication bus system 850. among them,
  • a memory 810 configured to store an instruction
  • the processor 820 is configured to invoke an instruction stored in the memory 810, and perform the following steps by using a receiving module, a processing module, and a sending module included in the processor 820:
  • the current permission state may record the permission state of each access interface and the execution state of the storage device in the form of a state table, and may also record the permission state and the execution state through other logical forms.
  • the access interface 830 includes multiple interfaces, such as the access interface 1, the access interface 2, and the like, and the access interface N, N is an integer greater than or equal to 1.
  • Management interface 840 also includes a plurality of interfaces, which may be represented by management interfaces 1 through N.
  • the release module in the processor 820 releases the operation authority, so that the storage device gives the operation authority to other management nodes, and performs corresponding operations.
  • the other management node may request the corresponding management node for the operation of the management node just executed, or may be other than the management node. Node.
  • the storage device provided by the embodiment of the present invention avoids multiple by administering a management node operation authority to one of the plurality of management nodes requesting the application authority and performing an operation according to the operation request sent by the management node having the operation authority.
  • the management node simultaneously operates the conflicts of the storage devices while avoiding the problem of continuous serial operations being interrupted.
  • the processor 820 may be a central processing unit (CPU), and the processor 820 may also be other general-purpose processors, digital signal processors (DSPs), and application specific integrated circuits. (ASIC), Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.
  • the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
  • the bus system 850 may include a power bus, a control bus, a status signal bus, and the like in addition to the data bus. However, for clarity of description, various buses are labeled as bus system 850 in the figure.
  • each step of the foregoing method may be completed by an integrated logic circuit of hardware in the processor 820 or an instruction in a form of software.
  • the steps of the method disclosed in the embodiment of the present invention may be directly implemented as a hardware processor, or may be performed by a combination of hardware and software modules in the processor 820.
  • the software module can be located in a conventional storage medium such as random access memory, flash memory, read only memory, programmable read only memory or electrically erasable programmable memory, registers, and the like.
  • the storage medium is located in the memory 810, and the processor 820 reads the information in the memory 810 and completes the steps of the above method in combination with its hardware. To avoid repetition, it will not be described in detail here.
  • the storage device 800 of the embodiment of the present invention may correspond to the storage device 500 of FIG. 6 and FIG. 7, and the foregoing and other modules of the storage device 800 according to the embodiment of the present invention.
  • the operations and/or functions are respectively implemented in order to implement the corresponding processes of the respective methods in FIG. 1, FIG. 4 and FIG. 5, and are not described herein again for brevity.
  • Embodiments of the present invention provide a non-transitory computer readable storage storing one or more programs The medium, wherein the one or more programs include instructions that, when executed by the storage device, cause the storage device to perform the following events:
  • the current privilege state may be determined by querying the state table, and the state table records the state of the privilege granted by the access interface and the state of the execution request.
  • the privilege state may also be embodied by other logical manners. The state of the request and the execution of the request are not limited in the embodiment of the present invention.
  • the operation authority When the storage medium performs the operation according to the operation request, the operation authority is released, so that the operation authority is given to the management node requesting the permission request, and the corresponding operation is performed.
  • the disclosed systems, devices, and methods may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or may be Integrate into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, or an electrical, mechanical or other form of connection.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit. Now.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, can be stored in a non-transitory computer readable storage medium.
  • the technical solution of the present invention contributes in essence or to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium.
  • a number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method of various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Storage Device Security (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Disclosed are a control method for operating a storage device, a storage device and a management node. The method comprises: receiving at least one request sent by at least one management node (110); when a request in the at least one request is an authority application request, according to a current authority state, determining whether to endow a management node sending the authority application request with an operating authority (120); and when a request in the at least one request is an operating request, according to the current authority state, determining whether a management node sending the operating request has an operating authority, and when the management node sending the operating request has the operating authority, executing an operation according to the operating request (130). Therefore, by endowing a management node in a plurality of management nodes requesting to apply for an authority with an operating authority, and executing a corresponding operation according to an operating request sent by the management node having the operating authority, a conflict caused due to the fact that a plurality of management nodes simultaneously operate a storage device is avoided, and at the same time, the problem that consecutive serial operations are interrupted is avoided.

Description

操作存储设备的控制方法和存储设备Control method and storage device for operating storage device 技术领域Technical field
本发明涉及动态数据库领域,尤其涉及一种操作存储设备的控制方法和存储设备。The present invention relates to the field of dynamic databases, and in particular, to a control method and a storage device for operating a storage device.
背景技术Background technique
非易失性存储(Non-Volatile Memory Express,NVMe)协议支持设备管理命令,可以直接对存储设备进行操作,这样可以避免现有基板管理控制器(Baseboard management controller,BMC)无法对存储设备直接操作的问题,但是由于NVMe协议可以支持多通道进行管理,例如,NVMe管理接口(Non-Volatile Memory Express Management Interface,NVMe-MI)协议可以支持集成电路总线(Inter-Integrated Circuit,IIC或I2C)、外部设备互联总线(Peripheral Component Interconnect Express,PCIE)等多通道同时进行管理设备传输协议(Management Component Transport Protocol,MCTP)管理,如图1所示,管理节点通过NVMe管理接口向存储设备发送管理命令,该管理命令可以为读或者写存储设备的操作命令。如图2所示,存储设备可以包括多个管理接口,当多个管理节点通过多个管理接口发送管理命令时,就会存在多个管理节点同时访问存储设备造成的操作冲突的问题。The non-volatile storage (Non-Volatile Memory Express, NVMe) protocol supports device management commands and can directly operate the storage device. This prevents the existing baseboard management controller (BMC) from directly operating on the storage device. Problem, but because the NVMe protocol can support multi-channel management, for example, the NVMe Management Interface (NVMe-MI) protocol can support Inter-Integrated Circuit (IIC or I2C), external Multi-channel, such as the Peripheral Component Interconnect Express (PCIE), manages the Management Component Transport Protocol (MCTP) at the same time. As shown in Figure 1, the management node sends a management command to the storage device through the NVMe management interface. The administrative command can be an operation command to read or write to the storage device. As shown in FIG. 2, the storage device may include multiple management interfaces. When multiple management nodes send management commands through multiple management interfaces, there may be a problem that multiple management nodes access the storage device at the same time.
发明内容Summary of the invention
本发明实施例提供一种操作存储设备的控制方法、存储设备和管理节点,通过赋予请求申请权限的多个管理节点中的一个管理节点操作权限,并根据该具有操作权限的管理节点发送的操作请求执行相应的操作,避免了多个管理节点同时操作存储设备的冲突。An embodiment of the present invention provides a method, a storage device, and a management node for operating a storage device, by which one of a plurality of management nodes that request permission to apply for an operation authority is operated, and the operation is sent according to the management node having the operation authority. Requesting to perform the corresponding operation avoids conflicts between multiple management nodes operating the storage device at the same time.
第一方面,本发明实施例提供了一种操作存储设备的控制方法,该方法包括:接收至少一个管理节点发送的请求,确定接收请求的类型;当请求为申请权限请求时,根据当前权限状态,确定是否赋予发送申请权限请求的管理节点操作权限;当请求为操作请求时,根据当前权限状态,确定发送操作请求的管 理节点是否具有操作权限,当确定发送操作请求的管理节点具有操作权限时,根据操作请求执行操作。In a first aspect, an embodiment of the present invention provides a method for controlling a storage device, where the method includes: receiving a request sent by at least one management node, determining a type of the received request; and when the request is a request permission request, according to the current permission status Determining whether to grant the operation authority of the management node that sends the request permission request; when the request is an operation request, determining the tube for sending the operation request according to the current permission status Whether the node has the operation authority, and when it is determined that the management node that sends the operation request has the operation authority, the operation is performed according to the operation request.
在第一方面中,当前权限状态记录了访问接口赋予权限的状态和执行请求的状态,在第一方面中,当前权限状态可以通过查询状态表的形式来实现,也可以通过其他方式来实现。In the first aspect, the current privilege state records the state of the privilege granted by the access interface and the state of the execution request. In the first aspect, the current privilege state may be implemented by querying the state table, or may be implemented by other means.
基于上述技术方案,通过确定接收的请求类型,根据请求的类型确定赋予发送申请权限请求的至少一个管理节点中的一个管理节点操作权限,或者确定发送操作请求的管理节点是否具有操作权限,并根据具有操作权限的管理节点发送的操作请求执行操作,避免了多个管理节点同时执行操作的冲突问题。According to the above technical solution, by determining the type of the received request, determining, according to the type of the request, one of the at least one management node that is to be sent the request for permission to operate, or determining whether the management node that sends the operation request has the operation authority, and according to An operation request sent by a management node with operation authority performs an operation, thereby avoiding a conflict problem in which multiple management nodes simultaneously perform operations.
结合第一方面,在第一方面的第一种可能的实现方式中,当确定赋予发送申请权限请求的至少一个管理节点中的一个管理节点操作权限时,更新状态表,用于通过该状态表确定发送申请权限请求的管理节点是否可以赋予操作权限,或者确定发送操作请求的管理节点是否具有操作权限,以确定多管理节点的操作权限和合法性。With reference to the first aspect, in a first possible implementation manner of the first aspect, when determining, by one of the at least one management node that sends the request permission request, the status table is updated, and the status table is used to pass the status table. It is determined whether the management node that sends the application permission request can give the operation authority, or whether the management node that sends the operation request has the operation authority to determine the operation authority and legality of the multiple management node.
结合第一方面的第一种实现方式,在第一方面的第二种可能实现的方式中,赋予发送申请权限请求的至少一个管理节点中的一个管理节点操作权限,并更新状态表之后,向赋予发送申请权限请求的管理节点发送响应消息,以便于申请权限请求的管理节点根据该响应消息,向存储设备发送操作请求。With reference to the first implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the management node operation authority of the at least one management node that sends the request permission request is updated, and after updating the state table, The management node that sends the request for permission to send the response message is sent, so that the management node that requests the permission request sends an operation request to the storage device according to the response message.
结合第一方面,在第一方面的第三种可能实现的方式中,根据状态表确定发送操作请求的管理节点是否具有操作权限包括,查询状态表中标记的具有操作权限的管理节点是否为发送操作请求的管理节点,当状态表中标记的具有操作权限的管理节点为发送操作请求的管理节点时,确定发送操作请求的管理节点具有操作权限。With reference to the first aspect, in a third possible implementation manner of the first aspect, determining, by the state table, whether the management node that sends the operation request has the operation authority includes: whether the management node with the operation authority marked in the query status table is sent The management node that operates the request, when the management node with the operation authority marked in the status table is the management node that sends the operation request, determines that the management node that sends the operation request has the operation authority.
结合上述可能的实现方式中的任一种实现方式,在第一方面的第四种可能实现的方式中,根据具有操作权限的管理节点发送的操作请求执行操作完成之后,该方法还包括释放操作权限,以便于将该操作权限赋予发送其他请求的管 理节点。With reference to any one of the foregoing possible implementation manners, in a fourth possible implementation manner of the first aspect, after the operation is performed according to the operation request sent by the management node having the operation authority, the method further includes a release operation. Permissions to give this action permission to the tube that sends other requests Node.
结合第一方面,在第一方面的第五种可能实现的方式中,接收至少一个管理节点发送的请求之后,该方法还包括串行化接收到的请求,以用于根据接收请求的时间顺序依次接收请求。In conjunction with the first aspect, in a fifth possible implementation manner of the first aspect, after receiving the request sent by the at least one management node, the method further includes serializing the received request for use according to a chronological order of receiving the request Receive requests in turn.
第二方面,本发明实施例提供了一种操作存储设备的控制方法,该方法包括:向存储设备发送申请权限请求,以用于存储设备根据申请权限请求赋予发送申请权限请求的管理节点操作权限,并向管理节点发送响应消息;接收到存储设备发送的响应消息;根据响应消息向存储设备发送操作请求,以便于存储设备根据操作请求执行操作。In a second aspect, the embodiment of the present invention provides a control method for operating a storage device, where the method includes: sending a request permission request to a storage device, where the storage device grants a management node operation permission to send an application permission request according to the application permission request. And sending a response message to the management node; receiving a response message sent by the storage device; and sending an operation request to the storage device according to the response message, so that the storage device performs an operation according to the operation request.
基于第二方面提供的操作存储设备的控制方法,对存储设备进行操作之前,先向存储设备申请操作权限,在具有操作权限的情况下,发送操作请求,以便于存储设备根据操作请求执行操作,避免了多个操作请求同时对存储设备执行操作引起的冲突。According to the control method of the operation storage device provided by the second aspect, before the operation of the storage device, the operation authority is first applied to the storage device, and in the case of having the operation authority, the operation request is sent, so that the storage device performs the operation according to the operation request. Avoid conflicts caused by multiple operation requests simultaneously performing operations on the storage device.
第三方面,本发明实施例提供一种存储设备,该存储设备包括:接收模块和处理模块,接收模块用于接收至少一个管理节点发送的请求;处理模块用于确定请求的类型,当请求为申请权限请求时,确定是否赋予发送申请权限请求的管理节点操作权限;当请求为操作请求时,确定发送操作请求的管理节点是否具有操作权限,当发送操作请求的管理节点具有操作权限时,根据操作请求执行操作。In a third aspect, an embodiment of the present invention provides a storage device, where the storage device includes: a receiving module and a processing module, where the receiving module is configured to receive a request sent by at least one management node; and the processing module is configured to determine a type of the request, when the request is When requesting the permission request, determining whether to grant the operation authority of the management node that sends the request permission request; when the request is an operation request, determining whether the management node that sends the operation request has the operation authority, when the management node that sends the operation request has the operation authority, according to The operation requests an action.
在第三方面中处理模块可以通过状态表确定是否赋予发送申请权限请求的管理节点操作权限,或者根据状态表确定发送操作请求的管理节点是否具有操作权限。In the third aspect, the processing module may determine, by the state table, whether to grant the management node operation authority for transmitting the application permission request, or determine whether the management node that sends the operation request has the operation authority according to the state table.
通过确定接收请求的类型,根据请求的类型,确定是否赋予发送请求的管理节点操作权限或者确定是否具有操作权限,可以避免多个管理节点执行操作引起的冲突问题。By determining the type of the received request, determining whether to give the management node that sends the request the operation authority or determining whether the operation authority is given according to the type of the request, the conflict problem caused by the plurality of management nodes performing the operation can be avoided.
结合第三方面,在第三方面的第一种可能实现的方式中,处理模块还用于, 当赋予发送申请权限请求的管理节点操作权限时,更新状态表,以用于通过该状态表确定发送申请权限请求的管理节点是否可以赋予操作权限,或者确定发送操作请求的管理节点是否具有操作权限,用以实现对多管理节点的操作权限以及合法性的判断。In conjunction with the third aspect, in a first possible implementation of the third aspect, the processing module is further configured to: When the management node operation authority for transmitting the application permission request is given, the status table is updated for determining whether the management node that sends the application permission request can give the operation authority through the status table, or whether the management node that sends the operation request has the operation authority It is used to judge the operation authority and legality of multiple management nodes.
结合第三发明的第一种可能实现的方式,在第三方面的第二种可能实现的方式中,该存储设备还包括发送模块,用于向发送申请权限请求的管理节点发送响应消息,以用于申请权限请求的管理节点根据响应消息向存储设备发送操作请求。In a second possible implementation manner of the third aspect, the storage device further includes a sending module, configured to send a response message to the management node that sends the request permission request, in a second possible implementation manner of the third aspect, The management node for requesting the permission request sends an operation request to the storage device according to the response message.
结合第三方面,在第三方面的第三种可能实现的方式中,处理模块用于查询状态表中标记的管理节点是否为发送操作请求的管理节点;当状态表中标记的管理节点为发送操作请求的管理节点时,确定发送操作请求的管理节点具有操作权限。With reference to the third aspect, in a third possible implementation manner of the third aspect, the processing module is configured to query whether the management node marked in the status table is a management node that sends an operation request; when the management node marked in the status table is sent When the requested management node is operated, it is determined that the management node that sent the operation request has the operation authority.
结合上述可能的实现方式中的任一种实现方式,在第三方面的第四种可能实现的方式中,该存储设备还包括释放模块,用于释放操作权限,以便于将该操作权限赋予发送其他请求的管理节点。In conjunction with any one of the foregoing possible implementation manners, in a fourth possible implementation manner of the third aspect, the storage device further includes a release module, configured to release the operation authority, so as to send the operation authority to the sending Other requested management nodes.
结合第三方面,在第三方面的第五种可能实现的方式中,处理模块还用于,串行化请求,以便于根据接收的请求按照时间顺序进行解析。In conjunction with the third aspect, in a fifth possible implementation of the third aspect, the processing module is further configured to serialize the request to facilitate parsing in chronological order based on the received request.
第四方面,本发明实施例提供一种管理节点,该管理节点包括发送模块和接收模块,发送模块用于向存储设备发送申请权限请求,以用于存储设备根据接收到的申请权限请求赋予操作权限,并向发送申请权限请求的管理节点发送响应消息;接收模块用于接收存储设备发送的响应消息;发送模块根据响应消息向存储设备发送操作请求,以用于存储设备根据操作请求执行操作。In a fourth aspect, an embodiment of the present invention provides a management node, where the management node includes a sending module and a receiving module, and the sending module is configured to send an application permission request to the storage device, where the storage device is used to perform an operation according to the received application permission request. And the receiving module sends a response message to the management node that sends the request permission request; the receiving module is configured to receive the response message sent by the storage device; and the sending module sends an operation request to the storage device according to the response message, where the storage device performs the operation according to the operation request.
通过先向存储设备发送申请操作请求,以申请操作权限,在获取到操作权限之后,根据操作请求执行相应的操作,避免了多管理节点之间的操作请求造成的冲突问题。By first sending an application operation request to the storage device to apply for the operation authority, after obtaining the operation authority, the corresponding operation is performed according to the operation request, thereby avoiding the conflict problem caused by the operation request between the multiple management nodes.
第五方面,本发明实施例提供一种存储设备,该存储设备包括至少一个访 问接口,例如:业务访问接口、管理接口,存储器和处理器;In a fifth aspect, an embodiment of the present invention provides a storage device, where the storage device includes at least one access Question interfaces, such as: service access interfaces, management interfaces, memory, and processors;
存储器,用于存储指令和权限状态;a memory for storing instructions and permission states;
处理器,用于调用存储器在存储器中的指令,以实现:a processor for invoking instructions in the memory in memory to implement:
通过至少一个访问接口接收至少一个管理节点发送的至少一个请求;当至少一个请求中的一个请求为申请权限请求时,根据当前权限状态,确定是否赋予发送申请权限请求的管理节点操作权限;当至少一个请求中的一个请求为操作请求时,根据当前权限状态,确定发送操作请求的管理节点是否具有操作权限,当发送所述操作请求的管理节点具有操作权限时,根据操作请求执行操作。Receiving, by the at least one access interface, at least one request sent by the at least one management node; when one of the at least one request is requesting the permission request, determining, according to the current permission status, whether to grant the operation authority of the management node that sends the application permission request; When one of the requests is an operation request, according to the current permission status, it is determined whether the management node that sends the operation request has the operation authority, and when the management node that sends the operation request has the operation authority, the operation is performed according to the operation request.
第六方面,本发明实施例提供一种存储一个或多个程序的非易失性计算机可读存储介质,其中,一个或多个程序包括指令,该指令当被包括存储设备执行时使存储设备执行以下事件:In a sixth aspect, an embodiment of the present invention provides a non-transitory computer readable storage medium storing one or more programs, wherein the one or more programs include instructions that, when executed by a storage device, cause the storage device Perform the following events:
接收至少一个管理节点发送的至少一个请求;当至少一个请求中的一个请求为申请权限请求时,根据当前权限状态,确定是否赋予发送申请权限请求的管理节点操作权限;当至少一个请求中的一个请求为操作请求时,根据当前权限状态,确定发送操作请求的管理节点是否具有操作权限,当发送所述操作请求的管理节点具有操作权限时,根据操作请求执行操作。Receiving at least one request sent by the at least one management node; when one of the at least one request is a request permission request, determining, according to the current permission status, whether to grant the management node operation authority for sending the application permission request; when one of the at least one request When the request is an operation request, according to the current permission status, it is determined whether the management node that sends the operation request has the operation authority, and when the management node that sends the operation request has the operation authority, the operation is performed according to the operation request.
以上几个方面中,当前权限状态为接收到请求时,存储器中记录的权限赋予权限的状态和执行请求的状态。权限状态可以通过状态表的形式体现,也可以通过其他的逻辑方式体现。In the above aspects, the current privilege state is the state in which the privilege recorded in the memory is granted the privilege and the state in which the request is executed when the request is received. The permission status can be expressed in the form of a status table or in other logical ways.
基于上述技术方案,本发明实施例提供的操作存储设备的控制方法、存储设备和管理节点,存储设备通过赋予请求申请权限的多个管理节点中的一个管理节点操作权限,并根据该具有操作权限的管理节点发送的操作请求执行相应的操作,避免了多个管理节点同时操作存储设备的冲突,同时避免了连续的串行操作被中断的问题。Based on the foregoing technical solution, the control method, the storage device, and the management node for operating the storage device provided by the embodiment of the present invention, the storage device operates the permission by one of the plurality of management nodes that are requested to apply for the permission, and according to the operation authority The operation request sent by the management node performs the corresponding operation, which avoids the conflict of multiple management nodes simultaneously operating the storage device, and avoids the problem that the serial serial operation is interrupted.
附图说明DRAWINGS
为了更清楚地说明本发明实施例的技术方案,下面将对本发明实施例中所 需要使用的附图作简单地介绍,显而易见地,下面所描述的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will be The drawings to be used are briefly described. It is obvious that the drawings described below are only some embodiments of the present invention, and those skilled in the art can also use these without any creative work. The drawings obtain other figures.
图1为现有技术中NVME管理系统分层图;1 is a layered diagram of a NVME management system in the prior art;
图2为现有技术中NVME管理子系统的结构示意图;2 is a schematic structural diagram of an NVME management subsystem in the prior art;
图3为本发明实施例提供的一种操作存储设备的控制方法的流程示意图;FIG. 3 is a schematic flowchart of a method for controlling a storage device according to an embodiment of the present disclosure;
图4为本发明实施例提供的状态表的示意图;4 is a schematic diagram of a state table according to an embodiment of the present invention;
图5为本发明另一实施例提供的操作存储设备的控制方法的流程示意图;FIG. 5 is a schematic flowchart of a method for controlling a storage device according to another embodiment of the present invention;
图6为本发明在一实施例提供的操作存储设备的控制方法的流程示意图;FIG. 6 is a schematic flowchart of a method for controlling a storage device according to an embodiment of the present invention;
图7为本发明实施例提供的存储设备的示意性结构图;FIG. 7 is a schematic structural diagram of a storage device according to an embodiment of the present disclosure;
图8为本发明另一实施例提供的存储设备的示意性结构图;FIG. 8 is a schematic structural diagram of a storage device according to another embodiment of the present invention;
图9为本发明实施例提供的管理节点的示意性结构图;FIG. 9 is a schematic structural diagram of a management node according to an embodiment of the present invention;
图10为本发明另一实施例提供的存储设备示意性结构图。FIG. 10 is a schematic structural diagram of a storage device according to another embodiment of the present invention.
具体实施方式detailed description
下面通过附图和实施例,对本发明的技术方案做进一步的详细描述。The technical solution of the present invention will be further described in detail below through the accompanying drawings and embodiments.
本发明实施例提供的方法、管理节点和存储设备,应用于非易失性存储(Non-Volatile Memory Express,NVMe)协议,NVMe可以减少数据读写延迟,提供更高的性能。NVMe可以支持设备管理命令,直接对存储设备进行操作,存储设备可以同时接收到多个管理节点发送的操作请求,该管理节点可以为基板管理控制器(Baseboard management controller,BMC)或者主机,由于操作请求可以为读或者写操作命令,当多个Host或者BMC同时访问存储设备时,会造成对存储设备操作的互斥问题,或者例如一些串行操作,在执行相应的操作过程中,执行其他的操作请求造成连续的串行操作被中断的问题,在这种情况下,存储设备在被执行操作之前,先将可以执行操作的权限赋予给一个管理节点,存储设备根据具有权限的管理节点发送的操作请求执行相应的操作,执行完成之后,将该权限释放,以用于其他的管理节点执行其他的操作。 The method, management node and storage device provided by the embodiments of the present invention are applied to a non-volatile storage (Non-Volatile Memory Express, NVMe) protocol, and the NVMe can reduce data read and write delays and provide higher performance. The NVMe can support the device management command and directly operate the storage device. The storage device can receive the operation request sent by multiple management nodes at the same time. The management node can be a Baseboard Management Controller (BMC) or a host. The request may be a read or write operation command. When multiple Hosts or BMCs access the storage device at the same time, the mutual exclusion of the operation of the storage device may occur, or for example, some serial operations may be performed during the execution of the corresponding operation. The operation request causes a problem that the serial serial operation is interrupted. In this case, the storage device first assigns the authority to perform the operation to a management node before the operation is performed, and the storage device sends the information according to the management node having the authority. The operation request performs the corresponding operation, and after the execution is completed, the authority is released for other management nodes to perform other operations.
在本发明实施例中,存储设备作为存储信息的设备,该设备可以为硬盘,包括:固态硬盘(例如SSD盘),机械硬盘(HDD传统硬盘)等具有存储信息的设备。In the embodiment of the present invention, the storage device is a device for storing information, and the device may be a hard disk, and includes: a solid state hard disk (for example, an SSD disk), a mechanical hard disk (HDD traditional hard disk), and the like having a device for storing information.
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明的一部分实施例,而不是全部实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都应属于本发明保护的范围。The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are a part of the embodiments of the present invention, but not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts shall fall within the scope of the present invention.
图3为本发明实施例提供的一种操作存储设备的控制方法的流程示意图,如图3所示,该方法100的执行主体为存储存储设备,该方法100包括:FIG. 3 is a schematic flowchart of a method for controlling a storage device according to an embodiment of the present invention. As shown in FIG. 3, an execution entity of the method 100 is a storage storage device, and the method 100 includes:
110,接收至少一个管理节点发送的至少一个请求;110. Receive at least one request sent by at least one management node.
120,当至少一个请求中的一个请求为申请权限请求时,根据当前权限状态,确定是否赋予发送申请权限请求的管理节点操作权限;120. When one of the at least one request is a request permission request, determine, according to the current permission status, whether to grant the operation authority of the management node that sends the application permission request;
130,当至少一个请求中的一个请求为操作请求时,根据当前权限状态,确定发送操作请求的管理节点是否具有操作权限,当发送所述操作请求的管理节点具有操作权限时,根据操作请求执行操作。130. When one of the at least one request is an operation request, determine, according to the current permission status, whether the management node that sends the operation request has an operation authority, and when the management node that sends the operation request has an operation authority, execute according to the operation request. operating.
具体的,在本发明实施例中,存储设备是存储信息的设备,该设备可以为硬盘包括:固态硬盘(例如SSD盘),机械硬盘(HDD传统硬盘)等,也可以为其他具有存储信息的设备。管理节点可以为主机或者BMC。在110中,存储设备接收多个管理节点发送的请求,该请求可以为申请权限请求,也可以为操作请求;存储设备依次确定接收请求的类型,判断接收的请求为申请权限请求还是操作请求。在120中,当接收的请求为申请权限请求时,存储设备根据当前的权限状态,确定是否有权限赋予发送申请权限请求的管理节点。Specifically, in the embodiment of the present invention, the storage device is a device for storing information, and the device may be a hard disk including: a solid state hard disk (such as an SSD disk), a mechanical hard disk (HDD traditional hard disk), or the like, and may also have other storage information. device. The management node can be a host or a BMC. In 110, the storage device receives a request sent by multiple management nodes, where the request may be an application permission request or an operation request; the storage device sequentially determines the type of the received request, and determines whether the received request is an application permission request or an operation request. In 120, when the received request is a request permission request, the storage device determines, according to the current permission status, whether there is a right to the management node that sends the request permission request.
在本发明实施例中,当前的权限状态可以通过查询状态表,确定是否有赋予发送申请权限请求的管理节点操作权限,或者确定当前状态是否正在执行操作。在本发明实施例中,存储设备还可以根据其他预定设置的逻辑方式,确定当前的权限状态,在本发明实施例中,当前的权限状态为存储在接收到请求的 时刻。In the embodiment of the present invention, the current permission status may be determined by querying the status table to determine whether there is an operation authority assigned to the management node that sends the application permission request, or whether the current status is performing an operation. In the embodiment of the present invention, the storage device may further determine the current permission state according to a logical manner of other predetermined settings. In the embodiment of the present invention, the current permission state is stored in the request for receiving the request. time.
例如,如图4所示,状态表可以分为两组,一组为权限状态组,另一组为请求执行状态组,权限状态组用于指示各管理节点的操作权限;执行请求状态组用于记录存储设备是否正在执行请求操作。在该权限状态组中,管理节点对应的权限状态以“1”表示具有操作权限,以“0”表示相应的管理节点不具有操作权限。For example, as shown in FIG. 4, the status table can be divided into two groups, one group is a permission status group, the other group is a request execution status group, the authority status group is used to indicate the operation authority of each management node, and the execution request status group is used. Whether the record storage device is performing the request operation. In the privilege status group, the privilege status corresponding to the management node indicates that there is an operation authority with "1", and "0" indicates that the corresponding management node does not have operation authority.
当存储设备当前未执行操作,且没有将操作权限赋予其他管理节点时,如图4中A所示,权限状态组中各个管理节点的权限状态和请求执行状态组的状态分别为“0”,此时,存储设备可以将操作权限赋予发送申请权限请求的管理节点。在同一时间段内,存储设备允许一个管理节点获取操作权限,当存储设备接收管理节点,例如:BMC0发送的申请权限命令,存储设备可以将操作权限赋予管理节点BMC0,如图4中B所示,权限状态标记BMC0具有操作权限,记作“1”,不具有操作权限的管理节点,例如BMC1、BMC2、BMC3分别被标记,记作“0”。When the storage device does not currently perform an operation and does not assign the operation authority to other management nodes, as shown in A of FIG. 4, the permission status of each management node in the authority status group and the status of the request execution status group are respectively “0”. At this time, the storage device can assign the operation authority to the management node that sends the request permission request. During the same period of time, the storage device allows a management node to obtain the operation authority. When the storage device receives the management node, for example, the application permission command sent by the BMC0, the storage device can assign the operation authority to the management node BMC0, as shown in B of FIG. The authority status flag BMC0 has an operation authority, which is denoted as "1", and a management node that does not have an operation authority, for example, BMC1, BMC2, and BMC3 are respectively marked and designated as "0".
在130中,当接收的请求为操作请求时,根据状态表确定发送操作请求的管理节点是否具有操作权限,如图4中B所示,确定发送操作请求的管理节点是否与状态表中记录的具有操作权限的管理节点为同一个管理节点,在这里需要说明的是,在整个系统中,每个管理节点都具有唯一的标识或名称,以保证状态表中记录的具有操作权限的管理节点与发送操作请求的管理节点为同一个管理节点。当存储设备确定发送操作请求的管理节点与状态表中记录的具有操作权限的管理节点为同一个管理节点时,根据操作请求执行相应的操作,该操作为管理节点对存储设备执行的读或者写操作。执行操作时,存储设备可以自动更新状态表,将状态表设置为正在执行状态,即如图4中C所示,请求执行状态组的状态由未执行操作状态“0”更新为正在执行操作状态“1”,以便于存储设备接收到其他管理节点,例如,BMC1、BMC2、BMC3发送的操作请求时,不再根据相应的操作请求执行操作,避免存储设备同时执行多个管 理节点发送的操作请求,且多个管理节点发送的操作请求互斥的问题,也可以避免串行操作被其他管理节点发送的操作请求干扰或中断。In 130, when the received request is an operation request, determining, according to the status table, whether the management node that sends the operation request has an operation authority, as shown in B of FIG. 4, determining whether the management node that sends the operation request is recorded in the status table. The management node with the operation authority is the same management node. Here, it should be noted that in the entire system, each management node has a unique identifier or name to ensure that the management node with operation authority recorded in the status table is The management node that sends the operation request is the same management node. When the storage device determines that the management node that sends the operation request is the same management node as the management node that has the operation authority recorded in the state table, performs a corresponding operation according to the operation request, where the operation is a read or write performed by the management node on the storage device. operating. When the operation is performed, the storage device can automatically update the state table and set the state table to the execution state, that is, as shown in C of FIG. 4, the state of the request execution state group is updated from the unexecuted operation state "0" to the execution state. "1", so that when the storage device receives the operation request sent by other management nodes, for example, BMC1, BMC2, and BMC3, the operation is no longer performed according to the corresponding operation request, thereby preventing the storage device from executing multiple tubes at the same time. The problem that the operation request sent by the node is mutually exclusive and the operation requests sent by the multiple management nodes are mutually exclusive can also prevent the serial operation from being interfered or interrupted by the operation request sent by other management nodes.
当管理节点BMC0执行完相应的操作之后,存储设备自动将状态表中的执行请求状态表标记为“0”,表示未执行操作状态,状态表如图4中D所示。After the management node BMC0 performs the corresponding operation, the storage device automatically marks the execution request status table in the status table as “0”, indicating that the operation status is not performed, and the status table is as shown in D of FIG. 4 .
需要说明的是,在本发明实施例中,操作请求可以为读操作、写操作或者其他操作。It should be noted that, in the embodiment of the present invention, the operation request may be a read operation, a write operation, or other operations.
采用本发明实施例提供的控制操作存储设备的方法,存储设备通过赋予请求申请权限的多个管理节点中的一个管理节点操作权限,并根据该具有操作权限的管理节点发送的操作请求执行相应的操作,避免了多个管理节点同时操作存储设备的冲突,同时避免了连续的串行操作被中断的问题。According to the method for controlling the operation of the storage device provided by the embodiment of the present invention, the storage device performs the operation authority of the management node by assigning one of the plurality of management nodes requesting the application authority, and executes the corresponding operation according to the operation request sent by the management node having the operation authority. The operation avoids the conflict of multiple management nodes operating the storage device at the same time, and avoids the problem that the serial serial operation is interrupted.
应理解,在本发明实施例中,请求可以为预定义的请求集合,当存储设备执行部分预定义请求时,存储设备执行其他预定义的请求。It should be understood that, in the embodiment of the present invention, the request may be a predefined set of requests, and when the storage device performs a partial predefined request, the storage device performs other predefined requests.
应理解,在本发明实施例中,权限状态组也可以以“0”表示相应的管理节点具有操作权限,以“1”表示相应的管理节点不具有操作权限,也或者权限状态组可以根据计算机采用的其他进制的数码表示管理节点具有操作权限的标记,在本发明实施例中对此不作限制。It should be understood that, in the embodiment of the present invention, the privilege state group may also indicate that the corresponding management node has the operation authority with "0", the corresponding management node does not have the operation authority with "1", or the privilege state group may be according to the computer. The other hexadecimal numbers used to indicate that the management node has the operation authority are not limited in the embodiment of the present invention.
需要说明的是,在本发明实施例中,状态表的数据定义是可以扩展的,不仅限于本发明实施例提供的状态表是的数据。It should be noted that, in the embodiment of the present invention, the data definition of the state table is extensible, and is not limited to the data of the state table provided by the embodiment of the present invention.
可选地,作为本发明另一实施例,如图5所示,根据所述状态表,确定发送操作请求的管理节点是否具有操作权限,包括:Optionally, as another embodiment of the present invention, as shown in FIG. 5, determining, according to the state table, whether a management node that sends an operation request has an operation right includes:
131,查询状态表中标记的管理节点是否为发送操作请求的管理节点;131. Query whether the management node marked in the status table is a management node that sends an operation request;
132,当状态表中标记的管理节点为发送所述操作请求的管理节点时,确定发送操作请求的管理节点具有操作权限。132. When the management node marked in the status table is the management node that sends the operation request, it is determined that the management node that sends the operation request has the operation authority.
具体地,在本发明实施例中,状态表中可以记录各管理节点并标记各管理节点的操作权限,存储设备在同一时间段内只允许一个管理节点具有操作权 限,并在状态表中标记该管理节点具有操作权限,其他管理节点都没有操作权限,并标记不具有操作权限的标记。当存储设备查询状态表中标记具有操作权限的管理节点,并确定状态表中标记的具有操作权限的管理节点与发送操作权限的管理节点为同一管理节点时,确定发送操作请求的管理节点具有操作权限,存储设备可以根据操作请求执行相应的操作。Specifically, in the embodiment of the present invention, each management node may be recorded in the status table and the operation authority of each management node is marked, and the storage device allows only one management node to have the operation right in the same time period. Limit, and mark the management node in the status table with operational permissions, other management nodes have no operational permissions, and mark the tokens that do not have operational permissions. When the management node with the operation authority is marked in the storage device query status table, and it is determined that the management node with the operation authority marked in the status table and the management node that sends the operation authority are the same management node, it is determined that the management node that sends the operation request has an operation. Permissions, the storage device can perform the corresponding operations according to the operation request.
例如,如图4中B所示,存储设备查询状态表存储的各管理节点以及权限状态,确定状态表中标记的具有操作权限的管理节点为BMC0,发送操作请求的管理节点也是BMC0,则确定该管理节点BMC0具有操作权限,存储设备可以根据管理节点BMC0发送的操作请求执行相应的操作。For example, as shown in B of FIG. 4, the storage device queries each management node and the permission status stored in the status table, determines that the management node with the operation authority marked in the status table is BMC0, and the management node that sends the operation request is also BMC0, then determines The management node BMC0 has an operation authority, and the storage device can perform a corresponding operation according to an operation request sent by the management node BMC0.
采用本发明实施例提供的操作存储设备的控制方法,通过赋予请求申请权限的多个管理节点中的一个管理节点操作权限,并根据该具有操作权限的管理节点发送的操作请求执行相应的操作,避免了多个管理节点同时操作存储设备的冲突,一个管理节点连续的串行操作被中断的问题。同时,通过对发送操作请求的管理节点的身份进行验证,确保发送操作请求的管理节点合法,避免串行操作被其他管理节点的操作请求干扰,中断。According to the control method for operating the storage device provided by the embodiment of the present invention, one of the plurality of management nodes requesting the application authority is given the operation authority of the management node, and the corresponding operation is performed according to the operation request sent by the management node having the operation authority, The problem that multiple management nodes operate the storage device at the same time is avoided, and the serial operation of one management node is interrupted. At the same time, by verifying the identity of the management node that sends the operation request, it is ensured that the management node that sends the operation request is legal, and the serial operation is prevented from being interfered and interrupted by the operation request of other management nodes.
可选地,作为本发明另一实施例,在确定是否赋予发送申请权限请求的管理节点操作权限之后,该方法100还包括:Optionally, as another embodiment of the present invention, after determining whether to grant the operation authority of the management node that sends the request permission request, the method 100 further includes:
140,当赋予发送申请权限请求的管理节点操作权限时,更新状态表。140: Update the status table when the management node operation authority for sending the request permission request is given.
具体地,当存储设备赋予多个管理节点中的一个管理节点操作权限时,在状态表中标记该管理节点的权限状态,以用于存储设备接收到其他管理节点发送的申请权限请求之后,查询状态表,确定是否给予发送申请权限的管理节点操作权限。在本发明实施例中,当状态表中已经标记某个管理节点具有操作权限时,存储设备不赋予发送申请权限请求的管理节点操作权限,并向发送申请权限请求的管理节点返回申请权限失败的响应消息。 Specifically, when the storage device is assigned to one of the plurality of management nodes, the permission status of the management node is marked in the state table, and the query is used after the storage device receives the application permission request sent by the other management node. The status table determines whether the management node operation authority for sending the application permission is given. In the embodiment of the present invention, when a certain management node has been marked with the operation authority in the status table, the storage device does not assign the operation authority of the management node that sends the request permission request, and returns the application authority to the management node that sends the application permission request. Response message.
可选地,作为本发明另一实施例中,如图5所示,在更新状态表之后,该方法100还包括:Optionally, in another embodiment of the present invention, as shown in FIG. 5, after updating the status table, the method 100 further includes:
150,向赋予发送所述申请权限请求的管理节点发送响应消息,以便于所述申请权限请求的管理节点根据所述响应消息,向存储设备发送操作请求。150. Send a response message to the management node that sends the request permission request, so that the management node that requests the permission request sends an operation request to the storage device according to the response message.
具体的,当存储设备赋予多个管理节点中的一个管理节点操作权限时,更新状态表,并向赋予操作权限的管理节点发送申请权限成功的响应消息,以用于该管理节点接收到响应消息之后,向存储设备发送操作请求。Specifically, when the storage device is assigned to one of the plurality of management nodes, the status table is updated, and a response message for successfully applying the permission is sent to the management node that gives the operation authority, so that the management node receives the response message. Thereafter, an operation request is sent to the storage device.
在本发明实施例中,存储设备可能在向管理节点发送赋予操作权限成功的响应消息后,立即接收到该管理节点发送的操作请求,并处理该操作请求;存储设备也可能在向管理节点发送赋予操作权限成功的响应消息之后,需要先接收到多个其他管理节点发送的申请权限请求以后,才可以接收到该管理节点发送的操作请求,存储设备处理到该管理节点发送的操作请求之前,需要对之前接收的每一个申请权限请求进行处理,并向相应的管理节点返回申请权限失败的响应消息,之后根据接收到的该管理节点发送的操作请求进行相应的操作。In the embodiment of the present invention, after the storage device sends a response message to the management node that successfully grants the operation authority, the storage device may immediately receive the operation request sent by the management node and process the operation request; the storage device may also send the operation request to the management node. After the response message to the operation authority is successfully received, the operation permission request sent by the management node is received before the storage device processes the operation request sent by the management node. Each of the previously requested application permission requests needs to be processed, and a response message for requesting permission failure is returned to the corresponding management node, and then the corresponding operation is performed according to the received operation request sent by the management node.
可选地,作为本发明另一实施例,如图5所示,在根据操作请求执行操作之后,该方法100还包括:Optionally, as another embodiment of the present invention, as shown in FIG. 5, after performing an operation according to the operation request, the method 100 further includes:
160,释放操作权限。160, release the operation permission.
具体的,当存储设备根据一个操作请求执行操作完毕之后,存储设备释放操作权限,更新状态表,将状态表中的管理节点BMC0的权限状态,标记为“0”,状态表如图4中E所示,以用于其他管理节点发送操作请求执行相应的操作,应理解,在本发明实施例中,其他管理节点可以为存储设备刚刚执行过的发送操作请求对应的管理节点,也可以为除该管理节点之外的其他任一管理节点。Specifically, after the storage device performs the operation according to an operation request, the storage device releases the operation authority, updates the state table, and marks the permission state of the management node BMC0 in the state table as “0”, and the state table is as shown in FIG. 4 As shown in the embodiment of the present invention, other management nodes may request a corresponding management node for a transmission operation that has just been performed by the storage device, or may be Any other management node other than this management node.
可选地,作为本发明另一实施例,接收至少一个管理节点发送的至少一个请求之后,该方法100还包括:Optionally, as another embodiment of the present invention, after receiving the at least one request sent by the at least one management node, the method 100 further includes:
串行化所述请求,以用于根据接收所述请求的顺序进行解析。 The request is serialized for parsing in accordance with the order in which the request was received.
具体的,存储设备可以同时接收多个管理节点发送的请求,当存储设备同时接收多个管理节点发送的请求时,将接收到的请求进行串行化,即将接收的请求存储在存储设备中,并对存储的请求依次进行解析,还原为原始请求。Specifically, the storage device can receive the request sent by multiple management nodes at the same time. When the storage device receives the request sent by multiple management nodes at the same time, the storage device serializes the received request, and the received request is stored in the storage device. The stored requests are parsed in turn and restored to the original request.
采用本发明实施例提供的操作存储设备的控制方法,通过赋予请求申请权限的多个管理节点中的一个管理节点操作权限,并根据该具有操作权限的管理节点发送的操作请求执行相应的操作,避免了多个管理节点同时操作存储设备的冲突,一个管理节点连续的串行操作被中断的问题。同时,通过对发送操作请求的管理节点的身份进行验证,确保发送操作请求的管理节点合法,避免串行操作被其他管理节点的操作请求干扰,甚至中断。According to the control method for operating the storage device provided by the embodiment of the present invention, one of the plurality of management nodes requesting the application authority is given the operation authority of the management node, and the corresponding operation is performed according to the operation request sent by the management node having the operation authority, The problem that multiple management nodes operate the storage device at the same time is avoided, and the serial operation of one management node is interrupted. At the same time, by verifying the identity of the management node that sends the operation request, it is ensured that the management node that sends the operation request is legal, and the serial operation is prevented from being interfered or even interrupted by the operation request of other management nodes.
应理解,在本发明实施例中,图4的状态表只是为了详细描述本发明实施例的技术方案,并不限制本发明实施例状态表的具体形式。It should be understood that, in the embodiment of the present invention, the state table of FIG. 4 is only for the detailed description of the technical solutions of the embodiments of the present invention, and does not limit the specific form of the state table of the embodiment of the present invention.
图6为本发明另一实施例提供的操作存储设备的控制方法,该方法400的执行主体为管理节点,该方法400包括:FIG. 6 is a flowchart of a method for controlling a storage device according to another embodiment of the present invention. The method is performed by the method 400. The method 400 includes:
410,向存储设备发送申请权限请求,以用于存储设备根据所述申请权限请求,赋予发送申请权限请求的管理节点操作权限,并向管理节点发送响应消息;Step 410: Send an application permission request to the storage device, where the storage device grants an operation permission for the management node that sends the application permission request according to the application permission request, and sends a response message to the management node;
420,接收存储设备发送的响应消息;420. Receive a response message sent by the storage device.
430,根据响应消息,向存储设备发送操作请求,以用于存储设备根据操作请求执行操作。430. Send an operation request to the storage device according to the response message, for the storage device to perform an operation according to the operation request.
具体的,在本发明实施例中,管理节点向存储设备发送申请权限请求,以便于当存储设备将操作权限赋予该管理节点时,向该管理节点发送申请权限成功的响应消息;管理节点接收到存储设备发送的响应消息后,根据响应消息,向存储设备发送操作请求,以用于存储设备可以根据操作请求执行相应的操作。Specifically, in the embodiment of the present invention, the management node sends an application permission request to the storage device, so that when the storage device assigns the operation authority to the management node, the response message for successfully requesting the permission is sent to the management node; After the response message sent by the storage device, the operation request is sent to the storage device according to the response message, so that the storage device can perform the corresponding operation according to the operation request.
采用本发明实施例提供的控制操作存储设备的方法,管理节点先向存储设 备申请操作权限,当具有操作权限时,再向存储设备发送操作请求,以根据操作请求进行相应的操作,避免了多个管理节点同时访问一个存储设备造成的操作请求互斥的情况,同时,有效保证了串行命令的连续执行。The method for controlling the operation of the storage device provided by the embodiment of the present invention, the management node firstly stores the storage device When the operation permission is applied, the operation request is sent to the storage device to perform the corresponding operation according to the operation request, thereby avoiding the mutual exclusion of operation requests caused by multiple management nodes accessing one storage device at the same time. It effectively guarantees the continuous execution of serial commands.
上文中结合图3至图6,详细描述了根据本发明实施例的控制操作存储设备的方法,下面将结合图7至图10,详细描述根据本发明实施例的存储设备和管理节点。The method of controlling the operation of the storage device according to the embodiment of the present invention is described in detail above with reference to FIG. 3 to FIG. 6. The storage device and the management node according to the embodiment of the present invention will be described in detail below with reference to FIG. 7 to FIG.
图7是本发明实施例提供的存储设备的结构示意图。如图7所示,该存储设备500包括:接收模块510和处理模块520。FIG. 7 is a schematic structural diagram of a storage device according to an embodiment of the present invention. As shown in FIG. 7, the storage device 500 includes a receiving module 510 and a processing module 520.
接收模块510,用于接收至少一个管理节点发送的至少一个请求;The receiving module 510 is configured to receive at least one request sent by the at least one management node;
处理模块520,用于当至少一个请求中的一个请求为申请权限请求时,确定是否赋予发送申请权限请求的管理节点操作权限;The processing module 520 is configured to determine, when one of the at least one request is a request permission request, whether to grant the operation authority of the management node that sends the request permission request;
处理模块520还用于,当至少一个请求中的一个请求为操作请求时,确定发送操作请求的管理节点是否具有操作权限,当发送操作请求的管理节点具有操作权限时,根据操作请求执行操作。The processing module 520 is further configured to: when one of the at least one request is an operation request, determine whether the management node that sends the operation request has an operation authority, and when the management node that sends the operation request has the operation authority, perform an operation according to the operation request.
具体的,接收模块510接收多个管理节点发送的请求,该请求可以为申请权限请求,也可以为操作请求;处理模块520依次判断接收到的请求,确定接收的请求为申请权限请求还是操作请求。当接收的请求为申请权限请求时,处理模块520可以根据当前的状态权限,确定是否有权限赋予发送申请权限请求的管理节点,当前权限状态的确定可以通过查询状态表确定,存储设备根据状态表,确定当前状态是否正在执行操作,当存储设备当前未执行操作,且没有将操作权限赋予其他管理节点时,将该操作权限赋予发送申请权限请求的管理节点。Specifically, the receiving module 510 receives a request sent by multiple management nodes, where the request may be an application permission request or an operation request; the processing module 520 sequentially determines the received request, and determines whether the received request is an application permission request or an operation request. . When the received request is the request permission request, the processing module 520 may determine, according to the current state authority, whether the authority has been granted to the management node that sends the request permission request, and the current permission status may be determined by querying the status table, and the storage device according to the status table. Determining whether the current state is performing an operation. When the storage device does not currently perform an operation and does not assign the operation authority to another management node, the operation authority is assigned to the management node that sends the request permission request.
在本发明实施例中,处理模块520还可以通过预设定的其他逻辑方式确定当前权限状态,在本发明实施例中对此不作限制。In the embodiment of the present invention, the processing module 520 may determine the current privilege state by using other logical modes that are preset, which is not limited in the embodiment of the present invention.
在本发明实施例中,操作请求可以为读操作、写操作或者其他操作。 In the embodiment of the present invention, the operation request may be a read operation, a write operation, or other operations.
应理解,在本发明实施例中,请求可以为预定义的请求集合,当存储设备执行部分预定义请求时,存储设备执行其他预定义的请求。It should be understood that, in the embodiment of the present invention, the request may be a predefined set of requests, and when the storage device performs a partial predefined request, the storage device performs other predefined requests.
采用本发明实施例提供的控制操作存储设备的方法,存储设备通过赋予请求申请权限的多个管理节点中的一个管理节点操作权限,并根据该具有操作权限的管理节点发送的操作请求执行相应的操作,避免了多个管理节点同时操作存储设备的冲突,同时避免了连续的串行操作被中断的问题。According to the method for controlling the operation of the storage device provided by the embodiment of the present invention, the storage device performs the operation authority of the management node by assigning one of the plurality of management nodes requesting the application authority, and executes the corresponding operation according to the operation request sent by the management node having the operation authority. The operation avoids the conflict of multiple management nodes operating the storage device at the same time, and avoids the problem that the serial serial operation is interrupted.
可选地,作为本发明另一实施例,处理模块520还用于,当赋予发送申请权限请求的管理节点操作权限时,更新状态表。Optionally, as another embodiment of the present invention, the processing module 520 is further configured to: when the management node that sends the request permission request is given the operation authority, update the state table.
具体地,当处理模块520赋予多个管理节点中的一个管理节点操作权限时,在状态表中标记该管理节点的权限状态,以用于接收模块510接收到其他管理节点发送的申请权限请求之后,处理模块520查询状态表,确定是否给予发送申请权限的管理节点操作权限。在本发明实施例中,当状态表中已经标记某个管理节点具有操作权限时,处理模块520不赋予发送申请权限请求的管理节点操作权限,并向发送申请权限请求的管理节点返回申请权限失败的响应消息。Specifically, when the processing module 520 assigns one of the plurality of management nodes to the operation authority, the authority status of the management node is marked in the status table, and the receiving module 510 receives the application permission request sent by the other management node. The processing module 520 queries the status table to determine whether to grant the operation authority of the management node that sends the application permission. In the embodiment of the present invention, when a certain management node has been marked with the operation authority in the status table, the processing module 520 does not assign the operation authority of the management node that sends the request permission request, and returns the application authority to the management node that sends the application permission request. Response message.
可选地,作为本发明另一实施例,如图8所示,存储设备500还包括发送模块530,用于向赋予发送申请权限请求的管理节点发送响应消息,以便于申请权限请求的管理节点根据响应消息,向存储设备发送操作请求。Optionally, as another embodiment of the present invention, as shown in FIG. 8, the storage device 500 further includes a sending module 530, configured to send a response message to the management node that is given the request for sending the permission, so as to facilitate the management node that requests the permission request. An operation request is sent to the storage device according to the response message.
具体的,当存储设备赋予多个管理节点中的一个管理节点操作权限时,更新状态表,并向赋予操作权限的管理节点发送申请权限成功的响应消息,以用于该管理节点接收到响应消息之后,向存储设备发送操作请求。Specifically, when the storage device is assigned to one of the plurality of management nodes, the status table is updated, and a response message for successfully applying the permission is sent to the management node that gives the operation authority, so that the management node receives the response message. Thereafter, an operation request is sent to the storage device.
在本发明实施例中,接收模块510可能在发送模块530向管理节点发送赋予操作权限成功的响应消息后,立即接收到该管理节点发送的操作请求,并处理该操作请求;接收模块510也可能在发送模块530向管理节点发送赋予操作权限成功的响应消息之后,需要接收多个其他管理节点发送的申请权限请求之后,才接收到该管理节点发送的操作请求,处理模块520处理到该管理节点发送的操作请求之前,需要对之前接收的每一个申请权限请求进行处理,并向相 应的管理节点返回申请权限失败的响应消息,根据接收到的该管理节点发送的操作请求进行相应的操作。In the embodiment of the present invention, the receiving module 510 may immediately receive an operation request sent by the management node after the sending module 530 sends a response message to the management node, and process the operation request; the receiving module 510 may also After the sending module 530 sends the response message indicating that the operation authority is successful to the management node, after receiving the application permission request sent by the plurality of other management nodes, the operation request sent by the management node is received, and the processing module 520 processes the management node. Before sending an operation request, it is necessary to process each request permission request received before, and to The responding management node returns a response message that the application authority fails, and performs corresponding operations according to the received operation request sent by the management node.
可选地,作为本发明另一实施例,处理模块520具体用于,Optionally, as another embodiment of the present invention, the processing module 520 is specifically configured to:
查询状态表中标记的管理节点是否为发送操作请求的管理节点;Query whether the management node marked in the status table is a management node that sends an operation request;
当状态表中标记的管理节点为发送所述操作请求的管理节点时,确定发送所述操作请求的管理节点具有操作权限。When the management node marked in the status table is the management node that sends the operation request, it is determined that the management node that sent the operation request has an operation authority.
具体地,在本发明实施例中,状态表中可以记录各管理节点并标记各管理节点的操作权限,存储设备在同一时间段内允许一个管理节点具有操作权限,并在状态表中标记该管理节点具有操作权限,其他管理节点都没有操作权限,并标记不具有操作权限的标记。当处理模块520查询状态表中标记具有操作权限的管理节点,并确定状态表中标记的具有操作权限的管理节点与发送操作权限的管理节点为同一管理节点时,确定发送操作请求的管理节点具有操作权限,处理模块520可以根据操作请求执行相应的操作。Specifically, in the embodiment of the present invention, each management node may be recorded in the status table and the operation authority of each management node may be marked, and the storage device allows one management node to have operation authority in the same time period, and marks the management in the status table. Nodes have operational privileges, and other management nodes have no operational permissions and mark tokens that do not have operational permissions. When the processing module 520 queries the management node with the operation authority in the status table, and determines that the management node with the operation authority marked in the status table and the management node that sends the operation authority are the same management node, the management node that determines the sending operation request has The operation authority, the processing module 520 can perform a corresponding operation according to the operation request.
可选地,作为本发明另一实施例,如图8所示,该存储设备500还包括释放模块540,用于在根据操作请求执行操作完毕之后,释放操作权限。Optionally, as another embodiment of the present invention, as shown in FIG. 8, the storage device 500 further includes a release module 540, configured to release the operation authority after the operation is completed according to the operation request.
具体的,当处理模块520根据一个操作请求执行操作完毕之后,释放操作权限,更新状态表,将状态表中的管理节点的权限状态标记修改为不具有操作权限的标记,以用于其他管理节点发送操作请求执行相应的操作。Specifically, after the processing module 520 performs the operation according to an operation request, the operation authority is released, the status table is updated, and the permission status flag of the management node in the status table is modified to be a flag that does not have the operation authority, and is used for other management nodes. The send operation requests the corresponding action.
可选地,作为本发明另一实施例,处理模块520还用于,串行化所述请求,以用于根据接收请求的顺序进行解析。Optionally, as another embodiment of the present invention, the processing module 520 is further configured to serialize the request for parsing according to an order of receiving the request.
具体的,接收模块510可以同时接收多个管理节点发送的请求,当接收模块510同时接收多个管理节点发送的请求时,处理模块520将接收到的请求进行串行化,即将接收的请求存储在该存储设备中,并对存储的请求依次进行解析,还原为原始请求。Specifically, the receiving module 510 can simultaneously receive the request sent by multiple management nodes. When the receiving module 510 simultaneously receives the request sent by multiple management nodes, the processing module 520 serializes the received request, and stores the received request. In the storage device, the stored requests are sequentially parsed and restored to the original request.
采用本发明实施例提供的存储设备,通过赋予请求申请权限的多个管理节点中的一个管理节点操作权限,并根据该具有操作权限的管理节点发送的操作 请求执行相应的操作,避免了多个管理节点同时操作存储设备的冲突,一个管理节点连续的串行操作被中断的问题。同时,通过对发送操作请求的管理节点的身份进行验证,确保发送操作请求的管理节点合法,避免串行操作被其他管理节点的操作请求干扰,甚至中断。According to the storage device provided by the embodiment of the present invention, the operation authority of the management node is given by one of the plurality of management nodes that request the application permission, and the operation is sent according to the management node having the operation authority. The request to perform the corresponding operation avoids the conflict that multiple management nodes operate the storage device at the same time, and the serial operation of one management node is interrupted. At the same time, by verifying the identity of the management node that sends the operation request, it is ensured that the management node that sends the operation request is legal, and the serial operation is prevented from being interfered or even interrupted by the operation request of other management nodes.
需要说明的是,在本发明实施例中,根据本发明实施例的存储设备500中的各个模块的上述和其它操作和/或功能分别为了实现图1和图4中的各个方法的相应流程,为了简洁,在此不再赘述。It should be noted that, in the embodiment of the present invention, the foregoing and other operations and/or functions of the respective modules in the storage device 500 according to the embodiments of the present invention are respectively implemented in order to implement the respective processes of the methods in FIG. 1 and FIG. For the sake of brevity, it will not be repeated here.
图9为本发明实施例提供的一种管理节点,该管理节点700包括:发送模块710和接收模块720。FIG. 9 is a management node according to an embodiment of the present invention. The management node 700 includes: a sending module 710 and a receiving module 720.
发送模块710,用于向存储设备发送申请权限请求,以用于存储设备根据申请权限请求,赋予发送申请权限请求的管理节点操作权限,并向管理节点发送响应消息;The sending module 710 is configured to send a request permission request to the storage device, where the storage device grants the operation authority of the management node that sends the request permission request according to the application permission request, and sends a response message to the management node;
接收模块720,用于接收存储设备发送的响应消息;The receiving module 720 is configured to receive a response message sent by the storage device.
发送模块710还用于,根据响应消息向存储设备发送操作请求,以用于存储设备根据操作请求执行操作。The sending module 710 is further configured to send an operation request to the storage device according to the response message, for the storage device to perform an operation according to the operation request.
具体的,在本发明实施例中,发送模块710向存储设备发送申请权限请求,以便于当存储设备将操作权限赋予该管理节点时,向该管理节点发送申请权限成功的响应消息;接收模块720接收到存储设备发送的响应消息后,根据响应消息,向存储设备发送操作请求,以用于存储设备可以根据操作请求执行相应的操作。Specifically, in the embodiment of the present invention, the sending module 710 sends an application permission request to the storage device, so that when the storage device assigns the operation authority to the management node, the response message for successfully requesting the permission is sent to the management node; and the receiving module 720 After receiving the response message sent by the storage device, the operation request is sent to the storage device according to the response message, so that the storage device can perform the corresponding operation according to the operation request.
采用本发明实施例提供的管理节点,管理节点先向存储设备申请操作权限,当具有操作权限时,再向存储设备发送操作请求,以根据操作请求进行相应的操作,避免了多个管理节点同时访问一个存储设备造成的操作请求互斥的情况,同时,有效保证了串行命令的连续执行。With the management node provided by the embodiment of the present invention, the management node first applies for the operation authority to the storage device, and when the operation authority is available, sends an operation request to the storage device to perform corresponding operations according to the operation request, thereby avoiding multiple management nodes simultaneously. Access to a storage device caused by the mutual exclusion of operation requests, while effectively ensuring the continuous execution of serial commands.
需要说明的是,在本发明实施例中,根据本发明实施例的管理节点700中 的各个模块的上述和其它操作和/或功能分别为了实现图5中的各个方法的相应流程,为了简洁,在此不再赘述。It should be noted that, in the embodiment of the present invention, the management node 700 is in accordance with an embodiment of the present invention. The above and other operations and/or functions of the respective modules are respectively implemented in order to implement the corresponding processes of the respective methods in FIG. 5, and are not described herein again for brevity.
图10为本发明实施例提供的另一存储设备的结构示意图,如图10所示,该存储设备800包括存储器810,处理器820、多个访问接口830、多个管理接口840和通信总线系统850。其中,存储器810,处理器820、多个访问接口830和多个管理接口840通过通信总线系统850相连接。其中,10 is a schematic structural diagram of another storage device according to an embodiment of the present invention. As shown in FIG. 10, the storage device 800 includes a memory 810, a processor 820, multiple access interfaces 830, multiple management interfaces 840, and a communication bus system. 850. The memory 810, the processor 820, the plurality of access interfaces 830, and the plurality of management interfaces 840 are connected by a communication bus system 850. among them,
存储器810,用于存储指令;a memory 810, configured to store an instruction;
处理器820,用于调用存储在存储器810中的指令,通过处理器820中包括的接收模块、处理模块和发送模块执行以下步骤:The processor 820 is configured to invoke an instruction stored in the memory 810, and perform the following steps by using a receiving module, a processing module, and a sending module included in the processor 820:
通过至少一个访问接口接收至少一个管理节点发送的至少一个请求;并通过管理接口对所述请求进行管理,当至少一个请求中的一个请求为申请权限请求时,根据当前权限状态,确定是否赋予发送申请权限请求的管理节点操作权限;当至少一个请求中的一个请求为操作请求时,根据当前权限状态,确定发送操作请求的管理节点是否具有操作权限,当发送所述操作请求的管理节点具有操作权限时,根据操作请求执行操作。Receiving, by the at least one access interface, at least one request sent by the at least one management node; and managing the request by using a management interface, when one of the at least one request is a request permission request, determining whether to give the sending according to the current permission status a management node operation authority for requesting a permission request; when one of the at least one request is an operation request, determining, according to the current permission state, whether the management node that sends the operation request has an operation authority, and when the management node that sends the operation request has an operation When permission is granted, the operation is performed according to the operation request.
在本发明实施例中,当前的权限状态可以通过状态表的形式来记录每个访问接口的权限状态和存储设备的执行状态,也可以通过其他逻辑形式来实现权限状态和执行状态的记录。In the embodiment of the present invention, the current permission state may record the permission state of each access interface and the execution state of the storage device in the form of a state table, and may also record the permission state and the execution state through other logical forms.
需要说明的是,在本发明实施例中,访问接口830包括多个接口,例如:访问接口1,访问接口2等访问接口N,N为大于等于1的整数。管理接口840也包括多个接口,可以用管理接口1至N表示。It should be noted that, in the embodiment of the present invention, the access interface 830 includes multiple interfaces, such as the access interface 1, the access interface 2, and the like, and the access interface N, N is an integer greater than or equal to 1. Management interface 840 also includes a plurality of interfaces, which may be represented by management interfaces 1 through N.
在本发明实施例中,当执行完相应的操作请求时,处理器820中的释放模块释放操作权限,以便于存储设备将操作权限赋予其他管理节点,进行相应的操作。需要说明的是,在本发明实施例中,其他管理节点可以为刚刚执行过的管理节点放的操作请求对应的管理节点,也可以为除该管理节点之外的其他管 理节点。In the embodiment of the present invention, when the corresponding operation request is executed, the release module in the processor 820 releases the operation authority, so that the storage device gives the operation authority to other management nodes, and performs corresponding operations. It should be noted that, in the embodiment of the present invention, the other management node may request the corresponding management node for the operation of the management node just executed, or may be other than the management node. Node.
基于本发明实施例提供的存储设备,通过赋予请求申请权限的多个管理节点中的一个管理节点操作权限,并根据该具有操作权限的管理节点发送的操作请求执行相应的操作,避免了多个管理节点同时操作存储设备的冲突,同时避免了连续的串行操作被中断的问题。The storage device provided by the embodiment of the present invention avoids multiple by administering a management node operation authority to one of the plurality of management nodes requesting the application authority and performing an operation according to the operation request sent by the management node having the operation authority. The management node simultaneously operates the conflicts of the storage devices while avoiding the problem of continuous serial operations being interrupted.
应理解,在本发明实施例中,该处理器820可以是中央处理单元(Central Processing Unit,CPU),该处理器820还可以是其他通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。It should be understood that, in the embodiment of the present invention, the processor 820 may be a central processing unit (CPU), and the processor 820 may also be other general-purpose processors, digital signal processors (DSPs), and application specific integrated circuits. (ASIC), Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc. The general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
该总线系统850除包括数据总线之外,还可以包括电源总线、控制总线和状态信号总线等。但是为了清楚说明起见,在图中将各种总线都标为总线系统850。The bus system 850 may include a power bus, a control bus, a status signal bus, and the like in addition to the data bus. However, for clarity of description, various buses are labeled as bus system 850 in the figure.
在实现过程中,上述方法的各步骤可以通过处理器820中的硬件的集成逻辑电路或者软件形式的指令完成。结合本发明实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器820中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器810,处理器820读取存储器810中的信息,结合其硬件完成上述方法的步骤。为避免重复,这里不再详细描述。In the implementation process, each step of the foregoing method may be completed by an integrated logic circuit of hardware in the processor 820 or an instruction in a form of software. The steps of the method disclosed in the embodiment of the present invention may be directly implemented as a hardware processor, or may be performed by a combination of hardware and software modules in the processor 820. The software module can be located in a conventional storage medium such as random access memory, flash memory, read only memory, programmable read only memory or electrically erasable programmable memory, registers, and the like. The storage medium is located in the memory 810, and the processor 820 reads the information in the memory 810 and completes the steps of the above method in combination with its hardware. To avoid repetition, it will not be described in detail here.
需要说明的是,在本发明实施例中,本发明实施例的存储设备800可以对应于图6和图7的存储设备500,根据本发明实施例的存储设备800中的各个模块的上述和其它操作和/或功能分别为了实现图1、图4和图5中的各个方法的相应流程,为了简洁,在此不再赘述。It should be noted that, in the embodiment of the present invention, the storage device 800 of the embodiment of the present invention may correspond to the storage device 500 of FIG. 6 and FIG. 7, and the foregoing and other modules of the storage device 800 according to the embodiment of the present invention. The operations and/or functions are respectively implemented in order to implement the corresponding processes of the respective methods in FIG. 1, FIG. 4 and FIG. 5, and are not described herein again for brevity.
本发明实施例提供一种存储一个或多个程序的非易失性计算机可读存储 介质,其中,一个或多个程序包括指令,该指令当被包括存储设备执行时使存储设备执行以下事件:Embodiments of the present invention provide a non-transitory computer readable storage storing one or more programs The medium, wherein the one or more programs include instructions that, when executed by the storage device, cause the storage device to perform the following events:
接收至少一个管理节点发送的至少一个请求;当至少一个请求中的一个请求为申请权限请求时,根据当前权限状态,确定是否赋予发送申请权限请求的管理节点操作权限;当至少一个请求中的一个请求为操作请求时,根据当前权限状态,确定发送操作请求的管理节点是否具有操作权限,当发送所述操作请求的管理节点具有操作权限时,根据操作请求执行操作。Receiving at least one request sent by the at least one management node; when one of the at least one request is a request permission request, determining, according to the current permission status, whether to grant the management node operation authority for sending the application permission request; when one of the at least one request When the request is an operation request, according to the current permission status, it is determined whether the management node that sends the operation request has the operation authority, and when the management node that sends the operation request has the operation authority, the operation is performed according to the operation request.
在本发明实施例中,当前权限状态可以通过查询状态表确定,状态表记录了访问接口赋予权限的状态和执行请求的状态,在本发明实施例中,还可以通过其他的逻辑方式体现权限状态和执行请求的状态,在本发明实施例中对此不作限制。In the embodiment of the present invention, the current privilege state may be determined by querying the state table, and the state table records the state of the privilege granted by the access interface and the state of the execution request. In the embodiment of the present invention, the privilege state may also be embodied by other logical manners. The state of the request and the execution of the request are not limited in the embodiment of the present invention.
当存储介质根据操作请求执行操作完毕时,释放操作权限,以便于将该操作权限赋予申请权限请求的管理节点,进行相应的操作。When the storage medium performs the operation according to the operation request, the operation authority is released, so that the operation authority is given to the management node requesting the permission request, and the corresponding operation is performed.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,该单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口、装置或单元的间接耦合或通信连接,也可以是电的,机械的或其它的形式连接。该作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本发明实施例方案的目的。另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以是两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实 现。In the several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be combined or may be Integrate into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, or an electrical, mechanical or other form of connection. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the embodiments of the present invention. In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit. Now.
该集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个非易失性(non-transitory)计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分,或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例该方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as a standalone product, can be stored in a non-transitory computer readable storage medium. Based on such understanding, the technical solution of the present invention contributes in essence or to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium. A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method of various embodiments of the present invention. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可想到各种等效的修改或替换,这些修改或替换都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的保护范围为准。 The above is only the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any equivalent modifications are conceivable within the technical scope of the present invention. These changes or substitutions are intended to be included within the scope of the invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims (16)

  1. 一种操作存储设备的控制方法,其特征在于,所述方法包括:A control method for operating a storage device, the method comprising:
    接收至少一个管理节点发送的至少一个请求;Receiving at least one request sent by at least one management node;
    当所述至少一个请求中的一个请求为申请权限请求时,根据当前权限状态,确定是否赋予发送所述申请权限请求的管理节点操作权限;When one of the at least one request is a request permission request, determining, according to the current permission status, whether to grant the operation authority of the management node that sends the application permission request;
    当所述至少一个请求中的一个请求为操作请求时,根据当前权限状态,确定发送所述操作请求的管理节点是否具有操作权限,当所述发送所述操作请求的管理节点具有操作权限时,根据所述操作请求执行操作。When the one of the at least one request is an operation request, determining, according to the current permission status, whether the management node that sends the operation request has an operation authority, when the management node that sends the operation request has an operation authority, The operation is performed in accordance with the operation request.
  2. 根据权利要求1所述的操作存储设备的控制方法,其特征在于,根据状态表确定是否赋予发送所述申请权限请求的管理节点操作权限或者根据所述状态表确定发送所述操作请求的管理节点是否具有操作权限。The control method for operating a storage device according to claim 1, wherein determining whether to grant a management node operation authority for transmitting the application authority request or determining a management node for transmitting the operation request according to the state table according to a state table Whether it has operational rights.
  3. 根据权利要求2所述的操作存储设备的控制方法,其特征在于,在所述确定是否赋予发送所述申请权限请求的管理节点操作权限之后,所述方法还包括:The method of controlling a storage device according to claim 2, wherein after the determining whether to grant the operation authority of the management node that sends the request permission request, the method further comprises:
    当赋予发送所述申请权限请求的管理节点操作权限时,更新所述状态表。The status table is updated when the management node operation authority that sends the request permission request is given.
  4. 根据权利要求3所述的操作存储设备的控制方法,其特征在于,在所述更新所述状态表之后,所述方法还包括:向赋予发送所述申请权限请求的管理节点发送响应消息,以便于所述申请权限请求的管理节点根据所述响应消息,向存储设备发送操作请求。The control method for operating a storage device according to claim 3, wherein after the updating the state table, the method further comprises: sending a response message to a management node that is given the request to send the application permission, so that And the management node that requests the permission request sends an operation request to the storage device according to the response message.
  5. 根据权利要求1所述的操作存储设备的控制方法,其特征在于,所述根据所述状态表,确定发送所述操作请求的管理节点是否具有操作权限,包括:The control method of the operation storage device according to claim 1, wherein the determining, according to the status table, whether the management node that sends the operation request has an operation authority comprises:
    查询所述状态表中标记的管理节点是否为发送所述操作请求的管理节点;Querying whether the management node marked in the status table is a management node that sends the operation request;
    当所述状态表中标记的管理节点为所述发送所述操作请求的管理节点 时,确定所述发送所述操作请求的管理节点具有操作权限。When the management node marked in the status table is the management node that sends the operation request And determining, by the management node that sends the operation request, an operation authority.
  6. 根据权利要求1-5任一项所述的操作存储设备的控制方法,其特征在于,在所述根据所述操作请求执行操作完毕之后,所述方法还包括,释放操作权限。The control method for operating a storage device according to any one of claims 1 to 5, wherein after the performing the operation according to the operation request, the method further comprises: releasing the operation authority.
  7. 根据权利要求1所述的操作存储设备的控制方法,其特征在于,所述接收至少一个管理节点发送的至少一个请求之后,所述方法还包括:The method of controlling a storage device according to claim 1, wherein after the receiving the at least one request sent by the at least one management node, the method further comprises:
    串行化所述请求,以用于根据接收所述请求的顺序解析所述请求。The request is serialized for parsing the request in accordance with the order in which the request was received.
  8. 一种操作存储设备的控制方法,其特征在于,所述方法包括:A control method for operating a storage device, the method comprising:
    向存储设备发送申请权限请求,以用于存储设备根据所述申请权限请求,赋予发送所述申请权限请求的管理节点操作权限,并向所述管理节点发送响应消息;And sending a request permission request to the storage device, where the storage device grants the operation authority of the management node that sends the request permission request according to the application permission request, and sends a response message to the management node;
    接收所述存储设备发送的所述响应消息;Receiving the response message sent by the storage device;
    根据所述响应消息,向所述存储设备发送操作请求,以用于存储设备根据所述操作请求执行操作。And sending, according to the response message, an operation request to the storage device, for the storage device to perform an operation according to the operation request.
  9. 一种存储设备,其特征在于,所述存储设备包括:A storage device, characterized in that the storage device comprises:
    接收模块,用于接收至少一个管理节点发送的至少一个请求;a receiving module, configured to receive at least one request sent by at least one management node;
    处理模块,用于当所述至少一个请求中的一个请求为申请权限请求时,根据当前权限状态,确定是否赋予发送所述申请权限请求的管理节点操作权限;a processing module, configured to: when one of the at least one request is a request permission request, determine, according to the current permission status, whether to grant the operation authority of the management node that sends the application permission request;
    所述处理模块还用于,当所述至少一个请求中的一个请求为操作请求时,根据当前权限状态,确定发送所述操作请求的管理节点是否具有操作权限,当所述发送所述操作请求的管理节点具有操作权限时,根据所述操作请求执行操作。The processing module is further configured to: when one of the at least one request is an operation request, determine, according to the current permission status, whether the management node that sends the operation request has an operation authority, when the operation request is sent When the management node has the operation authority, the operation is performed according to the operation request.
  10. 根据权利要求9所述的存储设备,其特征在于,所述处理模块根据状态表确定是否赋予发送所述申请权限请求的管理节点操作权限或者根据所述状态表确定发送所述操作请求的管理节点是否具有操作权限。 The storage device according to claim 9, wherein the processing module determines, according to the state table, whether to grant a management node operation authority for transmitting the application permission request or determining, according to the state table, a management node that sends the operation request Whether it has operational rights.
  11. 根据权利要求10所述的存储设备,其特征在于,所述处理模块还用于,当赋予发送所述申请权限请求的管理节点操作权限时,更新所述状态表。The storage device according to claim 10, wherein the processing module is further configured to update the state table when the operation authority of the management node that sends the request permission request is given.
  12. 根据权利要求11所述的存储设备,其特征在于,所述存储设备还包括发送模块,用于向赋予发送所述申请权限请求的管理节点发送响应消息,以便于所述申请权限请求的管理节点根据所述响应消息,向存储设备发送操作请求。The storage device according to claim 11, wherein the storage device further comprises a sending module, configured to send a response message to the management node that is configured to send the request permission request, so as to facilitate the management node that requests the permission request Sending an operation request to the storage device according to the response message.
  13. 根据权利要求9所述的存储设备,其特征在于,所述处理模块具体用于,The storage device according to claim 9, wherein the processing module is specifically configured to:
    查询所述状态表中标记的管理节点是否为发送所述操作请求的管理节点;Querying whether the management node marked in the status table is a management node that sends the operation request;
    当所述状态表中标记的管理节点为所述发送所述操作请求的管理节点时,确定所述发送所述操作请求的管理节点具有操作权限。When the management node marked in the status table is the management node that sends the operation request, it is determined that the management node that sends the operation request has an operation authority.
  14. 根据权利要求9-13任一项所述的存储设备,其特征在于,所述存储设备还包括释放模块,用于在所述根据所述操作请求执行操作完毕之后,释放操作权限。The storage device according to any one of claims 9 to 13, wherein the storage device further comprises a release module, configured to release the operation authority after the performing the operation according to the operation request is completed.
  15. 根据权利要求9所述的操作存储设备的控制方法,所述处理模块还用于,The control method of operating a storage device according to claim 9, wherein the processing module is further configured to:
    串行化所述请求,以用于根据接收所述请求的顺序解析所述请求。The request is serialized for parsing the request in accordance with the order in which the request was received.
  16. 一种管理节点,其特征在于,所述管理节点包括:A management node, wherein the management node comprises:
    发送模块,用于向存储设备发送申请权限请求,以用于存储设备根据所述申请权限请求,赋予发送所述申请权限请求的管理节点操作权限,并向所述管理节点发送响应消息;a sending module, configured to send an application permission request to the storage device, where the storage device grants the operation authority of the management node that sends the request permission request according to the application permission request, and sends a response message to the management node;
    接收模块,用于接收所述存储设备发送的所述响应消息;a receiving module, configured to receive the response message sent by the storage device;
    所述发送模块还用于,根据所述响应消息向所述存储设备发送操作请求,以用于存储设备根据所述操作请求执行操作。 The sending module is further configured to send an operation request to the storage device according to the response message, for the storage device to perform an operation according to the operation request.
PCT/CN2016/095534 2015-10-28 2016-08-16 Control method for operating storage device and storage device WO2017071373A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US15/965,132 US10656874B2 (en) 2015-10-28 2018-04-27 Storage device operation control method, and storage device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510711287.3A CN106648440B (en) 2015-10-28 2015-10-28 Control method for operating storage device and storage device
CN201510711287.3 2015-10-28

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/965,132 Continuation US10656874B2 (en) 2015-10-28 2018-04-27 Storage device operation control method, and storage device

Publications (1)

Publication Number Publication Date
WO2017071373A1 true WO2017071373A1 (en) 2017-05-04

Family

ID=58631290

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/095534 WO2017071373A1 (en) 2015-10-28 2016-08-16 Control method for operating storage device and storage device

Country Status (3)

Country Link
US (1) US10656874B2 (en)
CN (1) CN106648440B (en)
WO (1) WO2017071373A1 (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113407244A (en) * 2016-03-01 2021-09-17 华为技术有限公司 System and method for remote shared access of cascade plate and SSD
CN109257955B (en) * 2017-05-15 2021-08-20 华为技术有限公司 Method for operating hard disk and hard disk manager
US10474833B2 (en) 2018-02-13 2019-11-12 Live Nation Entertainment, Inc. Enhanced processing and verification of digital access rights
CN112055851B (en) * 2018-04-17 2024-05-07 日本电信电话株式会社 Instrument control device, instrument control method, and instrument control system
CN109816199B (en) * 2018-12-14 2023-09-22 深圳平安医疗健康科技服务有限公司 Work task processing method and device, server and computer readable storage medium
CN109669731B (en) * 2018-12-28 2022-03-25 联想(北京)有限公司 Service control method and device of baseboard manager
CN110209606B (en) * 2019-04-30 2021-01-22 杭州电子科技大学 Control method of PCIe-based multi-interface storage device
US11182086B2 (en) * 2019-07-19 2021-11-23 Cignet Technology, Inc. Method and system for application-based management of user data storage rights
US11507288B2 (en) * 2021-04-15 2022-11-22 Dell Products L.P. Detecting and reconfiguring of boot parameters of a remote non-volatile memory express (NVME) subsystem

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040073730A1 (en) * 2002-09-30 2004-04-15 Matsushita Electric Industrial Co., Ltd. Resource management device
CN1667597A (en) * 2004-03-12 2005-09-14 松下电器产业株式会社 Resource management device
US20080065802A1 (en) * 2006-09-13 2008-03-13 Yoshiharu Watanabe Resource management device
CN101271435A (en) * 2008-05-20 2008-09-24 北京中星微电子有限公司 Method for access to external memory
CN101980140A (en) * 2010-11-15 2011-02-23 北京北方烽火科技有限公司 SSRAM access control system
CN102272744A (en) * 2009-01-02 2011-12-07 国际商业机器公司 Prioritization for conflict arbitration in transactional memory management

Family Cites Families (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4864511A (en) * 1987-01-27 1989-09-05 Storage Technology Corporation Automated cartridge system
JP2008077290A (en) * 2006-09-20 2008-04-03 Hitachi Ltd Information processor, information processing method and storage system
US8935751B1 (en) * 2006-09-29 2015-01-13 Emc Corporation Method for extending the fragment mapping protocol to prevent malicious access to virtualized storage
US8392702B2 (en) * 2007-07-27 2013-03-05 General Instrument Corporation Token-based management system for PKI personalization process
US20130086311A1 (en) * 2007-12-10 2013-04-04 Ming Huang METHOD OF DIRECT CONNECTING AHCI OR NVMe BASED SSD SYSTEM TO COMPUTER SYSTEM MEMORY BUS
CA2795431A1 (en) * 2010-04-15 2011-10-20 General Instrument Corporation Cross-domain identity management for a whitelist-based online secure device provisioning framework
US10360176B2 (en) * 2012-01-17 2019-07-23 Intel Corporation Techniques for command validation for access to a storage device by a remote client
US20130185173A1 (en) * 2012-01-18 2013-07-18 General Instrument Corporation Feature licensing framework for third party feature credit management
US9875204B2 (en) * 2012-05-18 2018-01-23 Dell Products, Lp System and method for providing a processing node with input/output functionality provided by an I/O complex switch
CN103189834B (en) * 2012-07-16 2015-07-08 华为技术有限公司 Method, apparatus and system for determining drive mark
WO2014070800A1 (en) * 2012-10-29 2014-05-08 General Instrument Corporation BUSINESS METHOD INCLUDING CHALLENGE-RESPONSE SYSTEM TO SECURELY AUTHENTICATE SOFTWARE APPLICATION PROGRAM INTERFACES (APIs)
CN103944856A (en) * 2013-01-17 2014-07-23 华为终端有限公司 Authority transfer method and device
US9311230B2 (en) * 2013-04-23 2016-04-12 Globalfoundries Inc. Local direct storage class memory access
US9959203B2 (en) * 2014-06-23 2018-05-01 Google Llc Managing storage devices
US9712619B2 (en) * 2014-11-04 2017-07-18 Pavilion Data Systems, Inc. Virtual non-volatile memory express drive
CN104536834A (en) * 2014-11-26 2015-04-22 华为技术有限公司 Method for authorizing lock permission and distributed lock manager

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040073730A1 (en) * 2002-09-30 2004-04-15 Matsushita Electric Industrial Co., Ltd. Resource management device
CN1667597A (en) * 2004-03-12 2005-09-14 松下电器产业株式会社 Resource management device
US20080065802A1 (en) * 2006-09-13 2008-03-13 Yoshiharu Watanabe Resource management device
CN101271435A (en) * 2008-05-20 2008-09-24 北京中星微电子有限公司 Method for access to external memory
CN102272744A (en) * 2009-01-02 2011-12-07 国际商业机器公司 Prioritization for conflict arbitration in transactional memory management
CN101980140A (en) * 2010-11-15 2011-02-23 北京北方烽火科技有限公司 SSRAM access control system

Also Published As

Publication number Publication date
CN106648440B (en) 2020-07-24
US20180246675A1 (en) 2018-08-30
US10656874B2 (en) 2020-05-19
CN106648440A (en) 2017-05-10

Similar Documents

Publication Publication Date Title
WO2017071373A1 (en) Control method for operating storage device and storage device
US10404690B2 (en) Authentication-free configuration for service controllers
US11221763B2 (en) Disk lock management method, apparatus, and system
US11256582B2 (en) System, and control method and program for input/output requests for storage systems
US10169178B2 (en) Implementing shared adapter configuration updates concurrent with maintenance actions in a virtualized system
TWI684864B (en) Managing function level reset in an io virtualization-enabled storage device
US11902112B2 (en) Provisioning persistent, dynamic and secure cloud services
EP3009930A1 (en) Lock management method and system, and lock management system configuration method and device
US9104501B2 (en) Preparing parallel tasks to use a synchronization register
US20120215941A1 (en) Accessing a configuration space of a virtual function
KR102568909B1 (en) PCIe FUNCTION AND OPERATING METHOD THEREOF
EP2998862A1 (en) Method, device, and system for memory management
BR112017011541B1 (en) METHOD FOR PROCESSING A BLOCK REQUEST, BLOCK REQUEST MANAGEMENT APPARATUS AND SERVER
US10324646B2 (en) Node controller and method for responding to request based on node controller
EP3629178B1 (en) System and method for providing backup services to high availability applications
US20170308684A1 (en) System and method for information processing
JP2014063356A (en) Information processing method, program, information processor and information processing system
US8719466B2 (en) Direct data transfer for device drivers
WO2017020572A1 (en) Interrupt processing method, ioapic and computer system
US9740641B2 (en) Information processing device, I/O system, and I/O control method
US20210004475A1 (en) Computer apparatus, data sharing system, and data access method
TWI389051B (en) A multi-image hardware access device and a method of utilizing a support system, an article of manufacture including a data storage medium, and a method of providing a service for managing a support system related therewith

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16858810

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16858810

Country of ref document: EP

Kind code of ref document: A1