JP3641863B2 - Data recording apparatus and method - Google Patents

Data recording apparatus and method Download PDF

Info

Publication number
JP3641863B2
JP3641863B2 JP33005995A JP33005995A JP3641863B2 JP 3641863 B2 JP3641863 B2 JP 3641863B2 JP 33005995 A JP33005995 A JP 33005995A JP 33005995 A JP33005995 A JP 33005995A JP 3641863 B2 JP3641863 B2 JP 3641863B2
Authority
JP
Japan
Prior art keywords
data
recording
identification code
recording medium
recorded
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.)
Expired - Fee Related
Application number
JP33005995A
Other languages
Japanese (ja)
Other versions
JPH09167447A (en
Inventor
雄一 鈴木
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.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP33005995A priority Critical patent/JP3641863B2/en
Publication of JPH09167447A publication Critical patent/JPH09167447A/en
Application granted granted Critical
Publication of JP3641863B2 publication Critical patent/JP3641863B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Management Or Editing Of Information On Record Carriers (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)

Description

【0001】
【発明の属する技術分野】
本発明はデータ記録装置および方法に関し、特に、データ記録媒体中に記録されているデータを管理する管理情報が正しいか否かを迅速に識別することができるようにした、データ記録装置および方法に関する。
【0002】
【従来の技術】
最近、コンピュータの普及にともない、磁気ディスク、光磁気ディスク、ICメモリカードなどのデータ記録媒体に種々のデータが記録され、利用されるようになってきた。
【0003】
図15は、光磁気ディスクの一種であるMD(ミニディスク)(商標)データのファイルシステムの構成例を表している。同図に示すように、MDデータディスクは、2252個のクラスタに区分され、クラスタ0乃至クラスタ82の83個の領域は、UTOCおよび交替クラスタ領域とされ、クラスタ83乃至クラスタ114は、ボリューム管理領域(Volume Management Area(VMA))とされている。また、クラスタ115乃至クラスタ2251は、データを記録するファイルエクステント領域(File Extent Area(FEA))とされている。
【0004】
UTOCおよび交替クラスタ領域中のクラスタ3乃至5は、UTOC(User Table of Content)領域とされ、クラスタ50乃至82は、交替クラスタ領域とされている。その他のクラスタは、リザーブとされている。
【0005】
ボリューム管理領域(VMA)の先頭のクラスタ83には、その先頭のセクタに、ボリュームディスクリプタ(Volume Descriptor (VD))が配置され、次の3セクタには、ボリュームスペースビットマップ(Volume Space Bitmap(VSB))が配置され、続く2セクタには、マネージメントテーブル(Mangement Table (MT))が配置され、さらに続く26セクタには、ディレクトリレコードブロック(Directory Record Block(DRB))が配置されている。
【0006】
1クラスタは32セクタにより構成され、1セクタは2048バイトとされている。従って、1クラスタは65536バイト(64kバイト)となる。
【0007】
ボリュームディスクリプタ(VD)は、図16に示すように、このディスクに記録されているボリュームスペースビットマップ(VSB)、マネージメントテーブル(MT)、ディレクトリレコードブロック(DRB)、ファイルエクステント領域(FEA)の位置を表している。
【0008】
ボリュームスペースビットマップ(VSB)は、ファイルエクステント領域(FEA)の空き領域を管理するビットマップデータを有している。マネージメントテーブル(MT)は、ディレクトリレコードブロック(DRB)の空きを管理している。また、ディレクトリレコードブロック(DRB)は、ファイルとディレクトリの管理を行う領域とされる。1つのDRBは、1つのセクタに記述されている。
【0009】
図17は、ボリューム管理領域(VMA)のフォマーットを模式的に表している。同図に示すように、クラスタ83の最初のセクタにはボリュームディスクリプタ(VD)が、次の3セクタにはボリュームスペースビットマップ(VSB)が、次の2セクタには、マネージメントテーブル(MT)が、それぞれ配置されている。そして、クラスタ83の、それ以降の各セクタと、クラスタ84乃至クラスタ114の各セクタには、ディレクトリレコードブロック(DRB)6乃至DRB1023が配置されている。
【0010】
図18は、従来のMDデータ記録再生装置における処理例を表している。
【0011】
最初にステップS91において、ディスク(MDデータ)から、ボリュームディスクリプタ(VD)、ボリュームスペースビットマップ(VSB)およびマネージメントテーブル(MT)が読み取られ、データ記録再生装置のRAM(図示せず)に書き込まれる。次にステップS92において、記録、再生、消去のいずれかの指令が入力されるまで待機する。
【0012】
記録、再生または消去の指令が入力されたとき、それぞれステップS93,S94またはS95に進み、指令に対応する記録処理、再生処理、または消去処理が実行される。すなわち、ディスクのファイルエクステント領域(FEA)に対して、データが記録され、再生され、あるいは消去される。
【0013】
次にステップS96において電源オフの指令、またはディスクを排出する指令などが入力されるなどして、動作の終了が指示されたか否かが判定される。終了が指示されない場合においては、ステップS92に戻り、それ以降の処理を繰り返し実行する。
【0014】
ステップS96において終了が指令されたと判定された場合、ステップS97に進み、RAMに記憶されているボリュームディスクリプタ(VD)、ボリュームスペースビットマップ(VSB)、マネージメントテーブル(MT)の内容が更新されている場合、それがディスクに書き込まれる。
【0015】
このようにして、ファイルエクステント領域(FEA)にデータを記録したり、記録されているデータを消去したりした場合においては、それに対応して、ボリューム管理領域(VMA)の内容を更新することで、ボリューム管理領域(VMA)の内容を参照して、ファイルエクステント領域(FEA)に記録されている任意のファイルを自由にアクセスすることができるようになされている。
【0016】
しかしながら、このようにボリューム管理領域(VMA)の内容を全てRAMに記憶しておき、動作を終了させるとき、最後にまとめてその内容をディスクに書き込むようにすると、RAMの容量を大きくしなければならず、コスト高となるばかりでなく、終了を指令した後、実際に動作が終了されるまでの時間が長くなり、操作性が悪化する。
【0017】
そこで、ボリューム管理領域(VMA)の内容を変更するたびに、その内容をディスクに記録するようにすることも考えられる。しかしながらそのようにすると、使用中における処理速度が低下することになる。
【0018】
これを解決するために、ボリュームディスクリプタ(VD)、ボリュームスペースビットマップ(VSB)、およびマネージメントテーブル(MT)をRAMに常駐させ、ディレクトリレコードブロック(DRB)は、アクセス頻度の高いものをRAM上に記憶させるようにし、新しいディレクトリレコードブロック(DRB)をアクセスするときは、古くなったディレクトリレコードブロック(DRB)をディスク上に書き込み、新しいディレクトリレコードブロック(DRB)をRAMに取り込むようにするLeast Recently Used(LRU)アルゴリズムが用いられる場合がある。
【0019】
しかしながら、そのようにすると、RAM上には、ディスクにまだ書き込まれていない情報が残ることになり、しかも、使用頻度の高い情報ほど、RAMに常駐される結果、ディスクには書き込まれていない可能性が高くなる。
【0020】
その結果、装置の故障、停電、操作ミスなどにより、上述したファイルシステムの動作手順が完結しない状態で、データ記録再生装置が停止してしまう(システムダウンする)状態が発生すると、システムエラーが発生する。
【0021】
例えば、ディレクトリレコードブロック(DRB)32に所定のファイルAが登録され、その内容データもファイルエクステント領域(FEA)に書かれたタイミングで、システムダウンが発生したとすると、ボリュームスペースビットマップ(VSB)がまだ更新されていないので、以後のアクセス時に、ファイルエクステント領域(FEA)のファイルAが記録されている領域は、空き領域と見なされてしまう。その結果、次に新しいファイルBを記録しようとすると、ファイルAが記録されている領域にファイルBが上書きされ、ファイルAが消去されてしまう事態が発生する。
【0022】
また、例えば、親ディレクトリのディレクトリレコードブロック(DRB)6において、サブディレクトリCが、ディレクトリレコードブロック(DRB)64として登録されており、ディレクトリレコードブロック(DRB)64が、まだ更新されていない状態でシステムダウンすると、実際には、サブディレクトリCは存在しないことになる。その結果、サブディレクトリCを読み込むと、システムエラーとなってしまう。
【0023】
【発明が解決しようとする課題】
このように、ディスクのファイル管理情報に異常があると、ファイル(データ)を正確に保持することが困難になる。そこで、ディスクのファイル管理情報に異常があるか否かを検査し、異常が発見された場合には、これを修復するようにしている。
【0024】
ディスクのファイル管理情報に異常があるか否かの検査は、例えば次のような項目を検査することにより行われる。
【0025】
(1)各ディレクトリに登録されているサブディレクトリが、実際に存在するか否か。
【0026】
(2)各ディレクトリに登録されている各ファイルの記録領域に対して、ボリュームスペースビットマップ(VSB)が使用中となっているか否か。
【0027】
(3)その他、ファイル管理情報の自己矛盾がないか否か。
【0028】
これらの検査には、数分の時間が必要となる。そこで、例えばデータ記録再生装置の電源がオンされた場合、あるいは、データ記録再生装置にディスクが装着されたとき、この検査を行うようにすることができる。しかしながらそのようにすると、データ記録再生装置を実際に使用し始めるまでに時間がかかりすぎ、操作性が損なわれることになる。
【0029】
そこで、装置の動作に異常が認められたとき、検査するようにすることができる。しかしながらそのようにすると、大切なデータが破壊された後、異常が発見されることになり、信頼性が損なわれることになる。
【0030】
本発明はこのような状況に鑑みてなされたものであり、迅速かつ確実に、記録媒体上のデータ管理情報が正しいか否かを検出することができるようにするものである。
【0031】
【課題を解決するための手段】
請求項1に記載のデータ記録装置は、記録媒体に記録されるデータを書き換える前に、データを書き換える前の状態であることを表す第1の識別符号を記録媒体に記録する第1の記録手段と、第1の識別符号の記録の後に、記録媒体に記録されるデータを書き換える書き換え手段と、書き換え手段によるデータの書き換えの後に、記録媒体に記録された第1の識別符号を、データを書き換えた後の状態であることを表す第2の識別符号に書き換える第2の記録手段と、第1の識別符号が記録媒体に記録される前の状態であることを表す第3の識別符号を記憶媒体に記録する第3の記録手段と、第1の記録手段により第1の識別符号が記録媒体に記録された後に、第3の識別符号を、第1の識別符号が記録された後の状態であることを表す第4の識別符号に書き換える第4の記録手段と、記録媒体からデータを再生する再生手段とを備え、第1の記録手段は、記録媒体に対するデータ書き換えが指令され、且つ、第3の識別符号が記録されているとき、第1の識別符号を記録媒体に記録し、再生手段は、記録媒体に記録されるデータの再生が指令されたとき、第3の識別符号が記録されているか否かを検出することなく、記録媒体からデータを再生することを特徴とする。
【0032】
請求項に記載のデータ記録方法は、記録媒体に記録されるデータを書き換える前に、データを書き換える前の状態であることを表す第1の識別符号を記録媒体に記録する第1の記録ステップと、第1の識別符号の記録の後に、記録媒体に記録されるデータを書き換える書き換えステップと、データの書き換えの後に、記録媒体に記録された第1の識別符号を、データを書き換えた後の状態であることを表す第2の識別符号に書き換える第2の記録ステップと、第1の識別符号が記録媒体に記録される前の状態であることを表す第3の識別符号を記憶媒体に記録する第3の記録ステップと、第1の識別符号が記録媒体に記録された後に、第3の識別符号を、第1の識別符号が記録された後の状態であることを表す第4の識別符号に書き換える第4の記録ステップと、記録媒体からデータを再生する再生ステップとを含み、第1の記録ステップは、記録媒体に対するデータ書き換えが指令され、且つ、第3の識別符号が記録されているとき、第1の識別符号を記録媒体に記録し、再生ステップは、記録媒体に記録されるデータの再生が指令されたとき、第3の識別符号が記録されているか否かを検出することなく、記録媒体からデータを再生することを特徴とする。
【0034】
請求項1に記載のデータ記録装置においては、第1の記録手段が、記録媒体に記録されるデータを書き換える前に、データを書き換える前の状態であることを表す第1の識別符号を記録媒体に記録し、書き換え手段が、第1の識別符号の記録の後に、記録媒体に記録されるデータを書き換え、第2の記録手段が、書き換え手段によるデータの書き換えの後に、記録媒体に記録された第1の識別符号を、データを書き換えた後の状態であることを表す第2の識別符号に書き換え、第3の記録手段が、第1の識別符号が記録媒体に記録される前の状態であることを表す第3の識別符号を記憶媒体に記録し、第4の記録手段が、第1の記録手段により第1の識別符号が記録媒体に記録された後に、第3の識別符号を、第1の識別符号が記録された後の状態であることを表す第4の識別符号に書き換え、再生手段が、記録媒体からデータを再生する。また、第1の記録手段は、記録媒体に対するデータ書き換えが指令され、且つ、第3の識別符号が記録されているとき、第1の識別符号を記録媒体に記録し、再生手段は、記録媒体に記録されるデータの再生が指令されたとき、第3の識別符号が記録されているか否かを検出することなく、記録媒体からデータを再生する。
【0035】
請求項に記載のデータ記録方法においては、記録媒体に記録されるデータを書き換える前に、データを書き換える前の状態であることを表す第1の識別符号を記録媒体に記録し、第1の識別符号の記録の後に、記録媒体に記録されるデータを書き換え、データの書き換えの後に、記録媒体に記録された第1の識別符号を、データを書き換えた後の状態であることを表す第2の識別符号に書き換え、第1の識別符号が記録媒体に記録される前の状態であることを表す第3の識別符号を記憶媒体に記録し、第1の識別符号が記録媒体に記録された後に、第3の識別符号を、第1の識別符号が記録された後の状態であることを表す第4の識別符号に書き換え、記録媒体からデータを再生する。また、記録媒体に対するデータ書き換えが指令され、且つ、第3の識別符号が記録されているとき、第1の識別符号を記録媒体に記録し、記録媒体に記録されるデータの再生が指令されたとき、第3の識別符号が記録されているか否かを検出することなく、記録媒体からデータを再生する。
【0037】
【発明の実施の形態】
図1は、本発明のデータ記録再生装置の構成例を示すブロック図である。データ記録媒体1は、例えば、磁気ディスク、光磁気ディスク、ICメモリカードなどよりなる記録媒体であって、データが記録される。媒体駆動部2は、データ記録媒体1に対してデータを記録し、また、これを再生するものであり、例えばデータ記録媒体1が光磁気ディスクである場合においては、これを回転するスピンドルモータ、光磁気ディスクに対してレーザ光を照射する光ピックアップ、各種のサーボ動作を行うサーボ回路、記録信号を変調し、また、再生信号を復調する変復調回路などよりなるディスクドライブ装置により構成される。
【0038】
RAM3は、データ記録媒体1に対してデータを記録再生する場合におけるバッファとしての機能や、CPU5が各種の動作を実行する上において、必要なデータやプログラムなどを適宜記憶するワークエリアとしても機能する。不揮発性メモリ4は、データ記録再生装置の電源をオフした後も記憶しておく必要のあるデータを記憶する。CPU5は、ROM6に記憶されているプログラムに従って、各種の処理を実行する。
【0039】
データ入力部7は、各種のデータを入力するものであり、キーボード、デジタルインタフェース、A/Dコンバータなどにより構成される。データ出力部8は、データを出力する部分であり、例えばデジタルインタフェース、CRTディスプレイ、D/Aコンバータなどにより構成される。
【0040】
以下の実施例においては、データ記録媒体1はMDデータであるとする。
【0041】
図2は、データ記録媒体1としてのMDデータのフォーマットを表している。このフォーマットは、図15を参照して説明した従来のMDデータのフォーマッットと基本的に同様であるが、この実施例においては、ボリューム管理領域(VMA)のクラスタ83に配置されているボリュームディスクリプタ(VD)の未使用バイトに、異常検出バイト(Fault Detect Byte(FDB))が配置される。その他の構成は、図15における場合と同様である。
【0042】
この異常検出バイト(FDB)は、その値が、0ならば正常、0x42ならば異常と定義される。なお、ここで0xは16進数を表す。
【0043】
この異常検出バイト(FDB)は、図3のフローチャートに示すように記録される。すなわち、いま、ユーザがデータ入力部7を操作して、データの記録を指令すると、ステップS1(第1の記録手段)において、CPU5は、媒体駆動部2を制御し、データ記録媒体1としてのMDデータのボリュームディスクリプタ(VD)中の異常検出バイト(FDB)に0x42(第1の識別符号)を書き込ませる。
【0044】
次に、ステップS2(書き換え手段)に進み、CPU5は、データ入力部7より入力された記録データをRAM3に一時的に記憶させる。そして、RAM3に記憶されたデータを読み出し、これを媒体駆動部2を介して、データ記録媒体1に供給し、ファイルエクステント領域(FEA)に記録させる。このデータの記録にともなって、ボリューム管理領域(VMA)の管理情報も更新される。
【0045】
そして、ステップS3(第の記録手段)に進み、CPU5は、ステップS1で0x42を書き込んだディスク(MDデータ)中の異常検出バイト(FDB)を0(第2の識別符号)に書き換える。
【0046】
このように、この実施例によれば、MDデータにデータを書き込む前に、異常検出バイト(FDB)に0x42を書き込み、データの書き込み完了後、その値を0に書き換えるようにしているので、データの書き換え処理の途中でシステムダウンが発生した場合、MDデータの異常検出バイト(FDB)は、0x42のままとなる。
【0047】
これに対して、データの書き込み前か、書き換え完了後にシステムダウンが発生したとしても、ディスクの内容は正常である。そしてこのとき、異常検出バイト(FDB)の値は0となっている。
【0048】
そこで、データ記録再生装置にディスクを装着したとき、あるいはデータ記録再生装置の電源がオンされたとき、MDデータの異常検出バイト(FDB)を読み出し、その値が0であれば、そのままその後の処理を継続し、その値が0x42である場合においては、ディスクの内容を修復する修復プログラムを実行するようにする。
【0049】
しかしながら、図3の実施例によると、ディスク上のデータを書き換えるたびに、異常検出バイト(FDB)を書き換える処理(ステップS1とS3の処理)を行わなければならず、処理速度が低下する。そこで、例えば図4のフローチャートに示すように処理することができる。
【0050】
図4の処理においては、最初にステップS11(再生手段)において、CPU5は、データ記録媒体1(MDデータ)からボリュームディスクリプタ(VD)、ボリュームスペースビットマップ(VSB)およびマネージメントテーブル(MT)を読み取り、それをRAM3に記憶させる。次にステップS12において、いま読み取ったボリュームディスクリプタ(VD)中の異常検出バイト(FDB)を読み取り、その値が0x42であるか否かを判定する。
【0051】
後述するように、この実施例においても、データの記録動作の途中でシステムダウンが発生したとき、異常検出バイト(FDB)は、0x42となっている。そこで、この場合、データの内容が正常ではないと判定し、ステップS13(修復手段)に進み、修復プログラムを実行する。これにより、データ記録媒体1中の異常が修復される。すなわち、ディレクトリに登録されているサブディレクトリが実際に存在するようになされ、各ディレクトリに登録されている各ファイルの記録領域に対し、ボリュームスペースビットマップ(VSB)が使用中となり、その他、管理情報の自己矛盾がないように修復が行われる。
【0052】
このような修復が行われたので、次にステップS14に進み、RAM3上のボリュームディスクリプタ(VD)中の異常検出バイト(FDB)の値を0に書き換える。そして、ステップS15において、RAM3に記憶されているボリュームディスクリプタ(VD)、ボリュームスペースビットマップ(VSB)およびマネージメントテーブル(MT)をデータ記録媒体1に書き込ませる(MDデータの内容を更新する)。これにより、MDデータのボリュームディスクリプタ(VD)には、異常検出バイト(FDB)の値として0が記録されることになる。
【0053】
そこで、ステップS11に戻り、再びMDデータからボリュームディスクリプタ(VD)、ボリュームスペースビットマップ(VSB)およびマネージメントテーブル(MT)を読み取り、RAM3に書き込むと、そのRAM3に書き込まれた異常検出バイト(FDB)の値は0となっている。そこで、この場合においては、ステップS12において、NOの判定が行われ、ステップS16に進む。
【0054】
ステップS16においては、RAM3に記憶されている異常検出バイト(FDB)の値を0から0x42に書き換えさせる。そして、ステップS17において、RAM3に記憶されているボリュームディスクリプタ(VD)、ボリュームスペースビットマップ(VSB)およびマネージメントテーブル(MT)が読み出され、MDデータに書き込まれる。
【0055】
この図4の処理は、データ記録再生装置にデータ記録媒体1を装着したとき、あるいは、データ記録媒体1が、既にデータ記録再生装置に装着されている場合においては、データ記録再生装置の電源をオンしたときに開始される。すなわち、データ記録再生装置の使用を開始するとき実行される。
【0056】
従って、データ記録媒体1に対する実質的な使用を開始する前に、データ記録媒体1が、常に正常な状態とされる。また、この状態において、データ記録媒体1の異常検出バイト(FDB)は、その後、途中でシステムダウンが発生した場合に備えて、その値が0x42に設定される。
【0057】
次に、ステップS18において、CPU5は、データ入力部7から所定の動作の指令が入力されるまで待機し、記録が指令されたとき、ステップS19に進み記録処理を実行し、再生が指令されたとき、ステップS20に進み再生処理を実行し、消去が指令されたとき、ステップS21に進み消去処理を実行する。
【0058】
図5は、記録処理の詳細を表している。最初にステップS111において、CPU5は、RAM3に記憶されているボリュームスペースビットマップ(VSB)を走査し、データを記録する上において必要な数の空きセクタを検索する。そしてステップS112に進み、ステップS111で検索した空きセクタにデータを記録する。
【0059】
なお、MDデータの場合、記録はクラスタ単位で行われる。従って、データを新たに記録すべき空きセクタが属するクラスタの他のセクタに、既にデータが記録されている場合においては、そのセクタのデータが読み出され、RAM3に記憶される。そして、データ入力部7より入力された記録データがRAM3のそのクラスタの空きセクタ中に書き込まれる。そして、1クラスタ分のデータが集められた後、その1クラスタ分のデータがRAM3から読み出され、媒体駆動部2を介してMDデータの対応するファイルエクステント領域(FEA)のクラスタに書き込まれる。
【0060】
次にステップS113に進み、CPU5は、RAM3に記憶されているボリュームスペースビットマップ(VSB)の、いまデータを記録した空きセクタに対応するビットを使用済に設定する。
【0061】
次にステップS114に進み、いま、データを記録したセクタに対応するディレクトリレコードブロック(DRB)をデータ記録媒体1から読み出し、RAM3に記憶する。そして、ステップS115において、いま読み込んだディレクトリレコードブロック(DRB)に、ステップS112で記録されたデータにより構成されるファイルのファイル名、データを記録した最初のセクタの番号、データを記録したセクタの数などを記録し、さらにこれをMDデータに記録する。
【0062】
図6は、再生処理の詳細を表している。再生処理においては、ステップS121において、CPU5は、データ記録媒体1に記録されているディレクトリレコードブロック(DRB)をRAM3に読み出して走査し、データ入力部7から入力された再生すべきファイル名を検索する。目的のファイル名のディレクトリレコードブロック(DRB)が検索されたとき、ステップS122に進み、そのディレクトリレコードブロック(DRB)からそのファイルの開始セクタ番号やセクタ数を読み取る。そしてステップS123において、CPU5は、ステップS122で読み取った開始セクタ番号から、やはり読み取った数のセクタを再生する。
【0063】
この再生データはRAM3に記憶された後、再び読み出され、データ出力部8に出力される。
【0064】
図7は、消去処理の詳細を表している。消去処理においては、ステップS141において、データ記録媒体1のディレクトリレコードブロック(DRB)がRAMに読み出されて走査され、消去対象とされるファイル名を有するディレクトリレコードブロック(DRB)が検索される。目的のファイル名を有するディレクトリレコードブロック(DRB)が検索されたとき、ステップS142に進み、そのディレクトリレコードブロック(DRB)の開始セクタ番号とセクタ数が読み取られる。
【0065】
次にステップS143に進み、CPU5は、ステップS142で読み取られた開始セクタ番号のセクタから、そのファイルを構成する数のセクタのボリュームスペースビットマップ(VSB)上の対応するビットをクリアする。このボリュームスペースビットマップ(VSB)は、RAM3に記憶されているものである。そして、ステップS144に進み、データ記録媒体1中のディレクトリレコードブロック(DRB)における、そのファイルの記述を消去する。
【0066】
図4に戻って、以上のようにして、ステップS19乃至S21において、記録処理、再生処理、または消去処理が実行された後、ステップS22に進み、処理の終了が指令されたか否かを判定する。データ入力部7よりデータ記録媒体1の排出や、データ記録再生装置の電源をオフする指令などが入力されるなどして、終了が指令されていなければ、ステップS18に戻り、それ以降の処理を繰り返し実行する。
【0067】
処理の終了が指令されたと判定された場合、ステップS23に進み、CPU5は、RAM3の異常検出バイト(FDB)を0に書き換える。この異常検出バイト(FDB)は、処理開始時において、ステップS16で、0x42に書き換えられていたものである。そして、ステップS24に進み、RAM3に記憶されているボリュームディスクリプタ(VD)、ボリュームスペースビットマップ(VSB)およびマネージメントテーブル(MT)をデータ記録媒体1に書き込む。さらに、ステップS25において、終了指令に対応して、電源をオフしたり、ディスクを排出する処理を実行する。
【0068】
以上のように、図4の実施例によれば、ステップS18乃至S22の実質的な使用状態の前と後に、それぞれ1回ずつ異常検出バイト(FDB)を書き換える処理を実行するだけなので、処理速度の低下は抑制される。
【0069】
しかしながら、図4に示す実施例の場合、ディスクにデータを書き込む場合だけでなく、単に再生を行う場合にも、異常検出バイト(FDB)の書き込み処理が実行されることになる。そこで、データ記録媒体1に対してデータの記録動作を行わない再生処理だけが行われる場合においては、データ記録媒体1の異常検出バイト(FDB)の更新を行わないようにすることも可能である。図8は、この場合の実施例を表している。
【0070】
図8においては、最初にステップS41において、データ記録媒体1からボリュームディスクリプタ(VD)、ボリュームスペースビットマップ(VSB)およびマネージメントテーブル(MT)が読み取られ、RAM3に記憶される。そして、ステップS42において、いま、読み取られたボリュームディスクリプタ(VD)中の異常検出バイト(FDB)が0x42であるか否かが判定される。異常検出バイト(FDB)が0x42である場合においては、ステップS43に進み、修復プログラムが実行される。そして、修復処理が実行された後、ステップS44において、RAM3の異常検出バイト(FDB)が0に書き換えられ、RAM3に記憶されているボリュームディスクリプタ(VD)、ボリュームスペースビットマップ(VSB)およびマネージメントテーブル(MT)が、ステップS45において、データ記録媒体1に書き込まれる。以上の処理は、図4におけるステップS11乃至S15の処理と同様の処理である。
【0071】
ステップS42において、RAM3に読み取った異常検出バイト(FDB)が0x42ではないと判定された場合(0であると判定された場合)、ステップS46に進み、CPU5は、RAM3の異常検出バイト(FDB)の値を0から0x42に書き換える。また、RAM3(または不揮発性メモリ4)に記憶されている検査バイト(FDS)(第3の識別符号)を0に設定する。この検査バイト(FDS)は、データ記録媒体1に対してデータを書き込んだか否かを表す識別符号として機能する。ここでは、データ記録媒体1にデータが書き込まれないものとして、値0を初期設定する。
【0072】
次に、ステップS47に進み、データ入力部7より所定の指令が入力されるまで待機する。
【0073】
データの記録が指令されたとき、ステップS48に進み、CPU5は、RAM3(また不揮発性メモリ4)に記憶されている検査バイト(FDS)が0であるか否かを判定する。まだ一度もデータ記録媒体1に対してデータを書き込んでいない場合においては、上述したように、ステップS46で検査バイト(FDS)に0が初期設定されている。この場合においては、ステップS49に進み、RAM3に記憶されているボリュームディスクリプタ(VD)、ボリュームスペースビットマップ(VSB)およびマネージメントテーブル(MT)がデータ記録媒体1に書き込まれる。従って、データ記録媒体1の異常検出バイト(FDB)は、0x42とされる。
【0074】
次にステップS50に進み、CPU5は、RAM3に記憶されている検査バイト(FDS)の値を1に書き換える。これにより、データ記録媒体1に対して記録処理が行われたこと(続くステップS51で行われる)が設定される。そしてステップS51に進み、データ入力部7より入力され、RAM3に記憶したデータを、データ記録媒体1のファイルエクステント領域(FEA)に記録させる。このステップS51における記録処理の詳細は、図5に示した場合と同様である。
【0075】
ステップS48において、検査バイト(FDS)が0ではない(1である)と判定された場合、データ記録媒体1に対して、1回以上データの書き込み処理が実行されたことになる。この場合、既にデータ記録媒体1の異常検出バイト(FDB)は、0x42に既に書き換えられているので、ステップS49,S50の処理はスキップされ、ステップS51に進み、記録処理が直ちに開始される。
【0076】
一方、ステップS47において、データの消去が指令された場合、この場合においても、データ記録媒体1の書き込みが行われるため、記録における場合と同様の処理が実行される。すなわち、この場合においては、ステップS53において、RAM3に記憶されている検査バイト(FDS)が0であるか否かが判定され、0であればステップS54に進み、RAM3に記憶されているボリュームディスクリプタ(VD)、ボリュームスペースビットマップ(VSB)およびマネージメントテーブル(MT)が、データ記録媒体1に書き込まれる。そして、ステップS55において、RAM3に記憶されている検査バイト(FDS)が1に設定される。その後、ステップS56に進み、消去処理が実行される。この消去処理の詳細は、図7に示した場合と同様である。
【0077】
ステップS53において、検査バイト(FDS)が0ではない(1である)と判定された場合、既にデータ記録媒体1には、1回以上データの書き込み処理が行われていることになる。そこで、この場合においては、異常検出バイト(FDB)は、0x42の値に既に書き換えられている。このため、ステップS54,55の処理はスキップされ、ステップS56の消去処理が直ちに実行される。
【0078】
さらに、ステップS47において、再生の指令が入力されたとき、ステップS52に進み、再生処理が実行される。この再生処理の詳細は、図6に示した場合と同様である。
【0079】
すなわち、再生が指令された場合においては、記録または消去が指令された場合とは異なり、データ記録媒体1の異常検出バイト(FDB)を更新する処理は行われないことになる。
【0080】
ステップS51,S52またはS56の次に、ステップS57に進み、処理の終了が指令されたか否かが判定され、指令されていなければステップS47に戻り、それ以降の処理が繰り返し実行される。
【0081】
処理の終了が指令されたと判定された場合、ステップS58に進み、検査バイト(FDS)が1であるか否かが判定される。上述したように、データ記録媒体1に対して1回でもデータを記録したとき、ステップS50またはS55において、検査バイト(FDS)には1が設定され、ステップS49またはS54において、データ記録媒体1中の異常検出バイト(FDB)が0x42の値に書き換えられている。そこで、ステップS59において、RAM3のボリュームディスクリプタ(VD)中の異常検出バイト(FDB)を0に書き換える。そして、ステップS60において、RAM3に記憶されているボリュームディスクリプタ(VD)、ボリュームスペースビットマップ(VSB)およびマネージメントテーブル(MT)をデータ記録媒体1に書き込む処理を実行する。
【0082】
さらに、ステップS61に進み、終了の指令に対応して、電源オフまたはディスクを排出する処理が実行される。
【0083】
ステップS58において、検査バイト(FDS)が1ではない(0である)と判定された場合、データ記録媒体1には、再生処理が行われたとしても、データの書き込み処理(記録または消去処理)が一度も行われていないことになる。従って、データ記録媒体1の異常検出バイト(FDB)は0のままとされている。そこで、ステップS59,S60の処理はスキップされ、ステップS61の処理が直ちに実行される。
【0084】
以上のように、この実施例によれば、一度も書き込み処理が行われていないディスクに対しては、余分な書き込み(異常検出バイト(FDB)の書き込み)が行われないことになる。
【0085】
この図8の実施例は、次のような効果を有する。すなわち、電源オン時やディスク挿入時には、ボリュームディスクリプタ(VD)は必ず読み込む必要があるものであり、異常検出バイト(FDB)の検査による効率低下は発生しない。
【0086】
また、ディスクへの書き込みが発生した場合、いずれにしてもボリュームスペースビットマップ(VSB)やボリュームディスクリプタ(VD)に変更が加えられるので、異常検出バイト(FDB)の記録再生を行わないとしても、ボリュームディスクリプタ(VD)、ボリュームスペースビットマップ(VSB)およびマネージメントテーブル(MT)の書き込み処理が行われる。従って、ディスクに対して書き込み処理が行われる場合には、異常検出バイト(FDB)をディスクに記録するようにしたとしても、それに起因して効率が低下するようなことはない。
【0087】
すなわち、異常検出バイト(FDB)が0である場合において、データを最初に記録するときのボリュームディスクリプタ(VD)、ボリュームスペースビットマップ(VSB)およびマネージメントテーブル(MT)の書き込み(ステップS49またはS54における書き込み)のみが、異常検出バイト(FDB)を採用しない場合に較べて余分な処理となるだけである。従って、異常検出バイト(FDB)を採用したとしても、それによる効率低下はほとんど無視することができる。
【0088】
次に修復プログラム実行の処理(図4のステップS13または図8のステップS43の処理)の詳細について、さらに説明する。
【0089】
MDデータにおいては、データ入力部7よりCPU5に対してミラーモードの設定を指令すると、CPU5は、通常、図17に示すように、クラスタ83乃至クラスタ114に形成するボリューム管理領域(VMA)を、図9に示すように、2倍に拡大し、クラスタ83乃至クラスタ146にボリューム管理領域(VMA)を形成する。そして、ボリューム管理領域(VMA)に、実質的に同一の情報を二重書きするようにする。
【0090】
すなわち、図9に示すように、各クラスタを前半と後半に区分し、前半と後半に同一の情報を記録するようにする。例えば、クラスタ83の前半には、ボリュームディスクリプタ(VD)、ボリュームスペースビットマップ(VSB)およびマネージメントテーブル(MT)と、ディレクトリレコードブロック(DRB)6乃至DRB15が記録される。そして、クラスタ83の後半にも、前半と同一のデータが記録される。クラスタ84においても、その前半と後半には、それぞれディレクトリ、レコードブロックDRB16乃至DRB31のデータが二重に書き込まれる。クラスタ85乃至クラスタ146においても同様である。
【0091】
このようなミラーモードが設定された場合、CPU5は、図4のステップS13または図8のステップS43の修復プログラム実行処理において、例えば図10に示す処理を実行する。
【0092】
この処理は、上述したように、図4のステップS12、または図8のステップS42において、異常検出フラグFDBが0x42であると判定されたとき行われるものであるので、いずれかの位置に異常(破壊されたデータ)が記録されていることになる。
【0093】
そこで、最初にステップS71において、CPU5は、クラスタ(例えばクラスタ83)の前半のデータが読み取り可能であるか否かを判定する。図11に示すように、クラスタ83の前半と後半のうち、後半のデータが破壊されていたとすれば、前半のデータ(更新された新しいデータ)は読み取ることが可能である。この場合においては、ステップS72に進み、クラスタ83の前半のボリュームディスクリプタ(VD)が読み取られる。
【0094】
そして、その読み取ったボリュームディスクリプタ(VD)中の異常検出バイト(FDB)が0であるか否かをステップS73で判定する。異常検出バイト(FDB)が0である場合、他のクラスタの書き換えが既に完了しているので、データは正常であると判定することができる。そこで、この場合においては、図8のステップS46(または図4のステップS16)に進み、正常である場合と同様の処理を実行する。
【0095】
これに対して、クラスタ83の前半のボリュームディスクリプタ(VD)中の異常検出バイト(FDB)が0ではない(0x42である)と判定された場合、他のクラスタは、書き換えられた可能性がある。そこで、この場合においてはステップS74に進み、修復プログラム処理が実行される。
【0096】
一方、ステップS71において、クラスタ83の前半のデータが読み取り可能ではないと判定された場合、ステップS75に進み、クラスタ83の後半のデータが読み取り可能であるか否かが判定される。例えば、図12に示すように、クラスタ83の前半のデータが破壊されていたとしても、その後半のデータ(更新されていない古いデータ)が破壊されていない場合がある。この場合、ステップS76に進み、クラスタ83の後半のデータが読み取られる。そして、ステップS77において、その読み取ったボリュームディスクリプタ(VD)中の異常検出バイト(FDB)が0であるか否かを判定する。
【0097】
古いボリュームディスクリプタ(VD)の異常検出バイト(FDB)が0である場合、他のクラスタは、まだ書き換えられていないので正常である。そこで、図8のステップS46(または図4のステップS16)に進み、それ以降の処理を実行する。
【0098】
ステップS77において、異常検出フラグFDBが0ではない(0x42である)と判定された場合、他のクラスタは書き換えられた可能性があるので、この場合はステップS74に進み、修復プログラム処理を実行する。
【0099】
図13に示すように、クラスタ83の中央部が破壊された場合、クラスタ83の前半と後半の両方が読み取り不可となる。この場合は、ステップS71とステップS75において、NOの判定が行われるため、ステップS74に進み、修復プログラム処理が実行される。
【0100】
また、クラスタ83以外のクラスタ84乃至クラスタ146のうちのいずれかのクラスタの書き込み中にシステムがダウンした場合、図14に示すように、そのクラスタnの前半(図14(a))、後半(図14(b))または中央(図14(c))において、データが破壊されている。この場合においても、クラスタ83における場合と同様に処理することができる。
【0101】
なお、データが破壊されているか否かは、再生時、データに同期した同期信号がなくなること、あるいはエラー訂正符号によりエラーが検出されることなどから検出することができる。
【0102】
上記実施例においては、異常検出バイトをデータ記録媒体1に記録するようにしたが、データ記録媒体1が、データ記録再生装置から取り外しできないものである場合においては、不揮発性メモリ4に書き込むようにすることもできる。
【0103】
また、異常検出バイト(FDB)は、1バイト全てを用いる必要はなく、単に異常の有無を判定するだけでよいのなら、1ビットでもよい。逆に異常の有無だけでなく、ファイル管理情報の整合性、ファイル中のデータの整合性など、より多様な整合性判定を行う場合においては、より多くのビットを使用するようにすることもできる。さらにこの場合においては、異常検出符号の他に、変更を加えようとするファイル名などを記録するようにすることもできる。
【0104】
以上の実施例においては、データ記録媒体1をMDデータとしたが、この発明は、MDデータ以外の光磁気ディスクはもとより、そのほかの磁気ディスク、ICメモリカードなどのデータ記録媒体にも適用することが可能である。
【0105】
【発明の効果】
以上の如く請求項1に記載のデータ記録装置および請求項に記載のデータ記録方法によれば、第1の識別符号の記録の後に、記録媒体に記録されるデータを書き換え、データを書き換えた後に、記録媒体に記録された第1の識別符号を第2の識別符号に書き換え、第3の識別符号を記憶媒体に記録し、第1の識別符号が記録媒体に記録された後に、第3の識別符号を第4の識別符号に書き換え、記録媒体からデータを再生するようにしたので、識別符号からデータ管理情報の整合性を瞬時に判定することができる。
【0106】
その結果、データ記録再生装置の起動時やデータ記録媒体の交換時に、毎回整合性判定を行ったとしても、作業効率が低下することが抑制される。そして、整合性が取れていない状態において、データ記録媒体に対して、データの記録再生処理が行われないようにすることができるので、操作性および信頼性を飛躍的に向上させることが可能となる。
【図面の簡単な説明】
【図1】本発明のデータ記録再生装置の構成例を示すブロック図である。
【図2】図1のデータ記録媒体1のフォーマットを説明する図である。
【図3】図1の実施例の第1の処理例を示すフローチャートである。
【図4】図1の実施例の第2の処理例を示すフローチャートである。
【図5】図4のステップS19の記録処理の詳細を説明するフローチャートである。
【図6】図4のステップS20の再生処理の詳細を説明するフローチャートである。
【図7】図4のステップS21の消去処理の詳細を説明するフローチャートである。
【図8】図1の実施例の第3の処理例を示すフローチャートである。
【図9】ミラーモード時におけるフォーマットを説明する図である。
【図10】ミラーモード時における図8のステップS43における処理の詳細を説明するフローチャートである。
【図11】クラスタ83の後半が破壊された状態を示す図である。
【図12】クラスタ83の前半が破壊された状態を示す図である。
【図13】クラスタ83の中央部が破壊された状態を示す図である。
【図14】クラスタ83以外のクラスタが破壊された状態を示す図である。
【図15】従来のMDデータのフォーマットを示す図である。
【図16】ボリューム管理領域の構成を説明する図である。
【図17】クラスタ83乃至クラスタ114のデータの配置を説明する図である。
【図18】従来のデータ記録再生装置の処理例を示すフローチャートである。
【符号の説明】
1 データ記録媒体
2 媒体駆動部
3 RAM
4 不揮発性メモリ
5 CPU
6 ROM
7 データ入力部
8 データ出力部
[0001]
BACKGROUND OF THE INVENTION
  The present inventionData recording apparatus and methodIn particular, the management information for managing the data recorded in the data recording medium can be quickly identified as to whether or not the management information is correct.Data recording apparatus and methodAbout.
[0002]
[Prior art]
Recently, with the spread of computers, various data have been recorded and used on data recording media such as magnetic disks, magneto-optical disks, and IC memory cards.
[0003]
FIG. 15 shows a configuration example of a file system of MD (mini disk) (trademark) data which is a kind of magneto-optical disk. As shown in the figure, the MD data disk is divided into 2252 clusters, 83 areas of cluster 0 to cluster 82 are UTOC and alternate cluster areas, and cluster 83 to cluster 114 are volume management areas. (Volume Management Area (VMA)). The clusters 115 to 2251 are used as file extent areas (FEA) for recording data.
[0004]
Clusters 3 to 5 in the UTOC and the alternate cluster area are UTOC (User Table of Content) areas, and clusters 50 to 82 are alternate cluster areas. Other clusters are reserved.
[0005]
In the first cluster 83 of the volume management area (VMA), a volume descriptor (Volume Descriptor (VD)) is arranged in the first sector, and in the next three sectors, a volume space bitmap (VSB) is arranged. )) Is arranged, a management table (MT) is arranged in the following two sectors, and a directory record block (Directory Record Block (DRB)) is arranged in the following 26 sectors.
[0006]
One cluster is composed of 32 sectors, and one sector is 2048 bytes. Therefore, one cluster is 65536 bytes (64 kbytes).
[0007]
As shown in FIG. 16, the volume descriptor (VD) is the position of the volume space bitmap (VSB), management table (MT), directory record block (DRB), and file extent area (FEA) recorded on this disc. Represents.
[0008]
The volume space bitmap (VSB) has bitmap data for managing the free area of the file extent area (FEA). The management table (MT) manages the empty space of the directory record block (DRB). The directory record block (DRB) is an area for managing files and directories. One DRB is described in one sector.
[0009]
FIG. 17 schematically shows the format of the volume management area (VMA). As shown in the figure, the first sector of the cluster 83 has a volume descriptor (VD), the next three sectors have a volume space bitmap (VSB), and the next two sectors have a management table (MT). , Each is arranged. Then, directory record blocks (DRB) 6 to DRB 1023 are arranged in each sector of the cluster 83 and subsequent sectors and in each sector of the cluster 84 to cluster 114.
[0010]
FIG. 18 shows an example of processing in a conventional MD data recording / reproducing apparatus.
[0011]
First, in step S91, the volume descriptor (VD), volume space bitmap (VSB), and management table (MT) are read from the disk (MD data) and written to the RAM (not shown) of the data recording / reproducing apparatus. . Next, in step S92, the process waits until a recording, reproduction, or erasing command is input.
[0012]
When a command for recording, reproduction or erasure is input, the process proceeds to step S93, S94 or S95, respectively, and recording processing, reproduction processing or erasure processing corresponding to the command is executed. That is, data is recorded, reproduced, or deleted from the file extent area (FEA) of the disc.
[0013]
Next, in step S96, it is determined whether or not the operation has been instructed by inputting a power-off command or a command to eject the disc. If the termination is not instructed, the process returns to step S92 and the subsequent processing is repeatedly executed.
[0014]
If it is determined in step S96 that termination has been instructed, the process proceeds to step S97, and the contents of the volume descriptor (VD), volume space bitmap (VSB), and management table (MT) stored in the RAM are updated. If so, it is written to disk.
[0015]
In this way, when data is recorded in the file extent area (FEA) or the recorded data is deleted, the contents of the volume management area (VMA) are updated accordingly. Referring to the contents of the volume management area (VMA), any file recorded in the file extent area (FEA) can be freely accessed.
[0016]
However, if the contents of the volume management area (VMA) are all stored in the RAM in this way and the operation is terminated, the contents are finally written to the disk, and the capacity of the RAM must be increased. Not only is the cost high, but the time until the operation is actually ended after the end is instructed becomes longer, and the operability is deteriorated.
[0017]
Therefore, every time the contents of the volume management area (VMA) are changed, the contents may be recorded on the disc. However, doing so would reduce the processing speed during use.
[0018]
In order to solve this, the volume descriptor (VD), the volume space bitmap (VSB), and the management table (MT) are made resident in the RAM, and the directory record block (DRB) is frequently accessed on the RAM. When a new directory record block (DRB) is accessed, the old directory record block (DRB) is written on the disk, and the new directory record block (DRB) is fetched into the RAM. An (LRU) algorithm may be used.
[0019]
However, if this is done, information that has not yet been written to the disk will remain on the RAM, and more frequently used information may be resident in the RAM, resulting in not being written to the disk. Increases nature.
[0020]
As a result, a system error occurs when the data recording / reproducing device stops (system goes down) when the above-mentioned file system operation procedure is not completed due to device failure, power failure, operation error, etc. To do.
[0021]
For example, assuming that a system down occurs at a timing when a predetermined file A is registered in the directory record block (DRB) 32 and its contents data is written in the file extent area (FEA), a volume space bitmap (VSB) Has not yet been updated, the area in which the file A in the file extent area (FEA) is recorded will be regarded as an empty area during subsequent access. As a result, when a new file B is next recorded, the file B is overwritten in the area where the file A is recorded, and the file A is erased.
[0022]
Further, for example, in the directory record block (DRB) 6 of the parent directory, the subdirectory C is registered as the directory record block (DRB) 64 and the directory record block (DRB) 64 is not yet updated. When the system goes down, the subdirectory C does not actually exist. As a result, reading subdirectory C results in a system error.
[0023]
[Problems to be solved by the invention]
Thus, if there is an abnormality in the file management information of the disk, it becomes difficult to accurately hold the file (data). Therefore, it is checked whether or not there is an abnormality in the file management information of the disk, and if an abnormality is found, it is repaired.
[0024]
Inspecting whether there is an abnormality in the file management information of the disk is performed by, for example, inspecting the following items.
[0025]
(1) Whether or not subdirectories registered in each directory actually exist.
[0026]
(2) Whether a volume space bitmap (VSB) is in use for the recording area of each file registered in each directory.
[0027]
(3) Whether there is any other self-contradiction in file management information.
[0028]
These inspections require several minutes. Therefore, for example, this inspection can be performed when the power source of the data recording / reproducing apparatus is turned on or when a disk is loaded in the data recording / reproducing apparatus. However, in such a case, it takes too much time to actually use the data recording / reproducing apparatus, and the operability is impaired.
[0029]
Therefore, when an abnormality is recognized in the operation of the apparatus, it can be inspected. However, if this is done, anomalies will be discovered after important data is destroyed, and reliability will be impaired.
[0030]
The present invention has been made in view of such a situation, and makes it possible to detect whether or not the data management information on the recording medium is correct quickly and reliably.
[0031]
[Means for Solving the Problems]
  The data recording apparatus according to claim 1 is a first recording means for recording, on the recording medium, a first identification code representing a state before the data is rewritten before rewriting the data recorded on the recording medium. And rewriting means for rewriting data recorded on the recording medium after recording the first identification code, and rewriting the data on the first identification code recorded on the recording medium after rewriting data by the rewriting means. A second recording means for rewriting the second identification code representing the state after the recording, and a third identification code representing the state before the first identification code is recorded on the recording medium.On storage mediaThe third recording means for recording and the state after the first identification code is recorded after the first identification code is recorded on the recording medium by the first recording means. Fourth recording means for rewriting to a fourth identification code representingReproducing means for reproducing data from a recording medium;The first recording means records the first identification code on the recording medium when data rewriting to the recording medium is instructed and the third identification code is recorded.The reproducing means reproduces data from the recording medium without detecting whether or not the third identification code is recorded when the reproduction of the data recorded on the recording medium is instructed.It is characterized by that.
[0032]
  Claim6In the data recording method described in 1), before rewriting data to be recorded on the recording medium, a first recording step for recording on the recording medium a first identification code representing a state before the data is rewritten, A rewriting step of rewriting data recorded on the recording medium after recording of one identification code, and a state after rewriting the data of the first identification code recorded on the recording medium after rewriting of data. A second recording step for rewriting to a second identification code representing that, and a third identification code representing a state before the first identification code is recorded on the recording medium.On storage mediaA third recording step for recording, a fourth identification representing a state after the first identification code is recorded, after the first identification code is recorded on the recording medium. A fourth recording step for rewriting the identification code;A reproduction step of reproducing data from the recording medium;And the first recording step records the first identification code on the recording medium when the data rewriting to the recording medium is instructed and the third identification code is recorded.The reproduction step reproduces data from the recording medium without detecting whether or not the third identification code is recorded when the reproduction of the data recorded on the recording medium is instructed.It is characterized by that.
[0034]
  Data according to claim 1Recording deviceIn the first recording means, before rewriting the data recorded on the recording medium, the first recording code is recorded on the recording medium to indicate the state before the data is rewritten. After recording the identification code of 1, the data recorded on the recording medium is rewritten, and the second recording means replaces the data with the first identification code recorded on the recording medium after rewriting the data by the rewriting means. The third identification code is rewritten to the second identification code representing the state after the rewriting, and the third recording means represents the state before the first identification code is recorded on the recording medium. TheOn storage mediaThe fourth recording means records the third identification code after the first identification code is recorded on the recording medium by the first recording means in the state after the first identification code is recorded. Rewrite to the fourth identification code to indicate that there isThe reproduction means reproduces data from the recording medium. The first recording means records the first identification code on the recording medium when the data rewriting to the recording medium is instructed and the third identification code is recorded, and the reproducing means When the reproduction of the data recorded in is instructed, the data is reproduced from the recording medium without detecting whether or not the third identification code is recorded.
[0035]
  Claim6In the data recording method described in 1), before rewriting the data recorded on the recording medium, the first identification code indicating the state before the data is rewritten is recorded on the recording medium. After recording, the data recorded on the recording medium is rewritten, and after the data is rewritten, the first identification code recorded on the recording medium is changed to the second identification code indicating the state after the data is rewritten. And a third identification code indicating that the first identification code is in a state before being recorded on the recording medium.On storage mediaAfter the recording and the first identification code are recorded on the recording medium, the third identification code is rewritten to a fourth identification code indicating the state after the first identification code is recorded.The data is reproduced from the recording medium. In addition, when the data rewriting to the recording medium is instructed and the third identification code is recorded, the first identification code is recorded on the recording medium and the reproduction of the data recorded on the recording medium is instructed. At this time, data is reproduced from the recording medium without detecting whether or not the third identification code is recorded.
[0037]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 1 is a block diagram showing a configuration example of a data recording / reproducing apparatus of the present invention. The data recording medium 1 is a recording medium made of, for example, a magnetic disk, a magneto-optical disk, an IC memory card, etc., and records data. The medium driving unit 2 records data on the data recording medium 1 and reproduces the data. For example, when the data recording medium 1 is a magneto-optical disk, a spindle motor that rotates the disk, The disk drive device includes an optical pickup that irradiates a magneto-optical disk with laser light, a servo circuit that performs various servo operations, a modulation / demodulation circuit that modulates a recording signal and demodulates a reproduction signal.
[0038]
The RAM 3 functions as a buffer when data is recorded / reproduced with respect to the data recording medium 1 and also as a work area for appropriately storing necessary data and programs when the CPU 5 executes various operations. . The nonvolatile memory 4 stores data that needs to be stored even after the power of the data recording / reproducing apparatus is turned off. The CPU 5 executes various processes according to programs stored in the ROM 6.
[0039]
The data input unit 7 is used to input various data and includes a keyboard, a digital interface, an A / D converter, and the like. The data output unit 8 is a part that outputs data, and is configured by, for example, a digital interface, a CRT display, a D / A converter, and the like.
[0040]
In the following embodiments, the data recording medium 1 is assumed to be MD data.
[0041]
FIG. 2 shows a format of MD data as the data recording medium 1. This format is basically the same as the format of the conventional MD data described with reference to FIG. 15, but in this embodiment, the volume descriptor (in the volume management area (VMA)) arranged in the cluster 83 ( An error detection byte (Fault Detect Byte (FDB)) is arranged in an unused byte of (VD). Other configurations are the same as those in FIG.
[0042]
The abnormality detection byte (FDB) is defined as normal if the value is 0, and abnormal if the value is 0x42. Here, 0x represents a hexadecimal number.
[0043]
This abnormality detection byte (FDB) is recorded as shown in the flowchart of FIG. That is, when the user operates the data input unit 7 to instruct data recording, the CPU 5 controls the medium driving unit 2 in step S1 (first recording means) to serve as the data recording medium 1. 0x42 (first identification code) is written in the abnormality detection byte (FDB) in the volume descriptor (VD) of the MD data.
[0044]
  Next, step S2 (RewriteThe CPU 5 temporarily stores the recording data input from the data input unit 7 in the RAM 3. Then, the data stored in the RAM 3 is read out, supplied to the data recording medium 1 via the medium driving unit 2, and recorded in the file extent area (FEA). As the data is recorded, the management information in the volume management area (VMA) is also updated.
[0045]
  And step S3 (the first2The CPU 5 rewrites the abnormality detection byte (FDB) in the disk (MD data) in which 0x42 is written in step S1 to 0 (second identification code).
[0046]
As described above, according to this embodiment, 0x42 is written to the abnormality detection byte (FDB) before writing data to the MD data, and the value is rewritten to 0 after the data writing is completed. When a system failure occurs during the rewriting process, the abnormality detection byte (FDB) of MD data remains 0x42.
[0047]
On the other hand, the contents of the disc are normal even if a system failure occurs before data writing or after rewriting is completed. At this time, the value of the abnormality detection byte (FDB) is zero.
[0048]
Therefore, when a disk is loaded in the data recording / reproducing apparatus or when the data recording / reproducing apparatus is turned on, the abnormality detection byte (FDB) of the MD data is read. If the value is 0x42, a repair program for repairing the contents of the disk is executed.
[0049]
However, according to the embodiment of FIG. 3, every time data on the disk is rewritten, processing for rewriting the abnormality detection byte (FDB) (processing of steps S1 and S3) has to be performed, and the processing speed decreases. Therefore, for example, processing can be performed as shown in the flowchart of FIG.
[0050]
In the process of FIG. 4, first, in step S11 (reproducing means), the CPU 5 reads the volume descriptor (VD), volume space bitmap (VSB), and management table (MT) from the data recording medium 1 (MD data). , It is stored in the RAM 3. Next, in step S12, the abnormality detection byte (FDB) in the volume descriptor (VD) just read is read to determine whether or not the value is 0x42.
[0051]
As will be described later, also in this embodiment, when a system down occurs during the data recording operation, the abnormality detection byte (FDB) is 0x42. Therefore, in this case, it is determined that the content of the data is not normal, and the process proceeds to step S13 (restoring means) to execute the repair program. Thereby, the abnormality in the data recording medium 1 is repaired. That is, the sub-directory registered in the directory actually exists, the volume space bitmap (VSB) is being used for the recording area of each file registered in each directory, and other management information Restoration is performed so that there is no self-contradiction.
[0052]
Since such repair has been performed, the process proceeds to step S14, and the value of the abnormality detection byte (FDB) in the volume descriptor (VD) on the RAM 3 is rewritten to 0. In step S15, the volume descriptor (VD), volume space bitmap (VSB), and management table (MT) stored in the RAM 3 are written in the data recording medium 1 (the contents of the MD data are updated). As a result, 0 is recorded as the value of the abnormality detection byte (FDB) in the volume descriptor (VD) of the MD data.
[0053]
Therefore, returning to step S11, the volume descriptor (VD), the volume space bitmap (VSB), and the management table (MT) are read from the MD data again and written to the RAM 3, and then the abnormality detection byte (FDB) written to the RAM 3 is read. The value of is 0. Therefore, in this case, NO is determined in step S12, and the process proceeds to step S16.
[0054]
In step S16, the value of the abnormality detection byte (FDB) stored in the RAM 3 is rewritten from 0 to 0x42. In step S17, the volume descriptor (VD), volume space bitmap (VSB), and management table (MT) stored in the RAM 3 are read and written to the MD data.
[0055]
The processing of FIG. 4 is performed when the data recording medium 1 is mounted on the data recording / reproducing apparatus, or when the data recording medium 1 is already mounted on the data recording / reproducing apparatus. Started when turned on. That is, it is executed when the use of the data recording / reproducing apparatus is started.
[0056]
Therefore, the data recording medium 1 is always in a normal state before the substantial use for the data recording medium 1 is started. Further, in this state, the value of the abnormality detection byte (FDB) of the data recording medium 1 is set to 0x42 in case the system goes down halfway thereafter.
[0057]
Next, in step S18, the CPU 5 stands by until a predetermined operation command is input from the data input unit 7. When the recording is instructed, the process proceeds to step S19 to execute the recording process and the reproduction is instructed. In step S20, the reproduction process is executed. When the deletion is instructed, the process advances to step S21 and the deletion process is executed.
[0058]
FIG. 5 shows details of the recording process. First, in step S111, the CPU 5 scans the volume space bitmap (VSB) stored in the RAM 3 and searches for the number of empty sectors necessary for recording data. In step S112, data is recorded in the empty sector searched in step S111.
[0059]
In the case of MD data, recording is performed in cluster units. Therefore, when data has already been recorded in another sector of the cluster to which the empty sector to which data is to be newly recorded belongs, the data in that sector is read and stored in the RAM 3. Then, the recording data input from the data input unit 7 is written in the empty sector of the cluster in the RAM 3. Then, after the data for one cluster is collected, the data for the one cluster is read from the RAM 3 and written to the cluster in the corresponding file extent area (FEA) of the MD data via the medium driving unit 2.
[0060]
In step S113, the CPU 5 sets the bit corresponding to the empty sector in which data is recorded in the volume space bitmap (VSB) stored in the RAM 3 to be used.
[0061]
In step S114, the directory record block (DRB) corresponding to the sector in which the data is recorded is read from the data recording medium 1 and stored in the RAM 3. In step S115, the file name of the file composed of the data recorded in step S112, the number of the first sector in which the data is recorded, and the number of sectors in which the data is recorded are stored in the directory record block (DRB) just read. Are recorded in the MD data.
[0062]
FIG. 6 shows details of the reproduction process. In the reproduction process, in step S121, the CPU 5 reads the directory record block (DRB) recorded on the data recording medium 1 into the RAM 3 and scans it, and searches for the file name to be reproduced input from the data input unit 7. To do. When the directory record block (DRB) having the target file name is searched, the process proceeds to step S122, and the start sector number and the number of sectors of the file are read from the directory record block (DRB). In step S123, the CPU 5 reproduces the same number of sectors as read from the start sector number read in step S122.
[0063]
The reproduction data is stored in the RAM 3 and then read out again and output to the data output unit 8.
[0064]
FIG. 7 shows the details of the erasure process. In the erasure process, in step S141, the directory record block (DRB) of the data recording medium 1 is read into the RAM and scanned, and a directory record block (DRB) having a file name to be erased is searched. When the directory record block (DRB) having the target file name is searched, the process proceeds to step S142, and the start sector number and the number of sectors of the directory record block (DRB) are read.
[0065]
Next, proceeding to step S143, the CPU 5 clears the corresponding bit on the volume space bitmap (VSB) of the number of sectors constituting the file from the sector of the start sector number read at step S142. This volume space bitmap (VSB) is stored in the RAM 3. In step S144, the description of the file in the directory record block (DRB) in the data recording medium 1 is deleted.
[0066]
Returning to FIG. 4, as described above, after the recording process, the reproduction process, or the erasing process is executed in steps S19 to S21, the process proceeds to step S22 to determine whether or not the end of the process is instructed. . If the end is not instructed by inputting the data recording medium 1 from the data input unit 7 or a command to turn off the power of the data recording / reproducing apparatus, the process returns to step S18, and the subsequent processing is performed. Run repeatedly.
[0067]
If it is determined that the end of the process has been commanded, the process proceeds to step S23, and the CPU 5 rewrites the abnormality detection byte (FDB) in the RAM 3 to zero. This abnormality detection byte (FDB) has been rewritten to 0x42 in step S16 at the start of processing. In step S24, the volume descriptor (VD), volume space bitmap (VSB), and management table (MT) stored in the RAM 3 are written in the data recording medium 1. Further, in step S25, in response to the end command, a process of turning off the power or ejecting the disc is executed.
[0068]
As described above, according to the embodiment of FIG. 4, the processing speed is only rewritten once each time the abnormality detection byte (FDB) is rewritten before and after the substantial use state of steps S18 to S22. The decrease in is suppressed.
[0069]
However, in the embodiment shown in FIG. 4, the abnormality detection byte (FDB) writing process is executed not only when data is written to the disk but also when data is simply reproduced. Therefore, when only the reproduction process that does not perform the data recording operation on the data recording medium 1 is performed, it is possible not to update the abnormality detection byte (FDB) of the data recording medium 1. . FIG. 8 shows an embodiment in this case.
[0070]
In FIG. 8, first, in step S41, the volume descriptor (VD), the volume space bitmap (VSB), and the management table (MT) are read from the data recording medium 1 and stored in the RAM 3. In step S42, it is determined whether or not the abnormality detection byte (FDB) in the read volume descriptor (VD) is 0x42. When the abnormality detection byte (FDB) is 0x42, the process proceeds to step S43, and the repair program is executed. After the restoration process is executed, in step S44, the abnormality detection byte (FDB) of the RAM 3 is rewritten to 0, and the volume descriptor (VD), volume space bitmap (VSB), and management table stored in the RAM 3 are stored. (MT) is written to the data recording medium 1 in step S45. The above process is the same as the process of steps S11 to S15 in FIG.
[0071]
  In step S42, when it is determined that the abnormality detection byte (FDB) read into the RAM 3 is not 0x42 (when it is determined to be 0),In step S46Then, the CPU 5 rewrites the value of the abnormality detection byte (FDB) in the RAM 3 from 0 to 0x42. Further, the inspection byte (FDS) (third identification code) stored in the RAM 3 (or the nonvolatile memory 4) is set to 0. This inspection byte (FDS) functions as an identification code indicating whether or not data has been written to the data recording medium 1. Here, the value 0 is initially set on the assumption that no data is written in the data recording medium 1.
[0072]
Next, it progresses to step S47 and waits until a predetermined instruction | command is input from the data input part 7. FIG.
[0073]
When the data recording is instructed, the process proceeds to step S48, and the CPU 5 determines whether or not the inspection byte (FDS) stored in the RAM 3 (or the nonvolatile memory 4) is zero. In the case where data has not been written to the data recording medium 1 yet, as described above, 0 is initially set in the inspection byte (FDS) in step S46. In this case, the process proceeds to step S49, and the volume descriptor (VD), volume space bitmap (VSB), and management table (MT) stored in the RAM 3 are written into the data recording medium 1. Therefore, the abnormality detection byte (FDB) of the data recording medium 1 is set to 0x42.
[0074]
In step S50, the CPU 5 rewrites the value of the check byte (FDS) stored in the RAM 3 to 1. Thereby, it is set that the recording process has been performed on the data recording medium 1 (performed in the subsequent step S51). In step S 51, the data input from the data input unit 7 and stored in the RAM 3 is recorded in the file extent area (FEA) of the data recording medium 1. The details of the recording process in step S51 are the same as those shown in FIG.
[0075]
If it is determined in step S48 that the inspection byte (FDS) is not 0 (is 1), the data writing process has been executed once or more for the data recording medium 1. In this case, since the abnormality detection byte (FDB) of the data recording medium 1 has already been rewritten to 0x42, the processing of steps S49 and S50 is skipped, and the processing proceeds to step S51 and the recording processing is immediately started.
[0076]
On the other hand, when data erasure is instructed in step S47, the data recording medium 1 is written in this case as well, so the same processing as in the recording is executed. That is, in this case, it is determined in step S53 whether or not the check byte (FDS) stored in the RAM 3 is 0. If it is 0, the process proceeds to step S54, and the volume descriptor stored in the RAM 3 is determined. (VD), volume space bitmap (VSB), and management table (MT) are written to the data recording medium 1. In step S55, the inspection byte (FDS) stored in the RAM 3 is set to 1. Thereafter, the process proceeds to step S56, and an erasing process is executed. The details of the erasing process are the same as those shown in FIG.
[0077]
If it is determined in step S53 that the inspection byte (FDS) is not 0 (1), the data recording medium 1 has already been subjected to data writing processing one or more times. Therefore, in this case, the abnormality detection byte (FDB) has already been rewritten to a value of 0x42. For this reason, the processes of steps S54 and 55 are skipped, and the erasure process of step S56 is immediately executed.
[0078]
Furthermore, when a reproduction command is input in step S47, the process proceeds to step S52, and reproduction processing is executed. The details of this reproduction process are the same as those shown in FIG.
[0079]
That is, when reproduction is instructed, unlike the case where recording or erasure is instructed, the process of updating the abnormality detection byte (FDB) of the data recording medium 1 is not performed.
[0080]
After step S51, S52 or S56, the process proceeds to step S57, where it is determined whether or not the end of the process has been commanded. If not, the process returns to step S47 and the subsequent processes are repeatedly executed.
[0081]
If it is determined that the end of the process has been commanded, the process proceeds to step S58, where it is determined whether or not the check byte (FDS) is 1. As described above, when data is recorded even once on the data recording medium 1, the inspection byte (FDS) is set to 1 in step S50 or S55, and in the data recording medium 1 in step S49 or S54. The anomaly detection byte (FDB) is rewritten to a value of 0x42. Therefore, in step S59, the abnormality detection byte (FDB) in the volume descriptor (VD) of the RAM 3 is rewritten to 0. In step S60, a process of writing the volume descriptor (VD), volume space bitmap (VSB), and management table (MT) stored in the RAM 3 into the data recording medium 1 is executed.
[0082]
Further, the process proceeds to step S61, and a process of turning off the power or ejecting the disk is executed in response to the termination command.
[0083]
If it is determined in step S58 that the inspection byte (FDS) is not 1 (0), the data recording medium 1 is subjected to a data writing process (recording or erasing process) even if a reproduction process is performed. Has never been done. Therefore, the abnormality detection byte (FDB) of the data recording medium 1 is kept at 0. Therefore, the processes in steps S59 and S60 are skipped, and the process in step S61 is immediately executed.
[0084]
As described above, according to this embodiment, extra writing (writing of an abnormality detection byte (FDB)) is not performed on a disk that has never been written.
[0085]
The embodiment of FIG. 8 has the following effects. That is, when the power is turned on or the disk is inserted, the volume descriptor (VD) must be read, and the efficiency reduction due to the inspection of the abnormality detection byte (FDB) does not occur.
[0086]
In addition, when writing to the disk occurs, the volume space bitmap (VSB) and the volume descriptor (VD) are changed anyway, so that even if recording / reproduction of the abnormality detection byte (FDB) is not performed, The volume descriptor (VD), volume space bitmap (VSB), and management table (MT) are written. Therefore, when the writing process is performed on the disk, even if the abnormality detection byte (FDB) is recorded on the disk, the efficiency does not decrease due to that.
[0087]
That is, when the abnormality detection byte (FDB) is 0, the volume descriptor (VD), volume space bitmap (VSB), and management table (MT) are written when data is first recorded (in step S49 or S54). Only writing is an extra process compared to the case where the abnormality detection byte (FDB) is not adopted. Therefore, even if the abnormality detection byte (FDB) is adopted, the efficiency reduction caused by it can be almost ignored.
[0088]
Next, details of the repair program execution processing (step S13 in FIG. 4 or step S43 in FIG. 8) will be further described.
[0089]
In the MD data, when the data input unit 7 instructs the CPU 5 to set the mirror mode, the CPU 5 normally sets the volume management area (VMA) formed in the cluster 83 to the cluster 114 as shown in FIG. As shown in FIG. 9, the volume management area (VMA) is formed in the cluster 83 to the cluster 146 by enlarging it twice. Then, substantially the same information is written twice in the volume management area (VMA).
[0090]
That is, as shown in FIG. 9, each cluster is divided into the first half and the second half, and the same information is recorded in the first half and the second half. For example, in the first half of the cluster 83, a volume descriptor (VD), a volume space bitmap (VSB), a management table (MT), and directory record blocks (DRB) 6 to DRB15 are recorded. In the second half of the cluster 83, the same data as the first half is recorded. Also in the cluster 84, the data of the directory and record blocks DRB16 to DRB31 are written twice in the first half and the second half, respectively. The same applies to the clusters 85 to 146.
[0091]
When such a mirror mode is set, the CPU 5 executes, for example, the process shown in FIG. 10 in the repair program execution process of step S13 of FIG. 4 or step S43 of FIG.
[0092]
As described above, this processing is performed when the abnormality detection flag FDB is determined to be 0x42 in step S12 of FIG. 4 or step S42 of FIG. (Destroyed data) is recorded.
[0093]
Therefore, first in step S71, the CPU 5 determines whether or not the first half of the cluster (for example, cluster 83) can be read. As shown in FIG. 11, if the data in the latter half of the first half and the second half of the cluster 83 is destroyed, the first half data (updated new data) can be read. In this case, the process proceeds to step S72, and the first half volume descriptor (VD) of the cluster 83 is read.
[0094]
Then, it is determined in step S73 whether or not the abnormality detection byte (FDB) in the read volume descriptor (VD) is zero. If the anomaly detection byte (FDB) is 0, the rewriting of another cluster has already been completed, so that it can be determined that the data is normal. Therefore, in this case, the process proceeds to step S46 in FIG. 8 (or step S16 in FIG. 4), and the same process as in the normal case is executed.
[0095]
On the other hand, when it is determined that the abnormality detection byte (FDB) in the volume descriptor (VD) in the first half of the cluster 83 is not 0 (0x42), another cluster may have been rewritten. . Therefore, in this case, the process proceeds to step S74, and the repair program process is executed.
[0096]
On the other hand, when it is determined in step S71 that the first half data of the cluster 83 is not readable, the process proceeds to step S75, and it is determined whether the second half data of the cluster 83 is readable. For example, as shown in FIG. 12, even if the first half data of the cluster 83 is destroyed, the second half data (old data that has not been updated) may not be destroyed. In this case, the process proceeds to step S76, and the latter half of the cluster 83 is read. In step S77, it is determined whether or not the abnormality detection byte (FDB) in the read volume descriptor (VD) is zero.
[0097]
When the abnormality detection byte (FDB) of the old volume descriptor (VD) is 0, the other clusters are normal because they have not been rewritten yet. Therefore, the process proceeds to step S46 in FIG. 8 (or step S16 in FIG. 4), and the subsequent processing is executed.
[0098]
If it is determined in step S77 that the abnormality detection flag FDB is not 0 (0x42), there is a possibility that another cluster has been rewritten. In this case, the process proceeds to step S74, and the repair program process is executed. .
[0099]
As shown in FIG. 13, when the central part of the cluster 83 is destroyed, both the first half and the second half of the cluster 83 are unreadable. In this case, since NO is determined in step S71 and step S75, the process proceeds to step S74, and the repair program process is executed.
[0100]
Further, when the system goes down during writing of any one of the clusters 84 to 146 other than the cluster 83, as shown in FIG. 14, the first half (FIG. 14 (a)) and the second half (FIG. 14A) In FIG. 14 (b)) or the center (FIG. 14 (c)), the data is destroyed. In this case, the same processing as in the cluster 83 can be performed.
[0101]
Whether or not the data is destroyed can be detected from the fact that there is no synchronization signal synchronized with the data at the time of reproduction or an error is detected by an error correction code.
[0102]
In the above embodiment, the abnormality detection byte is recorded on the data recording medium 1. However, when the data recording medium 1 cannot be removed from the data recording / reproducing apparatus, it is written in the nonvolatile memory 4. You can also
[0103]
Also, the abnormality detection byte (FDB) does not need to use all 1 byte, and may be 1 bit if it is only necessary to determine whether or not there is an abnormality. Conversely, more bits can be used when performing more diverse consistency checks, such as file management information consistency and file data consistency, as well as whether there is an error. . Further, in this case, in addition to the abnormality detection code, a file name to be changed can be recorded.
[0104]
In the above embodiments, the data recording medium 1 is MD data. However, the present invention is applicable not only to magneto-optical disks other than MD data, but also to other data recording media such as magnetic disks and IC memory cards. Is possible.
[0105]
【The invention's effect】
  As described above, the data recording apparatus according to claim 1 and the claim6According to the data recording method described in 1), after recording the first identification code, the data recorded on the recording medium is rewritten, and after rewriting the data, the first identification code recorded on the recording medium is changed to the second identification code. To the identification code ofRecording the third identification code on the storage medium;After the first identification code is recorded on the recording medium, the third identification code is rewritten to the fourth identification code., Play data from recording mediaThus, the consistency of the data management information can be instantaneously determined from the identification code.
[0106]
As a result, even if the consistency determination is performed every time the data recording / reproducing apparatus is activated or the data recording medium is replaced, it is possible to suppress a reduction in work efficiency. Further, since it is possible to prevent the data recording / reproducing process from being performed on the data recording medium in a state where consistency is not achieved, it is possible to dramatically improve operability and reliability. Become.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration example of a data recording / reproducing apparatus of the present invention.
FIG. 2 is a diagram for explaining the format of the data recording medium 1 of FIG. 1;
FIG. 3 is a flowchart showing a first processing example of the embodiment of FIG. 1;
FIG. 4 is a flowchart showing a second processing example of the embodiment of FIG. 1;
FIG. 5 is a flowchart illustrating details of the recording process in step S19 of FIG.
FIG. 6 is a flowchart illustrating details of the reproduction process in step S20 of FIG.
FIG. 7 is a flowchart for explaining details of an erasing process in step S21 of FIG.
FIG. 8 is a flowchart showing a third processing example of the embodiment of FIG. 1;
FIG. 9 is a diagram illustrating a format in a mirror mode.
FIG. 10 is a flowchart illustrating details of processing in step S43 of FIG. 8 in the mirror mode.
FIG. 11 is a diagram showing a state in which the latter half of the cluster 83 is destroyed.
FIG. 12 is a diagram showing a state in which the first half of the cluster 83 is destroyed.
FIG. 13 is a diagram showing a state in which the central portion of the cluster 83 is destroyed.
FIG. 14 is a diagram showing a state in which clusters other than the cluster 83 are destroyed.
FIG. 15 is a diagram showing a format of conventional MD data.
FIG. 16 is a diagram illustrating the configuration of a volume management area.
FIG. 17 is a diagram for explaining the arrangement of data in clusters 83 to 114;
FIG. 18 is a flowchart showing a processing example of a conventional data recording / reproducing apparatus.
[Explanation of symbols]
1 Data recording media
2 Medium drive unit
3 RAM
4 Nonvolatile memory
5 CPU
6 ROM
7 Data input section
8 Data output section

Claims (10)

記録媒体に記録されるデータを書き換える前に、前記データを書き換える前の状態であることを表す第1の識別符号を前記記録媒体に記録する第1の記録手段と、
前記第1の識別符号の記録の後に、前記記録媒体に記録されるデータを書き換える書き換え手段と、
前記書き換え手段による前記データの書き換えの後に、前記記録媒体に記録された前記第1の識別符号を、前記データを書き換えた後の状態であることを表す第2の識別符号に書き換える第2の記録手段と、
前記第1の識別符号が前記記録媒体に記録される前の状態であることを表す第3の識別符号を記憶媒体に記録する第3の記録手段と、
前記第1の記録手段により前記第1の識別符号が前記記録媒体に記録された後に、前記第3の識別符号を、前記第1の識別符号が記録された後の状態であることを表す第4の識別符号に書き換える第4の記録手段と、
前記記録媒体からデータを再生する再生手段と
を備え、
前記第1の記録手段は、前記記録媒体に対するデータ書き換えが指令され、且つ、前記第3の識別符号が記録されているとき、前記第1の識別符号を前記記録媒体に記録し、
前記再生手段は、前記記録媒体に記録されるデータの再生が指令されたとき、前記第3の識別符号が記録されているか否かを検出することなく、前記記録媒体からデータを再生する
ことを特徴とするデータ記録装置。
A first recording means for recording on the recording medium a first identification code representing a state before the data is rewritten before rewriting the data recorded on the recording medium;
Rewriting means for rewriting data recorded on the recording medium after recording the first identification code;
After the rewriting of the data by the rewriting means, a second recording for rewriting the first identification code recorded on the recording medium with a second identification code indicating the state after the data is rewritten. Means,
Third recording means for recording on the storage medium a third identification code indicating that the first identification code is in a state before being recorded on the recording medium;
After the first identification code is recorded on the recording medium by the first recording means, the third identification code is a state after the first identification code is recorded. A fourth recording means for rewriting the identification code of 4,
Playback means for playing back data from the recording medium ,
The first recording means records the first identification code on the recording medium when data rewriting to the recording medium is instructed and the third identification code is recorded ,
The reproduction means reproduces data from the recording medium without detecting whether the third identification code is recorded or not when reproduction of data recorded on the recording medium is instructed. A characteristic data recording device.
前記再生手段は、前記記録媒体から、前記第1または第2の識別符号を再生し、
再生された前記第1または第2の識別符号に対応して、前記記録媒体の修復処理を行う修復手段と
をさらに備えることを特徴とする請求項1に記載のデータ記録装置。
The reproducing means reproduces the first or second identification code from the recording medium ;
The data recording apparatus according to claim 1, further comprising: a restoration unit that performs a restoration process of the recording medium in correspondence with the reproduced first or second identification code.
前記第2の記録手段は、前記データ記録装置の動作終了が指令され、且つ、前記第4の識別符号が記録されているとき、前記記録媒体に記録された前記第1の識別符号を、前記第2の識別符号に書き換える
ことを特徴とする請求項1に記載のデータ記録装置。
When the second recording means is instructed to end the operation of the data recording apparatus and the fourth identification code is recorded, the second recording means stores the first identification code recorded on the recording medium, The data recording apparatus according to claim 1, wherein the data recording apparatus is rewritten with a second identification code.
前記書き換え手段は、前記記録媒体にデータを記録する
ことを特徴とする請求項1に記載のデータ記録装置。
The data recording apparatus according to claim 1, wherein the rewriting unit records data on the recording medium.
前記書き換え手段は、前記記録媒体に記録されるデータを消去する
ことを特徴とする請求項1に記載のデータ記録装置。
The data recording apparatus according to claim 1, wherein the rewriting unit erases data recorded on the recording medium.
記録媒体に記録されるデータを書き換える前に、前記データを書き換える前の状態であることを表す第1の識別符号を前記記録媒体に記録する第1の記録ステップと、
前記第1の識別符号の記録の後に、前記記録媒体に記録されるデータを書き換える書き換えステップと、
前記データの書き換えの後に、前記記録媒体に記録された前記第1の識別符号を、前記データを書き換えた後の状態であることを表す第2の識別符号に書き換える第2の記録ステップと、
前記第1の識別符号が前記記録媒体に記録される前の状態であることを表す第3の識別符号を記憶媒体に記録する第3の記録ステップと、
前記第1の識別符号が前記記録媒体に記録された後に、前記第3の識別符号を、前記第1の識別符号が記録された後の状態であることを表す第4の識別符号に書き換える第4の記録ステップと、
前記記録媒体からデータを再生する再生ステップと
を含み、
前記第1の記録ステップは、前記記録媒体に対するデータ書き換えが指令され、且つ、前記第3の識別符号が記録されているとき、前記第1の識別符号を前記記録媒体に記録し、
前記再生ステップは、前記記録媒体に記録されるデータの再生が指令されたとき、前記第3の識別符号が記録されているか否かを検出することなく、前記記録媒体からデータを再生する
ことを特徴とするデータ記録方法。
A first recording step of recording on the recording medium a first identification code representing a state before the data is rewritten before rewriting the data recorded on the recording medium;
A rewriting step of rewriting data recorded on the recording medium after the recording of the first identification code;
A second recording step of rewriting the first identification code recorded on the recording medium after the rewriting of the data to a second identification code representing a state after the rewriting of the data;
A third recording step of recording on the storage medium a third identification code indicating that the first identification code is in a state before being recorded on the recording medium;
After the first identification code is recorded on the recording medium, the third identification code is rewritten to a fourth identification code indicating a state after the first identification code is recorded. 4 recording steps;
A reproducing step of reproducing data from the recording medium ,
In the first recording step, when the data rewriting to the recording medium is instructed and the third identification code is recorded, the first identification code is recorded on the recording medium ,
The reproduction step reproduces data from the recording medium without detecting whether the third identification code is recorded or not when reproduction of data recorded on the recording medium is instructed. A characteristic data recording method.
前記再生ステップは、前記記録媒体から、前記第1または第2の識別符号が再生し、
前記再生ステップにより再生された前記第1または第2の識別符号に対応して、前記記録媒体の修復処理を行う修復ステップと
をさらに含むことを特徴とする請求項に記載のデータ記録方法。
In the reproducing step, the first or second identification code is reproduced from the recording medium ,
The data recording method according to claim 6 , further comprising: a repairing step of performing a repairing process of the recording medium in correspondence with the first or second identification code reproduced by the reproducing step.
前記第2の記録ステップは、前記データ記録方法の動作終了が指令され、且つ、前記第4の識別符号が記録されているとき、前記記録媒体に記録された前記第1の識別符号を、前記第2の識別符号に書き換える
ことを特徴とする請求項に記載のデータ記録方法。
In the second recording step, when the operation end of the data recording method is instructed and the fourth identification code is recorded, the first identification code recorded on the recording medium is The data recording method according to claim 6 , wherein the second identification code is rewritten.
前記書き換えステップは、前記記録媒体にデータを記録することを特徴とする請求項に記載のデータ記録方法。7. The data recording method according to claim 6 , wherein the rewriting step records data on the recording medium. 前記書き換えステップは、前記記録媒体に記録されるデータを消去する
ことを特徴とする請求項に記載のデータ記録方法。
The data recording method according to claim 6 , wherein the rewriting step erases data recorded on the recording medium.
JP33005995A 1995-12-19 1995-12-19 Data recording apparatus and method Expired - Fee Related JP3641863B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP33005995A JP3641863B2 (en) 1995-12-19 1995-12-19 Data recording apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP33005995A JP3641863B2 (en) 1995-12-19 1995-12-19 Data recording apparatus and method

Publications (2)

Publication Number Publication Date
JPH09167447A JPH09167447A (en) 1997-06-24
JP3641863B2 true JP3641863B2 (en) 2005-04-27

Family

ID=18228325

Family Applications (1)

Application Number Title Priority Date Filing Date
JP33005995A Expired - Fee Related JP3641863B2 (en) 1995-12-19 1995-12-19 Data recording apparatus and method

Country Status (1)

Country Link
JP (1) JP3641863B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1816568A1 (en) * 2005-08-22 2007-08-08 Sony Corporation Recording apparatus, recording method, program, and computer readable recording medium

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11242850A (en) 1998-02-25 1999-09-07 Hitachi Ltd Real time data recording system
CA2268543C (en) * 1998-04-30 2003-12-09 Samsung Electronics Co., Ltd. Transparent record access manager for a disk drive
US7340153B2 (en) 2000-01-11 2008-03-04 Hitachi, Ltd. Apparatus and method for recording and reproducing information
SG151111A1 (en) * 2003-03-08 2009-04-30 Samsung Electronics Co Ltd An apparatus for reproducing and/or recording from and/or to a recording medium
US8184513B2 (en) 2003-04-15 2012-05-22 Samsung Electronics Co., Ltd. Recording/reproducing method, recording/reproducing apparatus, optical recording medium, and computer readable recording medium having recorded thereon program for the recording/reproducing method
TWI309816B (en) * 2003-04-26 2009-05-11 Samsung Electronics Co Ltd Method of and drive for recording medium defect management, and defect managed recording medium
KR100739674B1 (en) * 2003-05-01 2007-07-13 삼성전자주식회사 Apparatus and method for managing defect and a disc thereof
JP3828095B2 (en) 2003-07-15 2006-09-27 パイオニア株式会社 Information recording medium, information recording apparatus and method
TWI351603B (en) * 2004-02-12 2011-11-01 Pioneer Corp Information recording medium, information recordin

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1816568A1 (en) * 2005-08-22 2007-08-08 Sony Corporation Recording apparatus, recording method, program, and computer readable recording medium
EP1816568A4 (en) * 2005-08-22 2012-10-10 Sony Corp Recording apparatus, recording method, program, and computer readable recording medium
US8346064B2 (en) 2005-08-22 2013-01-01 Sony Corporation Recording apparatus, recording method, program and computer-readable recording medium

Also Published As

Publication number Publication date
JPH09167447A (en) 1997-06-24

Similar Documents

Publication Publication Date Title
US5319626A (en) Method for rewriting defect management areas on optical disk according to ECMA standard
KR100288203B1 (en) Real time data recording method
KR100272076B1 (en) Cd-rom recording
US6553532B1 (en) Method and apparatus for recording and reproducing information on and from disk
TWI248604B (en) Method and apparatus for managing disc defects
RU2005111237A (en) METHOD AND DEVICE FOR MANAGING DISK DEFECTS USING TEMPORARY INFORMATION ABOUT DEFECTS (WIOD) AND TEMPORARY INFORMATION ABOUT DEFECT MANAGEMENT (VIAU) AND A DISC HAVING A VIDEO AND VIAUD
RU2330330C1 (en) Device for writing and/or reading data regarding single-time writable medium, and respective single-time writable medium
JPH1139801A (en) Method for recording information
JP2002074832A (en) Device and method for checking alteration of data and recording medium
MX2007001243A (en) Recording medium, and method and apparatus of recording and reproducing data on the same.
JP3641863B2 (en) Data recording apparatus and method
JP4255324B2 (en) Information recording / reproducing apparatus and information recording / erasing method
JPH10312650A (en) Optical disk recorder
CN1910688B (en) Recording device and recording method, reproducing device and reproducing method
US20050122870A1 (en) Information recording medium, recording and/or reproducing method, and recording and/or reproducing apparatus
JP4713140B2 (en) Digital data recording method, recording apparatus and reproducing apparatus
JP4230553B2 (en) Data recording device
JPH03192436A (en) Information recording and reproducing system
JPH10302397A (en) Optical disk recording device
JP3595550B1 (en) Information recording / reproducing apparatus, information recording / reproducing method, and program
JP2001291366A (en) Method and device for recording, and recording medium
JP3707396B2 (en) Recording method and recording apparatus
JP2840489B2 (en) Information recording / reproducing device
JP3384732B2 (en) Information recording / reproducing device
JPH11353857A (en) Optical disc device and method for repairing optical disc

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20040611

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040621

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040820

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20040927

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20041126

A911 Transfer of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20041209

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: 20050104

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050117

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

Free format text: PAYMENT UNTIL: 20080204

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20090204

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20100204

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees