# US 11,119,847 B2 · System and method for improving efficiency and reducing system resource consumption in a data integrity check

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 11,119,847 B2
- Document ID: US11119847B2
- Status: Granted
- Kind: B2
- Application number: 16/682,726
- Filed: 2019-11-13
- Published: 2021-05-13
- Granted: 2021-09-14
- Earliest claimed: 2019-11-13
- Assignees: Alibaba Group Holding Limited
- Applicants: Alibaba Group Holding Limited
- Inventors: Shu Li
- Web page: https://patentgrep.com/patent/US11119847B2

## CPC

- G06F 11/1004: {to protect a block of data words, e.g. CRC or checksum (G06F11/1076 takes precedence; security arrangements for protecting computers or computer systems against unauthorized activity G06F21/00)}
- G06F 9/30029: {Logical and Boolean instructions, e.g. XOR, NOT}
- G06F 11/0793: {Remedial or corrective actions (recovery from an exception in an instruction pipeline G06F9/3861; by retry G06F11/1402; for recovering from a failure of a protocol instance or entity H04L69/40)}
- G06F 11/1044: {with specific ECC/EDC distribution}
- G06F 11/106: {Correcting systematically all correctable errors, i.e. scrubbing}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The system receives, by a first controller, data to be written to a first storage device. The data may not be accompanied by a cyclic redundancy check (CRC) signature. The system calculates, by the first controller, a first error detection code based on the data, and writes the data and the first error detection code to the first storage device. The system calculates a second error detection code based on the written data. The system performs a first integrity check of the written data by determining whether the second error detection code matches the first error detection code. The system performs a second integrity check of the written data by: obtaining one or more additional error detection codes from one or more other storage devices, wherein an obtained error detection code is calculated by a controller of a corresponding storage device; and determining whether the first error detection code matches the one or more additional error detection codes.

## Claims

### Claim 1

A computer-implemented method, comprising:
receiving, by a first controller, data to be written to a first storage device;
calculating, by the first controller, a first error detection code based on the data;
writing the data and the first error detection code to the first storage device;
calculating a second error detection code based on the written data;
performing a first integrity check of the written data by determining whether the second error detection code matches the first error detection code; and
performing a second integrity check of the written data by obtaining one or more additional error detection codes from one or more other storage devices,
wherein a respective obtained error detection code is calculated by a controller of a corresponding storage device based on a replica of the written data.

### Claim 2 (depends on 1)

The method of claim 1, wherein performing the first integrity check of the written data comprises:
in response to determining that the second error detection code matches the first error detection code:
successfully verifying the integrity of the written data; and
transmitting the first error detection code to a computing device from which the data to be written is received; and
in response to determining that the second error detection code does not match the first error detection code, performing a remedial action associated with unhealthy data stored in the first storage device.

### Claim 3 (depends on 1)

The method of claim 1,
wherein performing the second integrity check of the written data further comprises:
determining whether the first error detection code matches the one or more additional error detection codes.

### Claim 4 (depends on 3)

The method of claim 3, wherein performing the second integrity check of the written data further comprises:
performing an exclusive OR operation on the first error detection code and the one or more additional error detection codes;
in response to determining that the exclusive OR operation yields a true result, successfully verifying the integrity of the written data; and
in response to determining that the exclusive OR operation yields a false result, performing a remedial action associated with unhealthy data stored in the first storage device or the other storage devices.

### Claim 5 (depends on 1)

The method of claim 1, further comprising:
receiving, by the first controller from a computing device, a request to read the data;
retrieving the written data and the first error detection code from the first storage device; and
transmitting the retrieved data and the retrieved first error detection code to the computing device, which causes the computing device to:
receive the transmitted data and the transmitted first error detection code;
calculate a third error detection code based on the received data;
perform a third integrity check of the received data by determining whether the calculated third error detection code matches the received first error detection code; and
in response to determining that the calculated third error detection code matches the received first error detection code, successfully verify the integrity of the received data.

### Claim 6 (depends on 1)

The method of claim 1, wherein prior to writing the data and the first error detection code to the first storage device, the method further comprises:
encoding, based on an error correction code (ECC), the data and the first error detection code to obtain an ECC codeword which includes the data, the first error detection code, and an ECC parity,
wherein writing the data and the first error detection code to the first storage device comprises writing the ECC codeword to the first storage device.

### Claim 7 (depends on 6)

The method of claim 6, further comprising:
receiving, by the first controller, a request to read the data;
retrieving the written ECC codeword from the first storage device;
decoding, based on the error correction code (ECC), the retrieved ECC codeword to obtain a real-time ECC parity; and
performing a fourth integrity check of the data from the retrieved ECC codeword by comparing the real-time ECC parity with the retrieved ECC parity from the retrieved ECC codeword.

### Claim 8 (depends on 1)

The method of claim 1, further comprising:
receiving second data to be written to a set of storage devices;
encoding, based on an erasure code (EC), the second data to obtain an EC codeword which includes an EC parity;
splitting the EC codeword into a plurality of parts; and
writing the plurality of parts to the set of storage devices,
wherein a controller of a respective storage device of the set of storage devices calculates a respective error detection code based on a respective part, and
wherein the controller of the respective storage device writes the respective part and the respective calculated error detection code to the respective storage device.

### Claim 9 (depends on 8)

The method of claim 8, further comprising:
detecting a condition to check an integrity of the EC codeword written as the plurality of parts to the set of storage devices;
retrieving the respective error detection codes written to the set of storage devices;
obtaining parity check EC data by:
padding the retrieved respective error detection codes with zeros;
shifting the respective error detection codes to align with the EC codeword; and
concatenating the shifted respective error detection codes to form the parity check EC data; and
decoding, based on the erasure code (EC), the obtained parity check EC data to determine whether the second data of the EC codeword is healthy.

### Claim 10

A computer system, comprising:
a processor; and
a memory coupled to the processor and storing instructions, which when executed by the processor cause the processor to perform a method, the method comprising:
receiving, by a first controller, data to be written to a first storage device;
calculating, by the first controller, a first error detection code based on the data;
writing the data and the first error detection code to the first storage device;
calculating a second error detection code based on the written data;
performing a first integrity check of the written data by determining whether the second error detection code matches the first error detection code; and
performing a second integrity check of the written data by obtaining one or more additional error detection codes from one or more other storage devices,
wherein a respective obtained error detection code is calculated by a controller of a corresponding storage device based on a replica of the written data.

### Claim 11 (depends on 10)

The computer system of claim 10, wherein performing the first integrity check of the written data comprises:
in response to determining that the second error detection code matches the first error detection code:
successfully verifying the integrity of the written data; and
transmitting the first error detection code to a computing device from which the data to be written is received; and
in response to determining that the second error detection code does not match the first error detection code, performing a remedial action associated with unhealthy data stored in the first storage device.

### Claim 12 (depends on 10)

The computer system of claim 10,
wherein performing the second integrity check of the written data further comprises:
determining whether the first error detection code matches the one or more additional error detection codes.

### Claim 13 (depends on 12)

The computer system of claim 12, wherein performing the second integrity check of the written data further comprises:
performing an exclusive OR operation on the first error detection code and the one or more additional error detection codes;
in response to determining that the exclusive OR operation yields a true result, successfully verifying the integrity of the written data; and
in response to determining that the exclusive OR operation yields a false result, performing a remedial action associated with unhealthy data stored in the first storage device or the other storage devices.

### Claim 14 (depends on 10)

The computer system of claim 10, wherein the method further comprises:
receiving, by the first controller from a computing device, a request to read the data;
retrieving the written data and the first error detection code from the first storage device; and
transmitting the retrieved data and the retrieved first error detection code to the computing device, which causes the computing device to:
receive the transmitted data and the transmitted first error detection code;
calculate a third error detection code based on the received data;
perform a third integrity check of the received data by determining whether the calculated third error detection code matches the received first error detection code; and
in response to determining that the calculated third error detection code matches the received first error detection code, successfully verify the integrity of the received data.

### Claim 15 (depends on 10)

The computer system of claim 10, wherein prior to writing the data and the first error detection code to the first storage device, the method further comprises:
encoding, based on an error correction code (ECC), the data and the first error detection code to obtain an ECC codeword which includes the data, the first error detection code, and an ECC parity,
wherein writing the data and the first error detection code to the first storage device comprises writing the ECC codeword to the first storage device.

### Claim 16 (depends on 15)

The computer system of claim 15, wherein the method further comprises:
receiving, by the first controller, a request to read the data;
retrieving the written ECC codeword from the first storage device;
decoding, based on the error correction code (ECC), the retrieved ECC codeword to obtain a real-time ECC parity; and
performing a fourth integrity check of the data from the retrieved ECC codeword by comparing the real-time ECC parity with the retrieved ECC parity from the retrieved ECC codeword.

### Claim 17 (depends on 10)

The computer system of claim 10, wherein the method further comprises:
receiving second data to be written to a set of storage devices;
encoding, based on an erasure code (EC), the second data to obtain an EC codeword which includes an EC parity;
splitting the EC codeword into a plurality of parts; and
writing the plurality of parts to the set of storage devices,
wherein a controller of a respective storage device of the set of storage devices calculates a respective error detection code based on a respective part, and
wherein the controller of the respective storage device writes the respective part and the respective calculated error detection code to the respective storage device.

### Claim 18 (depends on 17)

The computer system of claim 17, wherein the method further comprises:
detecting a condition to check an integrity of the EC codeword written as the plurality of parts to the set of storage devices;
retrieving the respective error detection codes written to the set of storage devices;
obtaining parity check EC data by:
padding the retrieved respective error detection codes with zeros;
shifting the respective error detection codes to align with the EC codeword; and
concatenating the shifted respective error detection codes to form the parity check EC data; and
decoding, based on the erasure code (EC), the obtained parity check EC data to determine whether the second data of the EC codeword is healthy.

### Claim 19

A non-transitory computer-readable storage medium storing instructions that when executed by a computer cause the computer to perform a method, the method comprising:
receiving, by a first controller, data to be written to a first storage device, wherein the data is not accompanied by a cyclic redundancy check (CRC) signature;
calculating, by the first controller, a first error detection code based on the data;
writing the data and the first error detection code to the first storage device;
calculating a second error detection code based on the written data;
performing a first integrity check of the written data by determining whether the second error detection code matches the first error detection code; and
performing a second integrity check of the written data by:
obtaining one or more additional error detection codes from one or more other storage devices, wherein a respective obtained error detection code is calculated by a controller of a corresponding storage device based on a replica of the written data; and
determining whether the first error detection code matches the one or more additional error detection codes.

### Claim 20 (depends on 19)

The storage medium of claim 19, wherein the method further comprises:
receiving, by the first controller from a computing device, a request to read the data;
retrieving the written data and the first error detection code from the first storage device; and
transmitting the retrieved data and the retrieved first error detection code to the computing device, which causes the computing device to:
receive the transmitted data and the transmitted first error detection code;
calculate a third error detection code based on the received data;
perform a third integrity check of the received data by determining whether the calculated third error detection code matches the received first error detection code; and
in response to determining that the calculated third error detection code matches the received first error detection code, successfully verify the integrity of the received data.
