# US 2014/0208321 A1 · Avoiding physical fragmentation in a virtualized storage environment

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

- Number: US 2014/0208321 A1
- Document ID: US20140208321A1
- Status: Published application
- Kind: A1
- Application number: 14/220,279
- Filed: 2014-03-20
- Published: 2014-07-24
- Earliest claimed: 2012-05-30
- Assignees: VMware, Inc.
- Applicants: Vmware, Inc.
- Inventors: Faraz SHAIKH; Murali VILAYANNUR
- Web page: https://patentgrep.com/patent/US20140208321A1

## CPC

- G06F 3/0664: {at device level, e.g. emulation of a storage device or system}
- G06F 3/0604: {Improving or facilitating administration, e.g. storage management}
- G06F 3/064: {Management of blocks}
- G06F 3/0671: {In-line storage system}
- G06F 3/0689: {Disk arrays, e.g. RAID, JBOD}
- G06F 9/455: Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F 9/45533: {Hypervisors; Virtual machine monitors}
- G06F 9/45558: {Hypervisor-specific management and integration aspects}
- G06F 11/1435: {using file system or storage system metadata}
- G06F 11/1484: {involving virtual machines}
- G06F 12/02: Addressing or allocation; Relocation (program address sequencing G06F9/00; arrangements for selecting an address in a digital store G11C8/00)
- G06F 12/08: in hierarchically structured memory systems, e.g. virtual memory systems
- G06F 16/22: Indexing; Data structures therefor; Storage structures
- G06F 2009/45579: {I/O management, e.g. providing access to device drivers or storage}
- G06F 2206/1004: Defragmentation
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A virtualized storage stack includes logical layers above the physical storage layer. Each logical layer allocates data blocks, and the data block allocation is propagated down to the physical storage layer. To facilitate contiguous storage, each layer of the virtualized storage stack maintains additional metadata associated with data blocks. For each data block, the metadata indicates whether the data block is free, provisioned and includes a tag that indicates when the data block was first written. Data blocks that were first written as part of the same write request share the same tag, and are mostly guaranteed to be physically co-located. Block allocations that reuse data blocks having the same tag are preferred. Such preference increases the likelihood of the blocks being contiguous in the physical storage as these blocks were allocated as part of the same first write.

## Claims

### Claim 1

A method for defragmenting physical storage that is accessed through a set of layers of a virtualization stack, the method comprising:
receiving a first defragmentation request at a lower layer from an upper layer, the first defragmentation request indicating a plurality of storage blocks for defragmentation;
determining, at the lower layer, a set of storage blocks that correspond to the plurality of storage blocks; and
transmitting by the lower layer a second defragmentation request to a layer that is below thereto, the second defragmentation request indicating the set of storage blocks for defragmentation.

### Claim 2 (depends on 1)

The method of claim 1, wherein the layer below the lower layer is at a bottom of the virtualization stack.

### Claim 3 (depends on 2)

The method of claim 2, further comprising determining at the bottom layer that defragmentation is necessary and initiating a first set of data movement operations for defragmentation.

### Claim 4 (depends on 3)

The method of claim 3, further comprising determining that the data movement operations were not successful, and transmitting by the bottom layer a first failure notification to the lower layer, wherein the lower layer, in response to the first failure notification, initiates a second set of data movement operations for defragmentation.

### Claim 5 (depends on 4)

The method of claim 4, wherein the first set of data movement operations is performed by the bottom layer and the second set of data movement operations is performed by the lower layer.

### Claim 6 (depends on 4)

The method of claim 4, further comprising:
transmitting by the lower layer a second failure notification to the upper layer; and
responsive to the second failure notification, transmitting by the upper layer a third failure notification to a layer of the virtualization stack that is situated above the upper layer.

### Claim 7 (depends on 3)

The method of claim 3, further comprising determining that the data movement operations were successful, and transmitting by the bottom layer a success notification to the lower layer.

### Claim 8 (depends on 3)

The method of claim 3, wherein defragmentation is determined to be necessary at the bottom layer by:
analyzing metadata associated with the set of storage blocks; and
determining, based on the metadata, that the storage blocks are not stored contiguously in the physical storage.

### Claim 9 (depends on 8)

The method of claim 8, wherein the metadata comprises a plurality of write tags, each write tag corresponding to one of the storage blocks and storing a value, and determining that the storage blocks are not stored contiguously in the physical storage comprises determining that the write tags do not all have a same value.

### Claim 10

A non-transitory computer readable storage medium comprising instructions executable in a computer system to cause the computer system to carry out a method for defragmenting physical storage that is accessed through a set of layers of a storage stack, the method comprising:
receiving a first defragmentation request at a lower layer from an upper layer, the first defragmentation request indicating a plurality of storage blocks for defragmentation;
determining, at the lower layer, a set of storage blocks that correspond to the plurality of storage blocks; and
transmitting by the lower layer a second defragmentation request to a layer that is below thereto, the second defragmentation request indicating the set of storage blocks for defragmentation.

### Claim 11 (depends on 10)

The non-transitory computer readable storage medium of claim 10, wherein the layer below the lower layer is at a bottom of the storage stack, and the method further comprises determining at the bottom layer that defragmentation is necessary and initiating a first set of data movement operations for defragmentation.

### Claim 12 (depends on 11)

The non-transitory computer readable storage medium of claim 11, wherein the method further comprises:
determining that the data movement operations were not successful; and
transmitting by the bottom layer a failure notification to the lower layer,
wherein the lower layer, in response to the failure notification, initiates a second set of data movement operations for defragmentation.

### Claim 13 (depends on 12)

The non-transitory computer readable storage medium of claim 12, wherein the first set of data movement operations are performed by the bottom layer and the second set of data movement operations are performed by the lower layer.

### Claim 14 (depends on 11)

The non-transitory computer readable storage medium of claim 11, wherein defragmentation is determined to be necessary at the bottom layer by:
analyzing metadata associated with the set of storage blocks; and
determining, based on the metadata, that the storage blocks are not stored contiguously in the physical storage.

### Claim 15 (depends on 14)

The non-transitory computer readable storage medium of claim 14, wherein the metadata comprises a plurality of write tags, each write tag corresponding to one of the storage blocks and storing a value, and determining that the storage blocks are not stored contiguously in the physical storage comprises determining that the write tags do not all have a same value.

### Claim 16

A virtualized computing system comprising:
a server;
a physical storage; and
a virtualization stack implemented by the server and the physical storage, the virtualization stack comprising a set of layers through which the physical storage is accessed, and configured to carry out a method for defragmenting the physical storage, the method comprising:
receiving a first defragmentation request at a lower layer from an upper layer, the first defragmentation request indicating a plurality of storage blocks for defragmentation;
determining, at the lower layer, a set of storage blocks that correspond to the plurality of storage blocks; and
transmitting by the lower layer a second defragmentation request to a layer that is below thereto, the second defragmentation request indicating the set of storage blocks for defragmentation.

### Claim 17 (depends on 16)

The system of claim 16, wherein the layer below the lower layer is at a bottom of the virtualization stack, and the method further comprises determining at the bottom layer that defragmentation is necessary and initiating a first set of data movement operations for defragmentation.

### Claim 18 (depends on 17)

The system of claim 17, wherein the method further comprises:
determining that the data movement operations were not successful; and
transmitting by the bottom layer a failure notification to the lower layer,
wherein the lower layer, in response to the failure notification, initiates a second set of data movement operations for defragmentation.

### Claim 19 (depends on 17)

The system of claim 17, wherein defragmentation is determined to be necessary by:
analyzing metadata associated with the set of storage blocks; and
determining, based on the metadata, that the storage blocks are not stored contiguously in the physical storage.

### Claim 20 (depends on 19)

The system of claim 19, wherein the metadata comprises a plurality of write tags, each write tag corresponding to one of the storage blocks and storing a value, and determining that the storage blocks are not stored contiguously in the physical storage comprises determining that the write tags do not all have a same value.
