# US 2018/0024751 A1 · Metadata management on a storage device

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

- Number: US 2018/0024751 A1
- Document ID: US20180024751A1
- Status: Published application
- Kind: A1
- Application number: 15/214,386
- Filed: 2016-07-19
- Published: 2018-01-25
- Earliest claimed: 2016-07-19
- Assignees: Western Digital Technologies, Inc.
- Applicants: Western Digital Technologies, Inc.
- Inventors: Zvonimir Z. Bandic; Jing Shi Booth; Sanghoon Chu; Cyril Guyot; Robert E. Mateescu; Minghai Qin; Qingbo Wang
- Web page: https://patentgrep.com/patent/US20180024751A1

## CPC

- G06F 3/0688: {Non-volatile semiconductor memory arrays}
- G06F 3/061: {Improving I/O performance}
- G06F 3/064: {Management of blocks}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A storage device may include a data storage portion including a set of blocks designated to store metadata and a controller. The controller may be configured to write first metadata at a first location designated by a first pointer. The first location may reference a block that does not contain any valid metadata. The controller may be configured to determine a number of valid blocks of previously written metadata in a subset of the set of blocks. A first block of the subset may be at a second location designated by a second pointer. The controller may be configured to, if the number of valid blocks is greater than zero, rewrite the valid previously written metadata to a group of one or more sequential blocks.

## Claims

### Claim 1

A method comprising:
writing, by the controller, first metadata at a first location designated by a first pointer in a data storage portion of a storage device, wherein the data storage portion comprises a set of blocks designated to store metadata, and wherein the first location designated by the first pointer references a block of the set of blocks that does not contain any valid metadata;
determining, by the controller, a number of valid blocks of previously written metadata in a subset of the set of blocks, wherein the subset of the set of blocks comprises a predetermined number of sequential blocks less than a total number of blocks in the set of blocks, and wherein a sequentially first block of the subset of blocks is at a second location designated by a second pointer in the data storage portion of the storage device; and
in response to determining that the number of valid blocks of previously written metadata is greater than zero, rewriting, by the controller, the valid previously written metadata in the subset of blocks to a group of one or more sequential blocks of the data storage portion, wherein the block referenced by the first location is sequential with the group of one or more sequential blocks, and wherein a number of blocks in the group of one or more sequential blocks is less than or equal to the number of valid blocks of previously written metadata in the subset of blocks.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
updating, by the controller, the first pointer to reference a second block at a third location, wherein the second location of the third block sequentially succeeds either the first location of the first block or a final sequential block of the group of one or more sequential blocks.

### Claim 3 (depends on 2)

The method of claim 2, wherein c comprises an index of the first location, and wherein updating the first location comprises updating c based on:
c=c+i,
wherein 1≦i≦k+1, wherein k comprises the predetermined number of sequential blocks in the subset of blocks, and wherein i comprises one more than the number of blocks in the group of one or more sequential blocks.

### Claim 4 (depends on 2)

The method of claim 2, wherein c comprises an index of a page in the first block referenced by the first location, and wherein updating the first location comprises updating c based on:
c=c+q+pg_per_blk,
wherein q comprises a number of valid pages of metadata present in the subset of blocks, and wherein pg_per_blk comprises a total number of pages in a singular block of the set of blocks.

### Claim 5 (depends on 1)

The method of claim 1, further comprising:
updating, by the controller, the second pointer to reference a second block at a third location, wherein the second block sequentially succeeds a final sequential block of the subset of blocks.

### Claim 6 (depends on 5)

The method of claim 5, wherein p comprises an index of the second location, and wherein updating the second location comprises updating p based on:
p=p+k,
wherein k comprises the predetermined number of sequential blocks in the subset of blocks.

### Claim 7 (depends on 6)

The method of claim 6, wherein k equals either 2 or 3.

### Claim 8 (depends on 1)

The method of claim 1, further comprising:
updating, by the controller, the second pointer to reference a second block at a third location, wherein p1 comprises an index of the second location, wherein p2 comprises an index of the second block, and wherein:
p2=p1+k, if k>s, and
p2=p1+(k−1), if k=s,
wherein k comprises the predetermined number of sequential blocks in the subset of blocks, and wherein s comprises the number of valid blocks of previously written metadata in the subset of blocks.

### Claim 9 (depends on 1)

The method of claim 1, wherein the first metadata comprises an update to previously written metadata stored in the data storage portion of the storage device.

### Claim 10 (depends on 1)

The method of claim 1, wherein the first metadata comprises one of a system situation, a file location, a file size, a file creation date, or a third pointer that references the file location.

### Claim 11

A storage device comprising:
a data storage portion comprising a set of blocks designated to store metadata; and
a controller configured to:
write first metadata at a first location designated by a first pointer in the data storage portion of the storage device, wherein the first location designated by the first pointer references a block of the set of blocks that does not contain any valid metadata;
determine a number of valid blocks of previously written metadata in a subset of the set of blocks, wherein the subset of the set of blocks comprises a predetermined number of sequential blocks less than a total number of blocks in the set of blocks, and wherein a sequentially first block of the subset of blocks is at a second location designated by a second pointer in the data storage portion of the storage device; and
in response to determining that the number of valid blocks of previously written metadata is greater than zero, rewrite the valid previously written metadata in the subset of blocks to a group of one or more sequential blocks of the data storage portion, wherein the block referenced by the first location is sequential with the group of one or more sequential blocks, and wherein a number of blocks in the group of one or more sequential blocks is less than or equal to the number of valid blocks of previously written metadata in the subset of blocks.

### Claim 12 (depends on 11)

The storage device of claim 11, wherein the controller is further configured to:
update the first pointer to reference a second block at a third location, wherein the third location of the second block sequentially succeeds either the first location of the first block or a final sequential block of the group of one or more sequential blocks.

### Claim 13 (depends on 12)

The storage device of claim 12, wherein c comprises an index of the first location, and wherein the controller being configured to update the first location comprises the controller being configured to update c based on:
c=c+i,
wherein 1≦i≦k+1, wherein k comprises the predetermined number of sequential blocks in the subset of blocks, and wherein i comprises one more than the number of blocks in the group of one or more sequential blocks.

### Claim 14 (depends on 12)

The storage device of claim 12, wherein c comprises an index of a page in the first block referenced by the first location, and wherein the controller being configured to update the first location comprises the controller being configured to update c based on:
c=c+q+pg_per_blk,
wherein q comprises a number of valid pages of metadata present in the subset of blocks, and wherein pg per blk comprises a total number of pages in a singular block of the set of blocks.

### Claim 15 (depends on 11)

The storage device of claim 11, wherein the controller is further configured to:
update the second pointer to reference a second block at a third location, wherein the second block sequentially succeeds a final sequential block of the subset of blocks.

### Claim 16 (depends on 15)

The storage device of claim 15, wherein p comprises an index of the second location, and wherein the controller being configured to update the second location comprises the controller being configured to update p based on:
p=p+k,
wherein k comprises the predetermined number of sequential blocks in the subset of blocks, and wherein k equals either 2 or 3.

### Claim 17 (depends on 11)

The storage device of claim 11, further comprising:
update t the second pointer to reference a second block at a third location, wherein p1 comprises an index of the second location, wherein p2 comprises an index of the second block, and wherein:
p2=+k, if k>s, and
p2=p1+(k−1), if k=s,
wherein k comprises the predetermined number of sequential blocks in the subset of blocks, and wherein s comprises the number of valid blocks of previously written metadata in the subset of blocks.

### Claim 18 (depends on 11)

The storage device of claim 11, wherein the first metadata comprises an update to previously written metadata stored in the data storage portion of the storage device.

### Claim 19 (depends on 11)

The storage device of claim 11, wherein the first metadata comprises one of a system situation, a file location, a file size, a file creation date, or a third pointer that references the file location.

### Claim 20

A computer-readable storage medium storing instructions that, when executed, cause a processor to:
write first metadata at a first location designated by a first pointer in a data storage portion of a storage device, wherein the data storage portion comprises a set of blocks designated to store metadata, and wherein the first location designated by the first pointer references a block of the set of blocks that does not contain any valid metadata;
determine a number of valid blocks of previously written metadata in a subset of the set of blocks, wherein the subset of the set of blocks comprises a predetermined number of sequential blocks less than a total number of blocks in the set of blocks, and wherein a sequentially first block of the subset of blocks is at a second location designated by a second pointer in the data storage portion of the storage device; and
in response to determining that the number of valid blocks of previously written metadata is greater than zero, rewrite the valid previously written metadata in the subset of blocks to a group of one or more sequential blocks of the data storage portion, wherein the block referenced by the first location is sequential with the group of one or more sequential blocks, and wherein a number of blocks in the group of one or more sequential blocks is less than or equal to the number of valid blocks of previously written metadata in the subset of blocks.
