Gang blocks
First Claim
Patent Images
1. A method for allocating space on a disk comprising:
- receiving a first request to allocate space on the disk having a first size;
allocating, in response to the first request, a first contiguous space having the first size and storing a first indirect block in the first contiguous space;
storing a second indirect block comprising a first block pointer referencing the first indirect block, wherein the first block pointer comprises a first gang block header bit that is not set;
receiving a second request to allocate space on the disk having a second size, wherein no contiguous space of the second size exists on the disk;
allocating, in response to the second request, a gang block header, wherein the gang block header occupies a minimum allocateable portion on the disk;
populating the gang block header; and
responding to the second request to allocate space on the disk by storing a second block pointer in the second indirect block, wherein the second block pointer comprises a second gang block header bit that is set, wherein the second block pointer references the gang block header and comprises a disk virtual address (DVA), a birth, and a checksum field and wherein the DVA comprises the second gang block header bit and a size field,wherein populating the gang block header comprises;
obtaining a second contiguous space on the disk having a third size, wherein the third size is less than the second size,storing a third pointer to the second contiguous space in the gang block header,obtaining a third contiguous space on the disk having a fourth size, wherein the fourth size is less than the second size, andstoring a fourth pointer to the third contiguous space in the gang block header.
2 Assignments
0 Petitions
Accused Products
Abstract
A method for allocating space on a disk involving receiving a request to allocate space on the disk having a first size, determining whether contiguous space of the first size exists on the disk. If contiguous space of the first size exists on the disk, allocating the contiguous space on the disk to obtain a contiguous space address, and responding to the request to allocate space on disk with a contiguous space pointer. If no contiguous space of the first size exists on the disk, allocating a gang block header, populating the gang block header, and responding to the request to allocate space on the disk with a gang block header pointer.
-
Citations
13 Claims
-
1. A method for allocating space on a disk comprising:
-
receiving a first request to allocate space on the disk having a first size; allocating, in response to the first request, a first contiguous space having the first size and storing a first indirect block in the first contiguous space; storing a second indirect block comprising a first block pointer referencing the first indirect block, wherein the first block pointer comprises a first gang block header bit that is not set; receiving a second request to allocate space on the disk having a second size, wherein no contiguous space of the second size exists on the disk; allocating, in response to the second request, a gang block header, wherein the gang block header occupies a minimum allocateable portion on the disk; populating the gang block header; and responding to the second request to allocate space on the disk by storing a second block pointer in the second indirect block, wherein the second block pointer comprises a second gang block header bit that is set, wherein the second block pointer references the gang block header and comprises a disk virtual address (DVA), a birth, and a checksum field and wherein the DVA comprises the second gang block header bit and a size field, wherein populating the gang block header comprises; obtaining a second contiguous space on the disk having a third size, wherein the third size is less than the second size, storing a third pointer to the second contiguous space in the gang block header, obtaining a third contiguous space on the disk having a fourth size, wherein the fourth size is less than the second size, and storing a fourth pointer to the third contiguous space in the gang block header. - View Dependent Claims (2, 3)
-
-
4. A method for retrieving a block comprising:
-
receiving a first request to read a first block, wherein the first request comprises a first block pointer, wherein the first block pointer comprises a gang block header bit that is not set; retrieving, in response to the first request, an indirect block using the first block pointer, wherein the indirect block comprises a second block pointer referencing the first block; retrieving the first block using the second block pointer; receiving a second request to read a second block, wherein the second request comprises a third block pointer, wherein the third block pointer comprises a disk virtual address (DVA), a birth, and a checksum field, wherein the DVA comprises the gang block header bit that is set and a size field; retrieving a gang block header using the third block pointer, wherein the gang block header occupies a minimum allocateable portion on a disk and comprises a plurality of block pointers, and wherein each of the plurality of block pointers references a non-contiguous sub-block of disk space; processing the gang block header to obtain at least two sub-blocks, wherein the size of each sub-block is less than the size of the second block; and combining the at least two sub-blocks to obtain the second block. - View Dependent Claims (5, 6, 7)
-
-
8. A system, comprising:
-
a storage pool comprising a first sub-data block, a second sub-data block, a first indirect block, a first data block, a gang block header, and a second indirect block, wherein the first indirect block comprises a first block pointer referencing the first data block, wherein the first data block is allocated as a contiguous block of space; wherein the gang block header occupies a minimum allocateable portion in the storage pool, wherein the gang block header comprises a second block pointer to the first sub-data block and a third block pointer to the second sub-data block, wherein the first sub-data block and the second sub-data block are located in non-contiguous portions of the storage pool, wherein a combination of the first-sub data block and the second sub-data block make up a second data block, wherein the second indirect block comprises a pointer to the gang block header, wherein the pointer comprises a disk virtual address (DVA), a birth, and a checksum field, wherein the DVA comprises a gang block header bit that is set and a size field; and a storage pool allocator configured to store the second data block using the gang block header and the second indirect block in the storage pool.
-
-
9. A computer system for allocating space on a disk comprising:
-
a processor; a memory; a storage device; and software instructions stored in the memory for enabling the computer system under control of the processor, to; receive a first request to allocate space on the disk having a first size; allocate, in response to the first request, a first contiguous space having the first size and storing a first indirect block in the first contiguous space; store a second indirect block comprising a first block pointer referencing the first indirect block, wherein the first block pointer comprises a first gang block header bit that is not set; receive a second request to allocate space on the disk having a second size, wherein no contiguous space of the second size exists on the disk; allocate, in response to the second request, a gang block header, wherein the gang block header occupies a minimum allocateable portion on the disk; populate the gang block header; and respond to the second request to allocate space on the disk by storing a second block pointer in the second indirect block, wherein the second block pointer comprises a second gang block header bit that is set, wherein the second block pointer references the gang block header and comprises a disk virtual address (DVA), a birth, and a checksum field and wherein the DVA comprises the second gang block header bit and a size field, wherein populating the gang block header comprises; obtaining a second contiguous space on the disk having a third size, wherein the third size is less than the second size, storing a third pointer to the second contiguous space in the gang block header, obtaining a third contiguous space on the disk having a fourth size, wherein the fourth size is less than the second size, and storing a fourth pointer to the third contiguous space in the gang block header.
-
-
10. A computer system for retrieving a block comprising:
-
a processor; a memory; a storage device; and software instructions stored in the memory for enabling the computer system under control of the processor, to; receive a first request to read a first block, wherein the first request comprises a first block pointer, wherein the first block pointer comprises a gang block header bit that is not set; retrieve, in response to the first request, an indirect block using the first block pointer, wherein the indirect block comprises a second block pointer referencing the first block; retrieve the first block using the second block pointer; receive a second request to read a second block, wherein the second request comprises a third block pointer, wherein the third block pointer comprises a disk virtual address (DVA), a birth, and a checksum field, wherein the DVA comprises the gang block header bit that is set and a size field; retrieve a gang block header using the third block pointer, wherein the gang block header occupies a minimum allocateable portion on a disk and comprises a plurality of block pointers, and wherein each of the plurality of block pointers references a non-contiguous sub-block of disk space; process the gang block header to obtain at least two sub-blocks, wherein the size of each sub-block is less than the size of the second block; and combine the at least two sub-blocks to obtain the second block.
-
-
11. A computer readable medium for allocating space on a disk comprising software instructions to:
-
receive a first request to allocate space on the disk having a first size; allocate, in response to the first request, a first contiguous space having the first size and storing a first indirect block in the first contiguous space; store a second indirect block comprising a first block pointer referencing the first indirect block, wherein the first block pointer comprises a first gang block header bit that is not set; receive a second request to allocate space on the disk having a second size, wherein no contiguous space of the second size exists on the disk; allocate, in response to the second request, a gang block header, wherein the gang block header occupies a minimum allocateable portion on the disk; populate the gang block header; and respond to the second request to allocate space on the disk by storing a second block pointer in the second indirect block, wherein the second block pointer comprises a second gang block header bit that is set, wherein the second block pointer references the gang block header and comprises a disk virtual address (DVA), a birth, and a checksum field and wherein the DVA comprises the second gang block header bit and a size field, wherein populating the gang block header comprises; obtaining a second contiguous space on the disk having a third size, wherein the third size is less than the second size, storing a third pointer to the second contiguous space in the gang block header, obtaining a third contiguous space on the disk having a fourth size, wherein the fourth size is less than the second size, and storing a fourth pointer to the third contiguous space in the gang block header.
-
-
12. A computer readable medium for retrieving a block comprising software instructions to:
-
receive a first request to read a first block, wherein the first request comprises a first block pointer, wherein the first block pointer comprises a gang block header bit that is not set; retrieve, in response to the first request, an indirect block using the first block pointer, wherein the indirect block comprises a second block pointer referencing the first block; retrieve the first block using the second block pointer; receive a second request to read a second block, wherein the second request comprises a third block pointer, wherein the third block pointer comprises a disk virtual address (DVA), a birth, and a checksum field, wherein the DVA comprises the gang block header bit that is set and a size field; retrieve a gang block header using the third block pointer, wherein the gang block header occupies a minimum allocateable portion on a disk and comprises a plurality of block pointers, and wherein each of the plurality of block pointers references a non-contiguous sub-block of disk space; process the gang block header to obtain at least two sub-blocks, wherein the size of each sub-block is less than the size of the second block; and combine the at least two sub-blocks to obtain the second block.
-
-
13. A network system having a plurality of nodes, comprising:
-
a storage pool comprising a first sub-data block, a second sub-data block, a first indirect block, a first data block, a gang block header, and a second indirect block, wherein the first indirect block comprises a first block pointer referencing the first data block, wherein the first data block is allocated as a contiguous block of space; wherein the gang block header occupies a minimum allocateable portion in the storage pool, wherein the gang block header comprises a second block pointer to the first sub-data block and a third block pointer to the second sub-data block, wherein the first sub-data block and the second sub-data block are located in non-contiguous portions of the storage pool, wherein a combination of the first-sub data block and the second sub-data block make up a second data block, wherein the second indirect block comprises a pointer to the gang block header, wherein the pointer comprises a disk virtual address (DVA), a birth, and a checksum field, wherein the DVA comprises a gang block header bit that is set and a size field; and a storage pool allocator configured to store the second data block using the gang block header and the second indirect block in the storage pool, wherein the storage pool resides on any one of the plurality of nodes, and wherein the storage pool allocator resides on any one of the plurality of nodes.
-
Specification