Movatterモバイル変換


[0]ホーム

URL:


JP2005149291A - File system, program thereof, and information processing system - Google Patents

File system, program thereof, and information processing system
Download PDF

Info

Publication number
JP2005149291A
JP2005149291AJP2003388031AJP2003388031AJP2005149291AJP 2005149291 AJP2005149291 AJP 2005149291AJP 2003388031 AJP2003388031 AJP 2003388031AJP 2003388031 AJP2003388031 AJP 2003388031AJP 2005149291 AJP2005149291 AJP 2005149291A
Authority
JP
Japan
Prior art keywords
data
file system
information
area
management area
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.)
Pending
Application number
JP2003388031A
Other languages
Japanese (ja)
Inventor
Yoshimichi Sato
美道 佐藤
Takashi Kiyono
隆 清野
Akira Karakama
章 唐鎌
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.)
Hitachi High Tech Corp
Original Assignee
Hitachi High Technologies Corp
Hitachi High Tech Corp
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 Hitachi High Technologies Corp, Hitachi High Tech CorpfiledCriticalHitachi High Technologies Corp
Priority to JP2003388031ApriorityCriticalpatent/JP2005149291A/en
Publication of JP2005149291ApublicationCriticalpatent/JP2005149291A/en
Pendinglegal-statusCriticalCurrent

Links

Images

Landscapes

Abstract

Translated fromJapanese

【課題】予期せぬ電源の遮断が生じてもデータが破壊されず、ファイルシステムの情報の整合性を確保する。
【解決手段】データ領域とデータの配置を管理する管理領域を別に有するファイルシステムにおいて、データ本体の情報を読取り、新たなデータとマージし、マージしたデータをデータ領域の未使用領域へ書き込む。その後に管理領域であるテーブルT1、T2の情報を更新する。電源の復旧時に、テーブルT1、T2のエラーチェックと内容比較の検査を行い、検査結果によりファイルシステムの異常を判断し、正しいデータを参照できるように修復する。常に正しい状態のデータとテーブル情報を確保でき、復旧処理が迅速に行える。
【選択図】 図3
Data consistency is ensured even when an unexpected power interruption occurs, and the consistency of information in a file system is ensured.
In a file system separately having a data area and a management area for managing the arrangement of data, information on the data body is read, merged with new data, and the merged data is written to an unused area of the data area. Thereafter, the information in the tables T1 and T2 which are management areas is updated. When the power is restored, the table T1 and T2 are checked for errors and compared, the file system abnormality is determined based on the check result, and the data is repaired so that correct data can be referenced. Data and table information that is always in the correct state can be secured, and recovery processing can be performed quickly.
[Selection] Figure 3

Description

Translated fromJapanese

本発明は情報処理システムに係り、特にハードディスクなど2次記憶内のデータの破壊や不整合を防止するファイルシステムに関する。  The present invention relates to an information processing system, and more particularly to a file system that prevents destruction or inconsistency of data in secondary storage such as a hard disk.

近年、ハードディスク装置の小型化、低価格化が進み、情報制御装置や機器へ広く応用されている。また、フラッシュメモリデバイスの高集積化、低価格化が進み、小型軽量、低消費電力等の特徴を生かし、従来のハードディスクの代替として用いられるようになってきている。これら2次記憶装置の浸透は一方で、従来は想定されなかった使用条件の問題を孕んでいる。  In recent years, hard disk devices have been reduced in size and price, and are widely applied to information control devices and devices. In addition, flash memory devices have been increasingly integrated and reduced in price, and have been used as an alternative to conventional hard disks by taking advantage of features such as small size and light weight and low power consumption. On the other hand, the penetration of these secondary storage devices has a problem of use conditions that have not been assumed in the past.

ハードディスクはパーソナルコンピュータで標準装備されているが、その記録データの内容はファイルと呼ぶ形式で操作される。データの本体はクラスタやセクタと呼ばれる一定容量のブロックに分割して記録し、これらを複数束ねることで構成されている。そして、複数のクラスタの配置や順序を管理するテーブル情報や、ファイルの名称を関連付ける情報を付加することによってファイルシステムが構築されている。ファイルシステムは多くの情報制御機器でも、その互換性を保つことによって利便性が高まるために利用されている。  The hard disk is standard equipment in a personal computer, but the contents of the recorded data are operated in a format called a file. The data body is divided and recorded in blocks of a certain capacity called clusters and sectors, and a plurality of these are bundled. A file system is constructed by adding table information for managing the arrangement and order of a plurality of clusters and information for associating file names. The file system is used in many information control devices in order to increase convenience by maintaining compatibility.

しかしながら、データの書換えなどファイルの操作中に電源が遮断されると、データが破壊されたり、テーブルの情報の整合性が失われたりして、その後の機器の動作が正しく行えなくなることがある。突然の電源遮断は落雷や電源容量の不足、あるいは電源コードの抜けなど、原因は複数の外部要因であることが多い。  However, if the power is shut off during file operations such as data rewriting, the data may be destroyed or the consistency of the information in the table may be lost, and subsequent device operations may not be performed correctly. Sudden power cuts are often caused by a number of external factors such as lightning strikes, lack of power supply capacity, or disconnection of the power cord.

このような予期しない電源遮断に対し、無停電電源装置(Uninterruptible Power Supply;UPS)を備え、システムに悪影響が残らない状態になるまで電力を供給する方法が知られている。しかし、無停電電源装置は予備電源としてバッテリを用いるため、小型化、低価格化が容易ではない。また、耐環境性や寿命、メンテナンスの問題もある。  For such an unexpected power interruption, there is known a method of supplying an electric power until an uninterruptible power supply (UPS) is provided and no adverse effect is left on the system. However, since the uninterruptible power supply uses a battery as a standby power supply, it is not easy to reduce the size and price. There are also problems with environmental resistance, life and maintenance.

他の解決方法として、パーソナルコンピュータでは復旧処置としてスキャンディスクと呼ばれるファイルシステム情報の全体検査と修復を実行する方法が知られている。スキャンディスクによる方法では全体検査の時間が長大となる問題がある。また、データの内容は必ずしも保証できないなど、修復可能な損害の範囲が限られている。  As another solution, there is known a method of executing a whole inspection and repair of file system information called a scan disk as a recovery procedure in a personal computer. The scan disk method has a problem that it takes a long time for the entire inspection. In addition, the scope of damage that can be repaired is limited, such as the contents of data cannot always be guaranteed.

近年、これらの解決策としてジャーナリングファイルシステム(Journaling File System)が導入されてきている。ファイルへの変更作業のログを別途、常に記録し、電源の遮断が生じた際には復旧時に短時間で検査、修復を実行できる方法である。特許文献1には複数のジャーナルデータをまとめて記憶媒体(フラッシュATAカード)に書き込むことにより、性能の改善や書込み回数を低減する改良方法が示されている。特許文献2にはジャーナル記録に相当する「状況データ」を不揮発性メモリに記録する方法が示されている。  In recent years, a journaling file system has been introduced as a solution to these problems. This is a method in which a separate log of changes to files is always recorded, and when power is cut off, inspection and repair can be executed in a short time at the time of recovery.Patent Document 1 discloses an improved method for improving performance and reducing the number of times of writing by collectively writing a plurality of journal data to a storage medium (flash ATA card).Patent Document 2 discloses a method of recording “status data” corresponding to journal recording in a nonvolatile memory.

また、他の解決方法として、特許文献3には第2の記憶媒体を更新専用として設けることによって初期的なファイルが失われないようにする方法が示されている。さらに、他の解決方法として、特許文献4には一時的にファイルインデックスを冗長に作成し、更新の際の手順を厳格に行うことによって復旧処理を簡略にする方法が示されている。  As another solution,Patent Document 3 discloses a method for preventing an initial file from being lost by providing a second storage medium exclusively for updating. Furthermore, as another solution,Patent Document 4 discloses a method of simplifying the recovery process by temporarily creating a redundant file index and strictly performing the update procedure.

特開2001−209567公報JP 2001-209567 A

特開2002−358248公報JP 2002-358248 A特開2002−36449公報JP 2002-36449 A特開2002−63057公報JP 2002-63057 A

上記のジャーナリングファイルシステムは復旧処置の検査時間は短いが、通常動作における手順が増加するため処理性能が低下してしまう。従って、ファイルシステムを完全に保証するほどの記録をしない場合が多い。また、標準的なファイルシステムとの互換性を持ちながら問題を解決することは困難である。  The journaling file system described above has a short inspection time for the recovery procedure, but the processing performance deteriorates because the number of procedures in normal operation increases. Therefore, there are many cases where the recording is not performed so as to completely guarantee the file system. It is also difficult to solve the problem while having compatibility with a standard file system.

特許文献1に記載の方法では複数のジャーナルデータをRAMにまとめてから記憶媒体に書き込むため、複数の記録が失われてしまう場合がある。特許文献2に記載の方法では状況データの書込み手順が多すぎ、性能が低下する。また、不揮発性メモリを別途用いるためにコストが増加する。  In the method described inPatent Document 1, since a plurality of journal data are collected in a RAM and then written to a storage medium, a plurality of records may be lost. In the method described inPatent Document 2, there are too many status data writing procedures, and the performance deteriorates. Further, the cost increases because the nonvolatile memory is separately used.

特許文献3に記載の方法では2つの記憶媒体を用いるためコストが増大する。また、読み書き専用媒体のファイルシステムが破綻したときは多くの新しい情報が失われてしまう。  The method described inPatent Document 3 uses two storage media, which increases the cost. Also, a lot of new information is lost when the file system of a read / write-only medium fails.

特許文献4に記載の方法では一時的なファイルインデックスを作成、削除する手順が通常動作に加わり性能が低下する。また、1セクタ内での書込みは瞬時に行われ書込み不全は有り得ないとしているが、一般の記憶媒体では書込み不全は起こり得る。特に書込み動作に時間のかかるフラッシュメディアでは問題となる。  In the method described inPatent Document 4, a procedure for creating and deleting a temporary file index is added to the normal operation and the performance is degraded. Although writing in one sector is performed instantaneously and writing failure is impossible, writing failure may occur in a general storage medium. This is particularly a problem with flash media that take time to write.

本発明が解決しようとする課題は、上記の従来技術の問題点に鑑み、予期せぬ電源の遮断が生じて更新処理が中断されたり、書込み不全があっても、正しいデータや管理情報を確保し、情報の整合性が失われないようにしたファイルシステムを提供することにある。また、そのためのプログラムを提供することにある。  The problem to be solved by the present invention is to ensure correct data and management information even if the update process is interrupted or there is a write failure due to unexpected power interruption due to the above-mentioned problems of the prior art And providing a file system in which the integrity of information is not lost. Another object is to provide a program for this purpose.

上記の課題を解決するための本発明は、データ領域とデータの配置を管理する管理領域を別に有するファイルシステムにおいて、データ本体の情報を読取り、新たなデータとマージし、マージしたデータをデータ領域の未使用領域へ書込み、その後に第1の管理領域(テーブルT1)を更新し、ついで第2の管理領域(テーブルT2)の情報を更新する。さらに、第1の管理領域の情報と第2の管理領域の情報を比較し異常の有無を判断する。  The present invention for solving the above-mentioned problems is a file system having a data area and a management area for managing the arrangement of data separately, reads information on the data body, merges it with new data, and merges the merged data into the data area The first management area (table T1) is updated, and then the information in the second management area (table T2) is updated. Further, the information of the first management area and the information of the second management area are compared to determine whether there is an abnormality.

これによって、常に正しい状態のデータとテーブル情報を確保できるようにしたものである。また、予期せぬ電源の遮断などが発生しても、復旧時にテーブルT1、T2のエラーチェックと内容比較を行うので、ファイルシステムの異常を容易に判断することができるようにしたものである。  As a result, data and table information in a correct state can always be secured. In addition, even if an unexpected power interruption occurs, the error check and contents comparison of the tables T1 and T2 are performed at the time of recovery, so that an abnormality in the file system can be easily determined.

本発明によれば2次記憶装置上のファイルシステムにおいて、テーブルT1、T2のエラーチェックと内容比較を行い、その比較結果によりファイルシステムの異常を判断し、正しいデータを参照できるように修復することができる。つまり、本発明によれば予期せぬ電源の遮断が生じても正しいデータが確保され、ファイルシステム情報の整合性を保つファイルシステムを、性能を大きく損なうことなく低コストで構築できる効果がある。  According to the present invention, in the file system on the secondary storage device, the error check and contents comparison of the tables T1 and T2 are performed, and the abnormality of the file system is judged based on the comparison result so that correct data can be referred to. Can do. That is, according to the present invention, it is possible to construct a file system that can secure correct data even when the power supply is unexpectedly shut down and maintain the consistency of the file system information at a low cost without greatly degrading the performance.

以下、本発明の実施形態を説明する。図1はファイルシステムを適用する装置の概略の構成図を示す。本装置はCPU101、ROM102、RAM103、I/O105、I/F106、2次記憶装置107で構成する。  Embodiments of the present invention will be described below. FIG. 1 is a schematic configuration diagram of an apparatus to which a file system is applied. This apparatus includes aCPU 101,ROM 102,RAM 103, I /O 105, I /F 106, andsecondary storage device 107.

CPU101はバス104の接続により他の構成部品と情報の入出力や、プログラムに基づいて数値演算や論理演算を行い、装置全体を制御するもので半導体デバイスの代表的なものである。  TheCPU 101 is a representative semiconductor device that controls the entire apparatus by inputting and outputting information to and from other components by connecting thebus 104 and performing numerical operations and logical operations based on programs.

ROM102はプログラムを記憶する半導体メモリデバイスである。読出し専用で電源を遮断しても内容は失われず、主に装置の立上げ動作に必要なプログラムを格納する。RAM103は読出しと書込みが自由な半導体メモリデバイスである。装置の動作中に2次記憶装置107のプログラムをコピーして使用したり、一時的にデータを格納する。  TheROM 102 is a semiconductor memory device that stores programs. The contents are not lost even when the power is shut off for read-only purposes, and mainly stores the programs necessary for the startup operation of the device. TheRAM 103 is a semiconductor memory device that can be freely read and written. During the operation of the apparatus, the program in thesecondary storage device 107 is copied and used, or data is temporarily stored.

I/O105は2次記憶装置107以外の各種の入出力である。通信装置やセンサ、アクチュエータを接続する。本発明において特に関連がないので詳細説明は省略する。I/F(Interface)106は2次記憶装置107とバス104を接続するためのプロトコル変換を行うものである。  The I /O 105 is various inputs / outputs other than thesecondary storage device 107. Connect communication devices, sensors, and actuators. Since there is no particular relevance in the present invention, detailed description is omitted. An I / F (Interface) 106 performs protocol conversion for connecting thesecondary storage device 107 and thebus 104.

2次記憶装置107はコンパクトフラッシュ(登録商標)、フラッシュメモリカード等のリムーバブルメディア(Removable Media)、またはハードディスク、あるいはフレキシブルディスク等である。また、近年市場に現れてきたフラッシュディスクでもよい。フラッシュディスクとは磁気ディスクではなく、フラッシュメモリデバイスを内蔵して記憶装置を構成しているものでハードディスクと同一プロトコルで接続できる。  Thesecondary storage device 107 is a removable media such as a compact flash (registered trademark) or a flash memory card, a hard disk, or a flexible disk. Also, a flash disk that has recently appeared on the market may be used. A flash disk is not a magnetic disk, but a flash memory device is built in to constitute a storage device, and can be connected with the same protocol as a hard disk.

図2はファイルシステムの適用装置のソフトウエアの概略構成図を示す。本装置のソフトウエアはCPU101が使用するプログラム群であり、ROM102に格納している。アプリケーション201、オペレーティングシステム202、またはI/Oライブラリ203で構成する。また、復旧処理プログラム206を備える。オペレーティングシステム202とI/Oライブラリ203はいずれか一つがあれば良く、本発明はいずれの形態にも適用できる。なお、プログラム群は起動時に必要最小限のものをROM102に格納し、残りを記憶媒体107に分割格納しても良い。  FIG. 2 is a schematic configuration diagram of software of a file system application apparatus. The software of this apparatus is a program group used by theCPU 101 and is stored in theROM 102. Theapplication 201, theoperating system 202, or the I /O library 203 is used. Arecovery processing program 206 is also provided. Any one of theoperating system 202 and the I /O library 203 is sufficient, and the present invention can be applied to any form. Note that the minimum necessary program group may be stored in theROM 102 at startup, and the rest of the program group may be divided and stored in thestorage medium 107.

オペレーティングシステム(OS)202は主に種々の入出力デバイスを管理するとともに、アプリケーションからのデバイスの参照を容易にする汎用性のある基本ソフトウエアである。ファイルシステム204は2次記憶上のデータをファイルとして扱うためのコンポーネントである。最下層のデバイスドライバ205は直接デバイス入出力操作を行うもので個々のデバイスに特有なプロトコルやパラメータを吸収し、上位のファイルシステム204がデバイス毎個別にならないように隠蔽する。  An operating system (OS) 202 is general-purpose basic software that mainly manages various input / output devices and facilitates reference of devices from applications. Thefile system 204 is a component for handling data on the secondary storage as a file. Thelowermost device driver 205 directly performs device input / output operations, absorbs protocols and parameters peculiar to each device, and hides theupper file system 204 so that it does not become individual for each device.

I/Oライブラリ203はオペレーティングシステム202を用いずに2次記憶107を参照する場合の手段である。オペレーティングシステムと同様にファイルシステム管理、デバイス入出力操作を行うためのソフトウエアインタフェースである。オペレーティングシステム202を用いるより最適化(高速、コンパクト)が期待できる。一方で最適化はI/Oライブラリの汎用性が乏しくなる場合がある。  The I /O library 203 is a means for referring to thesecondary storage 107 without using theoperating system 202. It is a software interface for file system management and device input / output operations, similar to the operating system. Optimization (high speed and compactness) can be expected from using theoperating system 202. On the other hand, optimization may make the I / O library less versatile.

図8にファイルシステムに必要とされる記録情報の説明図を示す。ハードディスクなどの2次記憶装置107の記憶領域801において、ファイルシステムの情報は3つの領域に配置される。3つの領域とは、テーブル領域802(T1)と803(T2)、ディレクトリ領域804、データ領域805である。それぞれは記憶領域上の固定位置に配置されている。  FIG. 8 is an explanatory diagram of recording information required for the file system. In thestorage area 801 of thesecondary storage device 107 such as a hard disk, file system information is arranged in three areas. The three areas are table areas 802 (T1) and 803 (T2), adirectory area 804, and adata area 805. Each is arranged at a fixed position on the storage area.

テーブル領域は記録されたデータ本体がどのクラスタにどのような順序で配置されているかの情報を収めるものである。T2(803)はT1(802)と同一内容(コピー)であり、一方のテーブルが損傷しても本体配置情報が確保できるようにしている。  The table area stores information on which cluster the recorded data body is arranged in what order. T2 (803) has the same content (copy) as T1 (802), and the main body arrangement information can be secured even if one of the tables is damaged.

図の例はテーブル20番に“21”の数値が書き込まれている。これはクラスタ20番には有効データが存在し、続くデータがクラスタ21番に存在していることを示す。そして、テーブル21番には“22”の数値が書き込まれているが、これはクラスタ21番に有効データが存在し、続くデータがクラスタ22番に存在していることを示す。テーブル22番には“E”(ENDの意)のコードが書き込まれているが、これはクラスタ22番に有効データが存在し、続くデータはなく最後尾のデータが収められていることを示す。なお、図中の“−”は有効データの存在しないことを示すコードが書き込まれている。  In the example shown in the figure, a numerical value “21” is written in table 20. This indicates that valid data exists incluster 20 and subsequent data exists incluster 21. The numerical value “22” is written in the table 21, which indicates that valid data exists in thecluster 21 and subsequent data exists in thecluster 22. A code of “E” (END) is written in the table No. 22, which indicates that valid data exists in the cluster No. 22, and there is no subsequent data and the last data is stored. . In the figure, “-” indicates a code indicating that no valid data exists.

ディレクトリ領域804はファイル毎にファイル名、更新日時、ファイルサイズ(大きさ)などの他、先頭クラスタ番号の情報を収める。先頭クラスタ番号とはデータ本体の先頭が何番のクラスタに存在するかを示す。図の例では、あるファイルがクラスタ20番に先頭のデータを収めていることを示している。例えば、実際の使用方法としてこのファイルのデータを参照するときは、ファイル名でディレクトリ領域を検索し、そして先頭クラスタ番号が20番であることから、データの本体配置情報をT1(802)のテーブル20番から順次たどっていけばよい。  Thedirectory area 804 stores the information of the head cluster number in addition to the file name, update date and time, file size (size), and the like for each file. The head cluster number indicates in what number cluster the head of the data body exists. In the example of the figure, it is shown that a certain file contains the top data in thecluster 20. For example, when referring to the data of this file as an actual usage method, the directory area is searched by the file name, and the head cluster number is 20, so that the main body arrangement information of the data is stored in the T1 (802) table. You can follow from the 20th.

データ領域805はファイルデータ本体を収める。前述のようにデータはクラスタに分割して記録される。図の例はクラスタ20番から22番に渡ってデータが“A”、“B”,“C”の部分ごとに収められていることを示している。なお、クラスタの大きさは一般に512バイトから64Kバイトであり、これより小さいデータのファイルであれば1つのクラスタのみを占有する。  Thedata area 805 contains the file data body. As described above, data is divided and recorded in clusters. The example in the figure shows that data is stored for each portion of “A”, “B”, and “C” acrossclusters 20 to 22. The size of the cluster is generally from 512 bytes to 64 Kbytes, and if the data file is smaller than this, only one cluster is occupied.

それぞれの書込みの順序は規定があるわけでなく、データ領域への書込みに先んじてテーブルの更新を行っていることが多い。  The order of writing is not specified, and the table is often updated prior to writing to the data area.

問題はファイルシステム情報の一連の更新処理の実行中に電源の遮断が起きたときに発生する。書込みが正常に終了せず内容が破壊された場合だけでなく、データ書換えが一部だけ行われたり、あるいはテーブルのみが更新されただけの段階で処理が中断すれば、一般にファイルとして参照されるデータの内容は保証されなくなる。しかも、異常の生じた個所の特定は容易ではない。  The problem occurs when a power interruption occurs during a series of file system information update processing. It is generally referred to as a file if the processing is interrupted only when a part of the data is rewritten or only the table is updated, not only when the writing does not end normally and the contents are destroyed. Data content is no longer guaranteed. Moreover, it is not easy to identify the location where an abnormality has occurred.

図3は本発明の一実施例により、ファイルの一部を更新するときの制御手順を示すフローチャートである。上位アプリケーションからファイルへの書込み要求に応じ、図8で説明したファイルシステム情報に対して一連の操作を行う。  FIG. 3 is a flowchart showing a control procedure for updating a part of a file according to an embodiment of the present invention. A series of operations are performed on the file system information described with reference to FIG.

まず、書込みデータサイズ分の未使用クラスタを検索する(ステップS01)。本発明では書込み以前のデータへの上書きはせず、新規のデータ書込みは必ず未使用状態のクラスタに対して行うので、テーブルの情報を検索すればよい。以降、検索の結果で書込みを行うことを決定したデータ領域805のクラスタに対しクラスタ毎に書込み操作を行う。  First, an unused cluster for the write data size is searched (step S01). In the present invention, data prior to writing is not overwritten, and new data writing is always performed on an unused cluster. Therefore, information in the table may be searched. Thereafter, a write operation is performed for each cluster on the cluster in thedata area 805 determined to be written as a result of the search.

次に部分書換えか否か判定する(ステップS02)。ここでの部分書換えとは書込みの新規データがクラスタサイズより小さく、しかも書き込み以前のデータとマージ(合併)しなければデータの一部を失ってしまうケースである。部分書換えでなければステップS05へ進む。  Next, it is determined whether or not partial rewriting is performed (step S02). The partial rewriting here is a case where the new data to be written is smaller than the cluster size and part of the data is lost unless merged with the data before writing. If it is not partial rewriting, the process proceeds to step S05.

部分書換えであれば1クラスタ分のデータ読出しを行う(ステップS03)。読み出すデータは書込み以前の有効データである。ステップS03で読出したデータに書き込みデータをマージする(ステップS04)。  If partial rewriting is performed, data for one cluster is read (step S03). The data to be read is valid data before writing. The write data is merged with the data read in step S03 (step S04).

次に、ステップS05で、1クラスタ分の新規データをステップS01で検索した未使用クラスタに書込む。そして、書き残したデータがあるか判定する(ステップS06)。言い換えれば、書込み予定の全てのクラスタへの書込みを完了したかどうかである。書き残しがあれば、次の未使用クラスタへの書込みを行うため、ステップS02へ進む。  Next, in step S05, new data for one cluster is written into the unused cluster searched in step S01. Then, it is determined whether there is unwritten data (step S06). In other words, whether or not writing to all clusters scheduled for writing has been completed. If there is any unwritten data, the process proceeds to step S02 in order to write to the next unused cluster.

書き残しがなければ、テーブルT1(802)を更新し(ステップS07)、新規データの書込みを行ったクラスタへ対応を合致させる。本実施例ではこのステップをデータ領域への書込みが完了した後に行う。さらに、テーブルT2(803)を更新し(ステップS08)、T1(802)と同一の情報を書込む。  If there is no unwritten data, the table T1 (802) is updated (step S07), and the correspondence is matched with the cluster in which the new data is written. In this embodiment, this step is performed after the writing to the data area is completed. Furthermore, the table T2 (803) is updated (step S08), and the same information as T1 (802) is written.

以上のように、新規データの書込みを全て未使用クラスタに対して行い、その後でテーブルT1の更新、続いてテーブルT2の更新を行う。  As described above, all new data is written to the unused cluster, and then the table T1 is updated, and then the table T2 is updated.

次に、本実施例の制御手順によるファイルシステムの情報操作の1例を具体的に説明する。図4はファイルのデータの一部を更新するときの一連の状態変化を示す説明図である。  Next, an example of file system information operation according to the control procedure of this embodiment will be described in detail. FIG. 4 is an explanatory diagram showing a series of state changes when a part of file data is updated.

(1)は更新前の状態である。ファイルはデータ領域805のクラスタ20番、21番、22番へ順序どおりに記録されている。データは“A”、“B”、“C”の3部位に分割管理されている。テーブルT1(802)とT2(803)、ディレクトリ804の内容も対応している。  (1) is the state before update. Files are recorded in order in clusters No. 20, No. 21, and No. 22 in thedata area 805. The data is divided and managed in three parts “A”, “B”, and “C”. The contents of the tables T1 (802) and T2 (803) and thedirectory 804 also correspond.

(2)は更新動作例で、“B”の部位の一部に対応するデータを書換える。未使用クラスタ検索で決定したクラスタは23番であったことを示す(図3のステップS01)。部分書換えであるので、クラスタ21番の旧データと新規データをマージしてクラスタ23番に書込む(図3のステップS02、S03、S04、S05)。新規のデータは“B’”である。本例では1クラスタの書込みだけで書き残し無くデータ領域の書込みを完了する(図3のステップS06)。  (2) is an update operation example, and data corresponding to a part of the part “B” is rewritten. This indicates that the cluster determined by the unused cluster search is No. 23 (step S01 in FIG. 3). Since this is partial rewriting, the old data and new data incluster 21 are merged and written into cluster 23 (steps S02, S03, S04, S05 in FIG. 3). The new data is “B ′”. In this example, the writing of the data area is completed with no writing left by only writing one cluster (step S06 in FIG. 3).

(3)はテーブルT1(802)の更新である。データの連結順序は“A”、“B’”、“C”であり、本例ではクラスタ配置と異なる。クラスタ21番の旧データは無効化し、クラスタ23番のデータを有効化する(図3のステップS07)。  (3) is an update of the table T1 (802). The data connection order is “A”, “B ′”, “C”, which is different from the cluster arrangement in this example. The old data ofcluster 21 is invalidated and the data ofcluster 23 is validated (step S07 in FIG. 3).

(4)はテーブルT2(803)の更新である(図3のステップS08)。以上のようにデータとテーブルの更新を行う。  (4) is an update of the table T2 (803) (step S08 in FIG. 3). Data and tables are updated as described above.

次に、本実施例の制御手順により、動作中に電源の遮断が発生した場合の対応方法を説明する。図5は、図4における動作例での3つの書込み動作中にそれぞれ電源の遮断(Power−fail)が起きた状態を示す。  Next, a description will be given of a method for dealing with a case where a power interruption occurs during operation according to the control procedure of the present embodiment. FIG. 5 shows a state in which power-off occurs during each of the three write operations in the operation example of FIG.

(a)はデータ領域(805)への書込み中に電源が遮断されたケースである。新規データのクラスタ“B’”の内容は破壊されている。この場合、再起動後にはテーブル情報とデータの対応はデータ更新直前のものと合っている。かつデータは損傷を受けていないものを参照できる。なお、データの書換えだけ完了し、テーブルは全く更新していない段階で電源遮断が生じた場合も同様である。  (A) is a case where the power supply was cut off during writing to the data area (805). The contents of the new data cluster “B ′” have been destroyed. In this case, after the restart, the correspondence between the table information and the data matches that immediately before the data update. And the data can refer to undamaged. The same applies to the case where the power is cut off at the stage where only data rewriting is completed and the table is not updated at all.

(b)はテーブルT1(802)への書込み中に電源が遮断されたケースである。テーブルT1の内容は破壊されている。この場合、再起動後にはテーブルT2(803)の情報とデータの対応はデータ更新直前のものと合っている。かつデータは損傷を受けていないものを参照できる。通常はT1を用いてデータを参照するので、再起動時にT1とT2の内容を検査し、この場合についてはT2の内容をT1にコピーして使用すればよい。検査方法については後述する。  (B) is a case where the power supply is cut off during writing to the table T1 (802). The contents of table T1 are destroyed. In this case, after the restart, the correspondence between the information in the table T2 (803) and the data matches that immediately before the data update. And the data can refer to undamaged. Usually, since data is referred to using T1, the contents of T1 and T2 are inspected at the time of restart. In this case, the contents of T2 may be copied to T1 and used. The inspection method will be described later.

(c)はテーブルT2(803)への書込み中に電源が遮断されたケースである。テーブルT2の内容は破壊されている。この場合、再起動後にはテーブルT1(802)の情報とデータの対応はデータ更新後のものと合っている。かつデータは損傷を受けていないものを参照できる。通常はT1を用いてデータを参照するが、再起動時にT1とT2の内容を検査し、この場合についてはT1の内容をT2にコピーしておく。検査方法については後述する。  (C) is a case where the power supply is cut off during writing to the table T2 (803). The contents of table T2 are destroyed. In this case, after the restart, the correspondence between the information in the table T1 (802) and the data matches that after the data update. And the data can refer to undamaged. Normally, data is referred to using T1, but the contents of T1 and T2 are inspected at the time of restart. In this case, the contents of T1 are copied to T2. The inspection method will be described later.

以上のように本実施例の制御手順によれば、動作中に電源の遮断が生じてもデータやテーブル情報が守られる。  As described above, according to the control procedure of the present embodiment, data and table information can be protected even if the power is cut off during operation.

次に、再起動後(復旧時)のテーブルの検査方法の例を説明する。図6はテーブルの検査結果と判定を示す説明図である。主な検査項目は「エラーチェック」と「内容比較」である。  Next, an example of a table inspection method after restart (during recovery) will be described. FIG. 6 is an explanatory diagram showing the inspection result and determination of the table. The main inspection items are “error check” and “content comparison”.

「エラーチェック」はテーブルT1(802)とT2(803)を読み出し、デバイス固有のエラー(サムチェックやCRCのような冗長検査符号による)が発生したかどうかを調べることを示す。デバイスへの書込みが正常に終了しなかったとき、殆どはこのチェックで検出される。  “Error check” indicates that the tables T1 (802) and T2 (803) are read to check whether a device-specific error (due to a redundancy check code such as a sum check or CRC) has occurred. When the writing to the device does not end normally, most of the time is detected by this check.

「内容比較」はテーブルT1(802)とT2(803)の内容をビット単位で比較するものである。上記の制御手順によれば、T1とT2の内容が完全に一致しているとき、テーブル情報とデータの対応は合っており、なおかつデータは損傷の無いものを参照できる。以下、検査結果によってどのように判定できるか、詳細を説明する。  “Content comparison” is to compare the contents of the tables T1 (802) and T2 (803) bit by bit. According to the above control procedure, when the contents of T1 and T2 are completely coincident with each other, the correspondence between the table information and the data matches, and the data can be referred to without any damage. Hereinafter, details of how the determination can be made based on the inspection result will be described.

結果1(601)は、T1、T2にエラーなしで、T1=T2(完全一致)である。判定は、2つのテーブルは正常で、テーブル情報とデータは正しい状態にある。  The result 1 (601) is T1 = T2 (perfect match) without error in T1 and T2. The determination is that the two tables are normal and the table information and data are in the correct state.

結果2(602)は、T1、T2にエラーなしで、かつT1≠T2(不一致)である。判定はテーブル更新中に終了で、少なくとも一方のテーブルは正常である。この場合、さらにテーブルの整合性を検査することにより正常なテーブルを選定できる。  As a result 2 (602), there is no error in T1 and T2, and T1 ≠ T2 (mismatch). The determination ends during the table update, and at least one of the tables is normal. In this case, a normal table can be selected by further checking the consistency of the table.

例えばシングルチェーン検証である。クラスタの連結は枝分かれしないので、ある一つのクラスタへは一つ(または0個)のクラスタからしか連結しないはずである。しかし、テーブル情報の更新途中では一時的に2つからの連結状態が発生しうる。また、連結先のテーブル情報は“−”(データ無効)となるはずは無いが、やはり一時的に連結先のテーブル情報が“−”になりうる。このような異常状態を検出するのがシングルチェーン検証である。なお、内容比較において不一致になった部分についてのみ検査すれば短時間で異常を判定できる。  For example, single chain verification. Since the cluster connection is not branched, a certain cluster should be connected from only one (or zero) cluster. However, during the update of the table information, a connection state from two may occur temporarily. In addition, the table information of the link destination cannot be “−” (data invalid), but the table information of the link destination can temporarily be “−”. Single chain verification detects such an abnormal state. It should be noted that an abnormality can be determined in a short time by inspecting only a portion that does not match in the content comparison.

結果3(603)は、T1にエラー検出、T2にエラーなしで、T1≠T2である。判定はT1テーブル更新中に終了で、T2テーブルは正常である。  Result 3 (603) is T1 ≠ T2 with an error detected at T1 and no error at T2. The determination ends during the T1 table update, and the T2 table is normal.

結果4(604)は、T1にエラーなし、T2にエラー検出で、T1≠T2である。判定はT1テーブルは正常で、T2テーブル更新中に終了である。  In result 4 (604), no error is detected in T1, error detection is performed in T2, and T1 ≠ T2. The determination is normal for the T1 table and ends during the T2 table update.

結果5(605)は、T1、T2にエラー検出である。判定は媒体の異常である。  Result 5 (605) is error detection at T1 and T2. The determination is a medium abnormality.

以上のように検査結果から判定して、正常なテーブルに基づけば正しくデータを参照できる。次に、この検査を実現し復旧処理を行う手順を説明する。  As described above, it is possible to correctly refer to data by determining from the inspection result and based on a normal table. Next, a procedure for realizing the inspection and performing the recovery process will be described.

図7は復旧処理手順(復旧処理プログラム)を示すフローチャートである。まず、T1のエラーチェックを行う(ステップS001)。エラーが検出されればステップS004へ進み、検出されなければステップS002へ進む。  FIG. 7 is a flowchart showing a recovery processing procedure (recovery processing program). First, an error check for T1 is performed (step S001). If an error is detected, the process proceeds to step S004, and if not detected, the process proceeds to step S002.

次に、T2のエラーチェックを行う(ステップS002)。エラーが検出されればステップS006へ進み、検出されなければステップS003へ進む。  Next, an error check of T2 is performed (step S002). If an error is detected, the process proceeds to step S006, and if not detected, the process proceeds to step S003.

T1とT2の内容を比較する(ステップS003)。一致していれば処理を終了し、不一致であればステップS005へ進む。  The contents of T1 and T2 are compared (step S003). If they match, the process ends. If they do not match, the process proceeds to step S005.

ステップS004ではT2のエラーチェックを行う。エラーが検出されればステップS008へ進み、検出されなければステップS007へ進む。  In step S004, an error check of T2 is performed. If an error is detected, the process proceeds to step S008, and if not detected, the process proceeds to step S007.

ステップS005では不一致となった部位の情報についてT1の整合性を検査する。正常であればステップS006へ進み、異常が検出されればステップS007へ進む。  In step S005, the consistency of T1 is inspected with respect to the information on the mismatched parts. If normal, the process proceeds to step S006, and if an abnormality is detected, the process proceeds to step S007.

ステップS006ではT1の内容をT2に上書きコピーした後、処理を終了する。ステップS007ではT2の内容をT1に上書きコピーした後、処理を終了する。ステップS008では媒体異常を報告した後、処理を終了する。  In step S006, the contents of T1 are overwritten and copied on T2, and then the process ends. In step S007, the contents of T2 are overwritten and copied on T1, and then the process ends. In step S008, after the medium abnormality is reported, the process is terminated.

なお、復旧処理は装置の起動時に必ず行ってもよいし、検出手段を備えて、予期せぬ電源断が生じていたことを検出したときのみ実行することもできる。また、復旧処理プログラムそのものは通常は書換えを行わないデバイス(またはパーティション)に格納されていることが望ましい。  Note that the recovery process may be always performed when the apparatus is activated, or may be executed only when it is detected that an unexpected power interruption has occurred by providing a detection unit. Further, it is desirable that the restoration processing program itself is stored in a device (or partition) that is not normally rewritten.

次に本発明の他の実施例を説明する。図9は、図4とは異なるファイルシステム情報操作の一例を示す説明図である。ファイルにデータを追記するためクラスタを増加させるときの一連の状態変化を示す。  Next, another embodiment of the present invention will be described. FIG. 9 is an explanatory diagram showing an example of file system information operation different from FIG. Shows a series of state changes when increasing clusters to append data to a file.

(1)は更新前の状態である。ファイルはデータ領域805のクラスタ20番、21番へ順序どおりに記録されている。データは“a”、“b”の2部位に分割管理されている。テーブルT1(802)とT2(803)、ディレクトリ804の内容も対応している。  (1) is the state before update. Files are recorded in order inclusters 20 and 21 in thedata area 805. The data is divided and managed in two parts “a” and “b”. The contents of the tables T1 (802) and T2 (803) and thedirectory 804 also correspond.

(2)はファイルのデータ終端に追記を行う。そのため、“b”の部位の終端の一部を書換え、さらに使用クラスタを追加してその先頭にもデータを書き加える。この場合、未使用クラスタ検索で決定したクラスタは22番と23番であったことを示す(図3のステップS01)。クラスタ22番については部分書換えであるので、クラスタ21番の旧データと新規データの一部をマージしたデータを書き込み(図3のステップS02、S03、S04、S05)、新規のデータは“b’”である。  (2) is added to the end of the file data. Therefore, a part of the end of the part “b” is rewritten, a use cluster is added, and data is also written at the head. In this case, it is indicated that the clusters determined by the unused cluster search were No. 22 and No. 23 (step S01 in FIG. 3). Sincecluster 22 is partially rewritten, data obtained by merging part of the old data and new data ofcluster 21 is written (steps S02, S03, S04, S05 in FIG. 3), and the new data is “b”. ".

本例では書き残しているデータをさらにもう一つのクラスタに書込む必要がある(図3のステップS06)。クラスタ23番への書込みは新規として旧データとマージせずに書き込む(図3のステップS02、S05)。こうしてデータ領域の書換えを完了する(図3のステップS06)。  In this example, it is necessary to write the remaining data into another cluster (step S06 in FIG. 3). Writing to thecluster number 23 is new and is written without merging with the old data (steps S02 and S05 in FIG. 3). Thus, rewriting of the data area is completed (step S06 in FIG. 3).

(3)はテーブルT1(802)を更新する。データの連結順序は“a”、“b’”、“c”である。クラスタ21番の旧データは無効化し、クラスタ22番と23番のデータへ連結するようにして有効化する(図3のステップS07)。  (3) updates the table T1 (802). The data connection order is “a”, “b ′”, “c”. The old data of the cluster No. 21 is invalidated and validated by linking to the data of the cluster No. 22 and No. 23 (step S07 in FIG. 3).

(4)はテーブルT2(803)を更新する(図3のステップS08)。以上のように、データとテーブルの更新を行う。  (4) updates the table T2 (803) (step S08 in FIG. 3). As described above, data and tables are updated.

以上説明したように、本実施例によれば、2次記憶装置上の標準的ファイルシステムにおいて、データ本体の情報を読取り、新たなデータとマージし、マージしたデータをデータ領域の未使用領域へ書込みを行う。その後に、テーブルT1、T2の情報を更新することによって、常に正しい状態のデータとテーブル情報を確保できる。そして、予期せぬ電源の遮断が発生しても、復旧時にテーブルT1、T2のエラーチェックと内容比較の検査を行えば、検査結果によりファイルシステムの異常を容易に判断し、正しいデータを参照できるように修復することができる。  As described above, according to the present embodiment, in the standard file system on the secondary storage device, the information of the data body is read, merged with new data, and the merged data is transferred to an unused area of the data area. Write. Thereafter, by updating the information in the tables T1 and T2, data and table information in a correct state can always be secured. Even if an unexpected power interruption occurs, if an error check and content comparison check is performed on the tables T1 and T2 at the time of recovery, a file system abnormality can be easily determined based on the check result and correct data can be referred to. Can be repaired.

つまり、本発明によれば予期せぬ電源の遮断が生じても正しいデータが確保され、ファイルシステム情報の整合性を保つファイルシステムを、性能を大きく損なうことなく低コストで構築できる。  That is, according to the present invention, it is possible to construct a file system that secures correct data even when an unexpected power interruption occurs and maintains the consistency of file system information without greatly degrading performance.

本発明により、ディレクトリ領域の情報が損傷を受けた場合の対処法については、以下の改良がある。標準的なファイルシステムではディレクトリ情報の配置について2つの方法が知られている。一つは前述のように固定領域に配置する方法であり、残り一つはファイルのデータ本体と同様にデータ領域に自由に配置する方法である。  According to the present invention, there is the following improvement as a countermeasure when the information in the directory area is damaged. In a standard file system, two methods for the arrangement of directory information are known. One is a method of arranging in the fixed area as described above, and the other is a method of freely arranging in the data area in the same manner as the data body of the file.

ディレクトリ情報を固定領域に配置する場合は、テーブル情報と同様にディレクトリ領域を2つ設けても良い。テーブル情報と同じようにエラーチェックと内容比較を復旧処理プログラムで行えば良い。特許文献4に記載の方法では冗長なファイルインデックスを書込むだけでなく消去する手順が必要とされるが、本発明では書込みのみで良い。さらにファイル名の更新や先頭クラスタ番号の更新時のみ保存するなどにより、処理のオーバーヘッドが小さくなる。ファイルサイズ情報などはEOFの無い非テキストファイルについてのみ行うなどの方法もある。ディレクトリ情報はその他一般のファイルと異なり、特定のクラスタに定めるなど、それ自体の参照に問題が発生しにくいようにするのが望ましい。その他、整合性検査について既存技術も多い。  When directory information is arranged in a fixed area, two directory areas may be provided similarly to the table information. Similar to the table information, error check and content comparison may be performed by the recovery processing program. The method described inPatent Document 4 requires not only a redundant file index but also an erasing procedure, but in the present invention, only writing is required. Furthermore, processing overhead is reduced by saving only when the file name is updated or the first cluster number is updated. There are also methods such as file size information only for non-text files without EOF. Unlike other general files, directory information should be specified in a specific cluster so that it is less likely to cause problems with its own reference. In addition, there are many existing technologies for consistency inspection.

ディレクトリ情報をデータ領域に自由に配置する場合は、データ本体と同様の手順で必ず未使用クラスタ領域に更新情報を書き込むようにすれば良い。  When directory information is freely arranged in the data area, the update information should be written in the unused cluster area by the same procedure as that for the data body.

本発明の第2の改良として、処理の高速化について説明する。ファイルデータやテーブル情報はメモリ上にコピーしたものを確保しておき、同一データを何度も2次記憶から読出さず、短時間で参照できるようにするキャッシュ方式が知られている。その場合に、部分書込みでも旧データの確保は2次記憶からではなく、高速なメモリ上から行えるケースがある。また、内容に変更が生じて2次記憶装置への反映が必要になったときには、データ領域、テーブルT1、テーブルT2への書込み制御順序を守るようにすれば良い。  As a second improvement of the present invention, the speeding up of the process will be described. A cache method is known in which file data and table information copied in a memory are secured so that the same data can be referred to in a short time without being repeatedly read from the secondary storage. In that case, there is a case where the old data can be secured from the high-speed memory instead of the secondary storage even in the partial writing. Further, when the contents are changed and need to be reflected in the secondary storage device, the order of writing control to the data area, the table T1, and the table T2 may be maintained.

本発明のファイルシステムを適用する情報制御装置の概略構成図。1 is a schematic configuration diagram of an information control apparatus to which a file system of the present invention is applied.本発明の適用形態例を示すソフトウエアの概略構成図。The schematic block diagram of the software which shows the example of an application form of this invention.本発明によるファイルシステムの書込み制御手順の一例を示すフローチャート。The flowchart which shows an example of the write-control procedure of the file system by this invention.ファイルの一部を書換える様子を順に示す説明図。Explanatory drawing which shows a mode that a part of file is rewritten in order.書込み中に電源断が生じた様子を示す説明図。Explanatory drawing which shows a mode that the power interruption generate | occur | produced during writing.テーブルの検査結果と判定を示す説明図。Explanatory drawing which shows the test result and determination of a table.本発明による復旧処理手順(復旧処理プログラム)の一例を示すフローチャート。The flowchart which shows an example of the recovery process procedure (recovery process program) by this invention.標準的ファイルシステム情報の配置を示す説明図。Explanatory drawing which shows arrangement | positioning of standard file system information.本発明の他の実施例で、ファイルにデータを追記する様子を順に示す説明図。Explanatory drawing which shows a mode that data is additionally written to a file in the other Example of this invention.

符号の説明Explanation of symbols

101…CPU、102…ROM、103…RAM、104…バス、105…I/O、106…I/F、107…2次記憶装置、201…アプリケーション、202…オペレーティングシステム(OS)、203…I/Oライブラリ、204…ファイルシステム、205…デバイスドライバ。  101 ... CPU, 102 ... ROM, 103 ... RAM, 104 ... bus, 105 ... I / O, 106 ... I / F, 107 ... secondary storage device, 201 ... application, 202 ... operating system (OS), 203 ... I / O library, 204... File system, 205... Device driver.

Claims (6)

Translated fromJapanese
記憶装置内の単一の記憶領域に構築されたファイルシステムにおいて、
前記ファイルシステムはデータ本体を格納するデータ領域と、データ本体の配置を管理する固定位置の管理領域を二重に有し、
データ本体の情報を読取り、新たなデータとマージし、マージしたデータをデータ領域の未使用領域へ書込み後に第1の管理領域の情報を更新し、第2の管理領域の情報を更新する手段を有することを特徴とするファイルシステム。
In a file system constructed in a single storage area in a storage device,
The file system has a data area for storing a data body and a management area for a fixed position for managing the arrangement of the data body,
Means for reading data body information, merging with new data, updating the information in the first management area after writing the merged data into the unused area of the data area, and updating the information in the second management area; A file system comprising:
前記第1の管理領域の情報と前記第2の管理領域の情報を比較し、比較結果によりファイルシステムの異常を判断する手段を有することを特徴とする請求項1記載のファイルシステム。  2. The file system according to claim 1, further comprising means for comparing the information in the first management area with the information in the second management area, and determining an abnormality of the file system based on the comparison result. 記憶装置内の単一の記憶領域に構築されたファイルシステムにおいて、
前記ファイルシステムはデータ本体を格納するデータ領域と、データ本体の配置を管理する第1及び第2の管理領域と、データ本体の情報を読取り、新たなデータとマージし、マージしたデータをデータ領域の未使用領域へ書込み後に第1の管理領域の情報を更新し、次に第2の管理領域の情報を更新する手段と、
前記第1の管理領域の情報と前記第2の管理領域の情報を比較し、その比較の結果から異常を判断する手段を設けたことを特徴とするファイルシステム。
In a file system constructed in a single storage area in a storage device,
The file system reads a data area for storing a data body, first and second management areas for managing the arrangement of the data body, and reads data body information, merges it with new data, and merges the data into the data area. Updating the information in the first management area after writing to the unused area, and then updating the information in the second management area;
A file system comprising means for comparing the information in the first management area and the information in the second management area, and determining an abnormality from the result of the comparison.
データ本体を格納するデータ領域と、データ本体の配置を管理する固定位置の管理領域を二重に有し、記憶装置内の単一の記憶領域に構築されたファイルシステムにデータを書き込むプログラムにおいて、
上位アプリケーションから前記ファイルシステムへの書き込み要求に応じ、書き込みデータサイズ分の未使用クラスタを検索するステップと、書き込みの新規データが部分書き換えかを判定するステップと、部分書き換えであれば1クラスタ分のデータを読み出し、書き込みデータをマージするステップと、1クラス分の新規データを前記未使用クラスタに書き込むステップと、書き残しがなければ第1の管理領域のテーブルを更新し、さらに第2の管理領域のテーブルを更新するステップとを有し、ファイルシステムの書き込みを行うことを特徴とするプログラム。
In a program that has a data area for storing the data body and a management area for a fixed position for managing the arrangement of the data body, and writes data to a file system constructed in a single storage area in the storage device,
In response to a write request from the upper application to the file system, a step of searching for unused clusters corresponding to the write data size, a step of determining whether the new data to be written is partial rewrite, and, if partial rewrite, one cluster A step of reading data and merging write data; a step of writing new data for one class to the unused cluster; and if there is no unwritten data, the table of the first management area is updated, and the second management area A program for updating a table and writing a file system.
データ本体を格納するデータ領域と、データ本体の配置を管理する固定位置の管理領域を二重に有し、記憶装置内の単一の記憶領域に構築されたファイルシステムの復旧処理を行うプログラムにおいて、
第1の管理領域のテーブル1のエラーの有無を検出するステップと、テーブル1にエラーが無ければ第2の管理領域のテーブル2のエラーの有無を検出するステップと、テーブル2にエラーが無ければテーブル1とテーブル2の内容の比較をするステップと、テーブル1にエラーが無くテーブル2にエラーが有ればテーブル1の内容をテーブル2に上書きするステップと、テーブル1とテーブル2の内容が不一致のときテーブル1不一致情報の整合性を検査するステップと、その結果に応じてテーブル1またはテーブル2の内容を他方に上書きするステップと、テーブル1、テーブル2の双方にエラーがあるとき媒体の異常を報告するステップとを有し、ファイルシステムの復旧処理を行うことを特徴とするプログラム。
In a program that has a data area for storing a data body and a management area at a fixed position for managing the arrangement of the data body, and that performs recovery processing for a file system built in a single storage area in the storage device ,
If there is no error in table 1 in the first management area; if there is no error in table 1; if there is no error in table 2 in the second management area; if there is no error in table 2 The step of comparing the contents of Table 1 and Table 2, the step of overwriting the contents of Table 1 on Table 2 if there are no errors in Table 1, and the contents of Table 1 and Table 2 are inconsistent If there is an error in both table 1 and table 2, the step of checking the consistency of table 1 mismatch information, the step of overwriting the contents of table 1 or table 2 to the other according to the result, the medium error And a file system recovery process.
電子計算機を備える情報処理システムにおいて、請求項1−3の何れか1項に記載のファイルシステムを設けることを特徴とする情報処理システム。
An information processing system comprising an electronic computer, wherein the file system according to any one of claims 1 to 3 is provided.
JP2003388031A2003-11-182003-11-18 File system, program thereof, and information processing systemPendingJP2005149291A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
JP2003388031AJP2005149291A (en)2003-11-182003-11-18 File system, program thereof, and information processing system

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
JP2003388031AJP2005149291A (en)2003-11-182003-11-18 File system, program thereof, and information processing system

Publications (1)

Publication NumberPublication Date
JP2005149291Atrue JP2005149291A (en)2005-06-09

Family

ID=34695231

Family Applications (1)

Application NumberTitlePriority DateFiling Date
JP2003388031APendingJP2005149291A (en)2003-11-182003-11-18 File system, program thereof, and information processing system

Country Status (1)

CountryLink
JP (1)JP2005149291A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
JP2007316944A (en)*2006-05-252007-12-06Toshiba Corp Data processing apparatus, data processing method, and data processing program
US8031361B2 (en)2006-09-192011-10-04Brother Kogyo Kabushiki KaishaImage forming apparatus
US8089662B2 (en)2006-09-252012-01-03Brother Kyogo Kabushiki KaishaImage forming apparatus
US8125670B2 (en)2006-09-282012-02-28Brother Kogyo Kabushiki KaishaData processing apparatus and recording medium
US8179557B2 (en)2006-09-282012-05-15Brother Kogyo Kabushiki KaishaImage forming apparatus for reading information from and writing information to a non-contact medium
JP2015022691A (en)*2013-07-232015-02-02コイト電工株式会社Signal control device, and method of preserving history data

Cited By (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
JP2007316944A (en)*2006-05-252007-12-06Toshiba Corp Data processing apparatus, data processing method, and data processing program
US8031361B2 (en)2006-09-192011-10-04Brother Kogyo Kabushiki KaishaImage forming apparatus
US8089662B2 (en)2006-09-252012-01-03Brother Kyogo Kabushiki KaishaImage forming apparatus
US8125670B2 (en)2006-09-282012-02-28Brother Kogyo Kabushiki KaishaData processing apparatus and recording medium
US8179557B2 (en)2006-09-282012-05-15Brother Kogyo Kabushiki KaishaImage forming apparatus for reading information from and writing information to a non-contact medium
JP2015022691A (en)*2013-07-232015-02-02コイト電工株式会社Signal control device, and method of preserving history data

Similar Documents

PublicationPublication DateTitle
JP4371771B2 (en) Power management block used in non-volatile memory system
CN107943414B (en)File system partition and data read-write method of embedded Linux
CN101430703B (en)Systems and methods for automatic maintenance and repair of entites in data model
US8775771B2 (en)Block management method for a flash memory and flash memory controller and storage system using the same
US8745443B2 (en)Memory system
CN103577121A (en)High-reliability linear file access method based on nand flash
CN103577574A (en)High-reliability linear file system based on nand flash
US7020805B2 (en)Efficient mechanisms for detecting phantom write errors
CN112463724A (en)Data processing method and system for lightweight file system
CN101625897B (en) Data writing method, storage system and controller for flash memory
TWI459198B (en)Memory storage device, memory controller thereof, and method for identifying valid data
TWI404071B (en)Controller circuit having functions for identifying error data in flash memory and storage system and method thereof
JP2006519444A (en) Flash memory data management method
CN101944386A (en)Control circuit for identifying error data in flash memory, storage system and method
CN102890655A (en) Memory storage device, its memory controller and effective data identification method
JPH03224045A (en)Data holding system
CN119248197B (en) Data processing method, device, equipment and medium
CN115878377A (en)Power failure protection method and device for embedded Linux system and computer equipment
JP2005149291A (en) File system, program thereof, and information processing system
CN114064596A (en)Log type embedded file system design method, system and storage medium
JP3675375B2 (en) Nonvolatile memory and data rewriting method of nonvolatile memory
JP2008234446A (en)Data consistency checking method and system
CN113434086B (en) Data storage method, device, non-volatile storage device and memory
JP2010536112A (en) Data storage method, apparatus and system for recovery of interrupted writes
CN102831032A (en)Repair system and method for master boot record of hard disc

Legal Events

DateCodeTitleDescription
A621Written request for application examination

Free format text:JAPANESE INTERMEDIATE CODE: A621

Effective date:20060316

RD02Notification of acceptance of power of attorney

Free format text:JAPANESE INTERMEDIATE CODE: A7422

Effective date:20060316

A977Report on retrieval

Free format text:JAPANESE INTERMEDIATE CODE: A971007

Effective date:20090324

A131Notification of reasons for refusal

Free format text:JAPANESE INTERMEDIATE CODE: A131

Effective date:20090331

A02Decision of refusal

Free format text:JAPANESE INTERMEDIATE CODE: A02

Effective date:20090811


[8]ページ先頭

©2009-2025 Movatter.jp