# US 10,956,052 B1 · Online address to hash (A2H) metadata scanner

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

- Number: US 10,956,052 B1
- Document ID: US10956052B1
- Status: Granted
- Kind: B1
- Application number: 15/656,170
- Filed: 2017-07-21
- Granted: 2021-03-23
- Earliest claimed: 2017-07-21
- Assignees: EMC IP Holding Company LLC
- Applicants: EMC IP Holding Company LLC
- Inventors: Xiangping Chen; Ying Hu
- Web page: https://patentgrep.com/patent/US10956052B1

## CPC

- G06F 3/0619: {in relation to data integrity, e.g. data losses, bit errors}
- G06F 3/0632: {by initialisation or re-initialisation of storage systems}
- G06F 3/064: {Management of blocks}
- G06F 3/0641: {De-duplication techniques}
- G06F 3/0647: {Migration mechanisms}
- G06F 3/067: {Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]}
- G06F 3/0689: {Disk arrays, e.g. RAID, JBOD}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A storage system is configured to comprise a processor in operable communication with a storage device and a metadata journal comprising metadata configured to store information associated with a change to be made to information stored on the storage device. While the storage system is booted up and responsive to I/O requests from a host, a scan is performed of a first portion of metadata that is loaded into storage system memory during the bootup, to check for existence of a metadata inconsistency condition comprising at least one of: (a) dirty tree (DT) entries in the metadata associated with an invalid logical unit (LU) index; (b) hash tree (HT) entries in the metadata which do not have corresponding DT bits; and (c) DT bits set without having a corresponding HT entry. Based on the results of the first scan, a determination is made about whether a first metadata inconsistency condition exists.

## Claims

### Claim 1

A computer-implemented method, comprising:
configuring a storage system comprising a processor in operable communication with a storage device, the storage system configured for responding to input/output (I/O) requests to the storage device from a host in operable communication with the storage system, the storage system comprising metadata configured to store information associated with at least one change to be made to information stored on the storage device;
configuring the storage system to load a first portion of metadata into a storage system memory during a bootup of the storage system, the first portion of metadata comprising metadata used to serve I/O requests from the host;
performing, after the first portion of metadata has been loaded, a first scan of at least the first portion of metadata loaded into storage system memory, wherein the first scan comprises a proactive scan that is configured to take place before the storage system allows further actions that make use of the first portion of metadata, the first scan configured to check for the existence of one or more metadata inconsistency conditions by checking for each of the following metadata inconsistency sub-conditions:
(a) dirty tree (DT) entries in the metadata which are associated with an invalid logical unit (LU) index;
(b) hash tree (HT) entries in the metadata which do not have corresponding DT bits; and
(c) DT bits set without having a corresponding HT entry;
wherein, in parallel with the first scan taking place and after the first portion of metadata has been loaded, the storage system is configured to be responsive to I/O requests from the host;
based at least in part on the results of the first scan, determining whether a first metadata inconsistency condition exists; and
based on the determination, proactively configuring further operation of the storage system after the first scan, wherein, if a determination is made that the first metadata inconsistency condition exists, the storage system is proactively configured to correct the first metadata inconsistency condition.

### Claim 2 (depends on 1)

The method of claim 1, further comprising generating a notification if the first metadata inconsistency condition exists.

### Claim 3 (depends on 1)

The method of claim 1, further comprising, if the first metadata inconsistency condition exists, taking a first set of actions to correct the first metadata inconsistency condition.

### Claim 4 (depends on 3)

The method of claim 3, wherein the storage system further comprises a metadata journal and wherein the method further comprises journaling the first set of actions in the metadata journal.

### Claim 5 (depends on 1)

The method of claim 1, wherein the method further comprises determining, based on at least one of the results of the first scan and a control signal, whether a second scan of the first portion of metadata needs to take place, wherein the second scan is configured to run an additional check for one or more of the (a), (b), and (c) metadata inconsistency sub-conditions.

### Claim 6 (depends on 1)

The method of claim 1, wherein the storage system comprises a plurality of snapshot groups and corresponding snapshot group control blocks, each snapshot group comprising an associated DT having a respective logical unit (LU) index, each snapshot group control block comprising a respective LU index record, and wherein the detection of whether metadata inconsistency sub-condition (a) exists further comprises:
for each respective snapshot group in the storage system, traverse the associated DT to compare the LU index for the associated DT with the respective LU index record; and
if, based on the comparison, it is determined there are metadata entries in the LU index that have no match in the LU index record, then making a determination that metadata inconsistency sub-condition (a) exists.

### Claim 7 (depends on 6)

The method of claim 6, further comprising if the metadata inconsistency sub-condition (a) exists, then fixing the metadata inconsistency sub-condition (a) by resetting to a nonexistent status any metadata entries in the LU index that have no match in the LU index record.

### Claim 8 (depends on 1)

The method of claim 1, wherein the storage system comprises a logical volume comprising a HT and a DT, the HT comprising a plurality of HT leaves, each HT leaf associated with a respective HT leaf volume offset, the DT having an associated DT bitmap that comprises a plurality of dirty bits, wherein the detection of whether metadata inconsistency sub-condition (b) exists further comprises:
iterating through the leaves of the HT to locate a non-empty HT leaf;
reading the non-empty HT leaf to determine a first respective HT leaf volume offset for the non-empty HT leaf;
checking whether, in the DT bitmap, there is a first respective dirty bit set at a location in the DT bitmap corresponding to the first respective HT leaf volume offset; and
if, based on the check, it is determined there is no first respective dirty bit set at the location in the DT bitmap corresponding to the first respective HT leaf volume offset, then making a determination that metadata inconsistency sub-condition (b) exists.

### Claim 9 (depends on 8)

The method of claim 8, further comprising if the metadata inconsistency sub-condition (b) exists, then fixing the metadata inconsistency sub-condition (b) by resetting the non-empty leaf in the HT to be an empty leaf.

### Claim 10 (depends on 1)

The method of claim 1, wherein the storage system comprises a logical volume comprising a HT and a DT, the HT comprising a plurality of HT entries, each HT entry associated with a respective HT entry offset, the DT, the DT comprising a plurality of DT leaves, each DT leaf associated with a respective DT leaf volume offset, wherein the detection of whether metadata inconsistency sub-condition (c) exists further comprises:
iterating through the leaves of the DT of the volume to locate a non-empty DT leaf;
reading the non-empty DT leaf to determine the first respective DT leaf volume offset for the non-empty DT leaf;
checking whether, in the HT, there is a corresponding HT leaf and whether, in the HT leaf, there is a corresponding entry associated with the same volume offset as the DT leaf volume offset; and
if, based on the check, it is determined either that there is no corresponding HT leaf or that that there is no corresponding HT entry, then making a determination that metadata inconsistency sub-condition (c) exists.

### Claim 11 (depends on 10)

The method of claim 10, wherein the DT further comprises a DT bitmap associated with the HT and further comprising, if the metadata inconsistency sub-condition (c) exists, then:
if there was no corresponding HT leaf, then resetting the DT bitmap to designate that the HT leaf is empty;
if there was no corresponding HT entry, then performing an HT trim to ensure that a correct trimmed flag is set in a corresponding HT leaf.

### Claim 12

A system, comprising:
a processor; and
a non-volatile memory in operable communication with the processor and storing computer program code that when executed on the processor causes the processor to execute a process operable to perform the operations of:
configuring a storage system comprising a processor in operable communication with a storage device, the storage system configured for responding to input/output (I/O) requests to the storage device from a host in operable communication with the storage system, the storage system comprising metadata configured to store information associated with at least one change to be made to information stored on the storage device;
configuring the storage system to load a first portion of metadata into a storage system memory of the storage system during a bootup of the storage system, the first portion of metadata comprising metadata used to serve I/O requests from the host;
performing, after the first portion of metadata has been loaded, a first scan of at least the first portion of metadata loaded into storage system memory, wherein the first scan comprises a proactive scan that is configured to take place before the storage system allows further actions that make use of the first portion of metadata, the first scan configured to check for the existence of one or more metadata inconsistency conditions by checking for each of the following metadata inconsistency sub-conditions:
(a) dirty tree (DT) entries in the metadata which are associated with an invalid logical unit (LU) index;
(b) hash tree (HT) entries in the metadata which do not have corresponding DT bits; and
(c) DT bits set without having a corresponding HT entry;
wherein, in parallel with the first scan taking place and after the first portion of metadata has been loaded, the storage system is configured to be responsive to I/O requests from the host;
based at least in part on the results of the first scan, determining whether a first metadata inconsistency condition exists; and
based on the determination, proactively configuring further operation of the storage system after the first scan, wherein, if a determination is made that the first metadata inconsistency condition exists, the storage system is proactively configured to correct the first metadata inconsistency condition.

### Claim 13 (depends on 12)

The system of claim 12, wherein the storage system comprises a plurality of snapshot groups and corresponding snapshot group control blocks, each snapshot group comprising an associated DT having a respective logical unit (LU) index, each snapshot group control block comprising a respective LU index record, and further comprising computer program code that when executed on the processor causes the processor to perform the following actions as part of the detection of whether metadata inconsistency sub-condition (a) exists:
for each respective snapshot group in the storage system, traverse the associated DT to compare the LU index for the associated DT with the respective LU index record; and
if, based on the comparison, it is determined there are metadata entries in the LU index that have no match in the LU index record, then making a determination that metadata inconsistency sub-condition (a) exists; and
fixing the metadata inconsistency sub-condition (a) by resetting to a nonexistent status any metadata entries in the LU index that have no match in the LU index record.

### Claim 14 (depends on 12)

The method of claim 12, wherein the storage system comprises a logical volume comprising a HT and a DT, the HT comprising a plurality of HT leaves, each HT leaf associated with a respective HT leaf volume offset, the DT having an associated DT bitmap that comprises a plurality of dirty bits, and further comprising computer program code that when executed on the processor causes the processor to perform the following actions as part of detecting whether metadata inconsistency sub-condition (b) exists:
iterating through the leaves of the HT to locate a non-empty HT leaf;
reading the non-empty HT leaf to determine a first respective HT leaf volume offset for the non-empty HT leaf;
checking whether, in the DT bitmap, there is a first respective dirty bit set at a location in the DT bitmap corresponding to the first respective HT leaf volume offset;
if, based on the check, it is determined there is no first respective dirty bit set at the location in the DT bitmap corresponding to the first respective HT leaf volume offset, then making a determination that metadata inconsistency sub-condition (b) exists; and
fixing the metadata inconsistency sub-condition (b) by resetting the non-empty leaf in the HT to be an empty leaf.

### Claim 15 (depends on 12)

The system of claim 12, wherein the storage system comprises a logical volume comprising a HT and a DT, the HT comprising a plurality of HT entries, each HT entry associated with a respective HT entry offset, the DT further comprises a DT bitmap associated with the HT and a plurality of DT leaves, each DT leaf associated with a respective DT leaf volume offset, and further comprising computer code that when executed on the processor causes the processor to perform the following actions as part of the detection of whether metadata inconsistency sub-condition (c) exists:
iterating through the leaves of the DT of the volume to locate a non-empty DT leaf;
reading the non-empty DT leaf to determine the first respective DT leaf volume offset for the non-empty DT leaf;
checking whether, in the HT, there is a corresponding HT leaf and whether, in the HT leaf, there is a corresponding entry associated with the same volume offset as the DT leaf volume offset;
if, based on the check, it is determined either that there is no corresponding HT leaf or that that there is no corresponding HT entry, then making a determination that metadata inconsistency sub-condition (c) exists;
if there was no corresponding HT leaf, then resetting the DT bitmap to designate that the HT leaf is empty; and
if there was no corresponding HT entry, then performing an HT trim to ensure that a correct trimmed flag is set in a corresponding HT leaf.

### Claim 16 (depends on 12)

The system of claim 12, further comprising computer program code that, when executed on the processor, causes the processor to perform the action of taking a first set of actions to correct the first metadata inconsistency condition, if the first metadata inconsistency condition exists.

### Claim 17 (depends on 12)

The system of claim 12, further comprising computer program code that, when executed on the processor, causes the processor to perform the operation of determining, based on at least one of the results of the first scan and a control signal, whether a second scan needs to take place, wherein the second scan is configured to run an additional check for one or more of the (a), (b), and (c) metadata inconsistency sub-conditions.

### Claim 18

A computer program product including a non-transitory computer readable storage medium having computer program code encoded thereon that when executed on a processor of a computer causes the computer to operate a storage system, the computer program product comprising:
computer program code for configuring a storage system comprising a processor in operable communication with a storage device, the storage system configured for responding to input/output (I/O) requests to the storage device from a host in operable communication with the storage system, the storage system comprising metadata configured to store information associated with at least one change to be made to information stored on the storage device;
computer program code for configuring the storage system to load a first portion of metadata into a storage system memory of the storage system during a bootup of the storage system, the first portion of metadata comprising metadata used to serve I/O requests from the host;
computer program code for performing, after the first portion of metadata has been loaded, a first scan of at least the first portion of metadata loaded into storage system memory, wherein the first scan comprises a proactive scan that is configured to take place before the storage system allows further actions that make use of the first portion of metadata, the first scan configured to check for the existence of one or more metadata inconsistency conditions by checking for each of the following metadata inconsistency sub-conditions:
(a) dirty tree (DT) entries in the metadata which are associated with an invalid logical unit (LU) index;
(b) hash tree (HT) entries in the metadata which do not have corresponding DT bits; and
(c) DT bits set without having a corresponding HT entry;
computer program code for ensuring that, in parallel with the first scan taking place and after the first portion of metadata has been loaded, the storage system is configured to be responsive to I/O requests from the host;
computer program code for determining, based at least in part on the results of the first scan, whether a first metadata inconsistency condition exists; and
computer program code for proactively configuring further operation of the storage system after the first scan, based on the determination, wherein, if a determination is made that the first metadata inconsistency condition exists, the storage system is proactively configured to correct the first metadata inconsistency condition.

### Claim 19 (depends on 18)

The computer program product of claim 18, further comprising computer program code for taking, if a first metadata inconsistency condition exists, a first set of actions to correct the first metadata inconsistency condition.

### Claim 20 (depends on 18)

The computer program product of claim 18, further comprising computer program code for determining, based on at least one of the results of the first scan and a control signal, whether a second scan of the first portion of metadata needs to take place, wherein the second scan is configured to run an additional check for a respective one or more of the (a), (b), and (c) metadata inconsistency sub-conditions.
