JP2008052767A - Recording device and recording method, and program - Google Patents
Recording device and recording method, and program Download PDFInfo
- Publication number
- JP2008052767A JP2008052767A JP2006225190A JP2006225190A JP2008052767A JP 2008052767 A JP2008052767 A JP 2008052767A JP 2006225190 A JP2006225190 A JP 2006225190A JP 2006225190 A JP2006225190 A JP 2006225190A JP 2008052767 A JP2008052767 A JP 2008052767A
- Authority
- JP
- Japan
- Prior art keywords
- data
- file
- recording
- size
- 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
Links
Images
Landscapes
- Signal Processing For Digital Recording And Reproducing (AREA)
- Management Or Editing Of Information On Record Carriers (AREA)
Abstract
Description
本発明は、記録装置および記録方法、並びにプログラムに関し、特に、データの記録中に電源が切断される場合において、データを管理する管理情報の破壊を抑制することができるようにした記録装置および記録方法、並びにプログラムに関する。 The present invention relates to a recording apparatus, a recording method, and a program, and in particular, a recording apparatus and a recording capable of suppressing destruction of management information for managing data when the power is turned off during data recording. The present invention relates to a method and a program.
メモリにファイルを記録する際にデバイスの電源が中断された場合、ファイルのクローズ処理を正しく行えないため、ファイルが破壊されてしまう。例えば、ファイルの実際のデータ(以下、実データという)をクラスタに記録しているときに、電源が中断された場合は、影響はそのファイルのみに抑えられるが、FAT(File Allocation Tables)エントリを更新しているときに、電源が中断された場合は、FAT領域が破壊されるので、その時作成していたファイルだけでなくメモリ内すべてのファイルが破壊され、読み込めなくなる。 If the power to the device is interrupted when recording a file in memory, the file will be destroyed because the file cannot be closed properly. For example, when the actual data of a file (hereinafter referred to as actual data) is recorded in the cluster and the power is interrupted, the impact is limited to that file, but the FAT (File Allocation Tables) entry is changed. If the power is interrupted while updating, the FAT area will be destroyed, so not only the file created at that time but all the files in memory will be destroyed and cannot be read.
そこで、FATエントリのバックアップを行う方法等が考案されている(例えば、特許文献1乃至3参照)。 Therefore, a method of backing up FAT entries has been devised (see, for example, Patent Documents 1 to 3).
ところで、ログデータなどを1つのファイルに随時記録するデバイスにおいて、従来はファイルに記録する度にファイルのオープンとクローズを行ったり、ファイルをオープンにしたまま記録を行い、クラスタが追加される度にFATエントリの更新を行ったりしていた。 By the way, in a device that records log data, etc. in one file at any time, each time a file is opened or closed each time it is recorded in a file, or when a file is opened and a cluster is added The FAT entry was updated.
このようにして、ログデータなどを1つのファイルに随時記録する場合、FAT領域への書き込みが常に行われるので、FAT領域が破壊され、メモリ内のすべてのファイルが破壊される可能性が高かった。 In this way, when logging data etc. is recorded in one file at any time, since writing to the FAT area is always performed, there is a high possibility that the FAT area will be destroyed and all the files in the memory will be destroyed. .
本発明は、このような状況に鑑みてなされたものであり、データの記録中に電源が切断される場合において、データを管理する管理情報の破壊を抑制することができるようにするものである。 The present invention has been made in view of such a situation, and makes it possible to suppress destruction of management information for managing data when the power is turned off during data recording. .
本発明の一側面の記録装置は、ファイル単位でデータを記録するデータ領域と、前記データを管理する管理情報を記録する管理領域とを有する記録媒体の前記データ領域に設けられたファイルに前記データを記録する記録装置において、前記ファイルに記録されるデータのサイズとして想定される最大のサイズ以上のサイズの空のファイルを、前記データのファイルとして生成する生成手段と、生成された前記ファイルに前記データを記録させる記録処理手段とを備える。 The recording apparatus according to an aspect of the present invention provides the data in a file provided in the data area of a recording medium having a data area for recording data in file units and a management area for recording management information for managing the data. In the recording apparatus for recording the data, a generating unit that generates an empty file having a size equal to or larger than a maximum size assumed as a size of data recorded in the file as the data file; and Recording processing means for recording data.
本発明の一側面の記録装置は、前記ファイルに記録されたデータのサイズを算出する算出手段と、前記ファイルのサイズを、前記算出手段により算出されたサイズに修正する修正手段とをさらに設けることができる。 The recording apparatus according to one aspect of the present invention further includes a calculation unit that calculates a size of data recorded in the file, and a correction unit that corrects the size of the file to the size calculated by the calculation unit. Can do.
本発明の一側面の記録装置は、前記データの記録中に電源が中断されたかどうかを判定する判定手段をさらに設け、前記記録手段は、前記ファイルの終端を表す情報である終端情報を、前記データの終端に記録し、前記算出手段は、前記判定手段により前記データの記録中に電源が中断されたと判定された場合、前記終端情報に基づいて、前記ファイルに記録されたデータのサイズを算出することができる。 The recording apparatus according to one aspect of the present invention further includes a determination unit that determines whether power is interrupted during the recording of the data, and the recording unit includes end information that is information indicating an end of the file. The data is recorded at the end of the data, and the calculating means calculates the size of the data recorded in the file based on the end information when the determining means determines that the power supply is interrupted during the data recording. can do.
本発明の一側面の記録装置は、前記データの記録中に電源が中断されたかどうかを判定する判定手段をさらに設け、前記算出手段は、前記判定手段により前記データの記録中に電源が中断されたと判定された場合、前記データのチェックサムに基づいて、前記ファイルに記録されたデータのサイズを算出することができる。 The recording apparatus according to one aspect of the present invention further includes a determination unit that determines whether or not a power source is interrupted during the recording of the data, and the calculation unit is configured to interrupt the power source during the recording of the data by the determination unit. If it is determined, the size of the data recorded in the file can be calculated based on the checksum of the data.
本発明の一側面の記録方法は、ファイル単位でデータを記録するデータ領域と、前記データを管理する管理情報を記録する管理領域とを有する記録媒体の前記データ領域に設けられたファイルに前記データを記録する記録装置の記録方法において、前記ファイルに記録されるデータのサイズとして想定される最大のサイズ以上のサイズの空のファイルを、前記データのファイルとして生成し、生成された前記ファイルに前記データを記録させるステップを含む。 The recording method according to one aspect of the present invention provides the data in a file provided in the data area of a recording medium having a data area for recording data in units of files and a management area for recording management information for managing the data. In the recording method of the recording apparatus for recording the file, an empty file having a size equal to or larger than a maximum size assumed as the size of data recorded in the file is generated as the data file, and the generated file is Recording data.
本発明の一側面のプログラムは、ファイル単位でデータを記録するデータ領域と、前記データを管理する管理情報を記録する管理領域とを有する記録媒体の前記データ領域に設けられたファイルに前記データを記録する処理を、コンピュータに行わせるプログラムにおいて、前記ファイルに記録されるデータのサイズとして想定される最大のサイズ以上のサイズの空のファイルを、前記データのファイルとして生成し、生成された前記ファイルに前記データを記録させるステップを含む。 According to another aspect of the present invention, there is provided a program for storing the data in a file provided in the data area of a recording medium having a data area for recording data in file units and a management area for recording management information for managing the data. In a program for causing a computer to perform a recording process, an empty file having a size greater than or equal to a maximum size assumed as the size of data recorded in the file is generated as the data file, and the generated file Recording the data.
本発明の一側面においては、ファイル単位でデータを記録するデータ領域と、前記データを管理する管理情報を記録する管理領域とを有する記録媒体の前記データ領域に設けられたファイルに記録されるデータのサイズとして想定される最大のサイズ以上のサイズの空のファイルが、前記データのファイルとして生成され、生成された前記ファイルに前記データが記録される。 In one aspect of the present invention, data recorded in a file provided in the data area of a recording medium having a data area for recording data in file units and a management area for recording management information for managing the data An empty file having a size greater than or equal to the maximum size assumed as the data size is generated as the data file, and the data is recorded in the generated file.
以上のように、本発明の一側面によれば、データの記録中に電源が切断される場合において、データを管理する管理情報の破壊を抑制することができる。 As described above, according to one aspect of the present invention, it is possible to suppress destruction of management information for managing data when the power is turned off during data recording.
以下に本発明の実施の形態を説明するが、本発明の構成要件と、明細書又は図面に記載の実施の形態との対応関係を例示すると、次のようになる。この記載は、本発明をサポートする実施の形態が、明細書又は図面に記載されていることを確認するためのものである。従って、明細書又は図面中には記載されているが、本発明の構成要件に対応する実施の形態として、ここには記載されていない実施の形態があったとしても、そのことは、その実施の形態が、その構成要件に対応するものではないことを意味するものではない。逆に、実施の形態が構成要件に対応するものとしてここに記載されていたとしても、そのことは、その実施の形態が、その構成要件以外の構成要件には対応しないものであることを意味するものでもない。 Embodiments of the present invention will be described below. Correspondences between the constituent elements of the present invention and the embodiments described in the specification or the drawings are exemplified as follows. This description is intended to confirm that the embodiments supporting the present invention are described in the specification or the drawings. Therefore, even if there is an embodiment which is described in the specification or the drawings but is not described here as an embodiment corresponding to the constituent elements of the present invention, that is not the case. It does not mean that the form does not correspond to the constituent requirements. Conversely, even if an embodiment is described here as corresponding to a configuration requirement, that means that the embodiment does not correspond to a configuration requirement other than the configuration requirement. It's not something to do.
本発明の一側面の記録装置は、
ファイル単位でデータを記録するデータ領域と、前記データを管理する管理情報を記録する管理領域とを有する記録媒体の前記データ領域に設けられたファイルに前記データを記録する記録装置(例えば、図1の記録装置10)において、
前記ファイルに記録されるデータのサイズとして想定される最大のサイズ以上のサイズの空のファイルを、前記データのファイルとして生成する生成手段(例えば、初期化部71)と、
生成された前記ファイルに前記データを記録させる記録処理手段(例えば、記録処理部72)と
を備える。
A recording apparatus according to one aspect of the present invention includes:
A recording device (for example, FIG. 1) that records the data in a file provided in the data area of a recording medium having a data area for recording data in units of files and a management area for recording management information for managing the data. Recording device 10)
Generating means (for example, an initialization unit 71) for generating an empty file having a size equal to or larger than a maximum size assumed as the size of data recorded in the file, as the data file;
Recording processing means (for example, a recording processing unit 72) for recording the data in the generated file.
本発明の一側面の記録装置は、
前記ファイルに記録されたデータのサイズを算出する算出手段(例えば、図6のステップS21の位置ファイルのサイズを算出する処理を実行する図3の終了処理部73)と、
前記ファイルのサイズを、前記算出手段により算出されたサイズに修正する修正手段(例えば、図6のステップS21の位置ファイルのサイズを修正する処理を実行する図3の終了処理部73)
をさらに備える。
A recording apparatus according to one aspect of the present invention includes:
Calculation means for calculating the size of the data recorded in the file (for example, the
Correction means for correcting the size of the file to the size calculated by the calculation means (for example, the
Is further provided.
本発明の一側面の記録装置は、
前記データの記録中に電源が中断されたかどうかを判定する判定手段(例えば、図3の修復処理部74)
をさらに備え、
前記記録手段は、前記ファイルの終端を表す情報である終端情報を、前記データの終端に記録し、
前記算出手段は、前記判定手段により前記データの記録中に電源が中断されたと判定された場合、前記終端情報に基づいて、前記ファイルに記録されたデータのサイズを算出する。
A recording apparatus according to one aspect of the present invention includes:
Determining means for determining whether the power supply is interrupted during the data recording (for example, the
Further comprising
The recording means records end information, which is information indicating the end of the file, at the end of the data,
The calculation unit calculates the size of data recorded in the file based on the end information when the determination unit determines that the power supply is interrupted during the recording of the data.
本発明の一側面の記録装置は、
前記データの記録中に電源が中断されたかどうかを判定する判定手段(例えば、図3の修復処理部74)
をさらに備え、
前記算出手段は、前記判定手段により前記データの記録中に電源が中断されたと判定された場合、前記データのチェックサムに基づいて、前記ファイルに記録されたデータのサイズを算出する。
A recording apparatus according to one aspect of the present invention includes:
Determining means for determining whether the power supply is interrupted during the data recording (for example, the
Further comprising
The calculation means calculates the size of the data recorded in the file based on the checksum of the data when the determination means determines that the power supply is interrupted during the recording of the data.
本発明の一側面の記録方法は、
ファイル単位でデータを記録するデータ領域と、前記データを管理する管理情報を記録する管理領域とを有する記録媒体の前記データ領域に設けられたファイルに前記データを記録する記録装置(例えば、図1の記録装置10)の記録方法において、
前記ファイルに記録されるデータのサイズとして想定される最大のサイズ以上のサイズの空のファイルを、前記データのファイルとして生成し(例えば、図4のステップS2)、
生成された前記ファイルに前記データを記録させる(例えば、図5のステップS11)
ステップを含む。
A recording method according to one aspect of the present invention includes:
A recording apparatus (for example, FIG. 1) that records the data in a file provided in the data area of a recording medium having a data area for recording data in units of files and a management area for recording management information for managing the data. In the recording method of the recording apparatus 10),
An empty file having a size equal to or larger than the maximum size assumed as the size of data recorded in the file is generated as the data file (for example, step S2 in FIG. 4).
The data is recorded in the generated file (for example, step S11 in FIG. 5).
Includes steps.
以下、本発明を適用した具体的な実施の形態について、図面を参照しながら詳細に説明する。 Hereinafter, specific embodiments to which the present invention is applied will be described in detail with reference to the drawings.
図1は、本発明を適用した記録装置10の一実施の形態の構成例を示すブロック図である。
FIG. 1 is a block diagram showing a configuration example of an embodiment of a
図1の記録装置10は、アンテナ11、増幅部12、位置データ算出部13、制御部14、およびHDD(Hard Disk Drive)15から構成され、例えば記録装置10の電源がオンにされたとき、衛星からGPS(Global Positioning System)情報を受信し、そのGPS情報に基づいて、現在の記録装置10の位置を表す位置データを記録する。
1 includes an
アンテナ11は、衛星からGPS情報の電波を受信し、増幅部12に供給する。増幅部12は、アンテナ11から供給されるGPS情報の電波を増幅し、位置データ算出部13に供給する。位置データ算出部13は、GPS情報に基づいて位置データを算出し、制御部14に供給する。
The
制御部14は、例えば、CPU(Central Processing Unit)、ROM(Read Only Memory)、およびRAM(Random Access Memory)からなるマイクロコンピュータなどにより構成される。制御部14のCPUは、HDD15からRAMにロードされたプログラムを実行することにより、記録装置10全体を制御する。例えば、制御部14のCPUは、位置データ算出部13から供給される位置データを、HDD15に供給して記録させる。また、制御部14のCPUは、HDD15から位置データを読み出し、図示せぬ他の装置に出力する。制御部14のRAMには、CPUが各種の処理を実行する上において必要なデータなどが適宜記憶される。
The
HDD15は、例えば、ハードディスク51(後述する図2)を内蔵しており、制御部14から供給される位置データをハードディスク51に記録させる。
The
図2は、HDD15に内蔵されているハードディスク51に対して位置データのファイル(以下、位置ファイルという)の書き込みおよび読み出しを行う場合の、制御部14のCPUの機能的な構成例を示すブロック図である。
FIG. 2 is a block diagram illustrating a functional configuration example of the CPU of the
制御部14のCPUは、アプリケーションプログラム31およびオペレーティングシステム(以下、OSと称する)32により構成される。OS32には、ファイルシステム41およびデバイスドライバ42が少なくとも含まれている。
The CPU of the
アプリケーションプログラム31は、各種の処理を実行して、位置ファイルの記録および読み出しをオペレーティングシステム32に要求する。オペレーティングシステム32は、いわゆる基本プログラムであり、例えば、記録装置10のハードウェアなどのリソースの取り扱いを制御する。
The
ファイルシステム41は、例えば、FATファイルシステム(FAT16,FAT32)であり、ハードディスク51に記録されているデータを、クラスタ単位で管理する。デバイスドライバ42は、ハードディスク51へのデータの記録またはハードディスク51に記録されているデータの読み出しなどを制御する。
The file system 41 is, for example, a FAT file system (FAT16, FAT32), and manages data recorded on the
アプリケーションプログラム31は、OS32のファイルシステム41に対してファイル単位(レベル)でのアクセス(読み出しまたは書き込み)を要求(指示)する。
The
ファイルシステム41は、ファイルをクラスタ単位で管理しており、アプリケーションプログラム31から位置ファイルへのアクセスが要求された場合、その位置ファイルの該当するクラスタ(以下、該当クラスタという)を検索する。例えば、アプリケーションプログラム31からファイルシステム41に対して、位置ファイルの読み出しが要求された場合、ファイルシステム41は、その位置ファイルの実データである位置データが記録されているクラスタを該当クラスタとして検索する。また例えば、アプリケーションプログラム31からファイルシステム41に対して位置ファイルの書き込みが要求された場合、ファイルシステム41は、位置ファイルの位置データを書き込み可能な空きクラスタを該当クラスタとして検索する。
The file system 41 manages files in cluster units, and when an access to the location file is requested from the
そして、ファイルシステム41は、検索された該当クラスタをLBA(Logical Block Addressing)に変換し、デバイスドライバ42に対して、セクタ単位でアクセスを要求する。
Then, the file system 41 converts the found cluster into LBA (Logical Block Addressing), and requests the
デバイスドライバ42は、ファイルシステム41からアクセスが要求されたセクタにアクセスする。
The
HDD15は、デバイスドライバ42の制御の下で、内蔵するハードディスク51の要求されたセクタにアクセスする。このハードディスク51は、FATファイルシステムでフォーマットされており、ハードディスク51には、記録装置10を起動させる場合に、ハードディスク51に記録されているOS32を実行させるためのMBR(Master Boot Record)、空き領域、1クラスタあたりのセクタ数など、ハードディスク51の物理的な属性が記録されるBPB(BIOS(Basic Input Output System) Parameter Block)、空き容量を高速に計算するための空きクラスタ数が記録されるFSInfo、データ領域内の各クラスタを管理するFATエントリ(管理情報)が記録されるFAT領域、FAT領域のバックアップなどのために利用される予備の領域、並びに、ファイルの名前、ファイルのサイズ、ファイルの実データの格納場所等が格納されているディレクトリエントリおよび実データが記録される領域であるデータ領域が配置されている。
The
デバイスドライバ42は、ファイルシステム41に対し、セクタ単位でのアクセスの要求に対する応答を行う。例えば、デバイスドライバ42は、ハードディスク51から読み出されたデータを、セクタ単位でファイルシステム41に供給する。ファイルシステム41は、アプリケーションプログラム31に対して、ファイル単位でのアクセスの要求に対する応答を行う。例えば、ファイルシステム41は、複数のクラスタから読み出された位置ファイルの実データである位置データを、ファイル単位でアプリケーションプログラム31に供給する。
The
図3は、アプリケーションプログラム31の構成例を示すブロック図である。
FIG. 3 is a block diagram illustrating a configuration example of the
初期化部71は、位置ファイルとして、位置ファイルに記録されるデータのサイズとして想定される最大のサイズ以上のサイズ(例えば、4MB)である規定サイズの空のファイルを生成する。即ち、初期化部71は、規定サイズの空のファイルを位置ファイルとしてハードディスク51に記録させる。また、初期化部71は、いま注目しているファイル上の位置を表すファイルポインタを、生成した位置ファイルの先頭位置に設定する。
The
記録処理部72は、位置データ算出部13から供給される位置データを、初期化部71により生成された位置ファイルに記録させる。また、記録処理部72は、ファイルポインタを、記録終了位置に修正する。
The
終了処理部73は、位置ファイル上のファイルポインタに基づいて、位置ファイルに記録された位置データのサイズ、即ち実際の位置ファイルのサイズを算出し、そのサイズに、位置ファイルのサイズを修正する。
The
修復処理部74は、電源の中断時に位置データが記録されていた位置ファイルのサイズを算出し、その結果得られたサイズに、位置ファイルのサイズを修正する。
The
次に、図4を参照して、図3の初期化部71が初期化を行う初期化処理について説明する。この初期化処理は、例えば、記録装置10の電源がオンにされたときに開始される。
Next, an initialization process in which the
ステップS1において、初期化部71は、位置データを書き込み中であるかどうかを表す書き込みフラグをオンにし、ステップS2に進む。ステップS2において、初期化部71は、位置ファイルとして、規定サイズの空のファイルを生成する。
In step S1, the
具体的には、初期化部71は、規定サイズの空のファイルの位置ファイルとしての書き込みをファイルシステム41に要求する。ファイルシステム41は、その要求に応じて、位置ファイルのクラスタとして、データ領域に規定サイズのクラスタを確保し、そのクラスタ(最後のクラスタを除く)の連鎖情報(クラスタチェーン)をFATエントリに作成する。
Specifically, the
また、ファイルシステム41は、ハードディスク51に設けられたデータ領域に、位置ファイルのディレクトリエントリを記録させる。なお、このディレクトリエントリに格納されるファイルサイズは、規定サイズである。
Further, the file system 41 records the directory entry of the position file in the data area provided in the
ステップS2の処理後は、ステップS3に進み、初期化部71は、位置ファイルをオープンし、ステップS4に進む。ステップS4において、初期化部71は、位置ファイルの終端を表すEOF(End Of File)マークを、位置ファイルのクラスタとして確保された最後のクラスタのクラスタチェーンとしてFATエントリに作成し、ステップS5に進む。ステップS5において、初期化部71は、ファイルポインタを、位置ファイルの先頭位置に設定し、処理を終了する。
After step S2, the process proceeds to step S3, where the
次に、図5を参照して、図3の記録処理部72が、位置ファイルに位置データを記録する記録処理について説明する。この記録処理は、例えば、位置データ算出部13から位置データが供給されたとき、開始される。
Next, a recording process in which the
ステップS11において、記録処理部72は、位置ファイルの、ファイルポインタが設定された位置から、位置データを記録させ、その位置データの終端にEOFマークを記録させる。このとき、ファイルポインタは、EOFマークの終端位置に修正される。ステップS11の処理後は、ステップS12に進み、記録処理部72は、位置データとEOFマークの記録に成功したかどうかを判定し、成功したと判定した場合、ステップS13に進む。
In step S11, the
ステップS13において、記録処理部72は、ファイルポインタを、EOFマークの終端位置から、位置データの終端位置(EOFマークの先頭位置)に修正し、処理を終了する。一方、ステップS12において、位置データとEOFマークの記録に成功していないと判定された場合、記録処理部72は、例えば所定のエラー処理を行い、処理を終了する。
In step S13, the
次に、図6を参照して、図3の終了処理部73が、データの記録を終了させる終了処理について説明する。この終了処理は、例えば、ユーザが、記録装置10に設けられた図示せぬ操作部を操作することにより、記録装置10の電源のオフを指令したとき、開始される。なお、図5の記録処理中に、ユーザが電源のオフを指令した場合は、その記録処理の終了後に、図6の終了処理が行われる。
Next, with reference to FIG. 6, the termination processing in which the
ステップS20において、終了処理部73は、書き込みフラグをオフにし、ステップS21に進む。ステップS21において、終了処理部73は、位置ファイル上のファイルポインタに基づいて、位置ファイルに記録された位置データのサイズを、位置ファイルの実際のサイズとして算出し、その結果得られるサイズに、位置ファイルのサイズを修正する。
In step S20, the
具体的には、終了処理部73は、位置ファイルのサイズの、算出したサイズへの修正を要求する。ファイルシステム41は、その要求に応じて、位置ファイルのディレクトリエントリに格納されるファイルサイズを、算出したサイズに修正し、FATエントリに作成されたクラスタチェーンを、位置データが記録されるクラスタのクラスタチェーンに修正する。
Specifically, the
以上のように、アプリケーションプログラム31は、規定サイズの位置ファイルを生成し、位置ファイルのオープン中には、その位置ファイルに位置データを記録し、位置ファイルのクローズ時には、位置ファイルのサイズを修正する。これにより、FAT領域への書き込みを、位置ファイルのオープン時とクローズ時の2回に抑えることができる。その結果、位置データの記録中に電源が切断される場合において、FATエントリの破壊を抑制することができる。
As described above, the
ステップS21の処理後は、ステップS22に進み、終了処理部73は、位置ファイルをクローズし、処理を終了する。
After the process of step S21, the process proceeds to step S22, and the
次に、図7を参照して、図3の修復処理部74が、位置ファイルを修復する修復処理について説明する。この修復処理は、例えば、記録装置10の電源がオンにされたときに、開始される。
Next, a repair process in which the
ステップS31において、修復処理部74は、記録途中の位置ファイルがあるかどうか、即ち、図5の記録処理中に電源が中断されたかどうかを判定する。具体的には、修復処理部74は、書き込みフラグがオンであるとき、記録途中の位置ファイルがあると判定し、書き込みフラグがオフであるとき、記録途中の位置ファイルがないと判定する。
In step S31, the
ステップS31において、記録途中の位置ファイルがないと判定された場合、処理は終了される。 If it is determined in step S31 that there is no position file being recorded, the process ends.
一方、ステップS31において、記録途中の位置ファイルがあると判定された場合、ステップS32において、修復処理部74は、位置ファイルにEOFマークがある(記録されている)かどうかを判定する。ステップS32において、位置ファイルにEOFマークがあると判定された場合、ステップS33に進み、修復処理部74は、その位置ファイルのEOFマークに基づいて、位置ファイルの先頭位置からEOFマークまでのデータのサイズを、位置ファイルの実際のサイズとして算出する。
On the other hand, when it is determined in step S31 that there is a position file being recorded, in step S32, the
また、ステップS32において、位置ファイルにEOFマークがないと判定された場合、ステップS34に進み、修復処理部74は、位置ファイルに記録されている位置データのチェックサムに基づいて、位置ファイルの先頭位置から、最後に記録された正常な位置データまでのデータのサイズを、位置ファイルの実際のサイズとして算出する。
If it is determined in step S32 that the position file does not have an EOF mark, the process proceeds to step S34, and the
ステップS33またはS34の処理後は、ステップS35に進み、修復処理部74は、ステップS33またはS34で算出されたサイズに、位置ファイルのサイズを修正する。
After the processing of step S33 or S34, the process proceeds to step S35, and the
14 制御部, 31 アプリケーションプログラム, 51 ハードディスク, 71 初期化部, 72 記録処理部, 73 終了処理部, 74 修復処理部 14 control unit, 31 application program, 51 hard disk, 71 initialization unit, 72 recording processing unit, 73 end processing unit, 74 repair processing unit
Claims (6)
前記ファイルに記録されるデータのサイズとして想定される最大のサイズ以上のサイズの空のファイルを、前記データのファイルとして生成する生成手段と、
生成された前記ファイルに前記データを記録させる記録処理手段と
を備える記録装置。 In a recording apparatus for recording the data in a file provided in the data area of a recording medium having a data area for recording data in file units and a management area for recording management information for managing the data,
Generating means for generating, as the data file, an empty file having a size equal to or larger than a maximum size assumed as the size of data recorded in the file;
A recording apparatus comprising: recording processing means for recording the data in the generated file.
前記ファイルのサイズを、前記算出手段により算出されたサイズに修正する修正手段と
をさらに備える
請求項1に記載の記録装置。 Calculating means for calculating the size of data recorded in the file;
The recording apparatus according to claim 1, further comprising: a correcting unit that corrects the size of the file to the size calculated by the calculating unit.
をさらに備え、
前記記録手段は、前記ファイルの終端を表す情報である終端情報を、前記データの終端に記録し、
前記算出手段は、前記判定手段により前記データの記録中に電源が中断されたと判定された場合、前記終端情報に基づいて、前記ファイルに記録されたデータのサイズを算出する
請求項2に記載の記録装置。 A determination means for determining whether or not a power supply is interrupted during the recording of the data;
The recording means records end information, which is information indicating the end of the file, at the end of the data,
The said calculation means calculates the size of the data recorded on the said file based on the said termination | terminus information, when it determines with the determination means having interrupted the power supply during recording of the said data. Recording device.
をさらに備え、
前記算出手段は、前記判定手段により前記データの記録中に電源が中断されたと判定された場合、前記データのチェックサムに基づいて、前記ファイルに記録されたデータのサイズを算出する
請求項2に記載の記録装置。 A determination means for determining whether or not a power supply is interrupted during the recording of the data;
The calculation unit calculates a size of data recorded in the file based on a checksum of the data when the determination unit determines that power is interrupted during recording of the data. The recording device described.
前記ファイルに記録されるデータのサイズとして想定される最大のサイズ以上のサイズの空のファイルを、前記データのファイルとして生成し、
生成された前記ファイルに前記データを記録させる
ステップを含む記録方法。 In a recording method of a recording apparatus for recording the data in a file provided in the data area of a recording medium having a data area for recording data in file units and a management area for recording management information for managing the data,
An empty file having a size equal to or larger than the maximum size assumed as the size of data recorded in the file is generated as the data file,
A recording method including the step of recording the data in the generated file.
前記ファイルに記録されるデータのサイズとして想定される最大のサイズ以上のサイズの空のファイルを、前記データのファイルとして生成し、
生成された前記ファイルに前記データを記録させる
ステップを含むプログラム。 Causes a computer to perform a process of recording the data in a file provided in the data area of a recording medium having a data area for recording data in units of files and a management area for recording management information for managing the data In the program
An empty file having a size equal to or larger than the maximum size assumed as the size of data recorded in the file is generated as the data file,
A program comprising a step of recording the data in the generated file.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006225190A JP2008052767A (en) | 2006-08-22 | 2006-08-22 | Recording device and recording method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006225190A JP2008052767A (en) | 2006-08-22 | 2006-08-22 | Recording device and recording method, and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2008052767A true JP2008052767A (en) | 2008-03-06 |
Family
ID=39236697
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006225190A Pending JP2008052767A (en) | 2006-08-22 | 2006-08-22 | Recording device and recording method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2008052767A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2015516145A (en) * | 2012-04-02 | 2015-06-08 | ソレクセル、インコーポレイテッド | High efficiency solar cell structure and manufacturing method thereof |
US10922270B2 (en) * | 2017-02-01 | 2021-02-16 | Pittasoft Co., Ltd. | Adaptive data recording method in vehicle image recording device |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004078490A (en) * | 2002-08-15 | 2004-03-11 | Sony Corp | Recording device and method, reproducing device and method, recording medium and program |
-
2006
- 2006-08-22 JP JP2006225190A patent/JP2008052767A/en active Pending
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004078490A (en) * | 2002-08-15 | 2004-03-11 | Sony Corp | Recording device and method, reproducing device and method, recording medium and program |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2015516145A (en) * | 2012-04-02 | 2015-06-08 | ソレクセル、インコーポレイテッド | High efficiency solar cell structure and manufacturing method thereof |
US10922270B2 (en) * | 2017-02-01 | 2021-02-16 | Pittasoft Co., Ltd. | Adaptive data recording method in vehicle image recording device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9477681B2 (en) | File management among different zones of storage media | |
US8151064B2 (en) | Hybrid hard disk drive and data storage method thereof | |
US8762661B2 (en) | System and method of managing metadata | |
US9336819B2 (en) | Apparatus and method for writing data based on drive state | |
US20090103203A1 (en) | Recording apparatus and control circuit | |
US20110125977A1 (en) | Aligning data storage device partition to boundary of physical data sector | |
US20190244638A1 (en) | Dynamic hybrid shingled magnetic recording | |
US8572344B2 (en) | Storage device erase command having a control field controllable by a requestor device | |
US20080126784A1 (en) | Storage apparatus, control method, and control device | |
JP2005011317A5 (en) | ||
JP2009266333A5 (en) | ||
JP2008276555A (en) | Information processor and firmware update method | |
US8156278B2 (en) | Non-volatile data storage system and method thereof | |
US20120137063A1 (en) | Auxiliary storage device and processing method thereof | |
WO2009084071A1 (en) | Raid control device and raid system | |
TWI450194B (en) | Method and system for processing operating system, computer readable storage medium storing the method | |
US8291206B2 (en) | Method for booting computer system | |
JP2012128645A (en) | Memory system | |
JP2008052767A (en) | Recording device and recording method, and program | |
US9389803B2 (en) | Method for controlling interface operation and interface device applying the same | |
US20170090768A1 (en) | Storage device that performs error-rate-based data backup | |
US10430287B2 (en) | Computer | |
US9086806B2 (en) | System and method for controlling SAS expander to electronically connect to a RAID card | |
JP5002944B2 (en) | Information processing apparatus, imaging apparatus, information processing method, and computer program | |
US10867633B1 (en) | Reduced adjacent track erasure from write retry |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20090729 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20101111 |
|
A131 | Notification of reasons for refusal |
Effective date: 20110315 Free format text: JAPANESE INTERMEDIATE CODE: A131 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20110726 |