# US 9,519,589 B2 · Methods to perform disk writes in a distributed shared disk system needing consistency across failures

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

- Number: US 9,519,589 B2
- Document ID: US9519589B2
- Status: Granted
- Kind: B2
- Application number: 13/205,443
- Filed: 2011-08-08
- Published: 2011-12-01
- Granted: 2016-12-13
- Earliest claimed: 1998-02-13
- Assignees: Oracle International Corporation
- Applicants: Sashikanth Chandrasekaran; Roger J. Bamford; William H. Bridge; David Brower; Neil MacNaughton; Wilson Wai Shun Chan; Vinay Srihari
- Inventors: Sashikanth Chandrasekaran; Roger J. Bamford; William H. Bridge; David Brower; Neil MacNaughton; Wilson Wai Shun Chan; Vinay Srihari
- Web page: https://patentgrep.com/patent/US9519589B2

## CPC

- G06F 12/0866: for peripheral storage systems, e.g. disk cache
- G06F 12/0804: with main memory updating (G06F12/0806 takes precedence)
- G06F 12/0815: Cache consistency protocols
- G06F 11/1469: {Backup restoration techniques}
- G06F 11/1471: involving logging of persistent data for recovery
- Y10S 707/99952: Coherency, e.g. same view to multiple users
- Y10S 707/99953: Recoverability
- Y10S 707/99954: Version management
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- Y10S: TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS

## Abstract

Techniques are provided for managing caches in a system with multiple caches that may contain different copies of the same data item. Specifically, techniques are provided for coordinating the write-to-disk operations performed on such data items to ensure that older versions of the data item are not written over newer versions, and to reduce the amount of processing required to recover after a failure. Various approaches are provided in which a master is used to coordinate with the multiple caches to cause a data item to be written to persistent storage. Techniques are also provided for transferring data items and locks associated with the data items from one node to another.

## Claims

### Claim 1

A method performed by a first node of a plurality of nodes, wherein each of the plurality of nodes has write access to a shared persistent storage to write data items to the shared persistent storage, and wherein a writing of data items to the shared persistent storage by the plurality of nodes is coordinated by one or more masters, comprising:
writing a data item in a cache associated with the first node to the shared persistent storage; and
while the writing of the data item is in progress and before the writing of the data item completes:
initiating a transfer operation to transfer the data item and a lock associated with the data item from the first node to a second node, wherein the lock allows the second node to modify the data item; and
sending a communication to a master of the data item to inform the master that writing of the data item to the shared persistent storage is in progress, wherein the one or more masters comprises the master.

### Claim 2 (depends on 1)

The method of claim 1, wherein the lock has an associated role of local or global, wherein a local role indicates that the data item associated with the lock can be written to the shared persistent storage without communicating with the master of the data item, and a global role indicates that the data item associated with the lock cannot be written to the shared persistent storage without first communicating with the master of the data item, and wherein the lock is transferred to the second node with a role of global.

### Claim 3 (depends on 2)

The method of claim 2, wherein prior to the transfer operation, the lock has a role of local, and wherein initiating the transfer operation comprises changing the role associated with the lock from local to global.

### Claim 4 (depends on 3)

The method of claim 3, wherein the method further comprises:
after writing of the data item is completed, sending a write confirmation to the master of the data item to cause the master of the data item to send a message to the second node informing the second node that the role associated with the lock can be changed from global to local.

### Claim 5

A non-transitory computer-readable storage medium carrying instructions, which when executed by one or more processors of a first node of a plurality of nodes, wherein each of the plurality of nodes has write access to a shared persistent storage to write data items to the shared persistent storage, and wherein a writing of data items to the shared persistent storage by the plurality of nodes is coordinated by one or more masters, cause:
writing a data item in a cache associated with the first node to the shared persistent storage; and
while the writing of the data item is in progress and before the writing of the data item completes:
initiating a transfer operation to transfer the data item and a lock associated with the data item from the first node to a second node, wherein the lock allows the second node to modify the data item; and
sending a communication to a master of the data item to inform the master that writing of the data item to the shared persistent storage is in progress, wherein the one or more masters comprises the master.

### Claim 6 (depends on 5)

The non-transitory computer-readable storage medium of claim 5, wherein the lock has an associated role of local or global, wherein a local role indicates that the data item associated with the lock can be written to the shared persistent storage without communicating with the master of the data item, and a global role indicates that the data item associated with the lock cannot be written to the shared persistent storage without first communicating with the master of the data item, and wherein the lock is transferred to the second node with a role of global.

### Claim 7 (depends on 6)

The non-transitory computer-readable storage medium of claim 6, wherein prior to the transfer operation, the lock has a role of local, and wherein initiating the transfer operation comprises changing the role associated with the lock from local to global.

### Claim 8 (depends on 7)

The non-transitory computer-readable storage medium of claim 7, wherein the instructions comprise instructions, that when executed by the one or more processors, cause:
after writing of the data item is completed, sending a write confirmation to the master of the data item to cause the master of the data item to send a message to the second node informing the second node that the role associated with the lock can be changed from global to local.

### Claim 9

A method performed by a first node of a plurality of nodes, wherein each of the plurality of nodes has write access to a shared persistent storage to write data items to the shared persistent storage, and wherein a writing of data items to the shared persistent storage by the plurality of nodes is coordinated by one or more masters, comprising:
transferring a data item and a lock associated with the data item from the first node to a second node, wherein the lock has a current role associated therewith of local or global, wherein a local role indicates that the data item associated with the lock can be written to the shared persistent storage without communicating with a master of the data item, and a global role indicates that the data item associated with the lock cannot be written to the shared persistent storage without first communicating with the master of the data item, wherein the one or more masters comprises the master, and wherein transferring comprises:
determining whether the data item has been dirtied by the first node;
in response to determining that the data item has been dirtied by the first node, transferring the data item and the lock associated with the data item to the second node with a role of global assigned to the lock; and
in response to determining that the data item has not been dirtied by the first node, and that the current role associated with the lock is local, transferring the data item and the lock associated with the data item to the second node with a role of local assigned to the lock.

### Claim 10 (depends on 9)

The method of claim 9, wherein the lock allows the second node to modify the data item.

### Claim 11 (depends on 10)

The method of claim 10, wherein the lock is an exclusive lock.

### Claim 12 (depends on 9)

The method of claim 9, wherein the data item has been dirtied by another node but not by the first node, and wherein the first node does not link the data item to a dirty queue of the first node.

### Claim 13 (depends on 9)

The method of claim 9, wherein the data item has been dirtied by the first node, and wherein the method further comprises:
retaining a copy of the data item, which is linked to a dirty queue of the first node, even after the data item has been transferred to the second node.

### Claim 14 (depends on 9)

The method of claim 9, wherein transferring further comprises:
in response to determining that the data item has not been dirtied by the first node, and that the current role associated with the lock is global, transferring the data item and the lock associated with the data item to the second node with a role of global assigned to the lock.

### Claim 15

A non-transitory computer-readable storage medium carrying instructions, which when executed by one or more processors of a first node of a plurality of nodes, wherein each of the plurality of nodes has write access to a shared persistent storage to write data items to the shared persistent storage, and wherein a writing of data items to the shared persistent storage by the plurality of nodes is coordinated by one or more masters, cause the one or more processors to perform:
transferring a data item and a lock associated with the data item from the first node to a second node, wherein the lock has a current role associated therewith of local or global, wherein a local role indicates that the data item associated with the lock can be written to the shared persistent storage without communicating with a master of the data item, and a global role indicates that the data item associated with the lock cannot be written to the shared persistent storage without first communicating with the master of the data item, and wherein transferring comprises:
determining whether the data item has been dirtied by the first node;
in response to determining that the data item has been dirtied by the first node, transferring the data item and the lock associated with the data item to the second node with a role of global assigned to the lock; and
in response to determining that the data item has not been dirtied by the first node, and that the current role associated with the lock is local, transferring the data item and the lock associated with the data item to the second node with a role of local assigned to the lock.

### Claim 16 (depends on 15)

The non-transitory computer-readable storage medium of claim 15, wherein the lock allows the second node to modify the data item.

### Claim 17 (depends on 16)

The non-transitory computer-readable storage medium of claim 16, wherein the lock is an exclusive lock.

### Claim 18 (depends on 15)

The non-transitory computer-readable storage medium of claim 15, wherein the data item has been dirtied by another node but not by the first node, and wherein the non-transitory first node does not link the data item to a dirty queue of the first node.

### Claim 19 (depends on 15)

The non-transitory computer-readable storage medium of claim 15, wherein the data item has been dirtied by the first node, and wherein the instructions comprise instructions, that when executed by the one or more processors, cause:
retaining a copy of the data item, which is linked to a dirty queue of the first node, even after the data item has been transferred to the second node.

### Claim 20 (depends on 15)

The non-transitory computer-readable storage medium of claim 15, wherein transferring further comprises:
in response to determining that the data item has not been dirtied by the first node, and that the current role associated with the lock is global, transferring the data item and the lock associated with the data item to the second node with a role of global assigned to the lock.
