Claims
- 1. A process for maintaining file allocation tables (FATs) for a volume of storage medium, comprising:
triggering, by a write operation, modification of data in an existing sector of a data file by writing of data to a new sector of the storage medium; writing revised used/unused sector information into one FAT; setting a variable indicative of a number of FATs (NOF) to a first value; copying the one FAT to another FAT; and re-setting the variable to a second value.
- 2. The process of claim 1, wherein writing the data to a new sector of the storage medium comprises atomically writing the data to a new sector of the storage medium via block drivers.
- 3. The process of claim 1, further comprising, prior to triggering, allocating a sector of the storage medium, and, after writing the data to a new sector of the storage medium, updating cluster chains.
- 4. The process of claim 1, wherein setting and resetting the variable comprises setting and resetting a NOF field in a boot sector of the storage medium.
- 5. The process of claim 1, wherein triggering by a write operation comprises committing a write operation to write data to the volume by an application, wherein the volume comprises non-volatile data storage.
- 6. The process of claim 1, wherein triggering by a write operation comprises committing a write operation by an application to add additional data to a body of data stored on the volume.
- 7. The process of claim 1, wherein triggering by a write operation comprises committing a write operation by an application to modify a body of data stored on the volume.
- 8. The process of claim 1, wherein triggering by a write operation comprises writing of any data by an application.
- 9. The process of claim 1, further comprising, when the variable is set to the first value, blocking access to the medium for operating systems employing a FAT file system chosen from a group consisting of: FAT12, FAT16 and FAT32.
- 10. The process of claim 1, further comprising blocking access to the medium for operating systems employing a conventional FAT file system when the variable is set to the first value.
- 11. The process of claim 1, further comprising allowing access to the medium for transaction-safe file systems when the variable is set to the second value.
- 12. The process of claim 1, further comprising blocking access to the medium for operating systems employing a conventional FAT file system when the variable is set to the second value but not blocking access to the medium for operating systems employing a conventional FAT file system when the variable is set to the first value.
- 13. The process of claim 1, further comprising allowing access to the medium for transaction-safe file systems when the variable is set to the first or second value.
- 14. The process of claim 1, wherein copying the one FAT to another FAT comprises copying the one FAT from the storage medium to another FAT stored on the storage medium.
- 15. The process of claim 1, further comprising, following re-setting the variable to the second value, freeing the existing sector.
- 16. The process of claim 1, wherein setting and resetting the variable comprises setting and resetting a data field in the other FAT.
- 17. One or more computer readable media having stored thereon a plurality of instructions that, when executed by one or more processors, causes the one or more processors to modify data represented by at least a first sector on a storage medium such that the one or more processors perform acts including:
write a new sector of the storage medium via an atomic block write; enter file allocation data including data describing the new sector in a first file allocation table; set a variable to a first value configured to block access to the storage medium by first types of file systems and configured to permit access to the storage medium by second types of file systems; copy the first file allocation table into a second file allocation table; and reset the variable to a second value configured to permit access to the storage medium by the first and second types of file systems.
- 18. The computer readable media of claim 17, wherein the instructions to cause the one or more processors to set a variable to a first value comprise instructions configured to cause the one or more processors to set the variable to a value to block access to the storage medium by operating systems chosen from a group consisting of FAT12, FAT16 and FAT32 and to not block access to the storage medium by transaction-safe file systems.
- 19. The computer readable media of claim 17, wherein the instructions to cause the one or more processors to modify data include instructions to cause the one or more processors to modify data in response to an instruction to close the file.
- 20. The computer readable media of claim 17, wherein the instructions to cause the one or more processors to modify data include instructions to cause the one or more processors to:
accumulate data to be written from a plurality of instructions to write data to the storage medium; determine an amount of accumulated data to be written to the storage medium; compare the amount of accumulated data to be written to a first predetermined threshold; and write the accumulated data to the storage medium when the amount of accumulated data exceeds the first threshold.
- 21. The computer readable media of claim 17, further comprising instructions to:
free the first sector after the variable is reset; and update cluster chains.
- 22. The computer readable media of claim 17, wherein instructions to set and reset the variable comprise instructions to set and reset a data field in the second file allocation table.
- 23. The computer readable media of claim 17, wherein instructions to set and reset the variable comprise instructions to set and reset a number of FATs field in a boot sector of the storage medium.
- 24 The computer readable media of claim 17, wherein the instructions to cause the one or more processors to modify data include instructions to cause the one or more processors to:
accumulate data to be written from a plurality of instructions to write data to the storage medium; enter file allocation data relevant to the data to be written in a temporary file allocation table maintained in a volatile storage medium; determine an amount of accumulated data to be written to the storage medium; compare the amount of accumulated data to be written to a first predetermined threshold; write the accumulated data to the storage medium when the amount of accumulated data exceeds the first threshold; and enter data from the temporary file allocation table into at least one of the first and second file allocation tables.
- 25. One or more computer readable media having stored thereon a plurality of instructions that, when executed by one or more processors, causes the one or more processors to modify an existing part of a stream on a storage medium such that the one or more processors perform acts including:
locate unallocated contiguous clusters sufficient to accommodate revised stream portions; allocate the contiguous sectors; traverse a first file allocation table to locate entries corresponding to the data stream; update the entries to correspond to the contiguous sectors; set a variable to a first value configured to block access to the storage medium by first types of file systems and configured to permit access to the storage medium by second types of file systems; write the contiguous sectors with the revised stream portions; copy the first file allocation table into a second file allocation table; and reset the variable to a second value configured to permit access to the storage medium by the first and second types of file systems.
- 26. The computer readable media of claim 25, wherein the instructions to cause the one or more processors to modify an existing part of a stream include instructions to cause the one or more processors to:
accumulate data to be written from a plurality of instructions to write data to the storage medium; enter file allocation data relevant to the data to be written in a temporary file allocation table maintained in a volatile storage medium; determine an amount of accumulated data to be written to the storage medium; compare the amount of accumulated data to be written to a predetermined threshold; write the accumulated data to the storage medium when the amount of accumulated data exceeds the threshold; and enter data from the temporary file allocation table into at least one of the first and second file allocation tables.
- 27. The computer readable media of claim 25, wherein instructions to set and reset the variable comprise instructions to set and reset a data field in the second file allocation table.
- 28. The computer readable media of claim 25, wherein instructions to set and reset the variable comprise instructions to set and reset a number of FATs field in a boot sector of the storage medium.
- 29. The computer readable media of claim 25, further comprising instructions to:
free sectors corresponding to the data stream after the variable is reset; and update cluster chains.
- 30. A directory creation process comprising:
allocating a first cluster on a storage medium for a new directory; creating a first entry within the first cluster, the first entry representing a sector where the new directory is stored; creating a second entry within the first cluster, the second entry representing a sector where a parent directory of the new directory is stored; and filling a remainder of the first cluster with data that a file system will not permit to be overwritten.
- 31. The method of claim 30, wherein filling a remainder comprises filling the remainder of the first cluster with volume labels.
- 32. The method of claim 30, further comprising:
modifying data in a file within the new directory; and relinking a chain of entries corresponding to the new directory in a file allocation table.
- 33. One or more computer readable media having stored thereon a plurality of instructions that, when executed by one or more processors, causes the one or more processors to modify data represented by at least a first sector on a storage medium such that the one or more processors perform acts including:
write a new sector of the storage medium via an atomic block write; enter file allocation data including data describing the new sector in a first file allocation table; set a variable to a first value configured to block access to the storage medium by first types of file systems and configured to permit access to the storage medium by second types of file systems; copy the first file allocation table into a second file allocation table; and reset the variable to a second value configured to permit access to the storage medium by the first and second types of file systems.
- 34. The computer readable media of claim 33, wherein the plurality of instructions that causes the one or more processors to modify data represented by at least a first sector comprises instructions that cause the one or more processors to modify an existing part of a stream of data, and wherein the plurality of instructions further comprise instructions to cause the one or more processors to:
locate unallocated contiguous sectors sufficient to accommodate revised stream portions; and allocate the contiguous sectors; wherein the instructions to cause the one or more processors to enter file allocation data comprise instructions configured to cause the one or more processors to:
traverse a first file allocation table to locate entries corresponding to the data stream; and update the entries to correspond to the contiguous sectors; and wherein the instructions to cause the one or more processors to write a new sector comprise instructions to cause the one or more processors to write the contiguous sectors with the revised stream portions.
- 35. A computer system comprising:
a processor; a bus coupled to the processor and configured to couple data to and from the processor; a memory system coupled to the bus and configured to store and retrieve data via the bus, the memory system including a portion configured to store a plurality of instructions that, when executed by the processor, cause the processor to employ directory creation process such that the processor performs acts to:
allocate first and second clusters on a storage medium coupled to the memory system for a new directory; create entries within the first cluster representing a current cluster where the new directory is stored and another cluster where a parent directory of the new directory is stored; fill a remainder of the first cluster with data that cannot be overwritten; and employ the second cluster for DIRENTRIES corresponding to the new directory.
- 36. The computer system of claim 35, wherein the instructions to cause the processor to fill the remainder comprise instructions to cause the processor to fill the remainder of the first cluster with volume labels.
- 36. The computer system of claim 35, further comprising instructions to cause the processor to:
modify data in a file within the new directory; and relink a chain of entries corresponding to the new directory in a file allocation table.
- 37. The computer system of claim 35, further comprising instructions to cause the processor modify data represented by at least a first sector on a non-volatile storage medium such that the processor performs acts including:
write a new sector of the storage medium via an atomic block write; enter file allocation data including data describing the new sector in a first file allocation table; set a variable to a first value configured to block access to the storage medium by first types of file systems and configured to permit access to the storage medium by second types of file systems; copy the first file allocation table into a second file allocation table; and reset the variable to a second value configured to permit access to the storage medium by the first and second types of file systems.
- 38. The computer system of claim 35, further comprising instructions to cause the processor to perform acts including setting a variable to block access to the non-volatile storage medium by operating systems chosen from a group consisting of FAT12, FAT16 and FAT32 and to not block access to the non-volatile storage medium by transaction-safe file systems.
- 39. A process for organizing a volume of storage medium to be transaction-safe comprising:
allocating a root directory region of the storage medium; entering a pointer to a subdirectory region in a first portion of the root directory region; and filling a remainder of the root directory region with unchangeable data.
- 40. The process of claim 39, wherein filling a remainder comprises writing volume labels to the remainder of the root directory.
- 41. The process of claim 39, further comprising:
triggering, by a write operation, allocation of a sector of the storage medium; writing data to the sector; writing revised used/unused sector information into one FAT; setting a variable indicative of a number of FATs to a first value; copying the one FAT to another FAT; and re-setting the variable to a second value.
- 42. A process for transaction-safe data storage comprising:
entering a pointer to a subdirectory into a root directory; and filling a remainder of the root directory with unchangeable data.
- 43. The process of claim 42, further comprising:
allocating first and second clusters for the subdirectory; entering data corresponding the root directory and to a sector associated with the subdirectory into a first portion of the subdirectory; and filling a remainder of the first cluster with unchangeable data.
- 44. The process of claim 42, wherein filling a remainder comprises filling a remainder of the root directory with volume labels.
- 45. The process of claim 42, wherein filling a remainder comprises filling a remainder of the root directory with volume labels, and further comprising:
allocating first and second clusters for the subdirectory; entering data corresponding the root directory and to a sector associated with the subdirectory into a first portion of the subdirectory; and filling a remainder of the first cluster with volume labels.
- 46. One or more computer-readable media comprising a FAT file system that is executable by a computer, the FAT file system comprising: a management system, including FAT tables, configured to record information associated with actions performed by the FAT file system thereby ensuring data integrity in the event there is a power failure.
- 47. A computer program product comprising a computer useable medium having computer program logic recorded for maintaining file allocation tables (FATs) for a volume of storage medium, the computer program logic comprising:
means for triggering, by a write operation, modification of data in an existing sector of a data file by writing of data to a new sector of the storage medium; means for writing revised used/unused sector information into one FAT; means for setting a variable indicative of a number of FATs (NOF) to a first value; means for copying the one FAT to another FAT; and means for re-setting the variable to a second value.
- 48. The product of claim 47, wherein the means for writing the data to a new sector of the storage medium comprises computer code configured to cause a processor to atomically write the data to a new sector of the storage medium via block drivers.
- 49. The product of claim 47, further comprising means for blocking access to the medium for operating systems employing a FAT file system chosen from a group consisting of: FAT12, FAT16 and FAT32 when the variable is set to the first value.
- 50. The product of claim 47, further comprising means for blocking access to the medium for operating systems employing a conventional FAT file system when the variable is set to the first value.
- 51. The process of claim 47, further comprising means for allowing access to the medium for transaction-safe file systems when the variable is set to the second value.
- 52. The product of claim 47, further comprising means for allowing access to the medium for transaction-safe file systems when the variable is set to the first or second value.
- 53. A computer program product comprising a computer useable medium having computer program logic recorded for directory creation for a volume of storage medium, the computer program logic comprising:
means for allocating a first cluster on a storage medium for a new directory; means for creating a first entry within the first cluster, the first entry representing a sector where the new directory is stored; means for creating a second entry within the first cluster, the second entry representing a sector where a parent directory of the new directory is stored; and means for filling a remainder of the first cluster with volume labels.
- 54. The product of claim 53, further comprising:
means for modifying data in a file within the new directory; and means for relinking a chain of entries corresponding to the new directory in a file allocation table.
- 55. A computer program product comprising a computer useable medium having computer program logic recorded for organizing a volume of storage medium to be transaction-safe, the computer program logic comprising:
means for allocating a root directory region of the storage medium; means for entering a pointer to a subdirectory region in a first portion of the root directory region; and means for filling a remainder of the root directory region with volume labels.
- 56. The product of claim 55, further comprising:
means for triggering, by a write operation, allocation of a sector of the storage medium; means for writing data to the sector; means for writing revised used/unused sector information into one FAT; means for setting a variable indicative of a number of FATs to a first value; means for copying the one FAT to another FAT; and means for re-setting the variable to a second value.
- 57. A computer program product comprising a computer useable medium having computer program logic recorded for transaction-safe data storage, the computer program logic comprising:
means for entering a pointer to a subdirectory into a root directory; and means for filling a remainder of the root directory with unchangeable data.
- 58. The product of claim 57, further comprising:
means for allocating first and second clusters for the subdirectory; means for entering data corresponding the root directory and to a sector associated with the subdirectory into a first portion of the subdirectory; and means for filling a remainder of the first cluster with volume labels.
RELATED APPLICATIONS
[0001] This application claims the benefit of U.S. Provisional Application No. 60/420,541, filed on Oct. 22, 2002, entitled “Transaction-Safe FAT Files Subsystem”, listing Michael D. Malueg, Hang Li, Yadhu N. Gopalan, Ronald O. Radko, Daniel J. Polivy, Sharon Drasnin, Jason R. Farmer and DaiQian Huang as inventors, which is hereby incorporated by reference.
Provisional Applications (1)
|
Number |
Date |
Country |
|
60420541 |
Oct 2002 |
US |