Patentable/Patents/US-6249792
US-6249792

On-line dynamic file shrink facility

PublishedJune 19, 2001
Assigneenot available in USPTO data we have
Inventorsnot available in USPTO data we have
Technical Abstract

An on-line dynamic shrink facility sets an allocation fence in a file and moves data from above the fence to below the fence. The fence is based on a target size for the file. When all the data above the fence is moved below the fence, the space above the fence is freed. The target size can be a specified size, an original size for the file when it was created, or a size calculated by examining the amount of space used and adding in an amount of desired free space. Resources that are required to move the data, such as old and new allocation units for the data, or that will be impacted by movement of the data, such as index entries, are locked or latched to prevent corruption of the data while it is being moved. The operations are performed in discreet transactions which are immediately committed to minimize the impact on other users of the file.

Patent Claims
21 claims

Legal claims defining the scope of protection, as filed with the USPTO.

1

1. A computerized method for shrinking a file that is subdivided into allocation units comprising: determining a target size for the file; setting an allocation fence address for the file, wherein the allocation fence address corresponds to the target size; moving data stored in each allocation unit above the fence address to an allocation unit below the fence address; and deleting the allocation units above the fence address.

2

2. The computerized method of claim 1, wherein determining the target size comprises: estimating the target size based on a number of allocation units having data stored therein; comparing the estimated target size to an original size for the file when it was created; and setting the target size to the greater of the estimated target size and the original size.

3

3. The computerized method of claim 2, wherein the estimated target size is further based on a number of allocation units having no data stored therein.

4

4. The computerized method of claim 1, further comprising: scanning the allocation units above the fence address when all the data have been moved to allocation units below the fence; and moving any new data stored in an allocation unit above the fence to an allocation unit above the fence.

5

5. The computerized method of claim 1, wherein moving the data comprises: examining each allocation unit above the fence starting at a tail of the file and terminating when the fence address is reached.

6

6. The computerized method of claim 1, wherein the data on an allocation unit is one of a plurality of data types and the data is moved based on the type.

7

7. The computerized method of claim 6, further comprising: if the type of the data is heap data, deleting the data; reinserting the deleted data; and dellocating the allocation unit above the page.

8

8. The computerized method of claim 6, further comprising: if the type of the data is clustered data, extracting a cluster key from the data; searching a key structure to find a lowest parent for the data based on the cluster key; moving the data below the fence; updating links to the lowest parent; and deallocating the allocation unit above the fence.

9

9. The computerized method of claim 6, further comprising: if the type of the data is text data, deleting the data on each allocation unit above the fence that contains related text data; and reinserting the deleted data.

10

10. The computerized method of claim 6, further comprising: if the type of the data is intermediate index node data, extracting an index key from the data; searching a key structure to find a lowest parent for the data based on the index key; moving the data below the fence; updating links to the lowest parent; and deallocating the allocation unit above the fence.

11

11. The computerize method of claim 6, further comprising: if the type of the data is root index node data, moving the data on each allocation unit above the fence that contains related root index node data.

12

12. The computerized method of claim 6, further comprising: if the type of the data is logical log data, moving the data and deleting the allocation units in a deferred manner.

13

13. The computerized method of claim 12, wherein determining the target size comprises: calculating an amount of space used during a set time period as the target size.

14

14. The computerize method of claim 1, further comprising: securing exclusive use of the data before moving the data; and releasing the data from exclusive use after moving the data.

15

15. A computer-readable medium having computer-executable modules comprising: a set fence module that places an allocation fence in a file; a compress to fence module that scans the file from a tail end until the fence; and a move page module that moves data in the file above the fence to below the fence when the compress to fence module finds data above the fence.

16

16. The computer-readable medium of claim 15, further comprising a plurality of move modules specific to a type of data that are invoked by the move page module when a corresponding data type is found by the compress to fence module.

17

17. The computer-readable medium of claim 15, wherein the plurality of move modules comprise: a move index page module that moves index data below the fence; a move head page module that moves heap data below the fence; a move text page module that moves text data below the fence; and a move allocation page module that move allocation data below the fence.

18

18. A computerized system comprising: a processing unit; a system memory coupled to the processing unit through a system bus; a computer-readable medium coupled to the processing unit through a system bus; and a shrink facility executed from the computer-readable medium by the processing unit, wherein the shrink facility causes the processing unit to place an allocation fence in a file, scan the file from a tail end to the allocation fence, move data found in the file allocation units above the fence to file allocation units below the fence, and delete the file allocation units above the fence.

19

19. The computerized system of claim 18, flirther comprising: a file allocation manager executed from the computer-readable by the processing unit, wherein the file allocation manager is coupled to the shrink facility and is responsive to the allocation fence being placed in the file.

20

20. The computerized system of claim 19, wherein the shrink facility invokes the file allocation unit to cause the processing unit to allocate appropriate new allocation units in the file below the fence.

21

21. The computerized system of 19, wherein the file allocation manager causes the processing unit to move the allocation fence toward the tail of the file when data to be stored in the file cannot fit below the fence.

Classification Codes (CPC)

Cooperative Patent Classification codes for this invention. Click any code to explore related patents in that topic.

Patent Metadata

Filing Date

December 16, 1998

Publication Date

June 19, 2001

Want to explore more patents?

Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.

Citation & reuse

Analysis on this page is generated by Patentable — an AI-powered patent intelligence platform. AI-generated summaries, explanations, and analysis may be reused with attribution and a visible link back to the canonical URL below. Patent abstracts and claims are USPTO public domain.

Cite as: Patentable. “On-line dynamic file shrink facility” (US-6249792). https://patentable.app/patents/US-6249792

© 2026 Patentable. All rights reserved.

Patentable is a research and drafting-assistant tool, not a law firm, and does not provide legal advice. Documents we generate are drafts for review by a licensed patent attorney.