IP Library Granted Patent US 7,899,989
Granted Patent B2
US 7,899,989 · App. 11/407,637 · Granted Mar 1, 2011

Method and system for using a block allocation policy

Assignee: Oracle America, Inc.
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 7,899,989
App. No.
11/407,637
Granted
Mar 1, 2011
Kind
B2
Abstract

A method for writing a logical block into a storage pool includes receiving a request to write the logical block, selecting a block allocation policy, by a file system associated with the storage pool, from a set of allocation policies, obtaining a list of free physical blocks in the storage pool, allocating a physical block from the list of free physical blocks, based on the block allocation policy, and writing the logical block to the physical block.

Claims (67)

1. A method for writing logical blocks into a storage pool organized in a hierarchical tree structure, comprising:

receiving a request to write first logical block;

selecting a block allocation policy, by a file system associated with the storage pool, from a plurality of allocation policies;

obtaining a list of free physical blocks in the storage pool;

allocating a first physical block from the list of free physical blocks, based on the block allocation policy;

writing the first logical block to the first physical block on a first level of the hierarchical tree structure;

calculating a first checksum for the first logical block;

assembling a second logical block, wherein the second logical block comprises a first block pointer that stores the first checksum and references the first logical block;

allocating a second physical block from the list of free physical blocks, based on the block allocation policy;

writing the second logical block to the second physical block on a second level of the hierarchical tree structure;

calculating a second checksum for the second logical block;

assembling a third logical block, wherein the third logical block comprises a second block pointer that stores the second checksum and references the second logical block;

allocating a third physical block from the list of free physical blocks, based on the block allocation policy; and

writing the third logical block to the third physical block on a third level of the hierarchical tree structure.

2. The method of claim 1 , further comprising:

obtaining metadata associated with the first logical block, wherein the block allocation policy is selected from the plurality of allocation policies using the metadata.

3. The method of claim 2 , wherein the metadata identifies a type of file with which the first logical block is associated.

4. The method of claim 2 , wherein the metadata identifies an application that initiated the request.

5. The method of claim 1 , further comprising:

adding a new allocation policy to the plurality of allocation policies, at run-time, such that the new allocation policy may be used by the file system.

6. The method of claim 1 , wherein the first logical block is a data block and the second logical block is an indirect block.

7. The method of claim 1 , wherein writing the first logical block to the physical block comprises writing a portion of the first logical block to the first physical block, when the first logical block is larger than the first physical block.

8. The method of claim 1 , wherein the block allocation policy uses a latency of at least two disks in the storage pool to allocate the first physical block.

9. A system comprising:

a storage pool organized in a hierarchical tree structure; and

a file system operatively connected to the storage pool and configured to:

receive a request to write a first logical block;

select a block allocation policy from a plurality of allocation policies;

obtain a list of free physical blocks in the storage pool;

allocate a first physical block from the list of free physical blocks based on the block allocation policy;

write the first logical block to the first physical block on a first level of the hierarchical tree structure;

calculate a checksum for the first logical block;

assemble a second logical block, wherein the second logical block comprises a block pointer that stores the checksum and references the first logical block;

allocate a second physical block from the list of free physical blocks, based on the block allocation policy;

write the second logical block to the second physical block on a second level of the hierarchical tree structure;

calculate a second checksum for the second logical block;

assemble a third logical block, wherein the third logical block comprises a second block pointer that stores the second checksum and references the second logical block;

allocate a third physical block from the list of free physical blocks, based on the block allocation policy; and

write the third logical block to the third physical block on a third level of the hierarchical tree structure.

10. The system of claim 9 , wherein the file system is further configured to:

obtain metadata associated with the first logical block, wherein the block allocation policy is selected from the plurality of allocation policies using the metadata.

11. The system of claim 10 , wherein the metadata identifies an application that initiated the request.

12. The system of claim 10 , wherein the metadata identifies a type of file with which the first logical block is associated.

13. The system of claim 9 , wherein the file system is further configured to:

add a new allocation policy to the plurality of allocation policies, at run-time, such that the new allocation policy may be used by the file system.

14. The system of claim 9 , wherein the first logical block is a data block and the second logical block is an indirect block.

15. The system of claim 9 , wherein writing the first logical block to the first physical block comprises writing a portion of the first logical block to the first physical block, when the first logical block is larger than the first physical block.

16. A computer readable medium comprising instructions, which when executed by a processor, cause the processor to perform a method for writing logical blocks into a storage pool organized in a hierarchical tree structure by:

receiving a request to write a first logical block;

selecting a block allocation policy, by a file system associated with the storage pool, from a plurality of allocation policies;

obtaining a list of free physical blocks in the storage pool;

allocating a first physical block from the list of free physical blocks, based on the block allocation policy;

writing the first logical block to the first physical block on a first level of the hierarchical tree structure;

calculating a checksum for the first logical block;

assembling a second logical block, wherein the second logical block comprises a block pointer that stores the checksum and references the first logical block;

allocating a second physical block from the list of free physical blocks, based on the block allocation policy;

writing the second logical block to the second physical block on a second level of the hierarchical tree structure;

calculating a second checksum for the second logical block;

assembling a third logical block, wherein the third logical block comprises a second block pointer that stores the second checksum and references the second logical block;

allocating a third physical block from the list of free physical blocks, based on the block allocation policy; and

writing the third logical block to the third physical block on a third level of the hierarchical tree structure.

17. The computer readable medium of claim 16 , further comprising instructions executable by the processor for writing logical blocks into the storage pool by:

obtaining metadata associated with the first logical block, wherein the block allocation policy is selected from the plurality of allocation policies using the metadata.

18. The computer readable medium of claim 17 , wherein the metadata identifies one selected from a group consisting of a type of file with which the first logical block is associated and an application that initiated the request.

19. The computer readable medium of claim 16 , further comprising executable instructions executable by the processor for writing logical blocks into the storage pool by:

adding a new allocation policy to a system comprising the storage pool, at run-time, such that the new allocation policy may be used by the system.

20. The computer readable medium of claim 16 , wherein the logical block is a data block and the second logical block is an indirect block.

Assignments (2)
MERGER AND CHANGE OF NAME Recorded Dec 16, 2015
From: ORACLE USA, INC.; SUN MICROSYSTEMS, INC.; ORACLE AMERICA, INC.
To: ORACLE AMERICA, INC.
Reel/Frame 037311/0056 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 20, 2006
From: MOORE, WILLIAM H.; BONWICK, JEFFREY S.
To: SUN MICROSYSTEMS, INC.
Reel/Frame 017945/0536 →
Continuity (2)
Provisional Application 60733381 · Nov 4, 2005
Related Publication 20070106865A1 · May 10, 2007