# US 10,956,072 B2 · Accelerating concurrent access to a file in a memory-based file system

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

- Number: US 10,956,072 B2
- Document ID: US10956072B2
- Status: Granted
- Kind: B2
- Application number: 16/585,613
- Filed: 2019-09-27
- Published: 2020-01-23
- Granted: 2021-03-23
- Earliest claimed: 2015-12-07
- Assignees: NetApp, Inc.
- Applicants: NetApp Inc.
- Inventors: Amit Golander; Sagi Manole; Boaz Harrosh
- Web page: https://patentgrep.com/patent/US10956072B2

## CPC

- G06F 3/0643: {Management of files}
- G06F 3/0623: {in relation to content}
- G06F 3/0673: {Single storage device}
- G06F 16/00: Information retrieval; Database structures therefor; File system structures therefor
- G06F 16/2308: {Concurrency control (transaction processing G06F9/466)}
- G06F 16/2343: {Locking methods, e.g. distributed locking or locking implementation details}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method, apparatus and product for accelerating concurrent access to a file in a memory-based file system. The method comprising receiving a request issued by a program, for accessing a file stored in a memory-based file system; and subject to the request being associated with data modification of data within the file, and subject to the modification not necessitating change in a structure of a data structure used for content lookup for the file, acquiring a lock to the file to the program, wherein the lock is acquired in a shared mode.

## Claims

### Claim 1

A method, comprising:
representing a file, of a file system and mapped to an address range of memory, using a data structure comprising a data unit accessible by a data lock and a metadata unit with a first portion accessible by a metadata lock and a second portion updateable by an atomic operation without a lock; and
utilizing the data lock and the metadata lock in a shared mode based upon an estimate that a data modification of a request changes a structure of the data structure and the data modification is delayed.

### Claim 2 (depends on 1)

The method of claim 1, wherein the data lock and the metadata lock are acquired for requests modifying the first portion of the metadata and the structure of the data structure.

### Claim 3 (depends on 1)

The method of claim 1, comprising:
utilizing the data structure for file content lookup operations.

### Claim 4 (depends on 1)

The method of claim 1, wherein the data structure has a hierarchical structure.

### Claim 5 (depends on 1)

The method of claim 1, comprising:
executing the data modification as a batch operation.

### Claim 6 (depends on 1)

The method of claim 1, wherein the data structure comprises a log tree comprising a tree element.

### Claim 7 (depends on 6)

The method of claim 6, wherein the request comprises a write request executable without shifting the tree element.

### Claim 8 (depends on 1)

The method of claim 1, wherein the request is associated with a page fault generated by a machine-level store instruction to the file system that supports direct access to the memory.

### Claim 9 (depends on 1)

The method of claim 1, wherein the second portion of the metadata comprises metadata fields unprotected by the metadata lock.

### Claim 10 (depends on 9)

The method of claim 9, wherein the metadata fields are updated using the atomic operation on a memory location without acquiring the lock.

### Claim 11 (depends on 1)

The method of claim 1, wherein timestamp metadata of the second portion of the metadata for the file is updated without the lock using the atomic operation.

### Claim 12

A non-transitory machine readable medium comprising instructions for performing a method, which when executed by a machine, causes the machine to:
represent a file, of a file system and mapped to an address range of memory, using a data structure comprising a data unit accessible by a data lock and a metadata unit with a first portion accessible by a metadata lock and a second portion updateable by an atomic operation without a lock; and
utilize the data lock and the metadata lock in a shared mode based upon an estimate that a data modification of a request changes a structure of the data structure and the data modification is delayed.

### Claim 13 (depends on 12)

The non-transitory machine readable medium of claim 12, wherein the data lock and the metadata lock are acquired for requests modifying the first portion of the metadata and the structure of the data structure.

### Claim 14 (depends on 12)

The non-transitory machine readable medium of claim 12, wherein the instructions cause the machine to:
utilize the data structure for file content lookup operations.

### Claim 15 (depends on 12)

The non-transitory machine readable medium of claim 12, wherein the data structure has a hierarchical structure.

### Claim 16 (depends on 12)

The non-transitory machine readable medium of claim 12, wherein the instructions cause the machine to:
execute the data modification as a batch operation.

### Claim 17 (depends on 12)

The non-transitory machine readable medium of claim 12, wherein the data structure comprises a log tree comprising a tree element.

### Claim 18 (depends on 17)

The non-transitory machine readable medium of claim 17, wherein the request comprises a write request executable without shifting the tree element.

### Claim 19 (depends on 12)

The non-transitory machine readable medium of claim 12, wherein the request is associated with a page fault generated by a machine-level store instruction to the file system that supports direct access to the memory.

### Claim 20

A computing device comprising:
a memory comprising machine executable code for performing a method; and
a processor coupled to the memory, the processor configured to execute the machine executable code to cause the processor to:
represent a file, of a file system and mapped to an address range of memory, using a data structure comprising a data unit accessible by a data lock and a metadata unit with a first portion accessible by a metadata lock and a second portion updateable by an atomic operation without a lock; and
utilize the data lock and the metadata lock in a shared mode based upon an estimate that a data modification of a request changes a structure of the data structure and the data modification is delayed.
