JP2007087063A - Fat file system, file management method, program and storage medium - Google Patents

Fat file system, file management method, program and storage medium Download PDF

Info

Publication number
JP2007087063A
JP2007087063A JP2005274414A JP2005274414A JP2007087063A JP 2007087063 A JP2007087063 A JP 2007087063A JP 2005274414 A JP2005274414 A JP 2005274414A JP 2005274414 A JP2005274414 A JP 2005274414A JP 2007087063 A JP2007087063 A JP 2007087063A
Authority
JP
Japan
Prior art keywords
file
fat
cache data
storage medium
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2005274414A
Other languages
Japanese (ja)
Other versions
JP4920937B2 (en
Inventor
Seikyo Suzuki
靖教 鈴木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2005274414A priority Critical patent/JP4920937B2/en
Publication of JP2007087063A publication Critical patent/JP2007087063A/en
Application granted granted Critical
Publication of JP4920937B2 publication Critical patent/JP4920937B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a file system for searching a cluster position for the data main body of a file whose operation is instructed with a few calculation amounts without using many memory sources when performing a reading or writing operation to a file on a storage medium. <P>SOLUTION: In a file system, when an operation instruction is operated to a file designated by a user program 101, a cluster position in a disk 107 for the data of a file whose operation is instructed by a file operation part 103 is calculated by referring to a retrieved start cluster position and FAT data(file allocation table) and FAT cache data. In this case, when new FAT cache data are generated, the FAT cache data are updated to the generated FAT cache data. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、ファイル割り付け表(FAT: File Allocation Table)を使用してファイルを管理するファイルシステム、ファイル管理方法、プログラムおよび記憶媒体に関する。   The present invention relates to a file system, a file management method, a program, and a storage medium that manage files using a file allocation table (FAT).

ファイル割り付け表を使用してファイルを管理するファイルシステムは、一般に、FATファイルシステムと呼ばれている。また、FATファイルシステムで使用されることを前提にフォーマットされたディスク媒体は、一般にFAT型ディスクと呼ばれている(例えば特許文献1参照)。   A file system that manages files using a file allocation table is generally called a FAT file system. A disk medium formatted on the assumption that it is used in a FAT file system is generally called a FAT disk (see, for example, Patent Document 1).

このFAT型ディスクにおいては、ユーザプログラムの入出力は、セクタと呼ばれる単位で行われる。セクタの大きさは、通常は512バイト(またはそのべき乗)である。   In this FAT type disk, input / output of user programs is performed in units called sectors. The sector size is typically 512 bytes (or a power thereof).

セクタを2のべき乗(1,2,4,8,16,・j個集めたものは、クラスタと呼ばれ、ファイルはクラスタの集まりで表される。1クラスタが何セクタから構成されるか(以降、セクタ/クラスタ数で表す)は、ディスクによって異なる。   A collection of powers of 2 (1, 2, 4, 8, 16, .. j) is called a cluster, and a file is represented by a collection of clusters. How many sectors a cluster is composed of ( Hereinafter, it is represented by the number of sectors / clusters) depending on the disk.

FAT型ディスクのフォーマット例として、MS−DOS(登録商標)で採用されているものについて図6〜図9を参照しながら説明する。図6はMS−DOS(登録商標)で採用されているFAT型ディスクのフォーマットの一例を示す図である。図7はFAT領域302の構造を示す図である。図8はルートディレクトリ領域303にある1つのファイルに対応するディレクトリエントリの構造を示す図である。図9は1つのファイルに関してFAT領域302、ルートディレクトリ領域303、データ領域304の間の関係を示す図である。   As a format example of the FAT type disc, a format employed in MS-DOS (registered trademark) will be described with reference to FIGS. FIG. 6 is a diagram showing an example of a format of a FAT type disc adopted in MS-DOS (registered trademark). FIG. 7 is a view showing the structure of the FAT area 302. FIG. 8 is a diagram showing the structure of a directory entry corresponding to one file in the root directory area 303. FIG. 9 is a diagram showing a relationship among the FAT area 302, the root directory area 303, and the data area 304 with respect to one file.

MS−DOS(登録商標)で採用されているFAT型ディスクのフォーマットにおいては、図6に示すように、ディスクに対して、ブートセクタ(予約領域)301、複数のFAT領域302、ルートディレクトリ領域303、データ領域304が設けられる。ブートセクタ(予約領域)301は先頭のセクタ(論理セクタ番号0)であり、ファイル管理外の領域である。このブートセクタ301には、オペレーティングシステムをロードするためのブートプログラム、前述のセクタ/クラスタ数、後述するFAT領域に使用されているセクタの数、ルートディレクトリエントリの数などの情報が記録される。   In the format of the FAT type disk adopted in MS-DOS (registered trademark), as shown in FIG. 6, a boot sector (reserved area) 301, a plurality of FAT areas 302, and a root directory area 303 are provided for the disk. , A data area 304 is provided. The boot sector (reserved area) 301 is the head sector (logical sector number 0), and is an area outside file management. In the boot sector 301, information such as a boot program for loading an operating system, the number of sectors / clusters described above, the number of sectors used in a FAT area described later, and the number of root directory entries are recorded.

FAT領域302は、クラスタの所在とファイル本体(内容)へのクラスタの割り付け(アロケーション)状況を示すFAT項目を記録する領域である。FAT領域302は、2重化されている。すなわち、FAT領域302として、2つの領域FAT1,FAT2が設けられ、それぞれには同一の内容が記録される。各FAT領域302は、ディスク上に連続して配置される。   The FAT area 302 is an area for recording a FAT item indicating the location of the cluster and the allocation (allocation) status of the cluster to the file body (contents). The FAT area 302 is duplicated. That is, as the FAT area 302, two areas FAT1 and FAT2 are provided, and the same contents are recorded in each area. Each FAT area 302 is continuously arranged on the disk.

現在一般に広く使用されているFAT型ディスクとしては、1クラスタ分のFAT項目を示すために、12ビット、16ビット、または32ビットを使用するものがある。ここでは、16ビットの場合を説明する。FAT領域302においては、具体的には、図7に示すように、FAT項目毎に管理するクラスタの位置とそのクラスタの使用状況が示されている。クラスタの使用状況が未使用の場合に対応する初期値は、0000hである。   Some FAT-type discs that are currently widely used currently use 12 bits, 16 bits, or 32 bits to indicate a FAT item for one cluster. Here, the case of 16 bits will be described. Specifically, in the FAT area 302, as shown in FIG. 7, the position of the cluster managed for each FAT item and the usage status of the cluster are shown. The initial value corresponding to the case where the cluster usage status is unused is 0000h.

ここで、あるファイルに初めてクラスタが割り付けられると、対応するFAT項目の内容は、使用中かつ最終クラスタであることを示すFFFFhに変更される。ファイルの大きさが1クラスタ分では不足すると、このFAT項目の内容は、次に新しく割り付けられたクラスタの位置を示すクラスタ番号に変更される(同時に新たに追加されたクラスタのFAT項目の内容は、FFFFhに変更される)。これにより、1つのファイルに対して、次々と新たなクラスタを割り付けることができる。   Here, when a cluster is assigned to a certain file for the first time, the content of the corresponding FAT item is changed to FFFFh indicating that it is in use and is the last cluster. If the file size is insufficient for one cluster, the content of this FAT item is changed to a cluster number indicating the position of the newly allocated cluster (the content of the FAT item of the newly added cluster is , FFFFh). Thereby, new clusters can be assigned to one file one after another.

ルートディレクトリ領域303は、ファイルの所在を管理する領域である。1つのファイルに対応する項目は、32バイトからなる。具体的には、図8に示すように、ルートディレクトリ領域303には、ファイルの名前、大きさ(ファイルサイズ)、ファイルの先頭のクラスタ(開始クラスタ)番号などの情報が記録される。   A root directory area 303 is an area for managing the location of a file. An item corresponding to one file consists of 32 bytes. Specifically, as shown in FIG. 8, information such as the file name, size (file size), and the top cluster (start cluster) number of the file is recorded in the root directory area 303.

データ領域304は、実際のファイルの内容(データ本体)、ルートディレクトリ以下に属するディレクトリに関する情報を記録する領域である。データ領域304は、クラスタ単位で管理され、どのクラスタがどのファイルに属しているかまたは未使用であるかについての情報は、FAT領域302によって管理されている。1つのファイルに属するクラスタの群は、FAT領域302によって論理的に連続して繋がっていればよく、物理的に連続して繋がる必要はない。   The data area 304 is an area for recording information relating to actual file contents (data body) and directories belonging to the root directory and below. The data area 304 is managed in units of clusters, and information about which cluster belongs to which file or is unused is managed by the FAT area 302. The group of clusters belonging to one file need only be logically continuously connected by the FAT area 302, and need not be physically continuously connected.

ここで、例えば1つのファイルに関して、FAT領域302、ルートディレクトリ領域303、データ領域304のそれぞれの間には、図9に示すような関係がある。ルートディレクトリ領域303の開始クラスタ番号は、FAT領域302の中の項目を指し、FAT領域302は、そのファイルが使用しているデータ領域304の中のクラスタ番号を指している。このように、1つのファイルを構成するクラスタ群は、FATをチェインとして繋げることによって論理的に繋がれている。   Here, for example, for one file, the FAT area 302, the root directory area 303, and the data area 304 have a relationship as shown in FIG. The starting cluster number of the root directory area 303 indicates an item in the FAT area 302, and the FAT area 302 indicates a cluster number in the data area 304 used by the file. In this way, the cluster group constituting one file is logically connected by connecting FAT as a chain.

次に、FAT型ディスクからのファイル内容の読み出し(または書き込み)処理について図10を参照しながら説明する。図10はFAT型ディスクからのファイル内容の読み出し(または書き込み)処理の手順を示すフローチャートである。ここでは、説明を簡単にするために、セクタ/クラスタ数を1とする。   Next, reading (or writing) processing of file contents from the FAT type disk will be described with reference to FIG. FIG. 10 is a flowchart showing a procedure for reading (or writing) the file contents from the FAT type disk. Here, in order to simplify the explanation, it is assumed that the number of sectors / clusters is one.

まずステップS1001において、ユーザプログラムにより、読み出し(または書き込み)の操作を行う対象のファイルの名前、読み出し(または書き込み)位置(バイト単位)、読み出し(または書き込み)サイズ(バイト単位)、読み出したデータを格納する(または書き込むデータが格納された)領域が指定される。   First, in step S1001, the name, the read (or write) position (byte unit), the read (or write) size (byte unit), and the read data are read out by the user program according to the user program. An area for storing (or storing data to be written) is designated.

次いで、ステップS1002において、指定された読み出し(または書き込み)位置に基づいて、当該位置がファイルのFATチェインの先頭から何クラスタ目であるかが計算により求められる。この計算には、次の(1)式が用いられる。   Next, in step S1002, based on the designated read (or write) position, the number of clusters from the beginning of the FAT chain of the file is determined by calculation. The following equation (1) is used for this calculation.

[読み出し位置]/([セクタサイズ]×[セクタ/クラスタ数]) (1)
ここで、上記(1)式の商が求めるクラスタの値となる。ここで、求められたクラスタの値は、nとする。
[Reading position] / ([Sector size] × [Sector / number of clusters]) (1)
Here, the value of the cluster obtained by the quotient of the above equation (1) is obtained. Here, the obtained cluster value is n.

次いで、ステップS1003においては、ルートディレクトリ領域303内の該当するファイル名の項目から開始クラスタ番号nextが取得され、続くステップS1004において、処理が終了したクラスタ数を示す処理済みのクラスタ数iに初期値として1が設定される。   Next, in step S1003, the start cluster number next is acquired from the corresponding file name item in the root directory area 303, and in the subsequent step S1004, the initial value is set to the processed cluster number i indicating the number of clusters that have been processed. Is set as 1.

次いで、ステップS1005において、上記ステップS1002で求められた値nと上記ステップS1004の処理済みクラスタ数iとが比較され、両者が等しいか否かの判定が行われる。ここで、両者の値が等しくなければ、ステップS1006において、開始クラスタ番号nextが記録されているセクタが読み出され、続くステップS1007において、FATチェインの次のクラスタ番号が開始クラスタ番号nextとされる。そして、ステップS1008において、処理済みのクラスタ数iが1インクリメントされ、ステップS1005へ戻る。   Next, in step S1005, the value n obtained in step S1002 is compared with the processed cluster number i in step S1004 to determine whether or not they are equal. If the two values are not equal, the sector in which the start cluster number next is recorded is read in step S1006, and the next cluster number in the FAT chain is set as the start cluster number next in step S1007. . In step S1008, the number i of processed clusters is incremented by 1, and the process returns to step S1005.

このように、ステップS1006からステップS1008までの処理が、ステップS1005において、処理済みのクラスタ数iが上記ステップS1002で求められたクラスタ数nと等しくなるまで繰り返される。これにより、ユーザプログラムにより指定されたファイル位置のデータが含まれるクラスタ番号を取得することができる。   In this manner, the processing from step S1006 to step S1008 is repeated until the number of processed clusters i is equal to the number of clusters n obtained in step S1002 in step S1005. Thereby, the cluster number including the data of the file position specified by the user program can be acquired.

そして、ステップS1005において処理済みのクラスタ数iが上記ステップS1002で求められたクラスタ数nと等しいと判定されると、ステップS1009に進む。このステップにおいて、求められたクラスタ番号nextに相当するセクタ番号が指定され、実際にディスクからのデータの読み出し(または書き込み)が行われる。そして、本処理は終了する。
特開2001−101064号公報
If it is determined in step S1005 that the processed cluster number i is equal to the cluster number n obtained in step S1002, the process proceeds to step S1009. In this step, a sector number corresponding to the obtained cluster number next is designated, and data is actually read (or written) from the disk. Then, this process ends.
JP 2001-101064 A

しかしながら、従来のFATファイルシステムの場合、その性質上、あるファイルに対する1回のデータ読み出し(または書き込み)操作毎に、実際のデータ読み出しまたは書き込み操作の前処理として、指定されたデータ位置がデータ領域304の何番目のクラスタに存在するのかを、開始クラスタからFATチェインを順に追うことによって求める必要がある。   However, in the case of the conventional FAT file system, due to its nature, every time data is read (or written) for a certain file, the designated data position is the data area as pre-processing of the actual data reading or writing operation. It is necessary to determine the number of the cluster in 304 by following the FAT chain in order from the start cluster.

また、FAT型ディスクの場合、FAT領域で各ファイルへのクラスタの割り当て状況を管理するという仕組みから、1つのファイルが使用しているクラスタの情報は、FAT領域302に散在している場合がある。そのため、あるファイルのFATチェインを取得するためには、FAT領域302からいくつかのセクタを読み出すことが必要となる。特に、動画データのようなファイルサイズの大きなファイルを扱う場合には、指定したファイル位置のデータを含むクラスタ番号を求めるために、より多くのFAT領域のセクタの読み出しが必要となり、かつ該当するクラスタ番号を求める計算を繰り返し実行する必要がある。その結果、1回の読み出しまたは書き込み処理に余分な時間が掛かることになる。   In addition, in the case of a FAT type disk, information on clusters used by one file may be scattered in the FAT area 302 because of the mechanism of managing the allocation status of clusters to each file in the FAT area. . Therefore, in order to acquire a FAT chain of a certain file, it is necessary to read several sectors from the FAT area 302. In particular, when handling a file with a large file size such as moving image data, it is necessary to read out more sectors in the FAT area in order to obtain the cluster number including the data at the specified file position, and the corresponding cluster. It is necessary to repeatedly execute the calculation for obtaining the number. As a result, extra time is required for one read or write process.

FAT領域のセクタの読み出しに関しては、一度読み出したFATデータを、一時的にメモリ上に蓄積することによって、ディスクからFATデータを読み出す際に要する時間のオーバヘッドを低減させる方法が考えられる。また、一度求められたFATチェインを一時的にメモリ上に保持する方法も考えられる。しかし、使用可能なメモリリソース量が限られている環境下では、上述した方法は、必ずしも有効な方法とはならない。   Regarding the reading of the sector in the FAT area, a method of reducing the overhead required for reading the FAT data from the disk by temporarily storing the FAT data once read in the memory can be considered. A method of temporarily holding the FAT chain once obtained in the memory is also conceivable. However, in an environment where the amount of usable memory resources is limited, the above method is not necessarily an effective method.

本発明は、上記の課題に鑑みてなされたものであり、記憶媒体上のファイルに対して読み出しまたは書き込み操作を行う場合に、多くのメモリリソースを使用することなく、かつ少ない計算量で操作指示されたファイルのデータ本体に対するクラスタ位置を求めることができるファイルシステム、ファイル管理方法、プログラムおよび記憶媒体を提供することを目的とする。   The present invention has been made in view of the above-described problems. When a read or write operation is performed on a file on a storage medium, an operation instruction is performed without using a large amount of memory resources and with a small amount of calculation. It is an object of the present invention to provide a file system, a file management method, a program, and a storage medium capable of obtaining a cluster position with respect to a data body of a file that has been recorded.

本発明は、上記目的を達成するため、記憶媒体のクラスタと該記憶媒体に格納されているファイルとの対応関係を示すFATデータが記録されているファイル割り付け表を参照して前記記憶媒体内のファイルの管理を行うファイルシステムであって、ファイル操作の際に用いられる1つ以上のFATキャッシャデータを保持する記憶手段と、ユーザにより指定されたファイルに対する操作指示を行うファイル操作手段と、前記記憶媒体からディレクトリ情報を取得し、該ディレクトリ情報に基づいて前記ファイル操作手段により操作指示されたファイルに対する開始クラスタ位置を検索するディレクトリ操作手段と、前記検索された開始クラスタ位置、前記ファイル割り付け表のFATデータ、および前記記憶手段に保持されているFATキャッシュデータを参照して、前記ファイル操作手段により操作指示されたファイルのデータ本体に対する前記記憶媒体内のクラスタ位置を求めるFAT操作手段とを備え、前記FAT操作手段は、新たなFATキャッシュデータを生成し、前記記憶手段に保持されているFATキャッシュデータを前記生成されたFATキャッシュデータへ更新するための更新処理を行うことを特徴とするファイルシステムを提供する。   In order to achieve the above object, the present invention refers to a file allocation table in which FAT data indicating the correspondence between clusters of storage media and files stored in the storage media is recorded. A file system for managing files, a storage unit for holding one or more FAT cache data used in file operations, a file operation unit for operating instructions for a file designated by a user, and the storage Directory operating means for acquiring directory information from the medium and searching for a starting cluster position for the file instructed by the file operating means based on the directory information; the searched starting cluster position; FAT of the file allocation table Data and the FAT key held in the storage means And FAT operation means for obtaining a cluster position in the storage medium with respect to the data body of the file instructed by the file operation means with reference to the cache data, and the FAT operation means generates new FAT cache data. A file system is provided for performing update processing for updating the FAT cache data held in the storage means to the generated FAT cache data.

本発明は、上記目的を達成するため、記憶媒体のクラスタと該記憶媒体に格納されているファイルとの対応関係を示すFATデータが記録されているファイル割り付け表を参照して前記記憶媒体内のファイルの管理を行うファイル管理方法であって、ユーザにより指定されたファイルに対する操作指示を行うファイル操作工程と、前記記憶媒体からディレクトリ情報を取得し、該ディレクトリ情報に基づいて前記ファイル操作手段により操作指示されたファイルに対する開始クラスタ位置を検索するディレクトリ操作工程と、前記検索された開始クラスタ位置、前記ファイル割り付け表のFATデータ、および記憶手段に保持されている1つ以上のFATキャッシュデータを参照して、前記ファイル操作工程で操作指示されたファイルのデータ本体に対する前記記憶媒体内のクラスタ位置を求めるFAT操作工程とを有し、前記FAT操作工程では、新たなFATキャッシュデータを生成し、前記記憶手段に保持されているFATキャッシュデータを前記生成されたFATキャッシュデータへ更新するための更新処理を行うことを特徴とするファイル管理方法を提供する。   In order to achieve the above object, the present invention refers to a file allocation table in which FAT data indicating the correspondence between clusters of storage media and files stored in the storage media is recorded. A file management method for managing files, a file operation step for instructing an operation for a file designated by a user, directory information is obtained from the storage medium, and operation is performed by the file operation means based on the directory information A directory operation process for searching for a starting cluster position for the indicated file, and the searched starting cluster position, the FAT data of the file allocation table, and one or more FAT cache data held in the storage means Data of the file instructed for operation in the file operation step. A FAT operation step for obtaining a cluster position in the storage medium with respect to a main body. In the FAT operation step, new FAT cache data is generated, and the FAT cache data held in the storage means is generated. Provided is a file management method characterized by performing an update process for updating to FAT cache data.

本発明は、上記目的を達成するため、記憶媒体のクラスタと該記憶媒体に保存されているファイルとの対応関係を示すFATデータが記録されるファイル割り付け表を参照して前記記憶媒体内のファイルの管理を行うシステムを構築するためのプログラムであって、ユーザにより指定されたファイルに対する操作指示を行うファイル操作モジュールと、前記記憶媒体からディレクトリ情報を取得し、該ディレクトリ情報に基づいて前記ファイル操作手段により操作指示されたファイルに対する開始クラスタ位置を検索するディレクトリ操作モジュールと、前記検索された開始クラスタ位置、前記ファイル割り付け表のFATデータ、および記憶手段に保持されている1つ以上のFATキャッシュデータを参照して、前記ファイル操作モジュールにより操作指示されたファイルのデータ本体に対する前記記憶媒体内のクラスタ位置を求めるFAT操作モジュールとを有し、前記FAT操作モジュールは、新たなFATキャッシュデータを生成し、前記記憶手段に保持されているFATキャッシュデータを前記生成されたFATキャッシュデータへ更新するための更新処理を行うことを特徴とするプログラムを提供する。   In order to achieve the above object, the present invention refers to a file allocation table in which FAT data indicating a correspondence relationship between a cluster of storage media and files stored in the storage media is referred to, and the files in the storage media A file management module for instructing an operation for a file designated by a user, directory information is obtained from the storage medium, and the file operation is performed based on the directory information. A directory operation module for searching a start cluster position for a file instructed by the means; the searched start cluster position; FAT data of the file allocation table; and one or more FAT cache data held in a storage means To refer to the file operation module. A FAT operation module for obtaining a cluster position in the storage medium with respect to the data body of the file instructed by the operation, the FAT operation module generates new FAT cache data and is held in the storage means There is provided a program for performing update processing for updating FAT cache data to the generated FAT cache data.

本発明は、上記目的を達成するため、請求項7記載のプログラムをコンピュータ読み取り可能に格納したことを特徴とする記憶媒体を提供する。   In order to achieve the above object, the present invention provides a storage medium characterized by storing the program according to claim 7 in a computer-readable manner.

本発明によれば、記憶媒体上のファイルに対して読み出しまたは書き込み操作を行う場合に、多くのメモリリソースを使用することなく、かつ少ない計算量で操作指示されたファイルのデータ本体に対するクラスタ位置を求めることができる。   According to the present invention, when a read or write operation is performed on a file on a storage medium, the cluster position with respect to the data body of the file that is instructed to operate without using many memory resources and with a small amount of calculation Can be sought.

以下、本発明の実施の形態について図面を参照しながら説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

図1は本発明の一実施の形態に係るFATファイルシステムのソフトウェア構成を示すブロック図である。   FIG. 1 is a block diagram showing a software configuration of a FAT file system according to an embodiment of the present invention.

FATファイルシステムは、図1に示すように、FATキャッシュ管理方式を実現するFATファイルシステムプログラム102により構築される。FATファイルシステムプログラム102は、ファイル操作部103、ディレクトリ操作部104、およびFAT操作部105を有する。   As shown in FIG. 1, the FAT file system is constructed by a FAT file system program 102 that realizes the FAT cache management system. The FAT file system program 102 includes a file operation unit 103, a directory operation unit 104, and a FAT operation unit 105.

ファイル操作部103は、ファイルディスクリプタを管理し、ユーザプログラム101からの要求に応じた処理を行う。ファイル操作部103は、例えば、ファイル名などで指定されたファイルをオープンまたはクローズする処理、新規ファイルの作成、ファイル空間上のどの位置から読み出しまたは書き込み操作を行うかを示すファイルポインタの管理などを行う。   The file operation unit 103 manages file descriptors and performs processing in response to a request from the user program 101. The file operation unit 103 performs, for example, processing for opening or closing a file specified by a file name or the like, creation of a new file, management of a file pointer indicating from which position in the file space a read or write operation is performed, etc. Do.

ディレクトリ操作部104は、ディスクドライバ部106を介してディスク(記憶媒体)107から読み出されたディレクトリエントリ情報を解析する。また、ディレクトリ操作部104は、ディレクトリエントリの解析、更新などを行う。例えば、ユーザプログラム101から指示されたファイルの検索、ファイルの先頭に当たるデータが含まれるクラスタ(開始クラスタ)番号の取得、最新のファイル情報のディレクエントリィへの書き込みなどが行われる。   The directory operation unit 104 analyzes directory entry information read from the disk (storage medium) 107 via the disk driver unit 106. In addition, the directory operation unit 104 analyzes and updates a directory entry. For example, a file instructed by the user program 101 is searched, a cluster (starting cluster) number including data corresponding to the head of the file is acquired, and the latest file information is written to the directory entry.

FAT操作部105は、FATキャッシュデータのメモリ上への構築、更新、削除などを行う。また、FAT操作部105は、FATキャッシュデータを参照し、またはディスク107から読み出されたディレクトリエントリやFAT領域の情報を解析して、読み書きの対象となるファイルのファイル位置からディスク107上のクラスタ番号を取得する。また、FAT操作部105は、ファイルのFATチェインを正しく形成してディスク107に書き込む処理などを行う。   The FAT operation unit 105 constructs, updates, and deletes FAT cache data on a memory. Further, the FAT operation unit 105 refers to the FAT cache data or analyzes the directory entry and the FAT area information read from the disk 107, and determines the cluster on the disk 107 from the file position of the file to be read / written. Get the number. Further, the FAT operation unit 105 performs processing such as correctly forming the FAT chain of the file and writing it to the disk 107.

ここで、ディスク107は、フロッピー(登録商標)ディスク、ハードディスク、またはフラッシュメモリカードなどの記憶媒体からなる。ディスクドライブ部106は、ディスク107の実際のデータ内容の読み出し、またはディスク107へのデータの書き込み処理を行う。   Here, the disk 107 is a storage medium such as a floppy (registered trademark) disk, a hard disk, or a flash memory card. The disk drive unit 106 reads the actual data content of the disk 107 or writes data to the disk 107.

次に、本実施の形態のFATファイルシステムを実現するためのハードウエア構成について図2を参照しながら説明する。図2は図1のFATファイルシステムを実現するためのハードウエア構成を示すブロック図である。   Next, a hardware configuration for realizing the FAT file system of the present embodiment will be described with reference to FIG. FIG. 2 is a block diagram showing a hardware configuration for realizing the FAT file system of FIG.

本実施の形態のFATファイルシステムは、図2に示すように、CPU201、RAM202、ディスク107を有するディスク装置203、およびそれらを接続するためのシステムバス204を備える。ディスク装置203は、上記ディスクドライバ部106および上記ディスク107(図1に示す)を含む記憶装置である。上記ディスク107には、上記ユーザプログラム101、FATファイルシステムプログラム102およびディスクドライバ部106を含む各種プログラム、ユーザにより作成されたデータおよび画像などのファイルが格納されている。CPU201は、ディスク装置203から上記ユーザプログラム101、FATファイルシステムプログラム102およびディスクドライバ部106を読み出してRAM202上にロードし、実行する。これにより、FATキャッシュ管理方式を実現するFATファイルシステムが構築される。   As shown in FIG. 2, the FAT file system of the present embodiment includes a CPU 201, a RAM 202, a disk device 203 having a disk 107, and a system bus 204 for connecting them. The disk device 203 is a storage device including the disk driver unit 106 and the disk 107 (shown in FIG. 1). The disk 107 stores various programs including the user program 101, the FAT file system program 102, and the disk driver unit 106, and files such as data and images created by the user. The CPU 201 reads out the user program 101, the FAT file system program 102, and the disk driver unit 106 from the disk device 203, loads them on the RAM 202, and executes them. As a result, a FAT file system that implements the FAT cache management system is constructed.

次に、FAT操作部105が操作するFATキャッシュについて図3を参照しながら説明する。図3は図1のFAT操作部105が操作するFATキャッシュの構成を示すブロック図である。   Next, the FAT cache operated by the FAT operation unit 105 will be described with reference to FIG. FIG. 3 is a block diagram showing the configuration of the FAT cache operated by the FAT operation unit 105 of FIG.

1つのFATキャッシュには、図3に示すように、ディスク上に存在するファイルを一意に特定することができるインデックス値、該ファイルを構成するクラスタのうちの1つのクラスタ番号、および該クラスタ番号に対応するファイルの先頭からの累積クラスタ数が含まれる。また、複数のFATキャッシュデータを管理するために、次のFATキャッシュデータを指し示すメモリ番地を保存することにより、FATキャッシュデータが鎖状を成し、複数のFATキャッシュデータを順に追って処理することが可能にする。なお、FATキャッシュチェインの最後のデータには、次のFATキャッシュデータを指し示すメモリ番地に0を記録することとする。   In one FAT cache, as shown in FIG. 3, an index value that can uniquely specify a file existing on a disk, a cluster number of one of the clusters constituting the file, and the cluster number are included. Contains the cumulative number of clusters from the beginning of the corresponding file. In addition, in order to manage a plurality of FAT cache data, by storing a memory address indicating the next FAT cache data, the FAT cache data forms a chain, and the plurality of FAT cache data can be processed in order. enable. In the last data in the FAT cache chain, 0 is recorded at the memory address indicating the next FAT cache data.

次に、本実施の形態のFATファイルシステムによるファイル内容の読み出し(または書き込み)処理について図4を参照しながら説明する。図4は本実施の形態のFATファイルシステムによるファイル内容の読み出し(または書き込み)処理の手順を示すフローチャートである。ここで、説明に使用するFAT型ディスクの記録フォーマット、ディレクトリエントリの構成、およびFAT領域の構成は、従来例で述べた図6〜図8に示すものと同じであるとする。   Next, a file content read (or write) process by the FAT file system of this embodiment will be described with reference to FIG. FIG. 4 is a flowchart showing the procedure of a file content read (or write) process by the FAT file system of this embodiment. Here, it is assumed that the recording format of the FAT disc, the configuration of the directory entry, and the configuration of the FAT area used for the description are the same as those shown in FIGS. 6 to 8 described in the conventional example.

まずステップS801において、ユーザプログラム101により、読み出し(または書き込み)の操作を行う対象のファイルの名前、読み出し(または書き込み)位置(バイト単位)、読み出し(または書き込み)サイズ(バイト単位)、読み出したデータを格納する(または書き込むデータが格納された)領域が指定される。   First, in step S801, the user program 101 performs the read (or write) file name, read (or write) position (byte unit), read (or write) size (byte unit), and read data. Is specified (or the data to be written is stored).

次いで、ステップS802において、指定された読み出し(または書き込み)位置に基づいて、当該位置がファイルのFATチェインの先頭から何クラスタ目であるかが計算により求められる。そして、ステップS803において、ルートディレクトリ領域303内の該当するファイル名の項目から開始クラスタ番号nextが取得される。続くステップS804において、処理が終了したクラスタ数を示す処理済みのクラスタ数iに初期値として1が設定される。   Next, in step S802, based on the designated read (or write) position, the number of clusters from the beginning of the FAT chain of the file is determined by calculation. In step S803, the start cluster number next is acquired from the corresponding file name item in the root directory area 303. In subsequent step S804, 1 is set as an initial value to the processed cluster number i indicating the number of clusters for which processing has been completed.

次いで、ステップS805において、上記ステップS802で求められた値nと上記ステップS804の処理済みクラスタ数iとが比較され、両者が等しいか否かの判定が行われる。ここで、両者の値が等しくなければ、ステップS806において、FATキャッシュデータの検索が行われる。ここでは、FATキャッシュチェイン(図3に示す)を参照して、クラスタ数iに対して、クラスタ数n以下で、最も近い値のものが検索される。そして、ステップS807において、上記ステップS806の検索の結果から該当するキャッシュデータがあるか無いかの判定が行われる。ここで、該当するFATキャッシュデータがあれば、ステップS808において、該当するFATキャッシュデータのクラスタ数とクラスタ番号とが、それぞれ、処理済みクラスタ数iの初期値として、および開始クラスタ番号nextの初期値として代入される。   Next, in step S805, the value n obtained in step S802 is compared with the processed cluster number i in step S804, and it is determined whether or not they are equal. If the two values are not equal to each other, FAT cache data is searched in step S806. Here, with reference to the FAT cache chain (shown in FIG. 3), a search is made for the closest value with the number of clusters n or less with respect to the number of clusters i. In step S807, it is determined whether or not there is corresponding cache data from the search result in step S806. If there is corresponding FAT cache data, the number of clusters and the cluster number of the corresponding FAT cache data are set as the initial value of the processed cluster number i and the initial value of the start cluster number next in step S808, respectively. Is assigned as

次いで、ステップS809において、上記ステップS802で求められた値nと上記ステップS808の処理済みクラスタ数iとが比較され、両者が等しいか否かの判定が行われる。ここで、両者の値が等しくなければ、ステップS810において、開始クラスタ番号nextが記録されているセクタが読み出され、続くステップS811において、FATチェインの次のクラスタ番号が開始クラスタ番号nextとされる。   Next, in step S809, the value n obtained in step S802 is compared with the processed cluster number i in step S808 to determine whether or not they are equal. If the two values are not equal to each other, the sector in which the start cluster number next is recorded is read in step S810, and the next cluster number in the FAT chain is set as the start cluster number next in step S811. .

次いで、ステップS812において、累積クラスタ数、クラスタ番号などの情報(図3に示す)をFATキャッシュへ保存するためのFATキャッシュ更新が行われる。このFATキャッシュ更新の詳細については後述する。そして、ステップS813において、処理済みのクラスタ数iが1インクリメントされ、ステップS809へ戻る。   Next, in step S812, FAT cache updating is performed to save information (shown in FIG. 3) such as the cumulative cluster number and cluster number in the FAT cache. Details of the FAT cache update will be described later. In step S813, the number of processed clusters i is incremented by 1, and the process returns to step S809.

このように、ステップS810からステップS813までの処理が、ステップS809において、処理済みのクラスタ数iが上記ステップS802で求められたクラスタ数nと等しくなるまで繰り返される。   In this way, the processing from step S810 to step S813 is repeated until the processed cluster number i becomes equal to the cluster number n obtained in step S802 in step S809.

そして、ステップS809において処理済みのクラスタ数iが上記ステップS802で求められたクラスタ数nと等しいと判定されると、ステップS814において、求められたクラスタ番号nextに相当するセクタ番号が指定され、実際にディスク107からのデータの読み出し(または書き込み)が行われる。そして、本処理は終了する。   If it is determined in step S809 that the processed cluster number i is equal to the cluster number n obtained in step S802, a sector number corresponding to the obtained cluster number next is designated in step S814, First, data is read (or written) from the disk 107. Then, this process ends.

上記ステップS807において該当するFATキャッシュデータがないと判定された場合、上記ステップS808をスキップしてステップS808へ進む。   If it is determined in step S807 that there is no corresponding FAT cache data, the process skips step S808 and proceeds to step S808.

上記ステップS805において、上記ステップS802で求められた値nと上記ステップS804の処理済みクラスタ数iとが等しいと判定された場合、ステップS814へ進む。   If it is determined in step S805 that the value n obtained in step S802 is equal to the number i of processed clusters in step S804, the process proceeds to step S814.

このように、ステップS809からステップS813までの繰り返し処理を行う以前に、上記ステップS806によるFATキャッシュデータの検索を行うことにより、上記繰り返し処理の一部を省略することができる。その結果として操作目的のクラスタ番号を高速に求めることができる。   Thus, before performing the iterative process from step S809 to step S813, a part of the iterative process can be omitted by searching the FAT cache data in step S806. As a result, the cluster number for the operation purpose can be obtained at high speed.

次に、上記ステップS812のFATキャッシュ更新処理について図5を参照しながら説明する。図5は図4のステップS812のFATキャッシュ更新処理の手順を示すフローチャートである。   Next, the FAT cache update process in step S812 will be described with reference to FIG. FIG. 5 is a flowchart showing the procedure of the FAT cache update process in step S812 of FIG.

本実施の形態においては、ユーザプログラム101などにより予め指定された一定の間隔毎に、FATキャッシュデータが更新される。例えばキャッシュする間隔がバイト単位のサイズで指定された場合には、[指定間隔(バイト)]/([セクタサイズ]ラ[セクタ/クラスタ数])の計算が行われ、その商がキャッシュするクラスタの間隔sとして求められる。また、FATキャッシュの数は有限個であり、古いFATキャッシュデータの内容を新しいものに更新する際には、キャッシュされたデータの参照時刻が最も古いものが置き換えの対象とされる。すなわち、いわゆるLRU(Least Recently Used)を用いたアルゴリズムでFATキャッシュデータの更新が行われる。   In the present embodiment, the FAT cache data is updated at regular intervals specified in advance by the user program 101 or the like. For example, if the cache interval is specified as a size in bytes, the [specified interval (byte)] / ([sector size] ra [sector / cluster count]) is calculated and the quotient is cached by the cluster It is calculated | required as space | interval s. Further, the number of FAT caches is limited, and when the contents of old FAT cache data are updated to new ones, those having the oldest reference time of the cached data are replaced. That is, the FAT cache data is updated by an algorithm using so-called LRU (Least Recently Used).

このFATキャッシュ更新処理においては、図5に示すように、まずステップS901において、FATキャッシュチェイン中の最初のFATキャッシュデータ(c)が取得される。次いで、ステップS902において、取得されたFATキャッシュデータ(c)の内容が空(無効)であるか否かの判定が行われる。取得されたFATキャッシュデータ(c)の内容が空(無効)でない場合、ステップS903において、取得されたFATキャッシュデータ(c)がFATキャッシュインの最後のデータであるか否かの判定が行われる。ここで、取得されたFATキャッシュデータ(c)がFATキャッシュインの最後のデータでなければ、ステップS904において、FATキャッシュチェインの次のFATキャッシュデータ(c)が取得され、上記ステップS902へ戻る。   In this FAT cache update process, as shown in FIG. 5, first, in step S901, the first FAT cache data (c) in the FAT cache chain is acquired. Next, in step S902, it is determined whether or not the content of the acquired FAT cache data (c) is empty (invalid). If the content of the acquired FAT cache data (c) is not empty (invalid), it is determined in step S903 whether the acquired FAT cache data (c) is the last data in the FAT cache in. . If the acquired FAT cache data (c) is not the last data in the FAT cache-in, the next FAT cache data (c) in the FAT cache chain is acquired in step S904, and the process returns to step S902.

上記ステップS902において取得されたFATキャッシュデータ(c)の内容が空(無効)であると判定された場合、またはステップS903において取得されたFATキャッシュデータ(c)がFATキャッシュインの最後のデータであると判定された場合、ステップS905において、保存対象となるFATキャッシュデータのうち、累積のクラスタ数nの値がFATキャッシュデータとして保存する間隔sの倍数であるか否かの判定が行われる。累積のクラスタ数nの値が間隔sの倍数でない場合、本処理は終了する。   When it is determined that the content of the FAT cache data (c) acquired in step S902 is empty (invalid), or the FAT cache data (c) acquired in step S903 is the last data in the FAT cache in. If it is determined that there is, in step S905, it is determined whether or not the value of the cumulative number of clusters n of the FAT cache data to be stored is a multiple of the interval s for storing as FAT cache data. If the value of the cumulative cluster number n is not a multiple of the interval s, this process ends.

これに対し、累積のクラスタ数nの値が間隔sの倍数である場合、ステップS906において、累積クラスタ数、クラスタ番号などを含むFATキャッシュデータが記録される。続くステップS907において、LRUに基づいたアルゴリズムでFATキャッシュチェインの更新(入れ換え)が行われる。そして、本処理は終了する。   On the other hand, if the value of the cumulative cluster number n is a multiple of the interval s, FAT cache data including the cumulative cluster number, cluster number, etc. is recorded in step S906. In the subsequent step S907, the FAT cache chain is updated (replaced) by an algorithm based on the LRU. Then, this process ends.

本実施の形態においては、上記ステップS809からステップS813までのFATチェインの追跡の処理により、読み書き操作の対象となるクラスタが求められるまでの間に、取得された全てのクラスタがステップS812のFATキャッシュ更新処理の対象となる。従って、この場合、例えばファイルの読み出し位置を前回の読み出し位置よりも大きく飛ばしてデータを読み出す場合には、その途中にあるFATチェインのクラスタは、FATキャッシュデータとして保存されることになる。   In the present embodiment, all of the acquired clusters are obtained in the FAT cache in step S812 until the cluster that is the target of the read / write operation is obtained by the processing of tracing the FAT chain from step S809 to step S813. It becomes the target of update processing. Therefore, in this case, for example, when data is read by skipping the file reading position larger than the previous reading position, the FAT chain cluster in the middle is stored as FAT cache data.

但し、このような必要が無い場合には、上記ステップS812のFATキャッシュ更新処理を上記ステップS809のYESの後に行うようにしてもよい。   However, if there is no such need, the FAT cache update process in step S812 may be performed after YES in step S809.

本発明の目的は、実施形態の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体を、システム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)が記憶媒体に格納されたプログラムコードを読み出して実行することによっても達成される。   An object of the present invention is to supply a storage medium storing software program codes for realizing the functions of the embodiment to a system or apparatus, and the computer (or CPU, MPU, etc.) of the system or apparatus is stored in the storage medium. It is also achieved by reading and executing the program code.

この場合、記憶媒体から読み出されたプログラムコード自体が前述した実施の形態の機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。   In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiment, and the storage medium storing the program code constitutes the present invention.

また、プログラムコードを供給するための記憶媒体としては、例えば、フロッピー(登録商標)ディスク、ハードディスク、光磁気ディスク、CD−ROM、CD−R、CD−RW、DVD−ROM、DVD−RAM、DVD−RW、DVD+RW、磁気テープ、不揮発性のメモリカード、ROM等を用いることができる。または、プログラムコードをネットワークを介してダウンロードしてもよい。   Examples of the storage medium for supplying the program code include a floppy (registered trademark) disk, a hard disk, a magneto-optical disk, a CD-ROM, a CD-R, a CD-RW, a DVD-ROM, a DVD-RAM, and a DVD. -RW, DVD + RW, magnetic tape, nonvolatile memory card, ROM, etc. can be used. Alternatively, the program code may be downloaded via a network.

また、コンピュータが読み出したプログラムコードを実行することにより、上記実施の形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼動しているOS(オペレーティングシステム)等が実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれる。   Further, by executing the program code read by the computer, not only the functions of the above-described embodiments are realized, but also an OS (operating system) running on the computer based on the instruction of the program code. A case where part or all of the actual processing is performed and the functions of the above-described embodiments are realized by the processing is also included.

さらに、記憶媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書き込まれた後、そのプログラムコードの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPU等が実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれる。   Further, after the program code read from the storage medium is written to a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer, the function expansion is performed based on the instruction of the program code. This includes the case where the CPU or the like provided in the board or the function expansion unit performs part or all of the actual processing, and the functions of the above-described embodiments are realized by the processing.

また、コンピュータが読み出したプログラムコードを実行することにより、前述した各実施の形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼働しているOSなどが実際の処理の一部または全部を行い、その処理によって前述した各実施の形態の機能が実現される場合も、本発明に含まれることは言うまでもない。   Further, by executing the program code read out by the computer, not only the functions of the above-described embodiments are realized, but also the OS running on the computer based on the instruction of the program code is actually Needless to say, the present invention also includes a case in which the functions of the above-described embodiments are realized by performing part or all of the processing and the processing.

この場合、上記プログラムは、該プログラムを記憶した記憶媒体から直接、又はインターネット、商用ネットワーク、若しくはローカルエリアネットワーク等に接続された不図示の他のコンピュータやデータベース等からダウンロードすることにより供給される。   In this case, the program is supplied by downloading directly from a storage medium storing the program or from another computer or database (not shown) connected to the Internet, a commercial network, a local area network, or the like.

上記プログラムの形態は、オブジェクトコード、インタプリタにより実行されるプログラムコード、OS(オペレーティングシステム)に供給されるスクリプトデータ等の形態から成ってもよい。   The form of the program may be in the form of object code, program code executed by an interpreter, script data supplied to an OS (operating system), and the like.

本発明の一実施の形態に係るFATファイルシステムのソフトウェア構成を示すブロック図である。It is a block diagram which shows the software structure of the FAT file system which concerns on one embodiment of this invention. 図1のFATファイルシステムを実現するためのハードウエア構成を示すブロック図である。It is a block diagram which shows the hardware constitutions for implement | achieving the FAT file system of FIG. 図1のFAT操作部105が操作するFATキャッシュの構成を示すブロック図である。It is a block diagram which shows the structure of the FAT cache which the FAT operation part 105 of FIG. 1 operates. 本実施の形態のFATファイルシステムによるファイル内容の読み出し(または書き込み)処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the reading (or writing) process of the file content by the FAT file system of this Embodiment. 図4のステップS812のFATキャッシュ更新処理の手順を示すフローチャートである。5 is a flowchart showing a procedure of FAT cache update processing in step S812 of FIG. MS−DOS(登録商標)で採用されているFAT型ディスクのフォーマットの一例を示す図である。It is a figure which shows an example of the format of the FAT type disc employ | adopted by MS-DOS (trademark). FAT領域302の構造を示す図である。FIG. 3 is a diagram showing a structure of a FAT area 302. ルートディレクトリ領域303にある1つのファイルに対応するディレクトリエントリの構造を示す図である。FIG. 3 is a diagram showing a structure of a directory entry corresponding to one file in a root directory area 303. 1つのファイルに関してFAT領域302、ルートディレクトリ領域303、データ領域304の間の関係を示す図である。It is a figure which shows the relationship between the FAT area | region 302, the root directory area | region 303, and the data area | region 304 regarding one file. FAT型ディスクからのファイル内容の読み出し(または書き込み)処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the reading (or writing) process of the file content from a FAT type | mold disk.

符号の説明Explanation of symbols

101 ユーザプログラム
102 FATファイルシステムプログラム
103 ファイル操作部
104 ディレクトリ操作部
105 FAT操作部
106 ディスクドライバ部
107 ディスク
201 CPU
202 RAM
203 ディスク装置
DESCRIPTION OF SYMBOLS 101 User program 102 FAT file system program 103 File operation part 104 Directory operation part 105 FAT operation part 106 Disk driver part 107 Disk 201 CPU
202 RAM
203 disk unit

Claims (8)

記憶媒体のクラスタと該記憶媒体に格納されているファイルとの対応関係を示すFATデータが記録されているファイル割り付け表を参照して前記記憶媒体内のファイルの管理を行うファイルシステムであって、
ファイル操作の際に用いられる1つ以上のFATキャッシャデータを保持する記憶手段と、
ユーザにより指定されたファイルに対する操作指示を行うファイル操作手段と、
前記記憶媒体からディレクトリ情報を取得し、該ディレクトリ情報に基づいて前記ファイル操作手段により操作指示されたファイルに対する開始クラスタ位置を検索するディレクトリ操作手段と、
前記検索された開始クラスタ位置、前記ファイル割り付け表のFATデータ、および前記記憶手段に保持されているFATキャッシュデータを参照して、前記ファイル操作手段により操作指示されたファイルのデータ本体に対する前記記憶媒体内のクラスタ位置を求めるFAT操作手段とを備え、
前記FAT操作手段は、新たなFATキャッシュデータを生成し、前記記憶手段に保持されているFATキャッシュデータを前記生成されたFATキャッシュデータへ更新するための更新処理を行うことを特徴とするファイルシステム。
A file system for managing files in the storage medium with reference to a file allocation table in which FAT data indicating a correspondence relationship between a cluster of the storage medium and a file stored in the storage medium is recorded;
Storage means for holding one or more FAT cashier data used in file operations;
A file operation means for instructing operation on a file designated by the user;
Directory operation means for obtaining directory information from the storage medium and searching for a starting cluster position for a file instructed by the file operation means based on the directory information;
The storage medium for the data main body of the file instructed by the file operation means with reference to the searched start cluster position, the FAT data of the file allocation table, and the FAT cache data held in the storage means FAT operation means for obtaining the cluster position in
The file system characterized in that the FAT operation means generates new FAT cache data and performs an update process for updating the FAT cache data held in the storage means to the generated FAT cache data. .
前記FAT操作手段は、予め指定された間隔毎にFATキャッシュデータを生成し、該FATキャッシュデータへの更新を行うことを特徴とする請求項1記載のファイルシステム。   2. The file system according to claim 1, wherein the FAT operation means generates FAT cache data at intervals specified in advance and updates the FAT cache data. 前記FAT操作手段は、前記記憶手段に保持されているFATキャッシュデータのうち、最も古いFATキャッシュデータを前記生成されたFATキャッシュデータへ更新することを特徴とする請求項1記載のファイルシステム。   2. The file system according to claim 1, wherein the FAT operation means updates the oldest FAT cache data among the FAT cache data held in the storage means to the generated FAT cache data. 前記FATキャッシュデータには、少なくとも、前記記憶媒体上に存在するファイルを一意に特定可能なインデックス値、該ファイルを構成するクラスタのうちの1つのクラスタ番号、該クラスタ番号に対応する開始クラスタから数えたクラスタの累積数が含まれていることを特徴とする請求項1記載のファイルシステム。   The FAT cache data is counted from at least an index value capable of uniquely specifying a file existing on the storage medium, one cluster number of clusters constituting the file, and a start cluster corresponding to the cluster number. 2. The file system according to claim 1, wherein the cumulative number of clusters is included. 前記FATキャッシュデータには、次に参照するFATキャッシュデータが存在するメモリ番地が含まれ、前記FATキャッシュデータは、次のFATキャッシュデータと鎖状を成すように管理されることを特徴とする請求項4記載のファイルシステム。   The FAT cache data includes a memory address where a FAT cache data to be referred to next exists, and the FAT cache data is managed so as to form a chain with the next FAT cache data. Item 4. The file system according to Item 4. 記憶媒体のクラスタと該記憶媒体に格納されているファイルとの対応関係を示すFATデータが記録されているファイル割り付け表を参照して前記記憶媒体内のファイルの管理を行うファイル管理方法であって、
ユーザにより指定されたファイルに対する操作指示を行うファイル操作工程と、
前記記憶媒体からディレクトリ情報を取得し、該ディレクトリ情報に基づいて前記ファイル操作手段により操作指示されたファイルに対する開始クラスタ位置を検索するディレクトリ操作工程と、
前記検索された開始クラスタ位置、前記ファイル割り付け表のFATデータ、および記憶手段に保持されている1つ以上のFATキャッシュデータを参照して、前記ファイル操作工程で操作指示されたファイルのデータ本体に対する前記記憶媒体内のクラスタ位置を求めるFAT操作工程とを有し、
前記FAT操作工程では、新たなFATキャッシュデータを生成し、前記記憶手段に保持されているFATキャッシュデータを前記生成されたFATキャッシュデータへ更新するための更新処理を行うことを特徴とするファイル管理方法。
A file management method for managing a file in the storage medium with reference to a file allocation table in which FAT data indicating a correspondence relationship between a cluster of the storage medium and a file stored in the storage medium is recorded. ,
A file operation process for instructing operation on a file designated by the user;
A directory operation step of obtaining directory information from the storage medium and searching for a start cluster position for a file instructed by the file operation means based on the directory information;
With reference to the searched start cluster position, FAT data of the file allocation table, and one or more FAT cache data held in the storage means, the data body of the file instructed in the file operation step A FAT operation step for obtaining a cluster position in the storage medium,
In the FAT operation step, new FAT cache data is generated, and an update process for updating the FAT cache data held in the storage means to the generated FAT cache data is performed. Method.
記憶媒体のクラスタと該記憶媒体に保存されているファイルとの対応関係を示すFATデータが記録されるファイル割り付け表を参照して前記記憶媒体内のファイルの管理を行うシステムを構築するためのプログラムであって、
ユーザにより指定されたファイルに対する操作指示を行うファイル操作モジュールと、
前記記憶媒体からディレクトリ情報を取得し、該ディレクトリ情報に基づいて前記ファイル操作手段により操作指示されたファイルに対する開始クラスタ位置を検索するディレクトリ操作モジュールと、
前記検索された開始クラスタ位置、前記ファイル割り付け表のFATデータ、および記憶手段に保持されている1つ以上のFATキャッシュデータを参照して、前記ファイル操作モジュールにより操作指示されたファイルのデータ本体に対する前記記憶媒体内のクラスタ位置を求めるFAT操作モジュールとを有し、
前記FAT操作モジュールは、新たなFATキャッシュデータを生成し、前記記憶手段に保持されているFATキャッシュデータを前記生成されたFATキャッシュデータへ更新するための更新処理を行うことを特徴とするプログラム。
A program for constructing a system for managing files in the storage medium by referring to a file allocation table in which FAT data indicating a correspondence relationship between a cluster of the storage medium and a file stored in the storage medium is recorded Because
A file operation module for instructing operations on a file specified by the user;
A directory operation module that acquires directory information from the storage medium and searches for a start cluster position for a file that is instructed by the file operation means based on the directory information;
With reference to the searched start cluster position, the FAT data of the file allocation table, and one or more FAT cache data held in the storage means, the data body of the file instructed by the file operation module A FAT operation module for determining a cluster position in the storage medium,
The FAT operation module generates new FAT cache data, and performs an update process for updating the FAT cache data held in the storage unit to the generated FAT cache data.
請求項7記載のプログラムをコンピュータ読み取り可能に格納したことを特徴とする記憶媒体。   A storage medium storing the program according to claim 7 in a computer-readable manner.
JP2005274414A 2005-09-21 2005-09-21 FAT file system, file management method, program, and storage medium Expired - Fee Related JP4920937B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005274414A JP4920937B2 (en) 2005-09-21 2005-09-21 FAT file system, file management method, program, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005274414A JP4920937B2 (en) 2005-09-21 2005-09-21 FAT file system, file management method, program, and storage medium

Publications (2)

Publication Number Publication Date
JP2007087063A true JP2007087063A (en) 2007-04-05
JP4920937B2 JP4920937B2 (en) 2012-04-18

Family

ID=37973990

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005274414A Expired - Fee Related JP4920937B2 (en) 2005-09-21 2005-09-21 FAT file system, file management method, program, and storage medium

Country Status (1)

Country Link
JP (1) JP4920937B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009288924A (en) * 2008-05-28 2009-12-10 Nec Electronics Corp File access system
JP2011118623A (en) * 2009-12-02 2011-06-16 Canon Inc Data synchronization apparatus

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004078704A (en) * 2002-08-20 2004-03-11 Sony Corp Image and sound record/playback device and file read/write method thereof
JP2004362092A (en) * 2003-06-03 2004-12-24 Canon Inc File system with fat cache function

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004078704A (en) * 2002-08-20 2004-03-11 Sony Corp Image and sound record/playback device and file read/write method thereof
JP2004362092A (en) * 2003-06-03 2004-12-24 Canon Inc File system with fat cache function

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009288924A (en) * 2008-05-28 2009-12-10 Nec Electronics Corp File access system
JP2011118623A (en) * 2009-12-02 2011-06-16 Canon Inc Data synchronization apparatus

Also Published As

Publication number Publication date
JP4920937B2 (en) 2012-04-18

Similar Documents

Publication Publication Date Title
US7987190B2 (en) Filesystem having a filename cache
ES2578186T3 (en) Backup and restore strategies for data deduplication
KR100790991B1 (en) Method for managing metadata of file system using DBMS
US20080140905A1 (en) Magnetic disk unit, file management system, and file management method
GB2204161A (en) Method of rapidly opening disk files identified by path names
US8433871B2 (en) Data copy management for faster reads
JP2001101046A (en) Device and method for processing information and computer readable memory
KR20000022716A (en) Efficient volume copy using pre-configuration of log structured target storage
JP2000298608A (en) Computer data storage medium and memory managing method
JP5447523B2 (en) Data processing apparatus, data recording method, and data recording program
JP4130808B2 (en) Formatting method
JP4920937B2 (en) FAT file system, file management method, program, and storage medium
JP2006313531A (en) File management system
US20050149493A1 (en) Data recording apparatus and data recording method
JP2003271439A (en) Information processing device and program
US9063656B2 (en) System and methods for digest-based storage
JP2006127377A (en) Fat file system
JP2009205591A (en) Access module, information recording module, and information recording system
JP7262977B2 (en) RECORDING DEVICE, CONTROL METHOD THEREOF, AND PROGRAM
JP2004362092A (en) File system with fat cache function
JP2008134777A (en) Caching method of file allocation table
JP3904182B2 (en) Data management system and data management method using the same
JP2008171212A (en) File management device and program
JP2005222531A (en) Data recording apparatus and data recording method
JP2014137749A (en) Storage device, write control method, and write control program

Legal Events

Date Code Title Description
RD05 Notification of revocation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7425

Effective date: 20070626

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080922

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110513

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110523

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110722

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20120131

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120202

R151 Written notification of patent or utility model registration

Ref document number: 4920937

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150210

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees