Method, apparatus and system for reverting FAT cluster number to file ID and offset of non-FAT flash file system
A device includes a processor connected to a memory. The device further includes a module having a process. The module is integrated in a memory file manager (MFM). The process operates to allow an external computer access to MFM volumes in the memory. A method includes reverting a file allocating table (FAT) cluster number to a file ID and file offset of a non-FAT flash memory file system.
Latest Intel Patents:
- Multi-access management service frameworks for cloud and edge networks
- 3D memory device with top wordline contact located in protected region during planarization
- Electromagnetic interference shielding enclosure with thermal conductivity
- Apparatus, system and method of communicating audio traffic over a Bluetooth link
- Technology to use video source context information in post-processing operations
This application is a divisional of U.S. patent application Ser. No. 11/395,124 filed Mar. 31, 2006, now U.S. Pat. No. 7,426,606 entitled METHOD, APPARATUS AND SYSTEM FOR REVERTING FAT CLUSTER NUMBER TO FILE ID AND OFFSET OF NON-FAT FLASH FILE SYSTEM.
BACKGROUND1. Field
The embodiments relate to devices that support file allocating tables (FAT) and devices the support a non-FAT file system, and more particularly to a process that operates to allow a device that supports FAT access to Multimedia File Manager (MFM) volumes in the memory of the device supporting a non-FAT file system.
2. Description of the Related Art
Currently, typical flash memory in cellular telephones is managed by various flash file systems, such as Multimedia Flash Manager (MFM), but not a FAT file system. This is because a FAT file system is not suitable for flash memory. MFM is a flash file system developed by FPG of Intel, and released in Flash Data Integrator (FDI) 7.1. FAT, however, is the default file system on universal serial bus (USB) mass storage devices for Microsoft Windows® current operating systems as well as many other operating systems. For reading and writing data in a flash file system, installation of an additional USB device driver is necessary in computer devices, such as a personal computer (PC).
A FAT file system converts file operations to sector read and write operations, in order to store data in physical storage device sector by sector.
The embodiments are illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings and in which like reference numerals refer to similar elements and in which:
The embodiments discussed herein generally relate to devices that revert a file allocating table (FAT) cluster number to a file ID and file offset of a non-FAT flash memory file system. Referring to the figures, exemplary embodiments will now be described. The exemplary embodiments are provided to illustrate the embodiments and should not be construed as limiting the scope of the embodiments.
In one embodiment a FAT cluster number is reverted to file id and offset of the non-FAT flash file system. The data structure and processes of embodiments can revert file position quickly. In one embodiment, in the progress of copying a file, sectors are written in sequence. In this embodiment, no holes will exist in any file. Therefore, only a part of data written into the file of the flash file system may exist. The last cluster number points to the last cluster that has been written to the flash file system. After a cluster is written to the flash file system, we will update the last cluster number to its next cluster number. The following cluster number is used to optimize the reverting process. The following cluster number points to the cluster that would be accessed by the external device in the next sector read or write operation.
Based on the embodiment data structure, different embodiment processes are used to revert a FAT cluster number to file id and offset of the flash file system.
Process 300 begins with block 310 where the cluster number is traced in a FAT table from cluster n to an EOF (end of file) cluster m. Process 300 continues with block 320 where the file list is searched to determine the file whose end is equal to m. Next, in block 330 the cluster number is traced in the FAT table from starting cluster number of the file to cluster n. Process 300 continues with block 340 where the offset between cluster n and the starting cluster number of the file is determined/calculated.
In block 350, if cluster n is behind the last cluster number of the file, an error is returned because cluster n does not exist in any file of the flash file system. Otherwise, the cluster position n is returned. With process 300 id and offset are determined quickly without scanning the whole FAT table to find the cluster n. However, the larger the file is, the more time is necessary to spend on process 300. The time complexity of process 300 is O(n).
Process 400 begins with block 410. In block 410 if it is determined that cluster n==current->following, process 400 continues with block 460 where current->following is set to the next cluster of n and current->offset is increased by CLUSTER_SIZE. Otherwise, process 400 continues with block 420. In block 420 the file list is searched for a file having a starting cluster of n. If a file is found with a starting cluster of n, process 400 continues with block 450 where current is set to the file found, and block 460 where following and offset is updated. Otherwise process 400 continues with block 430.
In block 430, the file list is searched for a file having its following equal to n. If a file is found with its following equal to n, process 400 continues with block 450. Otherwise, process 40 continues with block 440 where process 300 is performed. After process 300 is performed in block 440, process 400 continues with block 450 where current is set to file. Process 400 then continues with block 460 and then process 400 ends.
In another embodiment, when a FAT file system writes a sector in a FAT region, the end cluster number and last cluster number of relevant files are updated. These sectors are stored in a FAT image file in the flash file system. After updating the FAT table, all variables used in FindPosition(n) are reset, such as current and following, because these variables may be invalid for the new FAT table.
In another embodiment, the FAT file system only modifies the first character of a file name to 0xe5 to delete a file. In this embodiment when moving a file to another directory, the FAT file system also marks the first character to 0xe5 first, and then creates another file in a destination directory with the same attribution and starting cluster number. Therefore, when a file is deleted in the flash file system when its first character is marked 0xe5, this file is lost because it is un-recoverable in flash file system. In this embodiment, instead of deleting the file, a flag is set on the file's type when its first character is marked as 0xe5. In this embodiment, the file is denoted as a temporary file. When the file's FAT entries are cleared to 0, the temporary file can be deleted in the flash file system.
When FAT system creates another file whose attribution and starting cluster number are the same as the temporary file, the temporary file is moved to the destination directory, and then the flag is reset on the moved file. In this embodiment the process can avoid losing files and data in the flash file system.
In one embodiment module 580 is a mountable universal serial bus (USB) module. In this embodiment external computer 510 can be a personal computer (PC), a hand held computer, a personal digital assistant (PDA), a lap top computer, etc. External computer 510 supports a FAT file system and USB mass storage devices. Memory 560 is managed by a non FAT file system. External computer 510 includes memory 540, processor 520 and FAT file system manager 530. Memory 540 can be local random access memory (RAM), synchronous RAM (SRAM), dynamic RAM (DRAM), fast page mode DRAM (FPM DRAM), Extended Data Out DRAM (EDO DRAM), Burst EDO DRAM (BEDO DRAM), erasable programmable ROM (EPROM) also known as Flash memory, etc.
Embodiments described above including data structure, devices, systems and processes are used in MUSB, which is a sub-module of MFM. MUSB makes data in the flash file system accessible by an external device (e.g., a PC). MUSB is integrated into MFM, and then external computer 510 can access MFM volumes. Since MFM volumes are not accessible from external computers that support a FAT file system, the above described embodiment makes it easier to exchange data from a system supporting a non-FAT file system with external computers 510 (e.g., a PC), especially for cellular telephone products. With the above described embodiments external computers (e.g., PC) can access files in a non-FAT flash file system without requiring any specific USB drivers to be installed in external computer 510.
System 600 reverts sector read and write operations to file operations in a USB device (e.g. a cellular telephone), and then calls a corresponding application programming interface (API) of the flash file system to achieve the same file operation launched by a FAT file system in external computer 510. For example, when external computer 510 is a PC and writes a sector of data to the 60th sector, and the above embodiments determine that it is the fourth sector of a file in the flash file system, this sector of data can be written to the file at a proper offset.
Embodiments of the present disclosure described herein may be implemented in circuitry, which includes hardwired circuitry, digital circuitry, analog circuitry, programmable circuitry, and so forth. These embodiments may also be implemented in computer programs. Such computer programs may be coded in a high level procedural or object oriented programming language. The program(s), however, can be implemented in assembly or machine language if desired. The language may be compiled or interpreted. Additionally, these techniques may be used in a wide variety of networking environments. Such computer programs may be stored on a storage media or device (e.g., hard disk drive, floppy disk drive, read only memory (ROM), CD-ROM device, flash memory device, digital versatile disk (DVD), or other storage device) readable by a general or special purpose programmable processing system, for configuring and operating the processing system when the storage media or device is read by the processing system to perform the procedures described herein. Embodiments of the disclosure may also be considered to be implemented as a machine-readable or machine recordable storage medium, configured for use with a processing system, where the storage medium so configured causes the processing system to operate in a specific and predefined manner to perform the functions described herein.
While certain exemplary embodiments have been described and shown in the accompanying drawings, it is to be understood that such embodiments are merely illustrative of and not restrictive on the broad invention, and that this invention not be limited to the specific constructions and arrangements shown and described, since various other modifications may occur to those ordinarily skilled in the art.
Reference in the specification to “an embodiment,” “one embodiment,” “some embodiments,” or “other embodiments” means that a particular feature, structure, or characteristic described in connection with the embodiments is included in at least some embodiments, but not necessarily all embodiments. The various appearances “an embodiment,” “one embodiment,” or “some embodiments” are not necessarily all referring to the same embodiments. If the specification states a component, feature, structure, or characteristic “may”, “might”, or “could” be included, that particular component, feature, structure, or characteristic is not required to be included. If the specification or claim refers to “a” or “an” element, that does not mean there is only one of the element. If the specification or claims refer to “an additional” element, that does not preclude there being more than one of the additional element.
Claims
1. An apparatus comprising:
- a processor coupled to a memory;
- a module having a process, the module is integrated in a Multimedia File Manager (MFM);
- wherein the process operates to revert a file allocating table (FAT) cluster number to a file ID and file offset of a non-FAT flash memory file system, wherein the process further operates to allow an external computer access to MFM volumes in the memory by tracing the cluster number in the FAT from cluster n to an end of file (EOF) cluster m, searching a file list to determine a file with an end equal to m, tracing from a starting cluster number of the file to cluster n, determining an offset between cluster n and the starting cluster for a file to be accessed by the external computer.
2. The apparatus of claim 1, wherein the module is a mountable universal serial bus (USB) module.
3. The apparatus of claim 1, wherein the external computer is one of a personal computer (PC), a hand held computer, a personal digital assistant (PDA), and a lap top computer, and the external computer supports a file allocating table (FAT) file system and USB mass storage devices.
4. The apparatus of claim 1, wherein the memory is a flash memory.
5. The apparatus of claim 1, wherein the external computer supports an FAT file system and a universal serial bus (USB) mass storage device.
6. The apparatus of claim 1, wherein the memory is managed by the non-FAT file system.
7. A system comprising:
- a processor coupled to a flash memory;
- a display coupled to the processor;
- a module having a process, the module is integrated in a Multimedia File Manager (MFM);
- wherein the process operates to revert a file allocating table (FAT) cluster number to a file ID and file offset of a non-FAT flash memory file system, wherein the process further operates to allow an external computer access to MFM volumes in the flash memory by tracing the cluster number in the FAT from cluster n to an end of file (EOF) cluster m, searching a file list to determine a file with an end equal to m, tracing from a starting cluster number of the file to cluster n, determining an offset between cluster n and the starting cluster for a file to be accessed by the external computer.
8. The system of claim 7, wherein the process reverts sector operations to file operations.
9. The system of claim 7, wherein the external computer supports a file allocating table (FAT) file system and a universal serial bus (USB) mass storage device.
10. The system of claim 7, wherein the external computer is one of a personal computer (PC), a hand held computer, a personal digital assistant (PDA) and a lap top computer, and the external computer supports a FAT file system and USB mass storage devices.
11. The system of claim 7, wherein the flash memory is managed by the non-FAT file system.
5987478 | November 16, 1999 | See et al. |
6704838 | March 9, 2004 | Anderson |
20060149902 | July 6, 2006 | Yun et al. |
20060184720 | August 17, 2006 | Sinclair et al. |
20070033375 | February 8, 2007 | Sinclair et al. |
20070143571 | June 21, 2007 | Sinclair et al. |
20070150662 | June 28, 2007 | Hara et al. |
20080082488 | April 3, 2008 | Terrell |
20100031145 | February 4, 2010 | Haggis et al. |
20110125958 | May 26, 2011 | Maeda et al. |
- Notice of Allowance for U.S. Appl. No. 11/395,124 mailed May 12, 2008, 11 pgs.
Type: Grant
Filed: Aug 12, 2008
Date of Patent: Aug 28, 2012
Patent Publication Number: 20080301195
Assignee: Intel Corporation (Santa Clara, CA)
Inventor: He Chu (Shanghai)
Primary Examiner: Midys Rojas
Attorney: Blakely, Sokoloff, Taylor & Zafman LLP
Application Number: 12/190,353
International Classification: G06F 12/00 (20060101); G06F 13/00 (20060101);