# US 12,112,047 B2 · Method, device and computer program product for locking a storage area in a storage system

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

- Number: US 12,112,047 B2
- Document ID: US12112047B2
- Status: Granted
- Kind: B2
- Application number: 17/988,979
- Filed: 2022-11-17
- Published: 2023-10-26
- Granted: 2024-10-08
- Earliest claimed: 2022-04-21
- Assignees: Dell Products L.P.
- Applicants: Dell Products L.P.
- Inventors: Haiyun Bao; Jianbin Kang; Jibing Dong; Geng Han
- Web page: https://patentgrep.com/patent/US12112047B2

## CPC

- G06F 3/061: {Improving I/O performance}
- G06F 3/0622: {in relation to access}
- G06F 3/0619: {in relation to data integrity, e.g. data losses, bit errors}
- G06F 3/0653: {Monitoring storage devices or systems}
- G06F 3/0659: {Command handling arrangements, e.g. command buffers, queues, command scheduling}
- G06F 3/0673: {Single storage device}
- G06F 3/0689: {Disk arrays, e.g. RAID, JBOD}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Techniques lock a storage area in a storage system including a first storage node and a second storage node. Such techniques involve adjusting a value of at least one of a first counter at the first node and a second counter at the second node in response to receiving a data access request for the storage area at at least one of the first node and the second node. Such techniques further involve allocating a lock flag to the first node in response to a ratio of the value of the first counter to the value of the second counter being greater than a first threshold, the lock flag indicating that the storage area is locked by the first node. Accordingly, storage resources required by nodes that are accessed more frequently in statistics are effectively reduced, and the efficiency of applying stripe lock reduction are improved.

## Claims

### Claim 1

A method of locking a storage area in a storage system, the storage system comprising a first storage node and a second storage node, and the method comprising:
adjusting a value of at least one of a first counter at the first storage node and a second counter at the second storage node in response to receiving a data access request for the storage area at one of the first storage node and the second storage node; and
allocating a lock flag to the first storage node in response to a ratio of the value of the first counter to the value of the second counter being greater than a first threshold, wherein the lock flag imposes a lock on the storage area by the first storage node;
wherein adjusting the value of at least one of the first counter and the second counter comprises:
decrementing the value of one of the first counter and the second counter based on the value of the first counter and the value of the second counter in response to receiving the data access request for the storage area at the first storage node and at least one of the value of the first counter and the value of the second counter being equal to a second threshold; and
wherein decrementing the value of one of the first counter and the second counter comprises:
determining a first probability, the first probability being a ratio of the value of the first counter to a sum of the value of the first counter and the value of the second counter; and
decrementing the value of the first counter with the first probability.

### Claim 2 (depends on 1)

The method according to claim 1, further comprising:
adjusting the value of at least one of the first counter and the second counter in response to receiving another data access request by incrementing the value of the first counter in response to receiving the other data access request for the storage area at the first storage node and both the value of the first counter and the value of the second counter being less than the second threshold.

### Claim 3 (depends on 2)

The method according to claim 2, wherein the second threshold is associated with capacities of the first counter and the second counter.

### Claim 4 (depends on 1)

The method according to claim 1, further comprising:
adjusting the value of at least one of the first counter and the second counter in response to receiving another data access request by decrementing the value of one of the first counter and the second counter based on the value of the first counter and the value of the second counter in response to receiving the other data access request for the storage area at the first storage node and at least one of the value of the first counter and the value of the second counter being equal to the second threshold.

### Claim 5 (depends on 4)

The method according to claim 4, wherein adjusting the value of at least one of the first counter and the second counter in response to receiving the other data access request by decrementing the value of one of the first counter and the second counter comprises:
determining a second probability, the second probability being a ratio of the value of the second counter to the sum of the value of the first counter and the value of the second counter; and
decrementing the value of the second counter with the second probability.

### Claim 6 (depends on 1)

The method according to claim 1, further comprising:
resetting the value of the first counter and the value of the second counter to zero in response to the lock flag not being allocated to any one of the first storage node and the second storage node.

### Claim 7 (depends on 1)

The method according to claim 1, wherein the storage area is one or more stripes of the storage system.

### Claim 8

A device for locking a storage area in a storage system, the storage system comprising a first storage node and a second storage node, and the device comprising:
one or more processors;
a memory coupled to at least one processor of the one or more processors; and
computer program instructions stored in the memory, wherein the computer program instructions, when executed by the at least one processor, cause the device to perform actions comprising:
adjusting a value of at least one of a first counter at the first storage node and a second counter at the second storage node in response to receiving a data access request for the storage area at one of the first storage node and the second storage node; and
allocating a lock flag to the first storage node in response to a ratio of the value of the first counter to the value of the second counter being greater than a first threshold, wherein the lock flag imposes a lock on the storage area by the first storage node;
wherein adjusting the value of at least one of the first counter and the second counter comprises:
decrementing the value of one of the first counter and the second counter based on the value of the first counter and the value of the second counter in response to receiving the data access request for the storage area at the first storage node and at least one of the value of the first counter and the value of the second counter being equal to a second threshold; and
wherein decrementing the value of one of the first counter and the second counter comprises:
determining a first probability, the first probability being a ratio of the value of the first counter to a sum of the value of the first counter and the value of the second counter; and
decrementing the value of the first counter with the first probability.

### Claim 9 (depends on 8)

The device according to claim 8, further comprising:
adjusting the value of at least one of the first counter and the second counter in response to receiving another data access request by incrementing the value of the first counter in response to receiving the other data access request for the storage area at the first storage node and both the value of the first counter and the value of the second counter being less than the second threshold.

### Claim 10 (depends on 9)

The device according to claim 9, wherein the second threshold is associated with capacities of the first counter and the second counter.

### Claim 11 (depends on 8)

The device according to claim 8, further comprising:
adjusting the value of at least one of the first counter and the second counter in response to receiving another data access request by decrementing the value of one of the first counter and the second counter based on the value of the first counter and the value of the second counter in response to receiving the other data access request for the storage area at the first storage node and at least one of the value of the first counter and the value of the second counter being equal to the second threshold.

### Claim 12 (depends on 11)

The device according to claim 11, wherein adjusting the value of at least one of the first counter and the second counter in response to receiving the other data access request by decrementing the value of one of the first counter and the second counter comprises:
determining a second probability, the second probability being a ratio of the value of the second counter to the sum of the value of the first counter and the value of the second counter; and
decrementing the value of the second counter with the second probability.

### Claim 13 (depends on 8)

The device according to claim 8, wherein the actions further comprise:
resetting the value of the first counter and the value of the second counter to zero in response to the lock flag not being allocated to any one of the first storage node and the second storage node.

### Claim 14 (depends on 8)

The device according to claim 8, wherein the storage area is one or more stripes of the storage system.

### Claim 15

A computer program product having a non-transitory computer readable medium which stores a set of instructions to lock a storage area in a storage system, the storage system comprising a first storage node and a second storage node; the set of instructions, when carried out by computerized circuitry, causing the computerized circuitry to perform a method of:
adjusting a value of at least one of a first counter at the first storage node and a second counter at the second storage node in response to receiving a data access request for the storage area at one of the first storage node and the second storage node; and
allocating a lock flag to the first storage node in response to a ratio of the value of the first counter to the value of the second counter being greater than a first threshold, wherein the lock flag imposes a lock on the storage area by the first storage node;
wherein adjusting the value of at least one of the first counter and the second counter comprises:
decrementing the value of one of the first counter and the second counter based on the value of the first counter and the value of the second counter in response to receiving the data access request for the storage area at the first storage node and at least one of the value of the first counter and the value of the second counter being equal to a second threshold; and
wherein decrementing the value of one of the first counter and the second counter comprises:
determining a first probability, the first probability being a ratio of the value of the first counter to a sum of the value of the first counter and the value of the second counter; and
decrementing the value of the first counter with the first probability.

### Claim 16 (depends on 15)

The computer program product according to claim 15, wherein the method further comprises:
resetting the value of the first counter and the value of the second counter to zero in response to the lock flag not being allocated to any one of the first storage node and the second storage node.

### Claim 17 (depends on 16)

The computer program product according to claim 16, wherein the second threshold is associated with capacities of the first counter and the second counter.

### Claim 18 (depends on 15)

The computer program product according to claim 15, wherein the storage area is one or more stripes of the storage system.

### Claim 19

A method of locking a storage area in a storage system, the storage system comprising a first storage node and a second storage node, and the method comprising:
adjusting a value of at least one of a first counter at the first storage node and a second counter at the second storage node in response to receiving a data access request for the storage area at one of the first storage node and the second storage node; and
allocating a lock flag to the first storage node in response to a ratio of the value of the first counter to the value of the second counter being greater than a first threshold, wherein the lock flag imposes a lock on the storage area by the first storage node;
wherein adjusting the value of at least one of the first counter and the second counter comprises:
decrementing the value of one of the first counter and the second counter based on the value of the first counter and the value of the second counter in response to receiving the data access request for the storage area at the first storage node and at least one of the value of the first counter and the value of the second counter being equal to a second threshold; and
wherein decrementing the value of one of the first counter and the second counter comprises:
determining a second probability, the second probability being a ratio of the value of the second counter to a sum of the value of the first counter and the value of the second counter; and
decrementing the value of the second counter with the second probability.

### Claim 20 (depends on 19)

The method according to claim 19, further comprising:
resetting the value of the first counter and the value of the second counter to zero in response to the lock flag not being allocated to any one of the first storage node and the second storage node.
