1. Technical Field
This invention is generally directed to a filesystem for use in a computer, embedded controller, processing system, or the like. More particularly, this invention is directed to a filesystem having a filename cache.
2. Related Art
Computers, embedded controllers, and other microprocessor based systems are typically constructed from a variety of different hardware components. The hardware components may include a processor, I/O devices, human interface devices, and the like. Additionally, such systems use memory storage units to maintain the data used in the system. The memory storage units may take on a variety of different forms including, but not limited to, hard disk drives, floppy disk drives, random access memory, flash memory, and the like.
High-level application programs that are executed in such systems must often interact seamlessly with these hardware components, including the memory storage units. To this end, many systems run an operating system that acts as an interface between the application programs and the system hardware. Filesystem software may be included as part of the operating system or it may be provided as an ancillary software component that interacts with the operating system. In either instance, the filesystem software organizes the data within the memory storage units for ready access by the processor and the high-level application programs that the processor executes.
The filesystem software may employ a file/directory layer that organizes the contents of files and directories into equal-sized logical blocks of contiguous data. Each logical block has an association with one or more corresponding physical blocks on the storage device where the data is actually retained. The file/directory layer executes updates to the filesystem by identifying every block that needs to be updated in response to a request and rewriting the entire contents of each such block. The file/directory layer reads the contents of files and directories by reading the entire contents of every block that holds a portion of the region of data to be read.
The filesystem also may include a storage layer that maps the virtual addresses of filesystem contents to physical blocks of data on the data storage device. The storage layer may execute logical block read requests from the file/directory layer by determining the correct physical block(s) associated with the request and reading its contents from the data storage device. Similarly, the storage layer may execute right requests by either updating contents of an existing physical block(s), or by allocating an unused physical block from the data storage device to the logical block and then updating the contents of the physical block.
The filesystem also may be responsible for locating a file in data storage using, for example, a filename associated with the file. Systems such as UNIX employ a filename cache in which a fixed number of bytes are allocated to each filename for this purpose. This system may be wasteful of memory space when the filenames are short and may result in ambiguous hits for long filenames that have been truncated to fit into the fixed byte allocation. Accordingly, there is a need for an improved filename caching system.
A system that comprises a processor, a data storage device that is accessible by the processor, and filesystem software that is executable by the processor to organize files on the data storage device are provided. The filesystem software may be executable to maintain a filename cache having variable size filename entries. The filename entries may include a filename header section and a name section storing an entire filename of a corresponding file. In one example, the filename cash is implemented in a ring-type buffer or the like.
The filename header section may include a variety of information. For example, the filename header section may include information corresponding to a length of the filename in the name section, information uniquely identifying the file associated with the filename in the name section, information for indexing into a filename hash table, information indicative of whether the filename entry corresponds to a first entry in the filename hash table for a particular namesum, and/or information indicative of whether the filename in the respective name section is not locatable on the system. Still further, the filename header section may include an index to the next name in the filename cache buffer having the same namesum value to thereby facilitate searches through the filename cache.
Other systems, methods, features and advantages of the invention will be, or will become, apparent to one with skill in the art upon examination of the following figures and detailed description. It is intended that all such additional systems, methods, features and advantages be included within this description, be within the scope of the invention, and be protected by the following claims.
The invention can be better understood with reference to the following drawings and description. The components in the figures are not necessarily to scale, emphasis instead being placed upon illustrating the principles of the invention. Moreover, in the figures, like referenced numerals designate corresponding parts throughout the different views.
Data storage 115 may include operating system code 135 that controls the interaction between high-level application programs executed by the processor 105 and the various hardware components, including memory 110 and 120, the data storage 115, and the interface devices 125 and 130. The operating system code 135 may include filesystem software for organizing files stored on the data storage 115. Alternatively, the filesystem software may be provided as a separate software component that merely interacts with the operating system code 135. In the latter case, the code corresponding to the filesystem software may be stored in read only memory 110, data storage 115 or the like. When processing system 100 is networked with other computers and/or storage devices through I/O interface 125, the filesystem software may be stored remotely and downloaded to the processing system 100 as needed.
The data storage 115 may take on any number of different forms. For example, the data storage 115 may take the form of a hard disk drive, floppy disk drive, etc. It also may be in the form of a non-rotating media device, such as non-volatile memory implemented in an integrated circuit format (e.g., flash memory, and the like). Still further, data storage 115 need not be limited to a single memory structure. Rather, the data storage 115 may include a number of separate storage devices of the same type (e.g., all flash memory) and/or separate storage devices of different types (e.g., one or more flash memory units and one or more hard disk drives).
The files stored in the data storage 115 include data that is interpreted in accordance with a predetermined format used by an application program or by the operating system code 135. For example, the data stored within a file may constitute the software code of an executable program, the ASCII text of a database record, audio media files, video media files, or the like.
Storage 115 also includes a metadata file 145 that stores metadata information for the files organized in the file data area 150. In other system designs, metadata file 145 may be stored in RAM 120. Access to the metadata information for a file through use of a filename is streamlined using a hash table 155 and filename cache 160. In the exemplary system shown in
One manner of searching through the filename entries 205 is represented in
The filename header section and name section for the filename entry generated at block 510 are stored as a filename entry at the put pointer location in the operation shown at block 515. This operation may overwrite one or more existing filename entries of the filename cache 160 thereby leaving unused space between the end of the new filename entry and the beginning of the next complete filename entry in the filename cache 160. To reduce problems that might otherwise be associated with this unused space, the unused space may be allocated to a dummy file name entry. To this end, the filesystem software checks at block 520 to determine whether a dummy entry is needed. If needed, the dummy entry is generated and stored after the current filename entry in the operation at block 525. If no dummy entry is needed, the put pointer 275 is updated to point to the end of the newly added filename entry in the operation at block 530. Alternatively, if a dummy entry is used at block 525, the put pointer 275 is updated to point to the end of the newly generated dummy entry. In the operation at block 535, the hash table 155 is updated to reflect changes to the filename cache buffer.
In a “filename not on system” update, the filesystem software 140 is directed to store a filename entry for a corresponding filename in the filename cache 160 and indicate that it is not on the system. To this end, the filename provided at block 505 is used to generate a filename header and name section for the absent filename in the operation shown at block 540. The missing field 330 of the generated filename header will be set to indicate that the filename is not on the system. This allows the filesystem software 140 to forgo searching the filesystem for a filename that has already been searched and not found on the system. Once the operation at block 540 is complete, the filesystem software 140 may proceed to execute the operations shown in blocks 515 through 535.
In a “filename deleted” update, the filesystem software 140 is directed to remove a filename entry for a corresponding filename from the filename cache 160. As shown, this is accomplished at block 545. In the operations at block 545, one or more bits in the filename header section of the filename entry that is to be removed are changed to indicate removal of the filename. For example, the unique file identifier field 310 may be filled with zeros or another value that is not associated with an actual file and known to be indicative of a removed file. Once the corresponding filename header section has been changed, the hash table is updated in the operations at block 535 to reflect changes to the filename cache 160.
While various embodiments of the invention have been described, it will be apparent to those of ordinary skill in the art that many more embodiments and implementations are possible within the scope of the invention. Accordingly, the invention is not to be restricted except in light of the attached claims and their equivalents.
This application is a continuation application of, and claims priority under 35 U.S.C. §120 to, U.S. patent application Ser. No. 11/717,583, “FILESYSTEM HAVING A FILENAME CACHE,” filed Mar. 13, 2007, the entire contents of which are incorporated by reference, which claims priority to both U.S. Provisional Application No. 60/841,804, filed Sep. 1, 2006, and U.S. Provisional Application No. 60/840,246, filed Aug. 25, 2006, the entire contents of which are incorporated by reference.
Number | Name | Date | Kind |
---|---|---|---|
4882703 | Nicolai | Nov 1989 | A |
4926317 | Wallach et al. | May 1990 | A |
4945475 | Bruffey et al. | Jul 1990 | A |
5187786 | Densmore et al. | Feb 1993 | A |
5201044 | Frey, Jr. et al. | Apr 1993 | A |
5222217 | Blount et al. | Jun 1993 | A |
5369757 | Spiro et al. | Nov 1994 | A |
5375233 | Kimber et al. | Dec 1994 | A |
5454103 | Coverston et al. | Sep 1995 | A |
5455944 | Haderle et al. | Oct 1995 | A |
5530849 | Hanushevsky et al. | Jun 1996 | A |
5726989 | Dokic | Mar 1998 | A |
5765172 | Fox | Jun 1998 | A |
5774715 | Madany et al. | Jun 1998 | A |
5806085 | Berliner | Sep 1998 | A |
5897661 | Baranovsky et al. | Apr 1999 | A |
5923900 | Soell et al. | Jul 1999 | A |
5960436 | Chang et al. | Sep 1999 | A |
5983293 | Murakami | Nov 1999 | A |
5995980 | Olson et al. | Nov 1999 | A |
6058400 | Slaughter | May 2000 | A |
6173291 | Jenevein | Jan 2001 | B1 |
6175900 | Forin et al. | Jan 2001 | B1 |
6185663 | Burke | Feb 2001 | B1 |
6286013 | Reynolds et al. | Sep 2001 | B1 |
6292808 | Obermarck et al. | Sep 2001 | B1 |
6324637 | Hamilton | Nov 2001 | B1 |
6356863 | Sayle | Mar 2002 | B1 |
6377992 | Plaza Fernández et al. | Apr 2002 | B1 |
6389427 | Faulkner | May 2002 | B1 |
6389513 | Closson | May 2002 | B1 |
6396421 | Bland | May 2002 | B1 |
6412042 | Paterson et al. | Jun 2002 | B1 |
6438661 | Beardsley et al. | Aug 2002 | B1 |
6467021 | Sinclair | Oct 2002 | B1 |
6496944 | Hsiao et al. | Dec 2002 | B1 |
6509850 | Bland | Jan 2003 | B1 |
6571259 | Zheng et al. | May 2003 | B1 |
6584582 | O'Connor | Jun 2003 | B1 |
6591376 | VanRooven et al. | Jul 2003 | B1 |
6606628 | Monsen et al. | Aug 2003 | B1 |
6661357 | Bland | Dec 2003 | B2 |
6675177 | Webb | Jan 2004 | B1 |
6732124 | Koseki et al. | May 2004 | B1 |
6748491 | Rodriguez | Jun 2004 | B2 |
6754696 | Kamath et al. | Jun 2004 | B1 |
6845401 | Papadopoulos et al. | Jan 2005 | B1 |
6856993 | Verma et al. | Feb 2005 | B1 |
6922708 | Sedlar | Jul 2005 | B1 |
7003619 | Moore et al. | Feb 2006 | B1 |
7047257 | Fletcher et al. | May 2006 | B2 |
7076599 | Aasheim et al. | Jul 2006 | B2 |
7096248 | Masters et al. | Aug 2006 | B2 |
7139752 | Broder et al. | Nov 2006 | B2 |
7181463 | Moore et al. | Feb 2007 | B2 |
7191170 | Ganguly et al. | Mar 2007 | B2 |
7191185 | Dweck et al. | Mar 2007 | B2 |
7349927 | Kanai et al. | Mar 2008 | B2 |
7359934 | Ricart et al. | Apr 2008 | B1 |
7383286 | Hamanaka et al. | Jun 2008 | B2 |
7529784 | Kavuri et al. | May 2009 | B2 |
7555483 | Maeda et al. | Jun 2009 | B2 |
7565452 | Freiburg et al. | Jul 2009 | B2 |
7870138 | Van Voorhis | Jan 2011 | B2 |
20010044798 | Nagral et al. | Nov 2001 | A1 |
20020048223 | Ota et al. | Apr 2002 | A1 |
20020120634 | Min et al. | Aug 2002 | A1 |
20020143862 | Peterson | Oct 2002 | A1 |
20020156840 | Ulrich et al. | Oct 2002 | A1 |
20020156937 | Wong et al. | Oct 2002 | A1 |
20020156938 | Wong et al. | Oct 2002 | A1 |
20020156975 | Staub et al. | Oct 2002 | A1 |
20020165942 | Ulrich et al. | Nov 2002 | A1 |
20020174295 | Ulrich et al. | Nov 2002 | A1 |
20030061316 | Blair et al. | Mar 2003 | A1 |
20030065682 | Nakajima | Apr 2003 | A1 |
20030070001 | Belknap et al. | Apr 2003 | A1 |
20030110237 | Kitamura et al. | Jun 2003 | A1 |
20030115227 | Guthery | Jun 2003 | A1 |
20030140210 | Testardi | Jul 2003 | A1 |
20030163594 | Aasheim et al. | Aug 2003 | A1 |
20030225585 | Miller et al. | Dec 2003 | A1 |
20040064500 | Kolar et al. | Apr 2004 | A1 |
20040114589 | Alfieri et al. | Jun 2004 | A1 |
20040215600 | Aridor et al. | Oct 2004 | A1 |
20040236793 | Kanai et al. | Nov 2004 | A1 |
20050050073 | Demiroski et al. | Mar 2005 | A1 |
20050091229 | Bali et al. | Apr 2005 | A1 |
20050091287 | Sedlar | Apr 2005 | A1 |
20050117885 | Lee et al. | Jun 2005 | A1 |
20050135341 | Kim | Jun 2005 | A1 |
20050144526 | Banko | Jun 2005 | A1 |
20050147130 | Hurwitz et al. | Jul 2005 | A1 |
20050149525 | Verma et al. | Jul 2005 | A1 |
20050210507 | Hawkins et al. | Sep 2005 | A1 |
20050240588 | Siegel et al. | Oct 2005 | A1 |
20050246362 | Borland | Nov 2005 | A1 |
20050251540 | Sim-Tang | Nov 2005 | A1 |
20050256845 | Jen et al. | Nov 2005 | A1 |
20050273486 | Keith Jr. | Dec 2005 | A1 |
20060015431 | Bugaj et al. | Jan 2006 | A1 |
20060021057 | Risan et al. | Jan 2006 | A1 |
20060074851 | Nagai et al. | Apr 2006 | A1 |
20060117056 | Havewala et al. | Jun 2006 | A1 |
20060136529 | Pudipeddi et al. | Jun 2006 | A1 |
20060188215 | Matsutani | Aug 2006 | A1 |
20060190469 | Kathuria et al. | Aug 2006 | A1 |
20060195480 | Spiegelman et al. | Aug 2006 | A1 |
20060206538 | Veazey | Sep 2006 | A1 |
20060218195 | LaChapelle et al. | Sep 2006 | A1 |
20060224620 | Silverman et al. | Oct 2006 | A1 |
20060242179 | Chen et al. | Oct 2006 | A1 |
20060253502 | Raman et al. | Nov 2006 | A1 |
20060277183 | Nichols et al. | Dec 2006 | A1 |
20070005560 | Dodge | Jan 2007 | A1 |
20070005614 | Dodge | Jan 2007 | A1 |
20070005615 | Dodge | Jan 2007 | A1 |
20070005627 | Dodge | Jan 2007 | A1 |
20070005874 | Dodge | Jan 2007 | A1 |
20070005894 | Dodge | Jan 2007 | A1 |
20070073937 | Feinberg et al. | Mar 2007 | A1 |
20070103984 | Kavuri et al. | May 2007 | A1 |
20070113120 | Dodge | May 2007 | A1 |
20070185879 | Roublev et al. | Aug 2007 | A1 |
20070198746 | Myllyla et al. | Aug 2007 | A1 |
20080033777 | Shukoor | Feb 2008 | A1 |
20080046667 | Fachan et al. | Feb 2008 | A1 |
20080052323 | Dodge et al. | Feb 2008 | A1 |
20080052329 | Dodge et al. | Feb 2008 | A1 |
20080059510 | Cardamore et al. | Mar 2008 | A1 |
20080126936 | Williams | May 2008 | A1 |
20080147747 | Cardamore | Jun 2008 | A1 |
20080228843 | Dodge et al. | Sep 2008 | A1 |
20090037651 | Gorobets | Feb 2009 | A1 |
20090265793 | Risan et al. | Oct 2009 | A1 |
Number | Date | Country |
---|---|---|
1289966 | Apr 2001 | CN |
1567256 | Jan 2005 | CN |
1705935 | Dec 2005 | CN |
0 410 210 | Jan 1991 | EP |
0 454 340 | Oct 1991 | EP |
0 588 488 | Mar 1994 | EP |
1 089 176 | Apr 2001 | EP |
1 522 927 | Apr 2005 | EP |
2006-235717 | Aug 1987 | JP |
06 139 124 | May 1994 | JP |
62 186 361 | Mar 1995 | JP |
07-078498 | Jun 2001 | JP |
2001-175624 | Jun 2001 | JP |
2001-175681 | Nov 2002 | JP |
2002-334006 | Jun 2003 | JP |
2003-173279 | Jul 2003 | JP |
2003-216620 | Jul 2005 | JP |
2005-182778 | Sep 2006 | JP |
20060009717 | Feb 2006 | KR |
1020060023387 | Mar 2006 | KR |
WO 0014632 | Mar 2000 | WO |
WO 0217140 | Feb 2002 | WO |
WO 2006061454 | Jun 2006 | WO |
Number | Date | Country | |
---|---|---|---|
20110078219 A1 | Mar 2011 | US |
Number | Date | Country | |
---|---|---|---|
60841804 | Sep 2006 | US | |
60840246 | Aug 2006 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 11717583 | Mar 2007 | US |
Child | 12960197 | US |