# US 2012/0254547 A1 · Managing metadata for data in a copy relationship

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

- Number: US 2012/0254547 A1
- Document ID: US20120254547A1
- Status: Published application
- Kind: A1
- Application number: 13/077,840
- Filed: 2011-03-31
- Published: 2012-10-04
- Earliest claimed: 2011-03-31
- Assignees: International Business Machines Corporation
- Inventors: Michael T. Benhase; Theresa M. Brown; Lokesh M. Gupta; Suguang Li; Mark L. Lipets; Carol S. Mellgren; Kenneth W. Todd
- Web page: https://patentgrep.com/patent/US20120254547A1

## CPC

- G06F 12/16: Protection against loss of memory contents {(contains no material, see G06F11/00)}
- G06F 11/0727: {in a storage system, e.g. in a DASD or network based storage system (drivers for digital recording or reproducing units G06F3/06; circuits for error detection or correction within digital recording or reproducing units G11B20/18; for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS], H04L67/1097)}
- 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 12/0871: Allocation or management of cache space
- G06F 12/0891: using clearing, invalidating or resetting means
- G06F 12/126: with special data handling, e.g. priority of data or instructions, handling errors or pinning
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Provided are a computer program product, system, and method for managing metadata for data in a copy relationship copied from a source storage to a target storage. Information is maintained on a copy relationship of source data in the source storage and target data in the target storage. The source data is copied from the source storage to the cache to copy to target data in the target storage indicated in the copy relationship. Target metadata is generated for the target data comprising the source data copied to the cache. An access request to requested target data comprising the target data in the cache is processed and access is provided to the requested target data in the cache. A determination is made as to whether the requested target data in the cache has been destaged to the target storage. The target metadata for the requested target data in the target storage is discarded in response to determining that the requested target data in the cache has not been destaged to the target storage.

## Claims

### Claim 1

A computer program product for managing data being copied from a source storage to a target storage, the computer program product comprising a computer readable storage medium having computer readable program code embodied therein that executes to communicate with the source storage, the target storage and a cache and to perform operations, the operations comprising:
maintaining information on a copy relationship of source data in the source storage and target data in the target storage;
copying source data from the source storage to the cache to copy to target data in the target storage indicated in the copy relationship;
generating target metadata for the target data comprising the source data copied to the cache;
processing an access request to requested target data comprising the target data in the cache;
providing access to the requested target data in the cache;
determining whether the requested target data in the cache has been destaged to the target storage; and
discarding the target metadata for the requested target data in the target storage in response to determining that the requested target data in the cache has not been destaged to the target storage.

### Claim 2 (depends on 1)

The computer program product of claim 1, wherein the operations of determining whether the requested target data in the cache has been destaged and discarding the target metadata are performed after the access request is processed.

### Claim 3 (depends on 1)

The computer program product of claim 1, wherein the request comprises a read request.

### Claim 4 (depends on 3)

The computer program product of claim 3, wherein the operations further comprise:
receiving a subsequent read request to the requested target data after completing the processed read request;
rebuilding target metadata for the requested target data for the subsequent read request;
providing access to the requested target data in the cache for the subsequent read request;
determining whether the requested target data in the cache has been destaged to the target storage; and
discarding the rebuilt target metadata for the requested target data in the target storage in response to determining that the requested target data in the cache has not been destaged to the target storage.

### Claim 5 (depends on 3)

The computer program product of claim 3, wherein the operations further comprise:
retaining the target metadata for the requested target data in the cache to destage to the target storage in response to determining that the requested target data has been destaged to the target storage.

### Claim 6 (depends on 3)

The computer program product of claim 3, wherein the operations further comprise:
receiving a request to withdraw the copy relationship; and
demoting the target data in the cache in the copy relationship in response to receiving the request to withdraw the copy relationship.

### Claim 7 (depends on 3)

The computer program product of claim 3, wherein the operations further comprise:
receiving a write request to write data to the target data in the copy relationship;
updating the target data in the cache with the write data;
generating target metadata for the updated target data in the cache; and
indicating in a data structure the updated target data in the cache, wherein the indication is removed in response to destaging the updated target data and the metadata for the updated target data to the target storage.

### Claim 8 (depends on 7)

The computer program product of claim 7, wherein the operations further comprise:
receiving a request to withdraw the copy relationship;
demoting the target data in the cache indicated in the copy relationship in response to receiving the request to withdraw the copy relationship; and
discarding the target metadata data in the target storage for the target data indicated in the data structure.

### Claim 9 (depends on 1)

The computer program product of claim 1, wherein the operations further comprise:
determining that an attempt to destage the target data to the target storage has failed; and
discarding the target metadata in the target storage for the target data whose destage failed in response to determining that the destage of the target data failed.

### Claim 10

A system in communication with a source storage and a target storage, comprising:
a processor;
a cache;
a computer readable storage medium having computer readable program code embodied therein executed by the processor to perform operations, the operations comprising:
maintaining information on a copy relationship of source data in the source storage and target data in the target storage;
copying source data from the source storage to the cache to copy to target data in the target storage indicated in the copy relationship;
generating target metadata for the target data comprising the source data copied to the cache;
processing an access request to requested target data comprising the target data in the cache;
providing access to the requested target data in the cache;
determining whether the requested target data in the cache has been destaged to the target storage; and
discarding the target metadata for the requested target data in the target storage in response to determining that the requested target data in the cache has not been destaged to the target storage.

### Claim 11 (depends on 10)

The system of claim 10, wherein the operations of determining whether the requested target data in the cache has been destaged and discarding the target metadata are performed after the access request is processed.

### Claim 12 (depends on 10)

The system of claim 10, wherein the request comprises a read request, wherein the operations further comprise:
receiving a subsequent read request to the requested target data after completing the processed read request;
rebuilding target metadata for the requested target data for the subsequent read request;
providing access to the requested target data in the cache for the subsequent read request;
determining whether the requested target data in the cache has been destaged to the target storage; and
discarding the rebuilt target metadata for the requested target data in the target storage in response to determining that the requested target data in the cache has not been destaged to the target storage.

### Claim 13 (depends on 10)

The system of claim 10, wherein the request comprises a read request, wherein the operations further comprise:
retaining the target metadata for the requested target data in the cache to destage to the target storage in response to determining that the requested target data has been destaged to the target storage.

### Claim 14 (depends on 10)

The system of claim 10, wherein the request comprises a read request, wherein the operations further comprise:
receiving a request to withdraw the copy relationship; and
demoting the target data in the cache in the copy relationship in response to receiving the request to withdraw the copy relationship.

### Claim 15 (depends on 10)

The system of claim 10, wherein the request comprises a read request, wherein the operations further comprise:
receiving a write request to write data to the target data in the copy relationship;
updating the target data in the cache with the write data;
generating target metadata for the updated target data in the cache; and
indicating in a data structure the updated target data in the cache, wherein the indication is removed in response to destaging the updated target data and the metadata for the updated target data to the target storage.

### Claim 16

A method, comprising:
maintaining information on a copy relationship of source data in a source storage and target data in a target storage;
copying source data from the source storage to a cache to copy to target data in the target storage indicated in the copy relationship;
generating target metadata for the target data comprising the source data copied to the cache;
processing an access request to requested target data comprising the target data in the cache;
providing access to the requested target data in the cache;
determining whether the requested target data in the cache has been destaged to the target storage; and
discarding the target metadata for the requested target data in the target storage in response to determining that the requested target data in the cache has not been destaged to the target storage.

### Claim 17 (depends on 16)

The method of claim 16, wherein the operations of determining whether the requested target data in the cache has been destaged and discarding the target metadata are performed after the access request is processed.

### Claim 18 (depends on 16)

The method of claim 16, wherein the request comprises a read request, further comprising:
receiving a subsequent read request to the requested target data after completing the processed read request;
rebuilding target metadata for the requested target data for the subsequent read request;
providing access to the requested target data in the cache for the subsequent read request;
determining whether the requested target data in the cache has been destaged to the target storage; and
discarding the rebuilt target metadata for the requested target data in the target storage in response to determining that the requested target data in the cache has not been destaged to the target storage.

### Claim 19 (depends on 16)

The method of claim 16, wherein the request comprises a read request, further comprising:
retaining the target metadata for the requested target data in the cache to destage to the target storage in response to determining that the requested target data has been destaged to the target storage.

### Claim 20 (depends on 16)

The method of claim 16, wherein the request comprises a read request, further comprising:
receiving a request to withdraw the copy relationship; and
demoting the target data in the cache in the copy relationship in response to receiving the request to withdraw the copy relationship.

### Claim 21 (depends on 16)

The method of claim 16, wherein the request comprises a read request, further comprising:
receiving a write request to write data to the target data in the copy relationship;
updating the target data in the cache with the write data;
generating target metadata for the updated target data in the cache; and
indicating in a data structure the updated target data in the cache, wherein the indication is removed in response to destaging the updated target data and the metadata for the updated target data to the target storage.
