A command interaction method, a memory controller card, and an interaction system

By managing the IO context information of the IPTT number in the storage controller card and using parity values, the data inconsistency problem caused by retransmission of response frames in the SAS storage system was resolved, thus improving system reliability.

CN120029549BActive Publication Date: 2026-04-17WUXI STARS MICRO SYSTEM TECHNOLOGIES CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
WUXI STARS MICRO SYSTEM TECHNOLOGIES CO LTD
Filing Date
2025-01-24
Publication Date
2026-04-17

Smart Images

  • Figure CN120029549B_ABST
    Figure CN120029549B_ABST
Patent Text Reader

Abstract

This application provides a command interaction method, a storage controller card, and a command interaction system. The method includes: responding to an I / O request from a host, obtaining a target command frame identifier of an I / O command frame corresponding to the I / O request; obtaining a target parity value associated with the target command frame identifier from I / O context information stored locally; carrying the target command frame identifier and the target parity value in the I / O command frame and sending it to a disk; upon receiving a response frame returned by the disk, if the command frame identifier and parity value carried in the response frame are consistent with the target command frame identifier and the target parity value, then returning a completion response to the I / O request to the host; and setting the target parity value associated with the target command frame identifier in the I / O context information to an inverse value. This application solves the problem of data inconsistency caused by SAS retransmission of response frames and improves the reliability of the storage system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of data storage, and specifically relates to an instruction interaction method, a storage controller card, and an instruction interaction system. Background Technology

[0002] like Figure 1A As shown, in a SAS storage system, the host communicates with the SAS (Serial Attached SCSI) hard drive via an HBA (Host Bus Adapter) / RAID card; for example... Figure 1B As shown, if more hard drives need to be mounted, an expansion card, SASExpander, may be added between the HBA / RAID card and the hard drives. In this SAS storage system, the host driver directly issues SCSI commands, which are then converted into SAS commands by the HBA / RAID card to complete the read and write operations on the SAS hard drives. Summary of the Invention

[0003] The purpose of this application is to provide a command interaction method, a storage controller card, and a command interaction system, which aims to solve the problem of data inconsistency caused by SAS retransmission response frames in related technologies.

[0004] According to a first aspect of this application, an instruction interaction method is provided, comprising:

[0005] In response to an I / O request from the host, obtain the target command frame identifier of the I / O command frame corresponding to the I / O request;

[0006] Obtain the target parity value associated with the target command frame identifier from the locally stored IO context information;

[0007] The target command frame identifier and the target parity value are carried in the IO command frame and sent to the disk;

[0008] Upon receiving the response frame returned by the disk, if the command frame identifier and parity value carried by the response frame are consistent with the target command frame identifier and the target parity value, then a completion response to the IO request is returned to the host.

[0009] Set the target parity value associated with the target command frame identifier in the IO context information to the opposite value.

[0010] In an optional implementation, obtaining the target command frame identifier of the IO command frame corresponding to the IO request includes:

[0011] Retrieve an available command frame identifier from the identifier buffer pool as the target command frame identifier for the IO command frame.

[0012] In an optional implementation, after setting the target parity value associated with the target command frame identifier in the IO context information to the opposite value, the method further includes:

[0013] The target command frame identifier is stored back into the identifier cache pool as an available command frame identifier.

[0014] In an optional implementation, obtaining the target parity value associated with the target command frame identifier from locally stored IO context information includes:

[0015] The target command frame identifier is matched with the locally stored IO context information; wherein, the IO context information records all command frame identifiers and the parity check value associated with each command frame identifier;

[0016] The target parity value associated with the target command frame identifier is determined based on the matching result.

[0017] According to a second aspect of this application, a storage controller card is provided, comprising:

[0018] The response unit is used to respond to the host's IO request and obtain the target command frame identifier of the IO command frame corresponding to the IO request;

[0019] The acquisition unit is used to obtain the target parity check value associated with the target command frame identifier from the locally stored IO context information;

[0020] A sending unit is configured to carry the target command frame identifier and the target parity value in the IO command frame and send them to the disk.

[0021] The response unit is configured to, upon receiving the response frame returned by the disk, if the command frame identifier and parity value carried in the response frame are consistent with the target command frame identifier and the target parity value, then return a completion response to the IO request to the host.

[0022] The setting unit is used to set the target parity value associated with the target command frame identifier in the IO context information to the opposite value.

[0023] In an optional implementation, the response unit is used to retrieve an available command frame identifier from the identifier cache pool as the target command frame identifier of the IO command frame.

[0024] In an optional implementation, the storage controller card further includes:

[0025] The recycling unit is configured to store the target command frame identifier as an available command frame identifier back into the identifier cache pool after the setting unit sets the target parity value associated with the target command frame identifier in the IO context information to the opposite value.

[0026] In an optional implementation, the acquisition unit is configured to match the target command frame identifier with locally stored IO context information, and determine the target parity value associated with the target command frame identifier based on the matching result; wherein the IO context information records all command frame identifiers and the parity value associated with each command frame identifier.

[0027] According to a third aspect of this application, an instruction interaction system is provided, comprising: a storage controller card and a disk;

[0028] In response to the host's IO request, the storage controller card obtains the target command frame identifier of the IO command frame corresponding to the IO request, obtains the target parity value associated with the target command frame identifier from the IO context information stored locally, and carries the target command frame identifier and the target parity value in the IO command frame and sends them to the disk.

[0029] The disk receives and processes the IO command frame, and returns a response frame to the storage controller card after processing is complete;

[0030] After receiving the response frame returned by the disk, the storage controller card returns a completion response to the IO request to the host when the command frame identifier and parity value carried in the response frame are consistent with the target command frame identifier and the target parity value, and sets the target parity value associated with the target command frame identifier in the IO context information to the opposite value.

[0031] In an optional implementation, the storage controller card retrieves an available command frame identifier from the identifier cache pool as the target command frame identifier for the IO command frame.

[0032] In an optional implementation, the storage controller card sets the target parity value associated with the target command frame identifier in the IO context information to the opposite value, and then stores the target command frame identifier back into the identifier cache pool as an available command frame identifier.

[0033] In an optional implementation, the storage controller card matches the target command frame identifier with the IO context information stored locally, and determines the target parity value associated with the target command frame identifier based on the matching result; wherein, the IO context information records all command frame identifiers and the parity value associated with each command frame identifier.

[0034] Compared with related technologies, the technical solution of this application has at least the following advantages:

[0035] To manage the execution of I / O commands, this application employs a storage controller card embedded within the HBA card that maintains I / O context information corresponding to each IPTT number. This I / O context information is maintained in hardware, typically stored in SRAM and indexed by the IPTT number. For example, a 1-bit value is stored at a fixed location within the corresponding I / O context information as the extended high-order parity value of the IPTT number. Each time a command frame is sent, this information is sent along with the command frame as the value of the highest-order bit of the IPTT number. After each I / O execution acknowledgment, the extended high-order parity value in the I / O context information is inverted. This ensures that when consecutively sending the same IPTT number, the parity bits are always different. When the storage controller card performs I / O send / receive frame operations, it checks the parity bits. Only when the parity bits are the same are the frame data considered to be from the same I / O command frame; otherwise, they are considered to be frame data from different I / O command frames. This method completely solves the data inconsistency problem caused by SAS retransmission of response frames, improving the reliability of the storage system.

[0036] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures and processes shown in the description and the accompanying drawings. Attached Figure Description

[0037] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0038] Figures 1A-1B This is a schematic diagram of the SAS storage system architecture based on relevant technologies.

[0039] Figure 2 This is a schematic diagram of the Non-data command interaction of the SAS storage system based on relevant technologies.

[0040] Figure 3 This is a diagram illustrating the retransmission of response frames due to ACK loss during Non-data command interaction based on relevant technologies.

[0041] Figure 4This is an illustration of an anomaly caused by ACK loss during Non-data command interaction based on relevant technologies, resulting in data inconsistency.

[0042] Figure 5 This is a timing diagram of the ACK loss exception frame interaction in the Non-data instruction interaction based on related technologies.

[0043] Figure 6 This is a flowchart illustrating an instruction interaction method according to an exemplary embodiment of this application.

[0044] Figure 7 This is a schematic diagram of IPTT high-order parity bit transmission on an extended link according to an exemplary embodiment of this application.

[0045] Figure 8 This is a schematic diagram of one implementation of the parity extension scheme according to an exemplary embodiment of this application.

[0046] Figure 9 This is a structural block diagram of a storage controller card according to an exemplary embodiment of this application. Detailed Implementation

[0047] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0048] like Figure 2 As shown, the non-data command interaction process between the HBA / RAID card and the SAS disk is as follows (the following explanation uses the HBA card as an example):

[0049] 1. The HBA sends a command frame carrying an IPTT (Initiator Port Transfer Tag) number of 1. The IPTT, or Command ID, can be understood as an I / O identifier used to uniquely identify a command frame. In communication between the HBA and the SAS Disk, each command frame carries an IPTT number so that the receiver can recognize and process the corresponding command.

[0050] 2. After receiving the command frame, the SAS Disk returns an ACK to acknowledge receipt, informing the HBA that it has successfully received the command frame with IPTT set to 1.

[0051] 3. After the HBA receives the ACK, it indicates that the command frame with IPTT set to 1 was successfully sent and it waits for the SAS Disk response.

[0052] 4. After the SAS Disk completes the processing of the command frame with IPTT of 1, it returns a response frame carrying IPTT number 1.

[0053] 5. After receiving the response frame, the HBA returns an ACK to inform the SAS Disk that it has successfully received the response frame with IPTT set to 1.

[0054] 6. The SAS Disk terminates the processing of commands with IPTT set to 1 and releases related resources.

[0055] 7. The HBA terminates the processing of commands with IPTT set to 1, responds to the host, releases related resources, and the command execution ends successfully.

[0056] However, during actual operation, the link may malfunction, leading to frame loss. For example... Figure 3 As shown, after the HBA receives the response frame, it returns an ACK. However, due to a link issue, the SAS Disk does not receive the ACK frame, which will trigger the SAS Disk to resend the response frame.

[0057] The protocol specifies that the retransmit flag is set to 1 in the retransmission response frame, indicating that the current frame is a retransmission frame. The protocol also specifies that the HBA, upon receiving a response frame with the retransmit flag set to 1, will normally return an ACK. Then, the received frame will be processed as follows:

[0058] If the response frame has been successfully received before, the current response frame is discarded; otherwise, the normal reception process for the response frame is performed.

[0059] However, after designing the HBA / RAID card according to the protocol, the system may experience data inconsistency anomalies during actual operation, such as... Figure 4 As shown.

[0060] Figure 4 The command execution process is explained as follows:

[0061] 1. The HBA sends the first IO command frame, which carries the IPTT number 1;

[0062] 2. The SAS Disk returns an ACK for the IO command frame;

[0063] 3. After the SAS Disk processes the IO command frame, it returns a response frame to the HBA, and this response frame carries the IPTT number 1.

[0064] 4. After receiving the response frame, the HBA returns the ACK corresponding to the response frame to the SAS Disk, but the ACK is lost and the SAS Disk does not receive it.

[0065] 5. After successfully receiving the response frame, the HBA successfully acknowledges the first IO request to the host. Upon receiving the acknowledgment, the host considers IPTT 1 to have been completed and reclaims IPTT 1. Due to a link issue, the ACK frame corresponding to the response frame is lost. The SAS Disk does not receive the ACK frame corresponding to the response frame and will soon trigger the SAS Disk to retransmit the response frame with IPTT number 1.

[0066] 6. The HBA sends the second IO command frame, using the same IPTT 1 (because the resources of the first IO command frame have been reclaimed, and the IPTT resources are reused).

[0067] 7. After receiving the second IO command frame, the SAS Disk link layer returns an ACK;

[0068] 8. The SAS Disk transport layer prepares to retransmit the response frame corresponding to the first IO command frame, which carries the IPTT number 1.

[0069] 9. After receiving the ACK for the second IO command frame, the HBA also received the retransmission response frame for the first IO command frame. Since the IPTT number is the same, the HBA mistakenly identifies it as the response frame for the second IO command frame, and therefore determines that the second IO was also executed successfully.

[0070] 10. When the SAS Disk receives the second IO command frame, since the execution of the first IO command frame has not yet finished and the corresponding ACK frame for the first IO command frame has not yet been received, the second IO command frame is considered an invalid frame. Therefore, an error response frame is returned for the second IO command frame, i.e., a Long response is returned.

[0071] 11. The HBA receives the error response frame Long response for the second IO command frame. At this time, the second IO command frame has already been acknowledged, so the long response is considered an invalid frame and is discarded.

[0072] Result: HBA considers the second IO command frame to have been executed successfully, but in reality, the second IO command frame failed to execute on the SAS Disk side, causing data inconsistency.

[0073] A detailed frame interaction timing diagram of the above process is shown below. Figure 5 As shown, data inconsistency is a serious problem in storage systems and must be strictly avoided. However, the SAS protocol does not address this issue. In practice, a common approach is to use a ring buffer in IPTT reuse schemes to increase the time interval between rapid reuse of the same IPTT. However, this solution only reduces the probability, not completely eliminates the problem.

[0074] Therefore, this application completely eliminates frame identification errors by extending the IPTT number, thereby fundamentally solving the problem of such data inconsistency.

[0075] like Figure 6 As shown, the first aspect of this application exemplarily provides a command interaction method, including:

[0076] In step S601, in response to the host's IO request, the target command frame identifier of the IO command frame corresponding to the IO request is obtained;

[0077] In step S602, the target parity check value associated with the target command frame identifier is obtained from the locally stored IO context information;

[0078] In step S603, the target command frame identifier and the target parity value are carried in the IO command frame and sent to the disk;

[0079] In step S604, after receiving the response frame returned by the disk, if the command frame identifier and parity value carried by the response frame are consistent with the target command frame identifier and target parity value, then a completion response to the IO request is returned to the host.

[0080] In step S605, the target parity check value associated with the target command frame identifier in the IO context information is set to the opposite value.

[0081] Exemplarily, this method is executed on a storage controller card, which can be an HBA card or a RAID card. After receiving an IO request from the host (which may be an application-layer client running on the host), the storage controller card assembles an IO command frame based on the IO request. This IO command frame carries a target command frame identifier to uniquely identify the IO command frame; for example, in the SAS protocol, this target command frame identifier can be an IPTT number. In some embodiments, the target command frame identifier can be sent to the storage controller card by the host in the IO request. In other embodiments, the target command frame identifier can be obtained by the storage controller card from an identifier cache pool. The identifier cache pool can record multiple available command frame identifiers. When needed, the storage controller card retrieves one from the identifier cache pool as the target command frame identifier for the current IO command frame. After the IO command frame is processed, the target command frame identifier can be retrieved, i.e., returned to the identifier cache pool, for use by the storage controller card later. It should be noted that the IO request issued by the host carries an ID identifying the IO request, and this ID corresponds one-to-one with the target command frame identifier. If the target command frame identifier is carried in the I / O request sent by the host, it can be directly used as the ID. Currently, the I / O request can also carry both the corresponding ID and the target command frame identifier, meaning the ID and the target command frame identifier are independent of each other. If the I / O request sent by the host does not carry the target command frame identifier, but only the ID, the storage controller card can obtain the target command frame identifier from the identifier cache pool and establish a one-to-one correspondence between the ID and the target command frame identifier.

[0082] For example, the storage controller card can store the parity value of each command frame identifier in a local storage identifier cache pool. For instance, the storage controller card records IO context information in SRAM, and the association between each command frame identifier and its parity value is stored in this IO context information. After obtaining the target command frame identifier, the storage controller card searches for its associated target parity value in the IO context information based on the target command frame identifier and fills the parity bit of the target command frame identifier with the target parity value. In some embodiments, the parity bit is one of the high-order bits of the target command frame identifier. Taking the SAS protocol as an example, the maximum number of IPTT resources is 32K, and the range of usable IPTT numbers is 0 to 32767. The IPTT number has a bit width of 16 bits, and all high-order bits can be freely allocated and used by the storage controller card, so any one of the high-order bits can be used as the parity bit. In other embodiments, if all bits of the target command frame identifier are occupied, one reserved bit can be selected from the IO command frame as the parity bit.

[0083] For example, after the storage controller card sends an I / O command frame to the disk, the disk receives the I / O command frame and first returns an ACK to confirm that it has received the I / O command frame. Then, after processing the I / O command frame, the disk returns a response frame. Taking the SAS protocol as an example, this response frame can be a response frame from the SSP protocol. This response frame carries the command frame identifier and parity value of the responded I / O command frame, which are obtained from the received and processed I / O command frame. Therefore, if the command frame identifier and parity value carried in the response frame received by the storage card are consistent with the target command frame identifier and target parity value carried in the I / O command frame it sent out, it means that the response frame is a return from the disk for the I / O command frame previously sent by the storage controller card. This indicates that the disk has completed processing the I / O command frame, and the storage controller card can return an acknowledgment to the host that the I / O request is complete. Subsequently, the storage controller card also reverses the target parity value corresponding to the target command frame identifier recorded in the IO context information. That is, if the target parity value recorded in the current context is odd, it is set to even, and if it is even, it is set to odd. In the above process, if the command identifier frame carried in the response frame is consistent with the target command identifier frame, but the parity value carried is inconsistent with the target parity value, the storage controller card can consider that the response frame is not the response frame corresponding to the IO command frame it sent out.

[0084] In some optional implementations, the target command frame identifier corresponding to the IO command frame of the IO request is obtained, including:

[0085] Retrieve an available command frame identifier from the identifier buffer pool as the target command frame identifier for the IO command frame.

[0086] For example, as described above, the storage controller card can read an available command frame identifier from the identifier cache pool as the target command frame identifier for the I / O command frame. The specific position of the parity bit in the command identifier frame is predefined (if all bits in the command identifier frame are occupied, the position of the reserved bit in the I / O command frame can also be predefined). It is understood that the parity bit in the command identifier frame retrieved from the target cache pool is empty.

[0087] In some optional implementations, after inverting the target parity value associated with the target command frame identifier in the IO context information, the method further includes:

[0088] Store the target command frame identifier back into the identifier cache pool as an available command frame identifier.

[0089] For example, after the disk returns a response frame for the current IO command frame, it indicates that the processing of the current IO command frame is complete. The storage controller card can then return a corresponding response to the host to inform the host that the IO command corresponding to the IO command frame has been executed successfully. Simultaneously, the storage controller card will set the target parity value associated with the target command frame identifier of the IO command frame in the context to the opposite value (e.g., 1 to 0, or 0 to 1), and return the target command frame identifier to the identifier cache pool to release the resource of the target command frame identifier. This way, the storage controller card can reuse the target command frame identifier the next time it needs to read it. Furthermore, after receiving the second IO request from the host, the storage controller card retrieves the target command frame identifier from the identifier cache pool. When creating the second IO command frame corresponding to the second IO request, this target command frame identifier is reused. The target parity value associated with this identifier is then obtained from the IO context information. Since the target parity value in the IO context information has been previously inverted, after sending the target command frame and the new target parity value along with the second IO command frame, the response frame returned by the disk also carries the target command frame identifier and the new target parity value. Therefore, the storage controller card can distinguish whether the response frame is for the first or second IO command frame, avoiding the data inconsistency problem described in the related technologies above. It should be noted that if the target command frame is carried in an IO request issued by the host, it is reclaimed by the host.

[0090] In some optional implementations, the target parity value associated with the target command frame identifier is obtained from locally stored IO context information, including:

[0091] The target command frame identifier is matched with the locally stored IO context information; the IO context information records all command frame identifiers and the parity value associated with each command frame identifier.

[0092] The target parity value associated with the target command frame identifier is determined based on the matching results.

[0093] For example, as described above, the storage controller card locally stores IO context information, which records all command frame identifiers and the parity value currently associated with each command frame identifier. After obtaining the target command frame identifier of the IO command frame corresponding to the currently received IO request, the storage controller card matches the target command frame identifier with all command frame identifiers stored in the IO context information. Once a matching command frame identifier is found, the parity value associated with the matching command frame identifier is used as the target parity value of the target command frame identifier. This target parity value is combined with the target command frame identifier to form the final command frame identifier, which is then carried in the IO command frame and sent to the disk.

[0094] The following is through Figure 7 as well as Figure 8 An example is provided to illustrate one implementation process of the instruction interaction method provided in this application.

[0095] In this application, the strategy for the host to issue IPTT (i.e., target command frame identifier) ​​remains unchanged. However, when the HBA sends an IO command frame, it extends the IPTT number on the link. In practical applications, the protocol specifies that the IPTT number in the frame structure is 16 bits wide, meaning there are 64K (65536) IPTT resources. However, in practice, only 8K (8192) IPTT resources are usually sufficient, and the high-order bits are generally filled with 0 and not used. Therefore, the 16th bit, the highest bit, is used as a parity bit. In two consecutive transmissions of the same IPTT, the highest-order bits transmitted on the link are reversed, thereby distinguishing the IO command frames corresponding to two identical consecutive IPTT numbers.

[0096] If all 16 bits of the IPTT number need to be used in a practical application, the parity bit is extended using reserved bits in the frame structure.

[0097] The following example uses an HBA card and a SAS disk to illustrate this interaction process:

[0098] 1. The HBA sends the first IO command frame, in which IPTT is 1. Assuming that the parity value corresponding to IPTT 1 is 1 at this time, the actual IPTT number in the SAS frame structure sent on the link is 0x8001.

[0099] 2. The SAS Disk returns the response frame (Response) of the first IO command frame.

[0100] 3. After receiving the response frame Response, the HBA returns an ACK for the response frame Response to the SAS Disk.

[0101] 4. After successfully receiving the response frame, the HBA also successfully acknowledges the first IO request to the host and inverts the parity value of IPTT 1 in the IO context information (resulting in 0). Upon receiving the acknowledgment, the host considers IPTT 1 to have been completed and reclaims IPTT 1; if IPTT 1 was retrieved from the identity cache pool by the HBA card, then the HBA card reclaims IPTT 1.

[0102] 5. Due to a link issue, the ACK returned by the HBA to the SAS Disk was lost, and the SAS Disk did not receive the ACK corresponding to the response frame; a retransmission is about to be triggered.

[0103] 6. The HBA sends the second IO command frame and uses the same IPTT 1 (because the IPTT resource of the first IO command frame has been reclaimed and can be reused); at this time, the parity value of IPTT1 recorded by the HBA in the IO context information is 0, so the actual IPTT number in the SAS frame structure of the second IO sent on the link is 0x0001.

[0104] 7. After the SAS Disk link layer receives the second IO command frame, it returns ack.

[0105] 8. The SAS Disk transport layer prepares to retransmit the response frame of the first IO command frame.

[0106] 9. After receiving the ACK, the HBA also received the retransmission response frame of the first IO command frame. Since the IPTT numbers are different (the highest bit is not equal), the HBA successfully identified the retransmission response frame as the retransmission response frame of the first IO command frame and performed a discard operation.

[0107] 10. After the SAS Disk receives the second IO command frame (IPTT=0x0001), it considers it to be a new IO command frame, so it normally returns the response frame for the second IO command frame.

[0108] 11. The HBA successfully received the response frame reopnse of the second IO command frame, indicating that the second IO command frame was executed successfully.

[0109] Therefore, it can be seen that the solution of this application successfully solves the problem of data inconsistency in the related technologies described above.

[0110] To manage the execution of I / O commands, this application employs a storage controller card embedded within the HBA card that maintains I / O context information corresponding to each IPTT number. This I / O context information is maintained in hardware, typically stored in SRAM and indexed by the IPTT number. For example, a 1-bit value is stored at a fixed location within the corresponding I / O context information as the extended high-order parity value of the IPTT number. Each time a command frame is sent, this information is sent along with the command frame as the value of the highest-order bit of the IPTT number. After each I / O execution acknowledgment, the extended high-order parity value in the I / O context information is inverted. This ensures that when consecutively sending the same IPTT number, the parity bits are always different. When the storage controller card performs I / O send / receive frame operations, it checks the parity bits. Only when the parity bits are the same are the frame data considered to be from the same I / O command frame; otherwise, they are considered to be frame data from different I / O command frames. This method completely solves the data inconsistency problem caused by SAS retransmission of response frames, improving the reliability of the storage system.

[0111] Accordingly, see Figure 9 As shown, a second aspect of this application exemplarily provides a storage controller card, comprising:

[0112] The response unit 901 is used to respond to the host's IO request and obtain the target command frame identifier of the IO command frame corresponding to the IO request;

[0113] The acquisition unit 902 is used to obtain the target parity check value associated with the target command frame identifier from the IO context information stored locally;

[0114] The sending unit 903 is used to carry the target command frame identifier and the target parity value in the IO command frame and send it to the disk.

[0115] The response unit 904 is used to, upon receiving a response frame returned by the disk, return a completion response to the IO request to the host if the command frame identifier and parity value carried in the response frame are consistent with the target command frame identifier and target parity value.

[0116] Setting unit 905 is used to set the target parity value associated with the target command frame identifier in the IO context information to the opposite value.

[0117] In some optional implementations, the response unit is used to retrieve an available command frame identifier from the identifier buffer pool as the target command frame identifier for the IO command frame.

[0118] In some alternative implementations, the storage controller card also includes:

[0119] The recycling unit is used to store the target command frame identifier as an available command frame identifier back into the identifier cache pool after the setting unit sets the target parity value associated with the target command frame identifier in the IO context information to the opposite value.

[0120] In some optional implementations, the acquisition unit is used to match the target command frame identifier with the locally stored IO context information, and determine the target parity value associated with the target command frame identifier based on the matching result; wherein, the IO context information records all command frame identifiers and the parity value associated with each command frame identifier.

[0121] The aforementioned storage controller card is a physical device for executing the instruction interaction method provided in the first aspect embodiment. The relevant details have been described in the instruction interaction method executed on the storage controller card in the first aspect embodiment, and can be referred to the content described in the first aspect embodiment, and will not be repeated here.

[0122] Accordingly, a third aspect of this application exemplarily proposes an instruction interaction system, comprising: a storage controller card and a disk;

[0123] In response to the host's IO request, the storage controller card obtains the target command frame identifier of the IO command frame corresponding to the IO request, obtains the target parity value associated with the target command frame identifier from the IO context information stored locally, and carries the target command frame identifier and target parity value in the IO command frame and sends it to the disk.

[0124] The disk receives and processes I / O command frames, and returns a response frame to the storage controller card after processing is complete;

[0125] After receiving the response frame returned by the disk, the storage controller card returns a completion response to the IO request to the host if the command frame identifier and parity value carried in the response frame match the target command frame identifier and target parity value, and sets the target parity value associated with the target command frame identifier in the IO context information to the opposite value.

[0126] In some alternative implementations, the storage controller card retrieves an available command frame identifier from the identifier cache pool as the target command frame identifier for the IO command frame.

[0127] In some alternative implementations, the storage controller card reverses the target parity value associated with the target command frame identifier in the IO context information and then stores the target command frame identifier back into the identifier cache pool as an available command frame identifier.

[0128] In some optional implementations, the storage controller card matches the target command frame identifier with the IO context information of the local storage, and determines the target parity value associated with the target command frame identifier based on the matching result; wherein, the IO context information records all command frame identifiers and the parity value associated with each command frame identifier.

[0129] For details regarding the aforementioned command interaction system, please refer to the descriptions in the first and second aspects, which will not be repeated here.

[0130] The following describes the instruction interaction method between the storage controller card and the disk in the above instruction interaction system. This method includes:

[0131] In response to the host's I / O request, the storage controller card obtains the target command frame identifier of the I / O command frame corresponding to the I / O request;

[0132] The storage controller card obtains the target parity value associated with the target command frame identifier from the IO context information of the local storage;

[0133] The storage controller card carries the target command frame identifier and the target parity value in the IO command frame and sends them to the disk;

[0134] The disk receives and processes I / O command frames, and returns a response frame to the storage controller card after processing is complete;

[0135] After receiving the response frame returned by the disk, if the command frame identifier and parity value carried in the response frame are consistent with the target command frame identifier and target parity value, the storage controller card returns a completion response to the IO request to the host.

[0136] The storage controller card sets the target parity value associated with the target command frame identifier in the IO context information to the opposite value.

[0137] In some optional implementations, the storage controller card obtains the target command frame identifier of the IO command frame corresponding to the IO request, including:

[0138] The storage controller card retrieves an available command frame identifier from the identifier cache pool as the target command frame identifier for the IO command frame.

[0139] In some alternative implementations, after the storage controller card inverts the target parity value associated with the target command frame identifier in the I / O context information, the method further includes:

[0140] The storage controller card stores the target command frame identifier back into the identifier cache pool as an available command frame identifier.

[0141] In some optional implementations, the storage controller card obtains the target parity value associated with the target command frame identifier from the IO context information of the local storage, including:

[0142] The storage controller card matches the target command frame identifier with the IO context information of the local storage; the IO context information records all command frame identifiers and the parity value associated with each command frame identifier.

[0143] The storage controller card determines the target parity value associated with the target command frame identifier based on the matching result.

[0144] The above-described instruction interaction method is an interaction method between the storage controller card and the disk. The relevant details have been described in the instruction interaction method executed on the storage controller card in the first aspect embodiment, and can be referred to the content described in the first aspect embodiment, and will not be repeated here.

[0145] It is understood that the circuit structures, names, and parameters described in the above embodiments are merely examples. Those skilled in the art can also make readily conceived combinations and adjustments to the structural features of the above embodiments according to their needs, and the concept of this application should not be limited to the specific details of the above examples.

[0146] Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. An instruction interaction method, characterized by, include: In response to the host's first IO request, the storage controller card retrieves an available command frame identifier from the identifier cache pool as the target command frame identifier for the IO command frame corresponding to the IO request; Obtain the target parity value associated with the target command frame identifier from the IO context information of the identifier cache pool; The IO context information stores the association between each command frame identifier and its associated parity value. The target command frame identifier and the target parity value are carried in the IO command frame and sent to the disk; Upon receiving the response frame returned by the disk, if the command frame identifier and parity value carried by the response frame are consistent with the target command frame identifier and the target parity value, then a completion response to the IO request is returned to the host. Set the target parity value associated with the target command frame identifier in the IO context information of the identifier buffer pool to the opposite value; The target command frame identifier is returned to the identifier cache pool to release the resources of the target command frame identifier; The method further includes: After the storage controller card receives the second IO request from the host, if the available command frame identifier retrieved from the identifier cache pool is still the target command frame identifier, then the target command frame identifier is reused, and the parity value associated with the target command frame identifier in the IO context information is the inverted target parity value.

2. The instruction interaction method according to claim 1, characterized in that, Obtaining the target parity value associated with the target command frame identifier from locally stored IO context information includes: The target command frame identifier is matched with the locally stored IO context information; wherein, the IO context information records all command frame identifiers and the parity check value associated with each command frame identifier; The target parity value associated with the target command frame identifier is determined based on the matching result.

3. A storage controller card, characterized in that, include: The response unit is used to respond to the host's IO request. The storage controller card retrieves an available command frame identifier from the identifier cache pool as the target command frame identifier of the IO command frame corresponding to the IO request. The acquisition unit is used to acquire the target parity check value associated with the target command frame identifier from the IO context information of the identifier cache pool; The IO context information stores the association between each command frame identifier and its associated parity value. A sending unit is configured to carry the target command frame identifier and the target parity value in the IO command frame and send them to the disk. The response unit is configured to, upon receiving the response frame returned by the disk, if the command frame identifier and parity value carried in the response frame are consistent with the target command frame identifier and the target parity value, then return a completion response to the IO request to the host. The setting unit is used to set the target parity value associated with the target command frame identifier in the IO context information that identifies the cache pool to the opposite value; The recycling unit is used to put the target command frame identifier back into the identifier cache pool to release the resources of the target command frame identifier; The storage controller card also includes: If, after receiving the second IO request from the host, the available command frame identifier retrieved from the identifier cache pool is still the target command frame identifier, then the target command frame identifier is reused, and the parity value associated with the target command frame identifier in the IO context information is the inverted target parity value.

4. The storage controller card according to claim 3, characterized in that, The acquisition unit is used to match the target command frame identifier with the locally stored IO context information, and determine the target parity value associated with the target command frame identifier based on the matching result; wherein, the IO context information records all command frame identifiers and the parity value associated with each command frame identifier.

5. A command interaction system, characterized in that, include: Storage controller card and disk; In response to an I / O request from the host, the storage controller card retrieves an available command frame identifier from the identifier cache pool as the target command frame identifier for the I / O command frame corresponding to the I / O request, obtains the target parity value associated with the target command frame identifier from the I / O context information of the identifier cache pool, and carries the target command frame identifier and the target parity value in the I / O command frame and sends it to the disk; the I / O context information stores the association relationship between each command frame identifier and its associated parity value; The disk receives and processes the IO command frame, and returns a response frame to the storage controller card after processing is complete; After receiving the response frame returned by the disk, the storage controller card, when the command frame identifier and parity value carried in the response frame are consistent with the target command frame identifier and target parity value, returns a completion response to the IO request to the host, sets the target parity value associated with the target command frame identifier in the IO context information of the identifier cache pool to the opposite value, and puts the target command frame identifier back into the identifier cache pool to release the resources of the target command frame identifier; After the storage controller card receives the second IO request from the host, if the available command frame identifier retrieved from the identifier cache pool is still the target command frame identifier, then the target command frame identifier is reused, and the parity value associated with the target command frame identifier in the IO context information is the inverted target parity value.

6. The instruction interaction system according to claim 5, characterized in that, The storage controller card matches the target command frame identifier with the IO context information stored locally, and determines the target parity value associated with the target command frame identifier based on the matching result; wherein, the IO context information records all command frame identifiers and the parity value associated with each command frame identifier.

Citation Information

Patent Citations

  • Memory system architecture for heterogeneous memory technology

    CN114649033A

  • Multiplex transmission method

    JP2995348B2