QUICK FILENAME LOOKUP USING NAME HASH

Abstract
A method of updating a file record on at least one of a first one or more computer readable storage media including writing at least three contiguous DirectoryEntry data structures corresponding to a directory entry set, the directory entry set corresponding to a file, the writing occurring to the at least one of a first one or more computer readable storage media.
Description
BACKGROUND

Generally described, there are a number of portable computing devices, such as digital still cameras, digital video cameras, media players, mobile phones, mobile computing devices, personal digital assistants, and the like that maintain data on a storage media, such as a portable storage media. The continued development of more complex portable computing devices and larger storage capacity portable storage media places a greater demand for flexibility on the file system format used on the storage media. Current file system format approaches can become deficient in that they may provide inadequate flexibility for increasing storage size capacities and/or storage media applications.


SUMMARY

An extensible file system format for portable storage media is provided. The extensible file system format includes the specification of primary and secondary directory entry types that may be custom defined. The primary and secondary directory entry types can be further classified as critical and benign directory entries.


In some embodiments, a computer-readable medium having computer-executable components for storing data is provided. The computer-readable components can include specific structures for improving the efficiency of determining if a target file name exists. In some embodiments, determining if the target file name exists includes (1) determining a file name hash, (2) finding a directory entry set containing the same hash and a potentially matching filename, thus either reducing the set of possible directory entries or more quickly removing a directory entry from consideration, and (3) determining the target file name exists by matching its file name against the potentially matching filename. In some embodiments, target file name may be converted to an uppercase version of the filename, e.g. for operating systems which perform case-insensitive operations on files. In some embodiments, conversion to uppercase may be based on an Up-Case Table stored on the media. In some embodiments, the directory entry can be read from one or more computer readable storage media, and the file name hash is compared to the directory entry set name hash value. In some embodiments, determining the file name hash can include using a set of pre-calculated hash values for at least a portion of the target file name. For example, if the device only creates 1000 file names, it can lookup the corresponding file name hash from a pre-computed corresponding set of values instead of performing the calculation. In some embodiments, if the a portion of the file names commonly created by the device are the same (e.g., all files start with “IMG” followed by a four digit number), a portion of the hash can be precomputed (e.g., “IMG0”, “IMG1”, “IMG2”, “IMG”, etc.) to further reduce computation of the hash value. As would be appreciated, the above processes can enable determination if a file name exists by allowing a comparison of fixed-length file hashes prior to comparisons of variable-length strings.


In some embodiments, a directory entry set on one or more computer-readable storage media is updated to contain information corresponding to a file. The directory entry set can be comprised of at least three contiguous DirectoryEntry data structures, the first of which can be a File DirectoryEntry data structure, the second can be a Stream Extension DirectoryEntry data structure, and the third can be a first File Name Extension DirectoryEntry data structure of a one or more contiguous File Name Extension DirectoryEntry data structures, the Stream Extension DirectoryEntry data structure can include a name hash field and a name length field, and the name length field can indicate the number of characters in the file name stored in the one or more contiguous File Name Extension DirectoryEntry data structures. In some embodiments, the DirectoryEntry data structures are all of the same fixed length, to further improve computational efficiencies.


This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This summary is not intended to identify key features of the claimed subject matter, nor is it intended to be used as an aid in determining the scope of the claimed subject matter.





DESCRIPTION OF THE DRAWINGS

The foregoing aspects and many of the attendant advantages embodied herein will become more readily appreciated as the same become better understood by reference to the following detailed description, when taken in conjunction with the accompanying drawings, wherein:



FIGS. 1A-1C are block diagrams illustrative of an illustrative environment including a portable computing device and a storage device implementing the extensible file system format in accordance with embodiments of the invention.



FIG. 2 is a block diagram illustrative of various volume layout components corresponding to an extensible file system format in accordance with an embodiment of the invention.



FIG. 3 is a block diagram illustrative of an extensible file system directory structures including primary and secondary directory entry structures in accordance with an embodiment of the invention.



FIG. 4 is a block diagram illustrative of data components for implementing a boot process block in an extensible file system format in accordance with an embodiment of the invention.



FIG. 5 is a block diagram illustrative of data components for implementing directory entries in an extensible file system format in accordance with an embodiment of the invention.



FIG. 6 is a block diagram illustrative of data components for implementing a file name and extensions in an extensible file system format in accordance with an embodiment of the invention.



FIG. 7 is a block diagram illustrative of data components for implementing a volume identifier in an extensible file system format in accordance with an embodiment of the invention.



FIG. 8 is a block diagram illustrative of data components for implementing an extensible directory entry in an extensible file system format in accordance with an embodiment of the invention.



FIG. 9 is a block diagram illustrative of data components for implementing an extensible directory entry in an extensible file system format in accordance with an embodiment of the invention.



FIG. 10 is a block diagram illustrative of data components for implementing an access control list in an extensible file system format in accordance with an embodiment of the invention.



FIG. 11 is a flow diagram illustrative of a file name creation routine for an extensible file system format in accordance with an embodiment of the invention.



FIG. 12 is an example of a suitable computing system environment for an extensible file system format.





DETAILED DESCRIPTION

Generally described, the application relates to an extensible file system format and various processes associated with the extensible file system format. In an illustrative embodiment, the extensible file system format corresponds to an extensible file system format for portable storage media and various processes associated with the extensible file system format on the portable storage media. Although one aspect will be described with regard to a portable storage media file system format, one skilled in the relevant art will appreciate that the disclosed embodiments are illustrative in nature and should not be construed as limiting. Additionally, one skilled in the relevant art will appreciate that the data structures and data layouts used in the illustrative examples may require additional information related to performance, security, and the like.


Extensible File Allocation Table (exFAT) is one illustrative embodiment of the disclosed file system. The exFAT embodiment retains both the simplicity and ease of implementation of other FAT-based file systems. In order to keep the simplicity of implementation, and in order to enable implementations on devices with limited memory and processor capacity, the file directory structure has been kept unsorted and “flat”. The exFAT embodiment also enables many files (e.g. up to 2,796,202) in a single directory. In order to find if a target file name exists in a “flat” unsorted directory structure (for example, to create, open, update, or delete a file with that name), a comparison of the target file name can be done against each file record (e.g. DirectoryEntry set). A string comparison can be more processor, power, and energy intensive than an integer comparison. Thus, by first creating a Name Hash based on the target file name, and then only performing a string comparison on file records (e.g. DirectoryEntry sets) which have a matching Name Hash, the speed and efficiency of the operation to find the matching target file name is improved. Similarly, by creating a Name Hash when creating or updating a directory entry for a file, the speed and efficiency of later operations to find this file by name can be improved. In addition, because some computing device systems perform case-insensitive file operations, in some embodiments the hash function can be based on a partly case-insensitive manner. In some embodiments, the file system can embed the lower-case to upper-case translation table on the media. Embedding the lower-case to upper-case translation table can provide support for unicode character mappings which may spring into existence or change in the future, without affecting the resulting hash on existing media. Additional details of an exFAT embodiment can be found more fully described in Appendix A, which begins at page 34.



FIGS. 1A-1C are block diagrams illustrative of various operating environments 100 for the extensible file system format. With reference to FIG. 1A, in an illustrative embodiment, the extensible file system format is utilized to store data from a computing device, such as a mobile computing device 102, and a storage media, such as a portable storage media 104. In an illustrative embodiment, the mobile computing device 102 can correspond to any one of a variety of computing devices, including but not limited to, portable computing devices, mobile telephones, personal digital assistants, music players, media players. The portable storage media can also include, but is not limited to, hard drives, flash media, micro-drives and other storage media. In an illustrative embodiment, the extensible file system on the portable storage media 104 does not have to include any type of executable or readable software components, such as an operating environment, utilized by the mobile computing device 102. Alternatively, the extensible file system on the portable storage media 104 may include executable or readable software components used by the mobile device 102.


In an illustrative embodiment, the mobile computing device 102 may be in communication with other computing devices for collecting/exchanging data to be stored on the portable storage media 104. With reference to FIG. 1B, the mobile computing device 102 may be in direct communication with another computing device 106 and storage media 108. In an illustrative embodiment, the direct communication can correspond to various wired and wireless communication methods. In an illustrative embodiment, the other storage media 108 is not required to be formatted in accordance with the extensible file system format. With reference to FIG. 1C, in a similar manner, the mobile computing device 102 may also be in communication with another computing device 110 and storage media 112, via a network connection. In an illustrative embodiment, the network connection can correspond to local area network (LAN) and wide are network (WAN) connections.


With reference now to FIG. 2, an illustrative embodiment volume layout 200 for an extensible file system format will be described. The volume layout 200 includes a boot parameters component 202 that include various information related to a description of the file system parameters of the partition. In an illustrative embodiment, the boot parameters component 202 can include code for bootstrapping from a defined partition, fundamental file system parameters for the defined partition, and various error checking information. A data structure for defining at least a portion of the boot parameters will be described below with regard to FIG. 4.


The volume layout 200 also includes an extensible parameters component, designated as OEM parameters 204, that define various additional data structures used in conjunction with the file system. In an illustrative embodiment, an original equipment manufacture (OEM) may specify various extensible data structures, such as performance parameters for a storage medium, that can be defined at time of manufacture. The volume layout 200 can further include a file allocation table component 206 that defines file and directory allocations. In an illustrative embodiment, each entry in the file allocation table component 206 corresponds to a 32-bit entry that represents an allocated cluster, an unallocated cluster or an unusable cluster. The volume layout 200 can still further include series of file data components 208A-208X that correspond to the data stored according to the file system format. Various data structures for defining a portion of the file data components 208A-208X will be defined with regard to FIGS. 3-10.


Turning now to FIG. 3, in one aspect, the file data components 208 may include one or more directory entries according to a directory structure 300. In an illustrative embodiment, directory structure 300 is organized into primary directory entries 302 and secondary directory entries 304. Each directory entry in the primary and secondary entries is typed. For example, in an illustrative embodiment, type values for the primary and secondary directory entries can correspond to a range of 1-255. Primary directory entries 302 correspond to the entries in the root directory of the file system. Secondary directory entries 304 follow a primary directory entry and are associated with the primary directory entry. Secondary directory entries extend the metadata associated with the correlated primary directory entry.


With continued reference to FIG. 3, in an illustrative embodiment, the primary directory entries 302 can be further classified as critical primary directory entries 306 and benign primary directory entries 308. Critical primary directory entries 306 define potentially different formats for each directory entry. In an illustrative embodiment, an operating environment will not mount a volume corresponding to the extensible file system format with an unknown critical primary directory entry, as will be described below. Examples of known primary directory entries 306 can include allocation bitmaps, up-case tables, volume labels, encryption keys, and normal directory entries. Benign primary directory entries 308 also define potential different formats for each directory entry, but can be ignored by the file system if a particular benign primary directory entry is not understood. Benign primary directory entries 308 can be associated with another cluster chain the volume. Additionally, benign primary directory entries 308 can also be associated a number of secondary directory entries 304.


In a manner similar to primary directory entries 302, secondary directory entries 304 may also be further classified as critical secondary directory entries 310 and benign secondary directory entries 312. As described above, the critical secondary directory entries 310 and benign secondary directory entries 312 are associated with a benign primary directory entry and extend the metadata associated with the primary directory entry. Both the critical secondary directory entries 310 and the benign secondary directory entries 312 can be associated with another cluster chain the volume.


To mount a corresponding to the extensible file system format, the file system implements a mount volume procedure. In an illustrative embodiment, the mount volume procedure attempts to a look at a version number for the volume. If the version number is not understood (e.g., the version number is higher), the volume will not be mounted. During a normal directory enumeration, any critical primary directory entries not known by the file system will prevent the volume from being mounted. Thereafter, various user-initiated processes, such as a file open, will cause the file system to enumerate the secondary directory entries. If the critical secondary directory entries 310 are not known by a file system, the entire directory entry will be skipped. Additionally, if benign secondary directory entries 312 are not known by the file system, the particular unknown benign secondary directory entry will be ignored.


With reference now to FIG. 4, a block diagram illustrative of data components 400 for implementing a boot process block in the boot parameters component 202 (FIG. 2) will be described. The data components 400 include an OEM name component 402 for specifying a name for the file system format of the storage media. The data components 400 also include a data size descriptor component 404 for specifying various characteristics of the data stored in the file system. For example, the data size descriptor component 404 can specify a count of bytes per sector, a number of sectors per allocation unit, a FAT table offset, and a count of sectors for all data structures. The data components include an active FAT flags component 406 for specifying a number of active FATs on the file system. In an illustrative embodiment, a file system may support multiple FATs for utilization with some operating system environments. The data components 400 can further include a volume identification component 408 for identifying a volume serial number and/or version number. Still further, the data components 400 can include a file system type for specifying the file system format for the file system. One skilled in the relevant art will appreciate that the data components 400 can include a number of additional/alternative rows for implementing the above-identified components 402-410 and additional components.


Turning now to FIG. 5, a block diagram illustrative of data components 500 for implementing directory entries in an extensible file system format will be described. The data components 500 include an in use component 502 for specifying whether the particular directory entry is in use. In an illustrative embodiment, the high bit of the data components will be set to “1” if the directory entry is in use. The data components 500 further include a type designation component 504 for specifying that the directory entry is associated with a normal directory entry. The data components 500 further include a secondary directory entries component 504 for specifying a number of secondary entries associated with the normal directory entry. The data components 500 also include a file attributes component 508 for specifying various file system attributes for the directory entry. Still further, the data components 500 include a time component 510 for specifying various time information such as a creation timestamp, modification time stamp and other time information. Additionally, the data components 500 further include a time zone component 512 for specifying a time zone for the last created time stamp. One skilled in the relevant art will appreciate that the data components 500 can include a number of additional/alternative rows for implementing the above-identified components 502-512 and additional components.


Turning now to FIG. 6, a block diagram data components 600 for implementing a file name and extensions will be described. The data components 600 include an in use component 602 for specifying whether the particular directory entry is in use. In an illustrative embodiment, the high bit of the data components will be set to “1” if the directory entry is in use. The data components 600 further include a type designation component 604 for specifying that the directory entry is associated with a file system name. The data components further include a file name length component 606 and a file name has component 608. The utilization of the file name hash component 608 will be described below. The data components 600 also include a file name component 610 for specifying the file name. One skilled in the relevant art will appreciate that the data components 600 can include a number of additional/alternative rows for implementing the above-identified components 602-610 and additional components. Additionally, file name directory entries may be extended by secondary directory entries.


Turning now to FIG. 7, a block diagram illustrative of data components 700 for implementing a volume identifier in an extensible file system format is provided. The data components 700 include an in use component 702 for specifying whether the particular directory entry is in use. In an illustrative embodiment, the high bit of the data components will be set to “1” if the directory entry is in use. The data components 700 further include a type designation component 704 for specifying that the directory entry is associated with a volume identifier. The data components 700 further include a secondary directory entries component 706 for specifying a number of secondary entries associated with the volume identifier. The data components 700 also include a volume identifier 708, such as a global unique identifier. One skilled in the relevant art will appreciate that the data components 700 can include a number of additional/alternative rows for implementing the above-identified components 702-708 and additional components. Additionally, in an illustrative embodiment, the data components 700 correspond to a benign directory entry that can be ignored by a file system that does not support volume identifiers.


With reference now to FIGS. 8 and 9, in an illustrative embodiment, parties, such as an OEM, may be able to define specific benign primary directory entry types 308 and benign secondary directory entry types 312. As discussed above, in the event the file system would not recognize or understand either the specific benign primary directory entry types 308 or benign secondary directory entry types 312, the file system could ignore the defined directory entry types.


With reference to FIG. 8, a block diagram illustrative of data components 800 for implementing an extensible benign primary directory entry 308 in an extensible file system format will be described. The data components 800 include an in use component 802 for specifying whether the particular directory entry is in use. In an illustrative embodiment, the high bit of the data components will be set to “1” if the directory entry is in use. The data components 800 further include a type designation component 804 for specifying that the directory entry is a benign primary directory entry. The data components 800 further include a secondary directory entries component 806 for specifying a number of secondary entries associated with the volume identifier. The data components 800 also include a volume identifier 808, such as a global unique identifier. The data components 800 can further include additional information 810, such as verification information and a starting cluster. One skilled in the relevant art will appreciate that the data components 800 can include a number of additional/alternative rows for implementing the above-identified components 802-810 and additional components.


With reference to FIG. 9, a block diagram illustrative of data components 900 for implementing a benign secondary directory entry in an extensible file system format will be described. The data components 900 include an in use component 902 for specifying whether the particular directory entry is in use. In an illustrative embodiment, the high bit of the data components will be set to “1” if the directory entry is in use. The data components 900 further include a type designation component 904 for specifying that the directory entry is a benign primary directory entry. The data components 900 further include a secondary directory entries component 906 for specifying a number of secondary entries associated with the volume identifier. The data components 900 also include a volume identifier 908, such as a global unique identifier. The data components 900 can further include additional information 910, such as verification information and a starting cluster. One skilled in the relevant art will appreciate that the data components 900 can include a number of additional/alternative rows for implementing the above-identified components 902-906 and additional components.


In an illustrative embodiment, a benign primary directory entry and/or secondary directory entries may be associated with access control list (ACL) information. FIG. 10 is a block diagram illustrative of data components 1000 for implementing an access control list in an extensible file system format. The data components 1000 include an in use component 1002 for specifying whether the particular directory entry is in use. In an illustrative embodiment, the high bit of the data components will be set to “1” if the directory entry is in use. The data components 1000 further include a type designation component 1004 for specifying that the directory entry is an ACL directory entry. The data components 1000 further include a number of ACL fields 1006, such as ACL flags, pointers to ACL databases, and the like. One skilled in the relevant art will appreciate that the data components 1000 can include a number of additional/alternative rows for implementing the above-identified components 1002-1006 and additional components.


With reference now to FIG. 11, a file name creation routine 1100 for an extensible file system format will be described. At block 1102, a file system obtains a request to create a directory entry with a specific file name. In an illustrative embodiment, the specific file name can correspond to a naming convention, such as a digital camera picture naming convention. At block 1104, the file system generates a target name hash. In some embodiments, the specific file name is converted via a conversion table (e.g. an UpCase Table) into a second string prior to generating the target name hash. At block 1106, an iterative loop is begun by examining the next directory entry hash value. An illustrative directory entry type for storing directory entry hash values is described above with regard to data components 600 (FIG. 6).


At decision block 1108, a test is conducted to determine whether the target hash value matches the current directory entry hash value. This enables implementations to perform a quick comparison when searching for a file by name. Importantly, the NameHash provides a sure verification of a mismatch. However, the NameHash does not provide a sure verification of a match. If they do not match, the routine 1100 returns to block 1106 (until all the directory entries have been examined. If the hash values match at decision block 1108, at block 1110, the file system obtains the full file name for the potentially matching directory entry. In some embodiments, this comparison is done by comparing the converted versions of the two file names. For example, an embodiment may compare an Up-Cased version of the specific file name against an Up-Cased version of the full file name for the potentially matching directory entry. An illustrative directory entry type for storing directory entry full file names is described above with regard to data components 600 (FIG. 6). At decision block 1112, a test is conducted to determine whether the target file name matches the full file name of the potentially matching directory entry. If so, the routine 1100 terminates by reporting a conflict and the file system will be required to select a new file name. If the full file does not match, the routine 1100 will return to block 1106 to continue checking hash values for the remaining directory entries.


In some embodiments at block 1104, when generating the name hash, the target file name is first converted into a second string via a conversion table. For example, the second string can be an up-cased version of the target file name, and the conversion table can be an Up-Case table. In some embodiments, the conversion table is stored on the same one or more pieces of media that contain the directory entries. The calculation of the name hash can initialize a temporary value to a predetermined start value (e.g. zero). For each character of the second string, the temporary value can be rotated right by one bit, and then have the current character of the second string added to the temporary value.


An example of code implementing one embodiment of the name hash generation written in psuedo-code based on the “C” language:

















UInt16 NameHash(WCHAR * SecondString, UCHAR NumChar)



{



  UCHAR * Buffer = (UCHAR *)FileName;



  UInt16 Temp =0;



  for (UInt16 Index = 0; Index < NumChar * 2; Index++)



  {










    Temp =
((Temp&1) ? 0x8000 : 0) | (Temp>>1);



    Temp +=
(UInt16)Buffer[Index];



  }



  return Hash;



}










In some embodiments at block 1104, the generating the name hash, either the target file name or the second string may be determined to correspond to a naming convention, such as a digital camera picture naming convention, which uses the same prefix (e.g. “IMG”) for many file names. In some embodiments, the calculation of a hash value for a common prefix will always yield the same temporary value (i.e. partial hash) after the hash function includes the common prefix and before it includes the variable portion of the file name. In these embodiments, a common prefix (e.g. “IMG”, “IMG00”, “IMG01”, and the like) can have its corresponding partial hash value pre-computed. Thus, when computing the hash value for a second string with a common prefix, the temporary value may instead be initialized to the pre-computed partial hash value corresponding to the common prefix. The remaining hash generating steps (e.g. rotation and addition steps) would then be applied only to the variable portion of the file name, thus saving a few instruction cycles in the computation of the name hash of the target file name, while resulting in the same name hash.


An example of code implementing one embodiment of the name hash generation for a common prefix, written in psuedo-code based on the “C” language, is as follows:

















UInt16 NameHash(WCHAR * VariableString, UCHAR NumChar,



UInt16 PrecomputedHash)



{



  UCHAR * Buffer = (UCHAR *)VariableString;



  UInt16 Temp = PrecomputedHash;



  for (UInt16 Index = 0; Index < NumChar * 2; Index++)



  {










    Temp =
((Temp&1) ? 0x8000 : 0) | (Temp>>1);



    Temp +=
(UInt16)Buffer[Index];



  }



  return Hash;



}










As can be appreciated, in the above example pseudo-code, the PrecomputedHash for a name where a portion of the file name does not have a common prefix, the partial hash value may be a predetermined value (e.g. zero), thus allowing the same function to generate the hash for all file names. It will be appreciated that the same operations can be applied to directory entry names. As can be further appreciated, the conversion of the file name to the second string may occur as an integral part of the name hash generation, as opposed to occurring prior to the generation of the hash. For example, in psuedo-code based on the “C” language, the same result occurs with:














UInt16 NameHash(WCHAR * TargetFileName, UCHAR NumChar)


{


  UInt16 Temp =0;


  for (UInt16 Index = 0; Index < NumChar; Index++)


  {


    // convert the characters one at a time








    WCHAR x =
UpCase(*TargetFileName);







    TargetFileName++;


    // apply both bytes to the hash








    BYTE *z =
(BYTE*)&x;


    Temp =
((Temp&1) ? 0x8000 : 0) | (Temp>>1);


    Temp +=
(UInt16)(*z);


    z++;


    Temp =
((Temp&1) ? 0x8000 : 0) | (Temp>>1);


    Temp +=
(UInt16)(*z);


  }


  return Hash;


}









Similarly, in some embodiments, if a device only creates files with a limited set of file names (i.e. 10,000 files with names “DSCN0000.JPG”, “DSCN0001.JPG”, . . . “DSCN9999JPG”), some or all of these file names may have their hash fully precomputed and stored in a device's memory. Then, when determining if a file exists or creating a new file record, the corresponding precomputed final hash may be simply read from the device's memory.



FIG. 12 illustrates an example of a suitable computing system environment 9900 on which embodiments of the invention may be implemented. The computing system environment 9900 is only one example of a suitable computing environment and is not intended to suggest any limitation as to the scope of use or functionality of embodiments of the invention. Neither should the computing environment 9900 be interpreted as having any dependency or requirement relating to any one or combination of components illustrated in the example operating environment 9900.


Embodiments of the invention are operational with numerous other general purpose or special purpose computing system environments or configurations. Examples of well known computing systems, environments, and/or configurations that may be suitable for use with embodiments of the invention include, but are not limited to, personal computers, server computers, hand-held or laptop devices (such as mobile phones, media players, etc.), multiprocessor systems, microprocessor-based systems, set top boxes, consumer electronics (such as televisions, optical disk players, digital picture frames, etc.), media kiosks, network PCs, minicomputers, mainframe computers, telephony systems, distributed computing environments that include any of the above systems or devices, and the like.


Embodiments of the invention may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. In some embodiments of the invention, at least a portion of processes described above may be implemented by computer-executable instructions executable by one or more computing systems. Embodiments of the invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.


With reference to FIG. 12, an example system for implementing embodiments of the invention includes a general-purpose computing device in the form of a computer 9910. Components of computer 9910 may include, but are not limited to, a processing unit 9920, a system memory 9930, and a system bus 9921 that couples various system components including the system memory to the processing unit 9920. The system bus 9921 may be any of several types of bus structures including a memory bus or memory controller, a peripheral bus, and a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA (EISA) bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus also known as Mezzanine bus.


Computer 9910 typically includes a variety of computer readable media. Computer readable media can be any available media that can be accessed by computer 9910 and includes both volatile and nonvolatile media, removable and non-removable media. By way of example, and not limitation, computer readable media may comprise computer storage media and communication media. Computer readable storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules, or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by computer 9910. Communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. The term “modulated data signal” means a signal that has one or more of its characteristics set or changed in such a manner as to encode information in the signal. By way of example, and not limitation, communication media includes wired media such as a wired network or direct-wired connection, and wireless media such as acoustic, RF, infrared and other wireless media. Combinations of any of the above should also be included within the scope of computer readable media.


The system memory 9930 includes computer storage media in the form of volatile and/or nonvolatile memory such as read only memory (ROM) 9931 and random access memory (RAM) 9932. A basic input/output system 9933 (BIOS), containing the basic routines that help to transfer information between elements within computer 9910, such as during start-up, is typically stored in ROM 9931. RAM 9932 typically contains data and/or program modules that are immediately accessible to and/or presently being operated on by processing unit 9920. By way of example, and not limitation, FIG. 12 illustrates operating system 9934, application programs 9935, other program modules 9936, and program data 9937.


The computer 9910 may also include other removable/non-removable volatile/nonvolatile computer storage media. By way of example only, FIG. 12 illustrates a hard disk drive 9941 that reads from or writes to non-removable, nonvolatile magnetic media, a magnetic disk drive 9951 that reads from or writes to a removable, nonvolatile magnetic disk 9952, and an optical disk drive 9955 that reads from or writes to a removable, nonvolatile optical disk 9956 such as a CD ROM or other optical media. Other removable/non-removable, volatile/nonvolatile computer storage media that can be used in the example operating environment include, but are not limited to, magnetic tape cassettes, flash memory cards, digital versatile disks, digital video tape, solid state RAM, solid state ROM, and the like. The hard disk drive 9941 is typically connected to the system bus 9921 through a non-removable memory interface such as interface 9940, and magnetic disk drive 9951 and optical disk drive 9955 are typically connected to the system bus 9921 by a removable memory interface, such as interface 9950.


The drives and their associated computer storage media discussed above and illustrated in FIG. 12, provide storage of computer readable instructions, data structures, program modules and other data for the computer 9910. In FIG. 12, for example, hard disk drive 9941 is illustrated as storing operating system 9944, application programs 9945, other program modules 9946, and program data 9947. Note that these components can either be the same as or different from operating system 9934, application programs 9935, other program modules 9936, and program data 9937. Operating system 9944, application programs 9945, other program modules 9946, and program data 9947 are given different numbers here to illustrate that, at a minimum, they are different copies.


A user may enter commands and information into the computer 9910 through input devices such as a keyboard 9962, a microphone 9963, and a pointing device 9961, such as a mouse, trackball or touch pad. Other input devices (not shown) may include a joystick, game pad, satellite dish, scanner, or the like. These and other input devices are often connected to the processing unit 9920 through a user input interface 9960 that is coupled to the system bus, but may be connected by other interface and bus structures, such as a parallel port, game port or a universal serial bus (USB). A monitor 9991 or other type of display device is also connected to the system bus 9921 via an interface, such as a video interface 9990. In addition to the monitor, computers may also include other peripheral output devices such as speakers 9997 and printer 9996, which may be connected through an output peripheral interface 9990.


The computer 9910 may operate in a networked environment using logical connections to one or more remote computers, such as a remote computer 9980. The remote computer 9980 may be a personal computer, a hand-held device, a server, a router, a network PC, a peer device or other common network node, and typically includes many or all of the elements described above relative to the computer 9910. The logical connections depicted in FIG. 12 include a local area network (LAN) 9971 and a wide area network (WAN) 9973, but may also include other networks. Such networking environments are commonplace in offices, enterprise-wide computer networks, intranets and the Internet.


When used in a LAN networking environment, the computer 9910 is connected to the LAN 9971 through a network interface or adapter 9970. When used in a WAN networking environment, the computer 9910 typically includes a modem 9972 or other means for establishing communications over the WAN 9973, such as the Internet. The modem 9972, which may be internal or external, may be connected to the system bus 9921 via the user input interface 9960, or other appropriate mechanism. In a networked environment, program modules depicted relative to the computer 9910, or portions thereof, may be stored in the remote memory storage device. By way of example, and not limitation, FIG. 12 illustrates remote application programs 9985 as residing on remote computer 9980. It will be appreciated that the network connections shown are example and other means of establishing a communications link between the computers may be used. In an example embodiment, various additional functionality may be added through the specification of specific directory types. For example, name streams may be supported by specifying a name stream directory entry. Additionally, on-disk encryption may also be supported through the utilization of specific encryption algorithms and key exchanges. Still further, time zone conversions may be associated with directory entries to automatically convert a current time zone with a time zone with the directory entry was made.


In an example embodiment, the file structures used in the file system described herein can be those described more fully in Appendix A.


While illustrative embodiments have been illustrated and described, it will be appreciated that various changes can be made therein without departing from the spirit and scope of that which is disclosed herein.

Claims
  • 1. One or more computer readable storage media having computer executable instructions that, when executed on at least one processor, configure the at least one processor to perform a method of updating a file record on at least one of a first one or more computer readable storage media, the method comprising: writing at least three contiguous DirectoryEntry data structures corresponding to a directory entry set, the directory entry set corresponding to a file, the writing occurring to the at least one of a first one or more computer readable storage media,a first of the at least three DirectoryEntry data structures is a File DirectoryEntry data structure;a second of the at least three DirectoryEntry data structures is a Stream Extension DirectoryEntry data structure, the Stream Extension DirectoryEntry data structure contiguous to and immediately following the File DirectoryEntry data structure; andthe third of the at least three DirectoryEntry data structures is a first File Name Extension DirectoryEntry data structure, the File Name Extension DirectoryEntry data structure contiguous to and immediately following the Stream Extension DirectoryEntry data structure.
  • 2. The one or more computer readable storage media of claim 1, further comprising: an EntryType field, the EntryType comprising: an InUse field at bit offset seven and one bit in length;a TypeCategory field at bit offset six and one bit in length;a TypeImportance field at bit offset five and one bit in length; anda TypeCode field at bit offset zero and one bit in length;the File DirectoryEnty data structure comprising: a first EntryType field at byte offset zero, one byte in length, set to the value 85h, indicating the TypeCode field is set to the value five, the TypeImportance field is set to the value zero, the TypeCategory field is set to the value zero, and the InUse field is set to the value one;a SecondaryCount field at byte offset one, one byte in length, having a value in the range one to 255 inclusive, the value corresponding to the number of the at least three DirectoryEntry data structures minus one; anda SetChecksum field at byte offset two, two bytes in length, and corresponding to a checksum of the at least three DirectoryEntry data structures excluding the SetChecksum field;the Stream Extension DirectoryEntry data structure comprising: a second EntryType field at byte offset zero, one byte in length, and set to the value COh, indicating the TypeCode field is set to the value zero, the TypeImportance field is set to the value zero, the TypeCategory field is set to the value one, and the InUse field is set to the value one;a NameLength field at byte offset three and one byte in length; anda NameHash field at byte offset four and two bytes in length;the first File Name Extension DirectoryEntry data structure comprising: a third EntryType field at byte offset zero, one byte in length, and set to the value Cl h, indicating the TypeCode field is set to the value one, the TypeImportance field is set to the value zero, the TypeCategory field is set to the value one, and the InUse field is set to the value one; anda FileName field at byte offset two and 30 bytes in length;the NameLength field in the Stream Extension DirectoryEntry indicating the number of characters of a Unicode string in the FileName fields of a one or more contiguous File Name Extension DirectoryEntry data structures, not including any trailing NULL, the first of the one or more contiguous File Name Extension DirectoryEntry data structures being the first NameExtension DirectoryEntry; andthe value in the NameHash field corresponding to a hash calculated based on the Unicode string in the NameLength field.
  • 3. The one or more computer readable storage media of claim 1, the File DirectoryEntry data structure further comprising: a SetChecksum field at byte offset two, two bytes in length, and corresponding to a checksum of the at least three DirectoryEntry data structures excluding the SetChecksum field.
  • 4. The one or more computer readable storage media of claim 1, further comprising: reading the at least three contiguous DirectoryEntry data structures, the File DirectoryEntry data structure further comprising a SetChecksum field, the SetChecksum field at byte offset two and two bytes in length within the File DirectoryEntry data structure;calculating a checksum corresponding to all bytes of the at least three contiguous DirectoryEntry data structures, except for the two bytes of the SetChecksum field;updating the SetChecksum field in the File DirectoryEntry data structure after writing at least the File DirectoryEntry data structure.
  • 5. In a computing device, a method of updating a file record on at least one of a first one or more computer readable storage media, the method comprising: writing at least three contiguous DirectoryEntry data structures corresponding to a directory entry set, the directory entry set corresponding to a file, the writing occurring to the at least one of a first one or more computer readable storage media,a first of the at least three DirectoryEntry data structures is a File DirectoryEntry data structure;a second of the at least three DirectoryEntry data structures is a Stream Extension DirectoryEntry data structure, the Stream Extension DirectoryEntry data structure contiguous to and immediately following the File DirectoryEntry data structure; andthe third of the at least three DirectoryEntry data structures is a first File Name Extension DirectoryEntry data structure, the File Name Extension DirectoryEntry data structure contiguous to and immediately following the Stream Extension DirectoryEntry data structure.
  • 6. The method of claim 5, further comprising: an EntryType field, the EntryType field comprising: an InUse field at bit offset seven and one bit in length;a TypeCategory field at bit offset six and one bit in length;a TypeImportance field at bit offset five and one bit in length; anda TypeCode field at bit offset zero and one bit in length;the File DirectoryEnty data structure comprising: a first EntryType field at byte offset zero, one byte in length, set to the value 85h, indicating the TypeCode field is set to the value five, the TypeImportance field is set to the value zero, the TypeCategory field is set to the value zero, and the InUse field is set to the value one;a SecondaryCount field at byte offset one, one byte in length, having a value in the range one to 255 inclusive, the value corresponding to the number of the at least three DirectoryEntry data structures minus one; anda SetChecksum field at byte offset two, two bytes in length, and corresponding to a checksum of the at least three DirectoryEntry data structures excluding the SetChecksum field;the Stream Extension DirectoryEntry data structure comprising: a second EntryType field at byte offset zero, one byte in length, and set to the value COh, indicating the TypeCode field is set to the value zero, the TypeImportance field is set to the value zero, the TypeCategory field is set to the value one, and the InUse field is set to the value one;a NameLength field at byte offset three and one byte in length; anda NameHash field at byte offset four and two bytes in length;the first File Name Extension DirectoryEntry data structure comprising: a third EntryType field at byte offset zero, one byte in length, and set to the value Cl h, indicating the TypeCode field is set to the value one, the TypeImportance field is set to the value zero, the TypeCategory field is set to the value one, and the InUse field is set to the value one; anda FileName field at byte offset two and 30 bytes in length;the NameLength field in the Stream Extension DirectoryEntry indicating the number of characters of a Unicode string in the FileName fields of a one or more contiguous File Name Extension DirectoryEntry data structures, not including any trailing NULL, the first of the one or more contiguous File Name Extension DirectoryEntry data structures being the first NameExtension DirectoryEntry; andthe value in the NameHash field corresponding to a hash calculated based on the Unicode string in the NameLength field.
  • 7. The method of claim 5, the File DirectoryEntry data structure further comprising: a SetChecksum field at byte offset two, two bytes in length, and corresponding to a checksum of the at least three DirectoryEntry data structures excluding the SetChecksum field.
  • 8. The method of claim 5, further comprising: reading the at least three contiguous DirectoryEntry data structures, the File DirectoryEntry data structure further comprising a SetChecksum field, the SetChecksum field at byte offset two and two bytes in length within the File DirectoryEntry data structure;calculating a checksum corresponding to all bytes of the at least three contiguous DirectoryEntry data structures, except for the two bytes of the SetChecksum field;updating the SetChecksum field in the File DirectoryEntry data structure after writing at least the File DirectoryEntry data structure.
  • 9. A computing device having a memory that stores computer executable instructions and a processor for executing the instructions, the instructions, when executed by the processor, causing the device to perform operations for updating a file record on at least one of a first one or more computer readable storage media, the operations comprising: writing at least three contiguous DirectoryEntry data structures corresponding to a directory entry set, the directory entry set corresponding to a file, the writing occurring to the at least one of a first one or more computer readable storage media,a first of the at least three DirectoryEntry data structures is a File DirectoryEntry data structure;a second of the at least three DirectoryEntry data structures is a Stream Extension DirectoryEntry data structure, the Stream Extension DirectoryEntry data structure contiguous to and immediately following the File DirectoryEntry data structure; andthe third of the at least three DirectoryEntry data structures is a first File Name Extension DirectoryEntry data structure, the File Name Extension DirectoryEntry data structure contiguous to and immediately following the Stream Extension DirectoryEntry data structure.
  • 10. The device of claim 9, further comprising: an EntryType field, the EntryType field comprising: an InUse field at bit offset seven and one bit in length;a TypeCategory field at bit offset six and one bit in length;a TypeImportance field at bit offset five and one bit in length; anda TypeCode field at bit offset zero and one bit in length;the File DirectoryEnty data structure comprising: a first EntryType field at byte offset zero, one byte in length, set to the value 85h, indicating the TypeCode field is set to the value five, the TypeImportance field is set to the value zero, the TypeCategory field is set to the value zero, and the InUse field is set to the value one;a SecondaryCount field at byte offset one, one byte in length, having a value in the range one to 255 inclusive, the value corresponding to the number of the at least three DirectoryEntry data structures minus one; anda SetChecksum field at byte offset two, two bytes in length, and corresponding to a checksum of the at least three DirectoryEntry data structures excluding the SetChecksum field;the Stream Extension DirectoryEntry data structure comprising: a second EntryType field at byte offset zero, one byte in length, and set to the value COh, indicating the TypeCode field is set to the value zero, the TypeImportance field is set to the value zero, the TypeCategory field is set to the value one, and the InUse field is set to the value one;a NameLength field at byte offset three and one byte in length; anda NameHash field at byte offset four and two bytes in length;the first File Name Extension DirectoryEntry data structure comprising: a third EntryType field at byte offset zero, one byte in length, and set to the value Cl h, indicating the TypeCode field is set to the value one, the TypeImportance field is set to the value zero, the TypeCategory field is set to the value one, and the InUse field is set to the value one; anda FileName field at byte offset two and 30 bytes in length;the NameLength field in the Stream Extension DirectoryEntry indicating the number of characters of a Unicode string in the FileName fields of a one or more contiguous File Name Extension DirectoryEntry data structures, not including any trailing NULL, the first of the one or more contiguous File Name Extension DirectoryEntry data structures being the first NameExtension DirectoryEntry; andthe value in the NameHash field corresponding to a hash calculated based on the Unicode string in the NameLength field.
  • 11. The device of claim 9, the File DirectoryEntry data structure further comprising: a SetChecksum field at byte offset two, two bytes in length, and corresponding to a checksum of the at least three DirectoryEntry data structures excluding the SetChecksum field.
  • 12. The device of claim 9, further comprising: reading the at least three contiguous DirectoryEntry data structures, the File DirectoryEntry data structure further comprising a SetChecksum field, the SetChecksum field at byte offset two and two bytes in length within the File DirectoryEntry data structure;calculating a checksum corresponding to all bytes of the at least three contiguous DirectoryEntry data structures, except for the two bytes of the SetChecksum field;updating the SetChecksum field in the File DirectoryEntry data structure after writing at least the File DirectoryEntry data structure.
CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a divisional of U.S. application Ser. No. 12/389,396, entitled QUICK FILENAME LOOKUP USING NAME HASH, filed on Feb. 20, 2009, which claims the benefit of U.S. Provisional Application No. 61/030,043, entitled FILE ALLOCATION TABLE, filed on Feb. 20, 2008; U.S. application Ser. No. 12/389,396 is a continuation-in-part of U.S. Non-Provisional application Ser. No. 11/229,485, entitled EXTENSIBLE FILE SYSTEM, filed on Sep. 16, 2005, which claims the benefit of U.S. Provisional Application No. 60/637,407, entitled FILE SYSTEM FORMAT FOR PORTABLE MEDIA, and filed on Dec. 17, 2004; The contents of U.S. application Ser. No. 12/389,396, U.S. application Ser. No. 11/229,485, U.S. Provisional Application No. 60/637,407, and U.S. Provisional Application No. 61/030,043 are incorporated by reference herein in their entirety.

Provisional Applications (2)
Number Date Country
61030043 Feb 2008 US
60637407 Dec 2004 US
Divisions (1)
Number Date Country
Parent 12389396 Feb 2009 US
Child 13685018 US
Continuation in Parts (1)
Number Date Country
Parent 11229485 Sep 2005 US
Child 12389396 US