Disk array card, control method of physical disk under disk array card, host equipment and product
By designing configuration space access commands, the host device can flexibly access the configuration space of the physical disk mounted on the RAID card, solving the problem of difficult development of RAID card management and debugging software in the existing technology, and achieving convenient physical disk control and management.
Patent Information
- Application Number
- CN202510344158.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-21
- Publication Date
- 2025-06-06
AI Technical Summary
In the prior art, host equipment needs to manage or adjust the physical disks hanging under the RAID card based on the RAID card firmware, which leads to high difficulty in software development and high workload, and there is a huge difference between the RAID card firmware development environment and the host software development environment.
Through the design of the configuration space access command, the host device can flexibly access the specified physical disk configuration space through the RAID card, thereby realizing control over the physical disk hanging under the RAID card. The method includes obtaining the configuration space access command sent by the host device, determining the target configuration space, accessing the target configuration space according to the operation type and configuration information, and sending feedback information after the access is completed.
Conveniently realize the control of the physical disks mounted on the RAID card by the host device, reduce the difficulty and workload of the corresponding software development, and improve the efficiency of RAID card management and tuning.
Smart Images

Figure CN120104065A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of storage technology, and in particular to a control method for a physical disk attached to a disk array card, a disk array card, a host device and a computer program product. Background Art
[0002] With the evolution of storage technology, RAID (Redundant Arrays of Independent Disks) cards have mostly adopted PCIe (Peripheral Component Interconnect express, a high-speed serial computer expansion bus standard) as their communication link in terms of interface technology with host devices. Accordingly, a large part of the work of host software that manages and debugs RAID card chips, such as RAID card chip business management software and PCIe link debugging software, is implemented based on the operations of the configuration space defined in the PCIe specification.
[0003] As the hard disk speed requirements become higher and higher, most RAID cards (or RAID card chips) use PCIe interface technology to manage the communication links for command and data reading and writing. Therefore, the software for managing and debugging RAID cards on the host device also needs to be implemented inside the RAID card in order to complete the management and debugging of the hard disks attached to the RAID card and their related PCIe links.
[0004] In related technologies, such as Figure 1 As shown, if the host device needs to directly manage the disks attached to the RAID card or perform link debugging, it needs to be done based on the RAID card firmware. When the host device wants to control the disks attached to the RAID card, the host software needs to be transplanted into the RAID card. However, due to the huge differences between the RAID card firmware development environment and the host software development environment in terms of software, hardware, and compiler, this work is very difficult and time-consuming. Therefore, how to conveniently realize the host device's control over the physical disks attached to the RAID card and reduce the difficulty and workload of the corresponding software development is a problem that needs to be solved nowadays. Summary of the invention
[0005] The purpose of the present invention is to provide a control method for a physical disk attached to a disk array card, a disk array card, a host device and a computer program product, so as to conveniently realize the control of the physical disk attached to the RAID card by the host device and reduce the difficulty and workload of developing corresponding software.
[0006] In order to solve the above technical problems, the present invention provides a control method for a physical disk mounted under a disk array card, which is applied to the disk array card and comprises:
[0007] Acquire a configuration space access command sent by a host device; wherein the configuration space access command includes a configuration space access command operation code, an operation type, a physical disk code, and configuration information;
[0008] Determine a target configuration space according to the physical disk code or the physical disk code and the operation type; wherein the target configuration space is a configuration space of a physical disk corresponding to the physical disk code mapped in the disk array card;
[0009] Accessing the target configuration space according to the operation type and the configuration information;
[0010] After the access is completed, feedback information is sent to the host device.
[0011] On the other hand, the configuration space access command operation code includes a preset custom operation code and a configuration space access command identifier; and the operation type includes a read operation type and / or a write operation type.
[0012] On the other hand, the physical disk corresponding to the physical disk encoding is a non-volatile memory host controller interface specification hard disk, and the preset custom operation code is any manufacturer-defined operation code specified by the non-volatile memory host controller interface specification standard; the read operation type includes the read operation type of the high-speed serial computer expansion bus standard configuration space and / or the read operation type of the base address register space; the write operation type includes the write operation type of the high-speed serial computer expansion bus standard configuration space and / or the write operation type of the base address register space.
[0013] On the other hand, the configuration space access command is a command submission queue entry, the first double word of the configuration space access command includes the preset custom operation code and the configuration space access command identifier, the third double word of the configuration space access command includes the operation type and the physical disk encoding, the seventh double word and the eighth double word of the configuration space access command include the configuration information, and the configuration information is the storage address of the access configuration information in the host device.
[0014] On the other hand, obtaining the configuration space access command sent by the host device includes:
[0015] Receiving a physical disk control command sent by the host device;
[0016] Determine whether the physical disk control command has the preset custom operation code and the configuration space access command identifier;
[0017] If so, it is determined that the physical disk control command is the configuration space access command.
[0018] On the other hand, the configuration information is a storage address of access configuration information in the host device, and accessing the target configuration space according to the operation type and the configuration information includes:
[0019] If the operation type is a write operation type, setting the configuration value in the access configuration information stored in the storage address to the target position in the target configuration space; wherein the target position is the position in the target configuration space corresponding to the offset information in the access configuration information stored in the storage address;
[0020] If the operation type is a read operation type, the data in the storage address is read from the target location in the target configuration space and updated.
[0021] The present invention also provides a disk array card, comprising:
[0022] A first memory for storing a computer program;
[0023] The first processor is used to implement the steps of the control method for attaching a physical disk to a disk array card as described above when executing the computer program.
[0024] The present invention also provides a control method for a physical disk mounted under a disk array card, which is applied to a host device and includes:
[0025] Generate a configuration space access command according to the access request of the acquired target physical disk; wherein the configuration space access command includes a configuration space access command operation code, an operation type, configuration information and a physical disk code corresponding to the target physical disk;
[0026] Sending the configuration space access command to the disk array card to control the disk array card to access the target configuration space; wherein the target configuration space is the configuration space of the target physical disk mapped in the disk array card;
[0027] Receive feedback information sent by the disk array card after the access is completed.
[0028] The present invention also provides a host device, comprising:
[0029] A second memory for storing a computer program;
[0030] The second processor is used to implement the steps of the control method for attaching a physical disk to a disk array card of a host device as described above when executing the computer program.
[0031] In addition, the present invention also provides a computer program product, including: a computer program / instruction, which, when executed by a processor, implements the steps of the control method for attaching a physical disk to a disk array card as described above.
[0032] A control method for a physical disk attached to a disk array card provided by the present invention is applied to the disk array card, comprising: obtaining a configuration space access command sent by a host device; wherein the configuration space access command comprises a configuration space access command operation code, an operation type, a physical disk code and configuration information; determining a target configuration space according to the physical disk code or the physical disk code and the operation type; wherein the target configuration space is a configuration space of a physical disk corresponding to the physical disk code mapped in the disk array card; accessing the target configuration space according to the operation type and the configuration information; and sending feedback information to the host device after the access is completed.
[0033] It can be seen that the present invention enables the host device to flexibly access the specified physical disk configuration space by using the transparent transmission command mode through the configuration of the configuration space access command, conveniently realizes the host device's control over the physical disks attached to the RAID card, and can reduce the difficulty and workload of the corresponding software development. In addition, the present invention also provides a control method for the physical disk attached to the disk array card of the host device, a disk array card, a host device and a computer program product, which also have the above-mentioned beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0035] Figure 1 A schematic diagram of the architecture of RAID card chip management data communication in the related art;
[0036] Figure 2 A flow chart of a method for controlling a physical disk attached to a disk array card provided by an embodiment of the present invention;
[0037] Figure 3 A schematic diagram of the format of a configuration space access command provided by an embodiment of the present invention;
[0038] Figure 4 A schematic diagram of a configuration space access command processing flow provided by an embodiment of the present invention;
[0039] Figure 5A schematic diagram of the structure of an SQE corresponding to a configuration space access command provided in an embodiment of the present invention;
[0040] Figure 6 A schematic flow chart of another method for controlling a physical disk attached to a disk array card provided by an embodiment of the present invention;
[0041] Figure 7 A structural block diagram of a control device for attaching a physical disk to a disk array card provided by an embodiment of the present invention;
[0042] Figure 8 A schematic diagram of the structure of a disk array card provided by an embodiment of the present invention;
[0043] Fig. 9 A flowchart of another method for controlling a physical disk attached to a disk array card provided by an embodiment of the present invention;
[0044] Fig.10 A structural block diagram of another control device for attaching a physical disk to a disk array card provided by an embodiment of the present invention;
[0045] Fig.11 A schematic diagram of the structure of a host device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0047] In the related art, according to the PCIe specification and the actual hardware implementation of the current RC (root complex) device and EP (endpoint) device, the PCIe configuration space and BAR (Base Address Register) space of the EP device are mapped to a continuous space of the RC, such as Figure 1 In the dotted part, the firmware of the RC device can directly operate the corresponding space of the EP device by accessing the address mapped to the local. This means that if the host device needs to directly manage the disks attached to the RAID card or perform link commissioning, it must be done based on the RAID card firmware.
[0048] RAID card firmware (software) generally uses a real-time operating system or bare metal program software architecture; the hardware is generally based on non-x86 architectures such as ARM (a chip architecture) or RISC (a chip architecture); but most host software is based on x86 architecture, Linux (an operating system) system or Windows (an operating system) system. When it is necessary to control the hard disk attached to the RAID card chip, there are the following shortcomings:
[0049] 1. The host software needs to be directly or simply transplanted into the RAID card chip. However, due to the huge differences between the RAID card firmware development environment and the host software development environment in terms of software, hardware, and compiler, this work becomes relatively difficult or time-consuming.
[0050] 2. Redevelop the hard disk control service based on the RAID card firmware environment. Since the RAID card environment is generally a lightweight and closed environment, redevelopment means that public components such as the compiled library on which it depends need to be transplanted, which makes development more difficult.
[0051] 3. RAID card firmware development is often limited by insufficient resources in embedded environments such as memory.
[0052] 4. Developing some debugging functions based on RAID card firmware has a huge impact on the existing core business functions of the RAID card, bringing many uncontrollable risks in software development, maintenance and integration.
[0053] Therefore, in order to quickly and conveniently manage or debug the physical disks attached to the RAID card chip based on the host software, this embodiment designs the configuration space access command so that the host device can flexibly access the specified physical disk configuration space by using the transparent command method, thereby reducing the difficulty and workload of the corresponding software development.
[0054] Please refer to Figure 2 , Figure 2 This is a flow chart of a method for controlling a physical disk attached to a disk array card provided by an embodiment of the present invention. The method is applied to a disk array card (RAID card) and may include:
[0055] Step 101: Acquire a configuration space access command sent by a host device; wherein the configuration space access command includes a configuration space access command operation code, an operation type, a physical disk code, and configuration information.
[0056] It is understandable that the configuration space access command in this embodiment can be a command for the host device to directly access the configuration space (such as PCIe configuration space and BAR space) of the physical disk attached to the RAID card through the RAID card (or RAID controller). Through the design of the configuration space access command, this embodiment enables the host device to flexibly access the specified physical disk configuration space by transparent transmission command mode, thereby realizing the control of the physical disk attached to the RAID card.
[0057] Correspondingly, the specific content of the configuration space access command in this embodiment can be set by the designer according to practical scenarios and user needs. For example, the configuration space access command may include a configuration space access command operation code, an operation type, a physical disk code, and configuration information. Among them, the configuration space access command operation code can be used to express that this command is a configuration space access command. For example, the configuration space access command operation code may include a preset custom operation code or a preset custom operation code and a configuration space access command identifier; for example, when the preset custom operation code is only used to express that this command is a configuration space access command, the configuration space access command operation code may only include the preset custom operation code; when the preset custom operation code is used to express that this command is a plurality of commands including the configuration space access command, the configuration space access command operation code may include a preset custom operation code (such as Figure 3 Disk configuration space access command code in the configuration space access command identifier (such as Figure 3 In the command operation code, the configuration space access command identifier is used to express that the command is a configuration space access command, that is, the configuration space access command and the command response are associated through the configuration space access command identifier.
[0058] Accordingly, the preset custom operation code may be any customizable operation code specified by the interface standard of the physical disk to be accessed. For example, when the physical disk to be accessed is an NVMe (Non-Volatile Memory Host Controller Interface Specification) hard disk, the preset custom operation may belong to any manufacturer-defined operation code (Combined Opcode) range specified by the NVMe standard, and its value may be any one of C0h to FFh. The configuration space access command identifier may be an identifier assigned by the host device when constructing the configuration space access command, which is used to associate the configuration space access command with the response of the command.
[0059] The operation type in the configuration space access command can be used to describe the access method. For example, the operation type can include a read operation type and / or a write operation type. The read operation type and the write operation type can be divided according to the type of the configuration space of the physical disk mounted under the RAID card, so as to facilitate the search and determination of the configuration space to be accessed (i.e., the target configuration space). Figure 4As shown, when the RAID card and the NVMe hard disk attached to it are connected through PCIe, the read operation type may include the read operation type of the PCIe configuration space (such as PCIe_CFG_GET) and / or the read operation type of the BAR space (such as BAR_GET), and the write operation type may include the write operation type of the PCIe configuration space (such as PCIe_CFG_SET) and / or the write operation type of the BAR space (such as BAR_SET).
[0060] Correspondingly, the physical disk ID (code) in the configuration space access command can be the unique identifier of the physical disk attached to the RAID card. The configuration information in the configuration space access command can be configuration-related information when accessing the configuration space of the physical disk. For example, the configuration information can be detailed access configuration information (such as the offset of the target configuration space and the configuration value to be written, etc.); it can also be the storage address of the access configuration information in the host device, and this embodiment does not impose any restrictions on this.
[0061] For example, when the physical disk attached to the RAID card is an NMVe hard disk, the configuration space access command sent by the host device to the RAID card can be a standard SQE (Submission Queue Entry), such as Figure 5 As shown, the first double word (DW0) of the configuration space access command may include a preset custom operation code (operation code) and a configuration space access command identifier (host command identifier), the third double word (DW2 may) of the configuration space access command may include an operation type and a physical disk ID, the seventh double word (DW6) and the eighth double word (DW7) of the configuration space access command may include configuration information, and the configuration information is a storage address (configuration information address) for accessing the configuration information in the host device, such as the seventh double word includes the lower 32 bits of the storage address, and the eighth double word includes the upper 32 bits of the storage address.
[0062] That is to say, after the host device obtains the access request for accessing the configuration space of the target physical disk, it generates the corresponding SQE (i.e., configuration space access command), so that after sending it to the RAID card, the RAID card can parse it normally. For example, the host device can fill the preset custom operation code and the generated configuration space access command identifier into DW0 of SQE; fill the physical disk ID and operation type corresponding to the target physical disk into DW2 of SQE respectively; and fill the address where the access configuration information is located into DW6 and DW7 of SQE.
[0063] Correspondingly, the specific method for the RAID card to obtain the configuration space access command sent by the host device in this step can be set by the designer. For example, when the configuration space access command operation code includes a preset custom operation code and a configuration space access command identifier, the RAID card can receive the physical disk control command sent by the host device; determine whether the physical disk control command has a preset custom operation code and a configuration space access command identifier; if so, determine that the physical disk control command is a configuration space access command; if not, the corresponding processing flow of other types of physical disk control commands can be executed.
[0064] The physical disk management command may be a command for managing and controlling the physical disks attached to the RAID card, such as the admin command in the NVMe protocol. Figure 3 and Figure 6 As shown, the RAID card can receive the admin command (SQE) sent by the host device through the PCIe connection with the host device, read the preset custom operation code and configuration space access command identifier in DW0 of the command, and determine whether it is a configuration space access command.
[0065] Step 102: Determine a target configuration space according to the physical disk code or the physical disk code and the operation type; wherein the target configuration space is a configuration space of the physical disk corresponding to the physical disk code mapped in the disk array card.
[0066] It should be noted that the target configuration space in this embodiment can be the configuration space to be accessed by the configuration space access command. If the physical disk corresponding to the physical disk code has only one type of configuration space, the RAID can directly determine the target configuration space according to the physical disk ID; if the physical disk corresponding to the physical disk code has at least two types of configuration spaces (such as PCIe configuration space and BAR space), the RAID can use the physical disk ID and operation type to determine the target configuration space.
[0067] like Figure 6 As shown, the RAID card can read the physical disk ID and operation type in DW2 of the command, such as using Figure 3 The configuration space access module in extracts the physical disk ID and operation type in DW2; according to the operation type, it is determined whether the target configuration space to be accessed is the PCIe configuration space or the BAR configuration space (i.e., the BAR space), and then the address of the target configuration space to be accessed is obtained according to the physical disk ID.
[0068] Step 103: Access the target configuration space according to the operation type and configuration information.
[0069] It is understandable that in this step, the RAID card can perform access operations on the data in the target configuration space according to the operation type and the configuration information. For example, when the operation type is a read operation type, the value stored in the configuration information address can be read from the target configuration space and updated; when the operation type is a write operation type, the configuration value stored in the configuration information address is set to the target configuration space.
[0070] For example, when the configuration information is a storage address of access configuration information in a host device, in this step, the RAID can set the configuration value in the access configuration information stored in the storage address to the target position in the target configuration space when the operation type is a write operation type; and read and update the data in the storage address from the target position in the target configuration space when the operation type is a read operation type. The target position is the position in the target configuration space corresponding to the offset information in the access configuration information stored in the storage address.
[0071] Step 104: After the access is completed, feedback information is sent to the host device.
[0072] In this step, after accessing the target configuration space, the RAID may send feedback information to the host device, such as constructing a CQE (Completion Queue Entry) and returning it to the host device, so that the host device can understand the access completion status and facilitate subsequent processing.
[0073] It should be noted that this embodiment does not limit the specific type of the physical disk attached to the RAID card, that is, the specific type of the physical disk corresponding to the physical disk ID in the configuration space access command. For example, the physical disk corresponding to the physical disk ID can be an NVMe hard disk, or a hard disk or disk using other common interface protocols such as SAS or SATA. The physical disk corresponding to the physical disk ID can be not only a physical disk directly connected to the RAID card, but also a physical disk indirectly connected to the RAID card through an expansion card such as a switch.
[0074] In this embodiment, the embodiment of the present invention configures the space access command so that the host device can flexibly access the specified physical disk configuration space by using the transparent command method, which conveniently realizes the host device's control over the physical disk attached to the RAID card and can reduce the difficulty and workload of corresponding software development.
[0075] Corresponding to the above method embodiment, an embodiment of the present invention further provides a control device for a physical disk mounted on a disk array card. The control device for a physical disk mounted on a disk array card described below and the control method for a physical disk mounted on a disk array card described above can refer to each other.
[0076] Please refer to Figure 7 , Figure 7 This is a structural block diagram of a control device for attaching a physical disk to a disk array card provided by an embodiment of the present invention. The device is applied to a disk array card and may include:
[0077] The acquisition module 10 is used to acquire the configuration space access command sent by the host device; wherein the configuration space access command includes a configuration space access command operation code, an operation type, a physical disk code and configuration information;
[0078] The parsing module 20 is used to determine the target configuration space according to the physical disk code or the physical disk code and the operation type; wherein the target configuration space is the configuration space of the physical disk corresponding to the physical disk code mapped in the disk array card;
[0079] An access module 30, used to access a target configuration space according to an operation type and configuration information;
[0080] The feedback module 40 is used to send feedback information to the host device after the access is completed.
[0081] In some embodiments, the configuration space access command operation code includes a preset custom operation code and a configuration space access command identifier; the operation type includes a read operation type and / or a write operation type.
[0082] In some embodiments, the physical disk corresponding to the physical disk encoding is a non-volatile memory host controller interface specification hard disk, and the preset custom operation code is any manufacturer-defined operation code specified by the non-volatile memory host controller interface specification standard; the read operation type includes the read operation type of the high-speed serial computer expansion bus standard configuration space and / or the read operation type of the base address register space; the write operation type includes the write operation type of the high-speed serial computer expansion bus standard configuration space and / or the write operation type of the base address register space.
[0083] In some embodiments, the configuration space access command is a command submission queue entry, the first double word of the configuration space access command includes a preset custom operation code and a configuration space access command identifier, the third double word of the configuration space access command includes an operation type and a physical disk encoding, and the seventh and eighth double words of the configuration space access command include configuration information, which is a storage address for accessing the configuration information in the host device.
[0084] In some embodiments, the acquisition module 10 may include:
[0085] A receiving submodule, used for receiving a physical disk control command sent by a host device;
[0086] The judgment submodule is used to judge whether the physical disk control command has a preset custom operation code and a configuration space access command identifier; if so, determine that the physical disk control command is a configuration space access command.
[0087] In another aspect, the configuration information is a storage address of access configuration information in the host device, and the access module 30 may include:
[0088] A write access submodule, for setting the configuration value in the access configuration information stored in the storage address to the target position in the target configuration space if the operation type is a write operation type; wherein the target position is the position in the target configuration space corresponding to the offset information in the access configuration information stored in the storage address;
[0089] The read access submodule is used to read and update the data in the storage address from the target location in the target configuration space if the operation type is a read operation type.
[0090] In this embodiment, the embodiment of the present invention configures the space access command so that the host device can flexibly access the specified physical disk configuration space by using the transparent command method, which conveniently realizes the host device's control over the physical disk attached to the RAID card and can reduce the difficulty and workload of corresponding software development.
[0091] Corresponding to the above method embodiment, the embodiment of the present invention further provides a disk array card. The disk array card described below and the control method for attaching a physical disk to a disk array card described above can refer to each other.
[0092] Please refer to Figure 8 , Figure 8 A schematic diagram of the structure of a disk array card provided by an embodiment of the present invention. The disk array card may include:
[0093] A first memory D1, used for storing computer programs;
[0094] The first processor D2 is used to implement the steps of the method for controlling the physical disk attached to the disk array card provided in the above method embodiment when executing the computer program.
[0095] Corresponding to the above method embodiment, an embodiment of the present invention further provides a control method for a physical disk mounted under a disk array card of a host device. The control method for a physical disk mounted under a disk array card of a host device described below and the control method for a physical disk mounted under a disk array card of a disk array card described above can correspond to each other.
[0096] Please refer to Fig. 9 , Fig. 9A flowchart of another method for controlling a physical disk attached to a disk array card provided by an embodiment of the present invention. The method is applied to a host device and may include:
[0097] Step 201: Generate a configuration space access command according to the access request of the acquired target physical disk; wherein the configuration space access command includes a configuration space access command operation code, an operation type, configuration information, and a physical disk code corresponding to the target physical disk.
[0098] Step 202: Send a configuration space access command to the disk array card to control the disk array card to access the target configuration space; wherein the target configuration space is the configuration space of the target physical disk mapped in the disk array card.
[0099] Step 203: Receive feedback information sent by the disk array card after the access is completed.
[0100] In some embodiments, the configuration space access command operation code includes a preset custom operation code and a configuration space access command identifier; the operation type includes a read operation type and / or a write operation type.
[0101] In some embodiments, the target physical disk is a non-volatile memory host controller interface specification hard disk, and the preset custom operation code is any manufacturer-defined operation code specified by the non-volatile memory host controller interface specification standard; the read operation type includes the read operation type of the high-speed serial computer expansion bus standard configuration space and / or the read operation type of the base address register space; the write operation type includes the write operation type of the high-speed serial computer expansion bus standard configuration space and / or the write operation type of the base address register space.
[0102] In some embodiments, the configuration space access command is a command submission queue entry, the first double word of the configuration space access command includes a preset custom operation code and a configuration space access command identifier, the third double word of the configuration space access command includes an operation type and a physical disk encoding, and the seventh and eighth double words of the configuration space access command include configuration information, which is a storage address for accessing the configuration information in the host device.
[0103] In this embodiment, the embodiment of the present invention configures the space access command so that the host device can flexibly access the specified physical disk configuration space by using the transparent command method, which conveniently realizes the host device's control over the physical disk attached to the RAID card and can reduce the difficulty and workload of corresponding software development.
[0104] Corresponding to the above method embodiment, an embodiment of the present invention further provides a control device for a physical disk mounted under a disk array card of a host device. The control device for a physical disk mounted under a disk array card of a host device described below and the control method for a physical disk mounted under a disk array card of a host device described above can correspond to each other.
[0105] Please refer to Fig.10 , Fig.10 This is a structural block diagram of another control device for attaching a physical disk to a disk array card provided by an embodiment of the present invention. The device is applied to a host device and may include:
[0106] A generating module 50 is used to generate a configuration space access command according to the access request of the acquired target physical disk; wherein the configuration space access command includes a configuration space access command operation code, an operation type, configuration information and a physical disk code corresponding to the target physical disk;
[0107] The sending module 60 is used to send the configuration space access command to the disk array card to control the disk array card to access the target configuration space; wherein the target configuration space is the configuration space of the target physical disk mapped in the disk array card;
[0108] The receiving module 70 is used to receive feedback information sent by the disk array card after the access is completed.
[0109] In some embodiments, the configuration space access command operation code includes a preset custom operation code and a configuration space access command identifier; the operation type includes a read operation type and / or a write operation type.
[0110] In some embodiments, the target physical disk is a non-volatile memory host controller interface specification hard disk, and the preset custom operation code is any manufacturer-defined operation code specified by the non-volatile memory host controller interface specification standard; the read operation type includes the read operation type of the high-speed serial computer expansion bus standard configuration space and / or the read operation type of the base address register space; the write operation type includes the write operation type of the high-speed serial computer expansion bus standard configuration space and / or the write operation type of the base address register space.
[0111] In some embodiments, the configuration space access command is a command submission queue entry, the first double word of the configuration space access command includes a preset custom operation code and a configuration space access command identifier, the third double word of the configuration space access command includes an operation type and a physical disk encoding, and the seventh and eighth double words of the configuration space access command include configuration information, which is a storage address for accessing the configuration information in the host device.
[0112] In this embodiment, the embodiment of the present invention configures the space access command so that the host device can flexibly access the specified physical disk configuration space by using the transparent command method, which conveniently realizes the host device's control over the physical disk attached to the RAID card and can reduce the difficulty and workload of corresponding software development.
[0113] Corresponding to the above method embodiment, the embodiment of the present invention further provides a host device. The host device described below and the control method for a physical disk attached to a disk array card of a host device described above can refer to each other.
[0114] Please refer to Fig.11 , Fig.11 A schematic diagram of the structure of a host device provided by an embodiment of the present invention. The host device may include:
[0115] A second memory D3, for storing computer programs;
[0116] The second processor D4 is used to implement the steps of the control method for attaching a physical disk to a disk array card of a host device provided by the above method embodiment when executing a computer program.
[0117] The host device provided in this embodiment may specifically be a server or a computer.
[0118] Corresponding to the above method embodiment, the embodiment of the present invention further provides a computer program product. The computer program product described below and the control method for attaching a physical disk to a disk array card described above can refer to each other.
[0119] A computer program product includes a computer program / instruction. When the computer program / instruction is executed by a processor, the steps of the control method for attaching a physical disk to a disk array card of a disk array or a host device provided in the above method embodiment are implemented.
[0120] Corresponding to the above method embodiment, the embodiment of the present invention further provides a computer-readable storage medium. The computer-readable storage medium described below and the control method for attaching a physical disk to a disk array card described above can refer to each other.
[0121] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the control method for attaching a physical disk to a disk array card applied to a disk array or a host device provided in the above method embodiment.
[0122] The computer-readable storage medium may be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc., which may store program codes.
[0123] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. For the device, disk array card, host device, computer program product and computer-readable storage medium disclosed in the embodiment, since they correspond to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.
[0124] The above is a detailed introduction to a control method for a physical disk mounted under a disk array card, a disk array card, a host device and a computer program product provided by the present invention. Specific examples are used herein to illustrate the principle and implementation of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present invention, the present invention can also be improved and modified, and these improvements and modifications also fall within the scope of protection of the present invention.
Claims
1. A method for controlling a physical disk attached to a disk array card, characterized in that: Applicable to disk array cards, including: Acquire a configuration space access command sent by a host device; wherein the configuration space access command includes a configuration space access command operation code, an operation type, a physical disk code, and configuration information; Determine a target configuration space according to the physical disk code or the physical disk code and the operation type; wherein the target configuration space is a configuration space of a physical disk corresponding to the physical disk code mapped in the disk array card; Accessing the target configuration space according to the operation type and the configuration information; After the access is completed, feedback information is sent to the host device.
2. The control method for attaching a physical disk to a disk array card according to claim 1, characterized in that: The configuration space access command operation code includes a preset custom operation code and a configuration space access command identifier; the operation type includes a read operation type and / or a write operation type.
3. The control method for attaching a physical disk to a disk array card according to claim 2, characterized in that: The physical disk corresponding to the physical disk code is a non-volatile memory host controller interface specification hard disk, and the preset custom operation code is any manufacturer-defined operation code specified by the non-volatile memory host controller interface specification standard; the read operation type includes the read operation type of the high-speed serial computer expansion bus standard configuration space and / or the read operation type of the base address register space; the write operation type includes the write operation type of the high-speed serial computer expansion bus standard configuration space and / or the write operation type of the base address register space.
4. The control method for attaching a physical disk to a disk array card according to claim 3, characterized in that: The configuration space access command is a command submission queue entry, the first double word of the configuration space access command includes the preset custom operation code and the configuration space access command identifier, the third double word of the configuration space access command includes the operation type and the physical disk encoding, the seventh double word and the eighth double word of the configuration space access command include the configuration information, and the configuration information is the storage address of the access configuration information in the host device.
5. The control method for attaching a physical disk to a disk array card according to claim 2, characterized in that: The obtaining of the configuration space access command sent by the host device includes: Receiving a physical disk control command sent by the host device; Determine whether the physical disk control command has the preset custom operation code and the configuration space access command identifier; If so, it is determined that the physical disk control command is the configuration space access command.
6. The method for controlling a physical disk attached to a disk array card according to any one of claims 1 to 5, characterized in that: The configuration information is a storage address of access configuration information in the host device, and accessing the target configuration space according to the operation type and the configuration information includes: If the operation type is a write operation type, setting the configuration value in the access configuration information stored in the storage address to the target position in the target configuration space; wherein the target position is the position in the target configuration space corresponding to the offset information in the access configuration information stored in the storage address; If the operation type is a read operation type, the data in the storage address is read from the target location in the target configuration space and updated.
7. A disk array card, characterized in that: include: A first memory for storing a computer program; The first processor is used to implement the steps of the method for controlling a physical disk attached to a disk array card as claimed in any one of claims 1 to 6 when executing the computer program.
8. A method for controlling a physical disk attached to a disk array card, characterized in that: Applicable to host devices, including: Generate a configuration space access command according to the access request of the acquired target physical disk; wherein the configuration space access command includes a configuration space access command operation code, an operation type, configuration information and a physical disk code corresponding to the target physical disk; Sending the configuration space access command to the disk array card to control the disk array card to access the target configuration space; wherein the target configuration space is the configuration space of the target physical disk mapped in the disk array card; Receive feedback information sent by the disk array card after the access is completed.
9. A host device, characterized in that: include: A second memory for storing a computer program; The second processor is used to implement the steps of the method for controlling a physical disk attached to a disk array card as claimed in claim 8 when executing the computer program.
10. A computer program product, characterized in that include: A computer program / instruction, which, when executed by a processor, implements the steps of the method for controlling a physical disk attached to a disk array card as described in any one of claims 1 to 6 and 8.