JP2004127458A - Recording controller and recording control method, and program - Google Patents
Recording controller and recording control method, and program Download PDFInfo
- Publication number
- JP2004127458A JP2004127458A JP2002292870A JP2002292870A JP2004127458A JP 2004127458 A JP2004127458 A JP 2004127458A JP 2002292870 A JP2002292870 A JP 2002292870A JP 2002292870 A JP2002292870 A JP 2002292870A JP 2004127458 A JP2004127458 A JP 2004127458A
- Authority
- JP
- Japan
- Prior art keywords
- data
- free area
- continuous free
- recording
- continuous
- 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
Abstract
Description
【0001】
【発明の属する技術分野】
本発明は、記録制御装置および記録制御方法、並びにプログラムに関し、特に、例えば、光ディスクに欠陥があっても、高ビットレートのデータを、リアルタイムで再生することができるようにする記録制御装置および記録制御方法、並びにプログラムに関する。
【0002】
【従来の技術】
例えば、光ディスクや、光磁気ディスク、磁気ディスク等のディスク状の記録媒体を駆動する従来のドライブにおいては、例えば、ECC(Error Checking and Correction)を行うECCブロックの単位で、データが読み書きされる。
【0003】
また、従来のドライブでは、光ディスク等の記録領域を所定のサイズに分けた物理的な物理セクタが、論理的な論理セクタに割り当てられる。そして、外部の装置からは、データを記録すべき論理セクタが指定され、ドライブでは、その論理セクタに割り当てられている物理セクタに、データが記録される。
【0004】
なお、ドライブでは、光ディスク上のユーザに開放された記録領域であるユーザエリア(user area)の物理セクタに対して、例えば、ある物理セクタ番号の物理セクタを基準として、シーケンシャルな論理セクタ番号の論理セクタが、順次割り当てられる。
【0005】
ところで、従来のドライブでは、記録媒体中に、正常に読み書きすることができない領域である欠陥領域が存在する場合、スリップ処理またはリアサイン処理によって、欠陥領域に対する対処が行われる(例えば、特許文献1参照)。
【0006】
即ち、例えば、いま、説明を簡単にするために、ECCブロックが、セクタの大きさに等しいものとすると、スリップ処理では、論理セクタが、欠陥がある物理セクタ(不良セクタ)に割り当てられずに飛ばされて(スリップして)、その直後の正常な物理セクタに割り当てられる。
【0007】
従って、例えば、図1に示すように、物理セクタ番号(以下、適宜、PSN(Physical Sector Number)と記載する)#N,#N+1,・・・の物理セクタが、本来ならば、論理セクタ番号(以下、適宜、LSN(Logical Sector Number)と記載する)#n,#n+1,・・・の論理セクタに割り当てられる場合において、PSN#N+3の物理セクタ(以下、適宜、物理セクタN+3のように記載する)が不良セクタであるときには、その不良セクタである物理セクタN+3を飛ばして、論理セクタの割り当てが行われる。その結果、図1の例では、物理セクタN,N+1,N+2に、論理セクタn,n+1,n+2がそれぞれ割り当てられ、物理セクタN+3を飛ばし、その後の物理セクタN+4,N+5,・・・に、続きの論理セクタn+3,n+4,・・・がそれぞれ割り当てられる。
【0008】
そして、ドライブでは、図2に示すように、論理セクタが割り当てられなかった不良セクタである物理セクタN+3のPSN#N+3が、欠陥領域の一覧であるディフェクトリスト(defect list)に登録される。
【0009】
スリップ処理が行われた場合、ある論理セクタへのアクセスの要求があったときに、ドライブでは、その論理セクタに割り当てられている物理セクタを求めるにあたって、その論理セクタの前の論理セクタ(その論理セクタのLSNより小さいLSNの論理セクタ)において、いくつの不良セクタがあるかを、ディフェクトリストを参照して調査する必要がある。
【0010】
ここで、スリップ処理では、論理セクタに割り当てられる物理セクタのPSNがずれていき、さらに、不良セクタは、ドライブの外部からは認識することができない。このため、スリップ処理は、一般に、光ディスクのフォーマット(サーティファイ(certify))時に行われる。
【0011】
一方、リアサイン処理では、論理セクタに割り当てられた物理セクタが不良セクタである場合、その不良セクタの代替として、正常な物理セクタが確保される。
【0012】
即ち、リアサイン処理では、例えば、図3に示すように、物理セクタN,N+1,・・・が、論理セクタn,n+1,・・・にそれぞれ割り当てられる場合において、物理セクタN+3が不良セクタであるときには、光ディスク上のユーザエリアとは別に確保されている予備エリアであるスペアエリア(spare area)内のある物理セクタが、不良セクタの代替セクタとして確保される。図3では、ユーザエリアにおける不良セクタである物理セクタN+3の代替エリアとして、スペアエリアにおける物理セクタAが確保されている。この場合、論理セクタn,n+1,・・・は、物理セクタN,N+1,・・・に割り当てられるが、不良セクタN+3については、正常な物理セクタAが代替セクタとして確保されており、その結果、不良セクタN+3に割り当てられている論理セクタn+3は、実質的には、物理セクタAに割り当てられる。
【0013】
そして、ドライブでは、図4に示すように、不良セクタのPSN#N+3と、その不良セクタN+3の代替セクタとして確保された物理セクタAのPSN#Aとが対応付けられ、ディフェクトリストに登録される。
【0014】
リアサイン処理が行われた場合、ある論理セクタへのアクセスの要求があったときに、ドライブでは、その論理セクタに割り当てられている物理セクタを求めるにあたって、その論理セクタを用いた線形変換を行えば済む。但し、求められた物理セクタが不良セクタである場合には、ディフェクトリストにおいて、その不良セクタに対応付けられている物理セクタが、最終的に、論理セクタに割り当てられている物理セクタとして使用される。
【0015】
ここで、リアサイン処理が行われても、論理セクタのLSNと物理セクタのPSNとの線形関係は維持されるが、不良セクタとなっている物理セクタは、他の正常な物理セクタに、実質的には置換される。このため、リアサイン処理は、フォーマット後に行うことが可能であり、一般に、光ディスクのフォーマット後に、新たな不良セクタが生じたときに行われる。
【0016】
なお、スリップ処理では、論理セクタに割り当てようとする物理セクタが不良セクタである場合に、その論理セクタに割り当てられる物理セクタが、不良セクタの直後の物理セクタにスリップされるため、論理セクタが連続していても、その論理セクタに割り当てられている物理セクタは、光ディスク上で不連続となる。一方、リアサイン処理では、論理セクタに割り当てようとする物理セクタが不良セクタである場合に、その論理セクタに割り当てられる物理セクタが、実質的には、ユーザエリアとは別のスペアエリアの物理セクタに置換されるため、やはり、論理セクタが連続していても、その論理セクタに割り当てられている物理セクタは、光ディスク上で不連続となる。
【0017】
このため、ドライブでは、その物理セクタが不連続となっている部分においては、シークが必要となる。なお、スリップ処理では、論理セクタに割り当てられる物理セクタが、不良セクタの直後の物理セクタにスライドされるのに対して、リアサイン処理では、論理セクタに(実質的に)割り当てられる物理セクタが、ユーザエリアとは別のスペアエリアの物理セクタに置換されるため、シーク時間は、一般に、リアサイン処理が行われた場合の方が、スリップ処理が行われた場合に比較して長くなる。
【0018】
【特許文献1】
特開平06−068598号公報。
【0019】
【発明が解決しようとする課題】
上述したように、スリップ処理やリアサイン処理が行われると、ドライブでは、不連続な物理セクタにアクセスするために、シークが生じる。
【0020】
従って、高ビットレートのデータ、特に、例えば、動画像のデータを、光ディスクに記録して再生する場合には、シークが生じることによって、データを、リアルタイムで再生することができなくなることがある。
【0021】
本発明は、このような状況に鑑みてなされたものであり、光ディスク等に欠陥があっても、高ビットレートのデータを、リアルタイムで再生することができるようにするものである。
【0022】
【課題を解決するための手段】
本発明の記録制御装置は、ECC(Error Checking and Correction)を行う単位よりも大きい単位のデータを、記録媒体に記録する注目データとして設定する設定手段と、注目データを、記録媒体の物理的に連続した空き領域である連続空き領域に記録させる記録制御手段とを備えることを特徴とする。
【0023】
本発明の記録制御方法は、ECC(Error Checking and Correction)を行う単位よりも大きい単位のデータを、記録媒体に記録する注目データとして設定する設定ステップと、注目データを、記録媒体の物理的に連続した空き領域である連続空き領域に記録させる記録制御ステップとを備えることを特徴とする。
【0024】
本発明のプログラムは、ECC(Error Checking and Correction)を行う単位よりも大きい単位のデータを、記録媒体に記録する注目データとして設定する設定ステップと、注目データを、記録媒体の物理的に連続した空き領域である連続空き領域に記録させる記録制御ステップとを備えることを特徴とする。
【0025】
本発明の記録制御装置および記録制御方法、並びにプログラムにおいては、ECC(Error Checking and Correction)を行う単位よりも大きい単位のデータが、記録媒体に記録する注目データとして設定され、注目データが、記録媒体の物理的に連続した空き領域である連続空き領域に記録される。
【0026】
【発明の実施の形態】
図5は、本発明を適用した記録再生システムの一実施の形態の構成例を示している。
【0027】
図5の記録再生システムは、コンピュータ1をベースに構成されており、コンピュータ1は、光ディスク3に対して、データを読み書きする、例えば、CD−R(Compact Disc Recordable),CD−RW(CD ReWritable),DVD−RAM(Digital VersatileDisc Random Access Memory)ドライブとしてのドライブ2を内蔵している。即ち、ドライブ2には、光ディスク3を容易に着脱することができるようになっており、ドライブ2は、コンピュータ1の制御の下、光ディスク3にデータを記録し(書き込み)、また、光ディスク3からデータを読み出す。
【0028】
図5の実施の形態では、画像データや音声データなどのAV(Audio Visual)データを出力し、必要に応じて、AVデータを入力することができるVTR(Video Tape Recorder)や、TVチューナなどでなる信号入出力装置4が、外部機器として、コンピュータ1に接続されている。コンピュータ1は、信号入出力装置4が出力するAVデータを受信し、ドライブ2に供給して、光ディスク3に記録させる。また、コンピュータ1は、ドライブ2に、光ディスク3に記録されたAVデータを読み出させ、例えば、その内蔵するディスプレイやスピーカから出力させる。あるいは、コンピュータ1は、光ディスク3から読み出されたAVデータを、例えば、信号入出力装置4に記録等させる。
【0029】
図6は、図5のコンピュータ1のハードウェア構成例を示している。
【0030】
CPU(Central Processing Unit)11は、例えば、ユーザによって入力部16が操作等されることにより指令が入力されると、それにしたがって、ROM(Read Only Memory)12に格納されているプログラムを実行する。あるいは、また、CPU11は、HD(Hard Disk)15に格納されているプログラム、衛星若しくはネットワークから転送され、通信部18で受信されてHD15にインストールされたプログラム、またはドライブ2に装着された光ディスク3などのリムーバブル記録媒体から読み出されてHD15にインストールされたプログラムを、RAM(Random Access Memory)14にロードして実行する。これにより、CPU11は、後述するフローチャートにしたがった各種の処理を行う。
【0031】
ROM12は、例えば、IPL(Initial Program Loading)やBIOS(Basic Input Output System)のプログラムその他のファームウェアを記憶している。なお、ROM12に代えて、書き換え可能なEEPROM(Electrically Erasable Programmable ROM)を採用することが可能であり、この場合、ファームウェアのバージョンアップに対処することができる。
【0032】
メモリコントローラ13は、例えば、DMA(Direct Memory Access)コントローラで構成され、RAM14に対するデータの読み書きを制御する。RAM14は、CPU11が実行するプログラムや、CPU11が処理を行う上で必要なデータを一時記憶する。HD15は、コンピュータ1にインストールされたプログラム(アプリケーションプログラムの他、OS(Operating System)なども含まれる)や、CPU11が処理を行う上で必要なデータを記憶する。
【0033】
入力部16は、例えば、キーボードや、マウス、マイク(マイクロフォン)などで構成され、ユーザによって操作等される。そして、入力部16は、ユーザによる操作等に対応する信号を、CPU11に供給する。出力部17は、例えば、ディスプレイやスピーカなどで構成され、そこに供給される画像または音声を、それぞれ表示または出力する。通信I/F(Interface)18は、例えば、IEEE(Institute of Electrical and Electronics Engineers)1394ポートや、USB(Universal Serial Bus)ポート、LAN(Local Area Network)接続用のNIC(Network Interface Card)などで構成され、各規格に応じた通信制御を行う。
【0034】
I/Fコントローラ19は、ドライブ2との間で、データを、例えば、ATA(AT Attachment)等の所定の方式でやりとりするためのインタフェースとして機能する。
【0035】
データ変換部20は、例えば、MPEG(Moving Picture Experts Group)エンコーダ/デコーダで構成され、信号入出力装置4から供給されるAVデータを、MPEG符号化し、その結果得られるMPEGストリームを、コンピュータ1のバス上に出力する。また、データ変換部20は、コンピュータ1のバス上に出力されたMPEGストリームをMPEG復号し、その結果得られるAVデータを、コンピュータ1のバス上に出力し、あるいは、信号入出力装置4に供給する。
【0036】
なお、以上のCPU11乃至データ変換部20は、コンピュータ1内部のバスを介して相互に接続されている。
【0037】
以上のように構成されるコンピュータ1では、CPU11がコンピュータ1にインストールされたプログラムを実行することにより、後述する各種の処理が行われる。
【0038】
ここで、CPU11が実行するプログラムは、コンピュータ1に内蔵されている記録媒体としてのHD15やROM12に予め記録しておくことができる。
【0039】
あるいはまた、プログラムは、フレキシブルディスク、CD−ROM(Compact Disc Read Only Memory),MO(Magneto Optical)ディスク,DVD(Digital Versatile Disc)、磁気ディスク、半導体メモリなどのリムーバブル記録媒体に、一時的あるいは永続的に格納(記録)しておくことができる。このようなリムーバブル記録媒体は、いわゆるパッケージソフトウエアとして提供することができる。
【0040】
なお、プログラムは、上述したようなリムーバブル記録媒体からコンピュータ1にインストールする他、ダウンロードサイトから、ディジタル衛星放送用の人工衛星を介して、コンピュータ1に無線で転送したり、LAN(Local Area Network)、インターネットといったネットワークを介して、コンピュータ1に有線で転送し、コンピュータ1では、そのようにして転送されてくるプログラムを、通信I/F18で受信し、内蔵するHD15にインストールすることができる。
【0041】
ここで、本明細書において、コンピュータ1に各種の処理を行わせるためのプログラムを記述する処理ステップは、必ずしもフローチャートとして記載された順序に沿って時系列に処理する必要はなく、並列的あるいは個別に実行される処理(例えば、並列処理あるいはオブジェクトによる処理)も含むものである。
【0042】
また、プログラムは、1のCPUにより処理されるものであっても良いし、複数のCPUによって分散処理されるものであっても良い。さらに、プログラムは、遠方のCPUに転送されて実行されるものであっても良い。
【0043】
次に、図7は、コンピュータ1に搭載されているドライブ2のハードウェア構成例を示している。
【0044】
スピンドルモータ31は、サーボ制御部32の制御にしたがい、光ディスク3を回転駆動する。サーボ制御部32は、RF(Radio Frequency)アンプ34や制御部39から供給される信号にしたがい、スピンドルモータ31およびピックアップ部33を制御する。ピックアップ部33は、サーボ制御部32の制御にしたがい、その位置決めや、トラッキングおよびフォーカス制御を行いながら、光ディスク3に対して、レーザ光を照射する。
【0045】
即ち、データの記録時においては、信号処理部35からピックアップ部33に対して、記録すべきデータに対応する信号が供給され、ピックアップ部33は、その信号に対応するレーザ光を、光ディスク3に照射することで、光ディスク3にデータを記録する。また、データの再生時においては、ピックアップ部33は、光ディスク3にレーザ光を照射するとともに、その照射したレーザ光の光ディスク3からの反射光を受光し、その反射光に対応する電気信号としてのRF信号を、RFアンプ34に供給する。
【0046】
RFアンプ34は、ピックアップ部33から供給されるRF信号を増幅し、サーボ制御部32と信号処理部35に供給する。サーボ制御部32は、ピックアップ部33から供給されるRF信号に基づいて、フォーカスサーボ、トラッキングサーボ、およびスピンドルサーボの各サーボ制御を行う。
【0047】
信号処理部35は、制御部39の制御にしたがい、メモリコントローラ36から供給される、ECCブロック単位のデータに、ECCのコードを付加して変調し、その結果得られる変調信号を、ピックアップ部33に供給する。また、信号処理部35は、RFアンプ34から供給されるRF信号を復調し、その結果得られる復調データに、ECC処理を施して、メモリコントローラ36に供給する。
【0048】
メモリコントローラ36は、制御部39の制御にしたがい、信号処理部35またはI/Fコントローラ38から供給されるデータを、メモリ37に記憶させるとともに、メモリ37に記憶されたデータを読み出し、そのデータを、I/Fコントローラ38または信号処理部35にそれぞれ供給する。メモリ37は、メモリコントローラ36から供給されるデータを一時記憶する。
【0049】
I/Fコントローラ38は、図6のI/Fコントローラ19との間で、データを、例えば、ATA(AT Attachment)等の所定の方式でやりとりするためのインタフェースとして機能する。なお、図6のI/Fコントローラ19は、データの他、制御部39に対して、所定の処理を行うことを指令するコマンドや、読み書きの対象とする光ディスク3のLSNなども、I/Fコントローラ38に供給する。I/Fコントローラ38は、コマンドやLSNを受信した場合、そのコマンドやLSNを、制御部39に供給する。
【0050】
制御部39は、光ディスク3に対してデータを読み書きするための各種の処理を行う。即ち、制御部39は、I/Fコントローラ38から供給されるコマンドにしたがい、信号処理部35や、メモリコントローラ36を制御するとともに、同じくI/Fコントローラ38から供給されるLSNをPSNに変換することで、そのPSNによって特定される光ディスク3の物理セクタに、データを記録させ、あるいはその物理セクタからデータを読み出させる。また、制御部39は、必要に応じて、サーボ制御部32を制御することにより、ピックアップ部33をシークさせる。さらに、制御部39は、所定のファイルシステムによって、光ディスク3へのデータの読み書きを管理するための管理情報を、信号処理部35を制御することによって、光ディスク3に読み書きし、I/Fコントローラ38を介して、コンピュータ1に供給する。また、制御部39は、信号処理部35をモニタすること等により、光ディスク3上の不良セクタ(欠陥領域)を検出し、前述したスリップ処理やリアサイン処理によって不良セクタに対処するための制御を行う。そして、その制御のため、制御部39は、前述したディフェクトリストを作成し、例えば、その内蔵するメモリ(図示せず)に記憶する。さらに、制御部39は、光ディスク3上で空き領域となっている論理セクタのLSNが記述された空き領域リストを作成し、例えば、その内蔵するメモリに記憶する。
【0051】
以上のように構成されるドライブ2では、信号処理部35で行われるECC処理の単位であるECCブロックのデータごとに、光ディスク3に対する読み書きが行われる。
【0052】
なお、ECCブロックは、例えば、光ディスク3に対する最小のデータの読み書き単位である物理セクタの1以上の整数倍の大きさである必要がある。例えば、ECCブロックが64KB(Kilo Byte)で、物理セクタが2KBであるとすると、ECCブロックは、32個の物理セクタに相当する。
【0053】
また、ドライブ2では、スリップ処理やリアサイン処理は、例えば、ECCブロック単位で行われる。この場合、ECCブロックのデータが読み書きされる1以上の物理セクタの中に、1つでも不良セクタが存在すると、そのECCブロックに相当する1以上の物理セクタは、例えば、すべて不良セクタとされる。
【0054】
ここで、スリップ処理やリアサイン処理がECCブロック単位で行われる場合、ディフェクトリストには、ECCブロックに相当する1以上の物理セクタのすべてのPSNを記述する方法と、そのうちの、例えば、先頭の物理セクタのPSNのみを記述する方法とがあるが、どちらの方法を採用することも可能である。
【0055】
以下においては、説明を簡単にするため、ECCブロックは、1つの物理セクタに相当することとして、説明を行う。但し、本発明は、ECCブロックが、いくつの物理セクタに相当するかによらず適用可能である。
【0056】
次に、図8は、図6のCPU11がプログラムを実行することにより実現されるコンピュータ1の機能的構成例を示している。
【0057】
コンピュータ1では、OSの管理の下で、各種のアプリケーションプログラムが実行される。また、OSの管理下では、ファイルシステムやデバイスドライバが動作している。
【0058】
アプリケーションプログラムは、ドライブ2に装着された光ディスク3へのデータの読み書きを行う場合、ファイルシステムに対して、そのデータを記録する、あるいは、そのデータが記録されたファイルを指定し、ファイルシステムは、指定されたファイルのLSNを、デバイスドライバに指定する。そして、デバイスドライバは、ファイルシステムからのLSNのデータの読み書きを、ドライブ2に要求する。
【0059】
本実施の形態では、例えば、アプリケーションプログラムまたはファイルシステムのいずれか一方に、あるいは、その両方に亘って、アロケーションマネージャが組み込まれており、アロケーションマネージャは、光ディスク3に対するデータの読み書き制御を、ドライブ2と分担して行う。
【0060】
即ち、アロケーションマネージャにおいて、リスト取得部41は、ドライブ2から空き領域リストとディフェクトリストを取得し、空き領域リストを、空き領域リスト記憶部42に供給するとともに、ディフェクトリストを、ディフェクトリスト記憶部43に供給する。
【0061】
空き領域リスト記憶部42は、リスト取得部41から供給される空き領域リストを、例えば、その記憶内容に上書きする形で記憶する。ディフェクトリスト記憶部43は、リスト取得部41から供給されるディフェクトリストを、例えば、その記憶内容に上書きする形で記憶する。
【0062】
連続空き領域リスト作成部44は、ドライブ2から、後述する論理セクタ開始物理セクタ番号を受信し、その論理セクタ開始物理セクタ番号、空き領域リスト記憶部42に記憶された空き領域リスト、およびディフェクトリスト記憶部43に記憶されたディフェクトリストに基づいて、光ディスク3上の、物理的に連続した空き領域のLSNが記述された連続空き領域リストを作成し、連続空き領域リスト記憶部45に供給する。
【0063】
連続空き領域リスト記憶部45は、連続空き領域リスト作成部44から供給される連続空き領域リストを、例えば、その記憶内容に上書きする形で記憶する。
【0064】
連続空き領域検出部46は、連続空き領域リスト記憶部45に記憶された連続空き領域リストを参照することにより、光ディスク3上の連続空き領域を検出し、データ設定部47、記録制御部48に供給する。
【0065】
データ設定部47には、光ディスク3に記録すべきデータが供給されるようになっており、データ設定部47は、そこに供給されるデータから、ECC(Error Checking and Correction)を行う単位よりも大きい単位のデータを、光ディスク3に物理的に連続して記録する注目データとして設定し、記録制御部48に供給する。なお、データ設定部47は、その他、連続空き領域検出部46から供給される連続空き領域の大きさを考慮して、注目データを設定する。また、上述したように、ドライブ2において、ECCブロック単位で読み書きが行われる場合、データ設定部47は、ECCブロックの正の整数倍の大きさのデータを、注目データとして設定する。
【0066】
記録制御部48は、データ設定部47から供給される注目データを、連続空き領域検出部46から供給される連続空き領域のLSNと、データの書き込みを指令するwriteコマンドとともに、ドライブ2に送信し、これにより、ドライブ2において、光ディスク3上の連続空き領域に、注目データを書き込ませる。
【0067】
データ記憶部49は、記録制御部48が処理を行う上で必要なデータ等を一時記憶する。
【0068】
次に、図9のフローチャートを参照して、図7のドライブ2の処理について概説する。
【0069】
ドライブ2には、図8に示したアロケーションマネージャから、ファイルシステムおよびデバイスドライバを介して、あるいはアロケーションマネージャから、デバイスドライバを介して、各種のコマンドが供給されるようになっており、そのコマンドは、ドライブ2のI/Fコントローラ38で受信され、制御部39に供給されるようになっている。
【0070】
そこで、制御部39は、まず最初に、ステップS1において、光ディスク3からのデータの読み出しを指令するreadコマンドが供給されたかどうかを判定する。
【0071】
ステップS1において、readコマンドが供給されたと判定された場合、ステップS2に進み、制御部39は、LSNをPSNに変換する。即ち、readコマンドは、光ディスク3から読み出すデータが記録された論理セクタ(群)のLSN(以下、適宜、読み出しLSNという)とともに供給されるようになっており、ステップS2では、そのreadコマンドとともに供給される読み出しLSNがPSNに変換される。
【0072】
そして、ステップS3に進み、ステップS2で得られたPSNで指定される光ディスク3の位置から、ECCブロック単位でのデータの読み出しが行われる。即ち、制御部39は、サーボ制御部32を制御することにより、ステップS2で得られたPSNで指定される光ディスク3の位置に、ピックアップ部33を移動させる。ピックアップ部33は、光ディスク3にレーザ光を照射し、そのレーザ光の光ディスク3からの反射光を受光して、その反射光に対応するRF信号を、RFアンプ34を介して、信号処理部35に供給する。信号処理部35は、そこに供給されるRF信号を復調し、その結果得られるECCブロック単位のデータにECC処理を施して、メモリコントローラ36に供給する。
【0073】
メモリコントローラ36は、ECC処理が施されたECCブロック単位のデータを受信して、ステップS4に進み、そのECCブロック単位のデータを、I/Fコントローラ38を介して、図8のアロケーションマネージャに転送する。
【0074】
その後、ステップS5に進み、制御部39は、readコマンドによって要求されたデータの読み出しがすべて終了したかどうかを判定する。ステップS5において、readコマンドによって要求されたデータの読み出しが、まだ終了していないと判定された場合、ステップS3に戻り、以下、同様の処理が繰り返されることで、まだ読み出されていないデータの読み出しが行われる。
【0075】
また、ステップS5において、readコマンドによって要求されたデータの読み出しがすべて終了したと判定された場合、ステップS1に戻り、以下、同様の処理が繰り返される。
【0076】
一方、ステップS1において、readコマンドが供給されていないと判定された場合、ステップS6に進み、制御部39は、ドライブ2が有している情報を要求する情報要求コマンドが供給されたかどうかを判定する。ステップS6において、情報要求コマンドが供給されたと判定された場合、ステップS7に進み、制御部39は、ディフェクトリスト、空き領域リスト、および論理セクタ開始物理セクタ番号を取得し、ステップS8に進む。ステップS8では、制御部39は、ステップS8で取得したディフェクトリスト、空き領域リスト、および論理セクタ開始物理セクタ番号を、I/Fコントローラ38を介して、図8のアロケーションマネージャに転送して、ステップS1に戻り、以下、同様の処理が繰り返される。
【0077】
また、ステップS6において、情報要求コマンドが供給されていないと判定された場合、ステップS9に進み、制御部39は、光ディスク3へのデータの書き込み(記録)を指令するwriteコマンドが供給されたかどうかを判定する。
【0078】
ステップS9において、writeコマンドが供給されていないと判定された場合、ステップS1に戻り、以下、同様の処理が繰り返される。
【0079】
また、ステップS9において、writeコマンドが供給されたと判定された場合、ステップS10に進み、制御部39は、LSNをPSNに変換する。即ち、writeコマンドは、データを書き込む論理セクタ(群)のLSN(以下、書き込みLSNという)とともに供給されるようになっており、ステップS10では、そのwriteコマンドとともに供給される書き込みLSNがPSNに変換される。
【0080】
そして、ステップS11に進み、I/Fコントローラ38は、図8のアロケーションマネージャから供給される、光ディスク3に書き込むべきデータを受信し、ステップS12に進む。
【0081】
ステップS12では、ステップS10で得られたPSNで指定される光ディスク3の位置から、ステップS11においてI/Fコントローラ38で受信されたデータの書き込みが、ECCブロック単位で行われる。即ち、I/Fコントローラ38で受信されたデータは、メモリコントローラ36を介して、信号処理部35に供給される。信号処理部35は、そこに供給されるデータに対して、ECCブロック単位で、ECC処理を行うための誤り訂正符号を付加し、その結果得られるECCブロック単位のデータを変調して、ピックアップ部33に供給する。
【0082】
一方、制御部39は、サーボ制御部32を制御することにより、ステップS11で得られたPSNで指定される光ディスク3の位置に、ピックアップ部33を移動させる。ピックアップ部33は、光ディスク3に、信号処理部35から供給される信号に対応するレーザ光を照射し、これにより、ステップS11で得られたPSNで指定される光ディスク3の位置から、信号処理部35で得られたECCブロック単位のデータの記録を開始する。
【0083】
その後、ステップS13に進み、制御部39は、データの記録が行われている光ディスク3の位置に、欠陥があるかどうかを判定する。即ち、ピックアップ部33は、光ディスク3にレーザ光を照射するのと同時に、そのレーザ光の光ディスク3からの反射光を受光しており、その反射光に対応するRF信号を、RFアンプ34および信号処理部35を介して、制御部39に供給する。制御部39は、ステップS13において、このようにして、ピックアップ部33から供給される信号に基づき、データの記録が行われている光ディスク3の位置に、欠陥があるかどうかを判定する。
【0084】
ステップS13において、光ディスク3に欠陥がないと判定された場合、ステップS14に進み、制御部39は、writeコマンドによって要求されたデータの書き込みがすべて終了したかどうかを判定する。ステップS14において、writeコマンドによって要求されたデータの書き込みが、まだ終了していないと判定された場合、ステップS11に戻り、以下、同様の処理が繰り返されることで、まだ書き込まれていないデータの光ディスク3への書き込みが行われる。
【0085】
また、ステップS14において、writeコマンドによって要求されたデータの書き込みがすべて終了したと判定された場合、ステップS15に進み、制御部39は、その内蔵するメモリに記憶された空き領域リストを更新する。即ち、制御部39は、ステップS11乃至S14の処理が繰り返されることによりデータが書き込まれた光ディスク3の論理セクタのLSNを、空き領域リストから削除する。以上のようにして、ステップS15において、空き領域リストの更新が行われた後は、ステップS1に戻り、以下、同様の処理が繰り返される。
【0086】
一方、ステップS13において、光ディスク3に欠陥があると判定された場合、ステップS16に進み、制御部39は、I/Fコントローラ38を制御することにより、欠陥があった旨の欠陥報告メッセージを、図8のアロケーションマネージャに送信させ、ステップS17に進む。ステップS17では、制御部39は、その内蔵するメモリに記憶されたディフェクトリストを更新して、即ち、ステップS13で発見された光ディスク3の欠陥に関する情報を、ディフェクトリストに追加して、ステップS1に戻り、以下、同様の処理が繰り返される。従って、データを書き込む光ディスク3の記録領域に欠陥がある場合には、そのデータの書き込みは中止され、欠陥報告メッセージが、図8のアロケーションマネージャに送信される。
【0087】
ここで、図9の実施の形態では、readコマンド、情報要求コマンド、writeコマンドの3つのコマンドに対するドライブ2の動作について説明したが、ドライブ2は、その他、例えば、光ディスク3のフォーマットを指令するフォーマットコマンドや、光ディスク3に記録されたデータ(ファイル)の削除を指令するデリートコマンドなどを受け付けることが可能である。ドライブ2は、フォーマットコマンドを受信した場合には、光ディスク3のフォーマットを行い、また、デリートコマンドを受信した場合には、光ディスク3に記録されたデータを削除する。
【0088】
なお、フォーマット時には、制御部39は、光ディスク3上の欠陥(不良セクタ)の調査を行い、ディフェクトリストを作成する。また、フォーマット時には、欠陥対策として、例えば、スリップ処理またはリアサイン処理のうちのいずれを採用するかを、アロケーションマネージャから指定することができるが、フォーマットの後の欠陥対策としては、例えば、リアサイン処理が採用される。
【0089】
次に、図8のアロケーションマネージャの処理について説明する。
【0090】
アロケーションマネージャは、上述したように、ディフェクトリスト、空き領域リスト、論理セクタ開始物理セクタ番号に基づいて、連続空き領域リストを作成するが、この連続空き領域リストを作成する連続空き領域リスト作成処理は、その処理で利用されるディフェクトリストが、スリップ処理用のものであるのか、またはリアサイン処理用のものであるのかによって異なる。
【0091】
そこで、まず最初に、図10のフローチャートを参照して、スリップ処理用のディフェクトリストを利用して行われるスリップ処理利用型の連続空き領域リスト作成処理について説明する。
【0092】
連続空き領域リスト作成処理では、まず最初に、ステップS21において、記録制御部48が、情報要求コマンドを、ドライブ2に送信する。情報要求コマンドを受信したドライブ2は、図9で説明したように、ディフェクトリスト、空き領域リスト、論理セクタ開始物理セクタ番号を、アロケーションマネージャに返してくるので、アロケーションマネージャは、ステップS22において、それらを受信することで、ディフェクトリスト、空き領域リスト、論理セクタ開始物理セクタ番号を取得する。
【0093】
即ち、ドライブ2から送信されてくるディフェクトリストおよび空き領域リストは、リスト取得部41で受信され、リスト取得部41は、ディフェクトリストと空き領域リストを、ディフェクトリスト記憶部42と空き領域リスト記憶部43にそれぞれ供給して記憶させる。また、ドライブ2から送信されてくる論理セクタ開始物理セクタ番号は、連続空き領域リスト作成部44において受信される。
【0094】
ここで、図10の実施の形態では、ディフェクトリスト記憶部42に記憶されるディフェクトリストは、前述の図2に示したようなスリップ処理で用いられるものであり、従って、欠陥がある物理セクタのPSNの一覧である。
【0095】
その後、ステップS23に進み、連続空き領域リスト作成部44は、空き領域リスト記憶部42に記憶された空き領域リストを読み出し、連続空き領域リスト記憶部45に、連続空き領域リストとしてコピーして、ステップS24に進む。
【0096】
ステップS24では、連続空き領域リスト作成部44が、ディフェクトリスト43に記憶された、スリップ処理で用いられるディフェクトリストに記述された各PSNを、順次、注目PSNとして、その注目PSNによって特定される欠陥領域(不良セクタ)の直前の正常な物理セクタに割り当てられている論理セクタのLSNを求める。さらに、ステップS24では、連続空き領域リスト作成部44が、そのLSNを、連続空き領域の終点のLSNを表す連続空き領域終点LSNとして、注目PSNと対応付けて、ディフェクトリストに登録する。
【0097】
ここで、PSNは、ドライブ2が、光ディスク3上の実際の物理セクタを特定するための番号であり、LSNは、ドライブ2の外部(ファイルシステムやアプリケーションなど)から、物理セクタに割り当てられた論理セクタを特定するための番号である。そして、ドライブ2では、仮に、光ディスク3に欠陥がないとすれば、光ディスク3のある物理セクタが、論理セクタの割り当てを開始する論理セクタ開始物理セクタとされ、その論理セクタ開始物理セクタである物理セクタから、論理セクタが、シーケンシャルに割り当てられていく。従って、いま、論理セクタ開始物理セクタのPSNを、論理セクタ開始物理セクタ番号というものとして、その論理セクタ開始物理セクタ番号を、LSN_STARTで表すこととすると、あるLSNで特定される論理セクタに割り当てられている物理セクタのPSNは、例えば、次式で表される。
【0098】
PSN=LSN+LSN_START・・・(1)
【0099】
また、あるPSNで特定される物理セクタに割り当てられている論理セクタのLSNは、式(1)から、次式で表される。
【0100】
LSN=PSN−LSN_START・・・(2)
【0101】
一方、スリップ処理では、欠陥がある物理セクタ(不良セクタ)には、論理セクタが割り当てられず、論理セクタの割り当てが、直後の正常な物理セクタにスリップされる。従って、論理セクタ開始物理セクタから、あるLSNによって特定される論理セクタに割り当てられている物理セクタまでに存在する不良セクタの数を、関数NOS(LSN)で表すこととすると(NOS:Number Of Slip defect)、スリップ処理が行われている場合の、あるLSNで特定される論理セクタに割り当てられている物理セクタのPSNは、式(1)から、次式で表される。
【0102】
PSN=LSN+LSN_START+NOS(LSN)・・・(3)
【0103】
また、論理セクタ開始物理セクタから、あるPSNによって特定される物理セクタに割り当てられている論理セクタまでに存在する不良セクタの数を、関数NOS(PSN)で表すこととすると、スリップ処理が行われている場合の、あるPSNで特定される物理セクタに割り当てられている論理セクタのLSNは、式(3)から、次式で表される。
【0104】
LSN=PSN−LSN_START−NOS(PSN)・・・(4)
【0105】
スリップ処理が行われている場合の、PSNとLSNとの間の相互の変換は、式(3)と(4)によって行うことができる。
【0106】
なお、リアサイン処理では、欠陥がある物理セクタ(不良セクタ)が、他の正常な物理セクタに実質的に置換されるが、不良セクタであっても、論理セクタは割り当てられるから、スリップ処理が行われている場合の、PSNとLSNとの間の相互の変換は、式(1)と(2)によって行うことができる。
【0107】
スリップ処理で用いられるディフェクトリストに記述されたPSNによって特定される欠陥領域(欠陥がある物理セクタ)の直前の正常な物理セクタに割り当てられている論理セクタのLSN、即ち、連続空き領域終点LSNは、式(4)によって求めることができ、従って、ステップS24では、図11に示すように、ディフェクトリスト記憶部43に記憶されているディフェクトリストに、連続空き領域終点LSNが追加される。
【0108】
ここで、本実施の形態では、論理セクタ開始物理セクタ番号LSN_STARTが、例えば100であるとして、PSNが100の物理セクタから、LSNが0からの論理セクタが順次割り当てられるとする。
【0109】
図11の実施の形態では、PSNが107,134,135の物理セクタが欠陥領域として、ディフェクトリストに記述されている。論理セクタ開始物理セクタである物理セクタ#100から、PSNが107で表される物理セクタ#107までの欠陥領域の数は、その物理セクタ#107の1つだけであり、NOS(PSN)は1となる。従って、PSN=107,LSN_START=100,NOS(PSN)=1を、式(4)に代入して計算することにより、物理セクタ#107に対しては、連続空き領域終点LSNとして6が求められる。
【0110】
また、論理セクタ開始物理セクタ#100から、PSNが134で表される物理セクタ#134までの欠陥領域の数は、その物理セクタ#134と、その前に記述されている物理セクタ#107の2つであり、NOS(PSN)は2となる。従って、PSN=134,LSN_START=100,NOS(PSN)=2を、式(4)に代入して計算することにより、物理セクタ#134に対しては、連続空き領域終点LSNとして32が求められる。さらに、論理セクタ開始物理セクタ#100から、PSNが135で表される物理セクタ#135までの欠陥領域の数は、その物理セクタ#135と、その前に記述されている物理セクタ#107および#134の3つであり、NOS(PSN)は3となる。従って、PSN=135,LSN_START=100,NOS(PSN)=3を、式(4)に代入して計算することにより、物理セクタ#135に対しては、連続空き領域終点LSNとして32が求められる。
【0111】
図10に戻り、ステップS24において、ディフェクトリストの各PSNに、連続空き領域終点LSNが対応付けられて登録された後は、ステップS25に進み、連続空き領域リスト作成部44は、ディフェクトリスト記憶部43に記憶されたディフェクトリストの最初のPSNを注目PSNとして、ステップS26に進む。ステップS26では、連続空き領域リスト作成部44は、注目PSNが表す欠陥領域(物理セクタ)の直前の物理セクタが欠陥領域であるかどうかを判定する。
【0112】
ステップS26において、注目PSNが表す欠陥領域の直前の物理セクタが欠陥領域であると判定された場合、即ち、注目PSNが表す欠陥領域の直前の物理セクタが欠陥領域であり、従って、注目PSNが表す物理セクタが、連続空き領域の最後の物理セクタにはなり得ない場合、ステップS27およびS28をスキップして、ステップS29に進む。
【0113】
また、ステップS26において、注目PSNが表す欠陥領域の直前の物理セクタが欠陥領域でないと判定された場合、ステップS27に進み、連続空き領域リスト作成部44は、ディフェクトリスト記憶部43に記憶されたディフェクトリストにおいて、注目PSNに対応付けられている連続空き領域終点LSNを含む連続空き領域が、連続空き領域リスト記憶部45に記憶された連続空き領域リストに存在するかどうかを判定する。ステップS27において、ディフェクトリストにおいて、注目PSNに対応付けられている連続空き領域終点LSNを含む連続空き領域が、連続空き領域リストに存在しないと判定された場合、ステップS28をスキップして、ステップS29に進む。
【0114】
また、ステップS27において、ディフェクトリストにおいて、注目PSNに対応付けられている連続空き領域終点LSNを含む連続空き領域が、連続空き領域リストに存在すると判定された場合、ステップS28に進み、連続空き領域リスト作成部44は、連続空き領域終点LSNを含む連続空き領域を、その先頭から連続空き領域終点LSNまでの連続空き領域と、それ以降の連続空き領域とに分割する。
【0115】
ここで、図12は、ドライブ2から供給された空き領域リストがコピーされた直後の連続空き領域リストの例を示している。
【0116】
ドライブ2から供給される空き領域リストには、例えば、空き領域となっている、1以上の連続した論理セクタの先頭のLSNと、その連続した論理セクタの長さ(数)が記述されている。なお、空き領域リストには、その他、例えば、空き領域となっている、1以上の連続した論理セクタの先頭のLSNと、その終わりのLSNとを記述すること等が可能である。
【0117】
ここで、図12では(後述する図13、図16、および図17においても同様)、連続した論理セクタが空き領域になっていることを分かりやすくするために、空き領域となっている、1以上の連続した論理セクタ(群)ごとに、行(段)を変えて、空き領域を図示してある。また、図12では(後述する図13、図16、および図17においても同様)、ドライブ2から供給される空き領域リストに記述されているLSNの他、そのLSNに対応するPSN(そのLSNによって特定される論理セクタが割り当てられている物理セクタのPSN)も図示してある。
【0118】
図12に示した連続空き領域リストは、上述したように、ドライブ2から供給された空き領域リストがコピーされた直後のもの、即ち、ドライブ2から供給される空き領域リストそのものであり、上述したように、各空き領域を構成する論理セクタは連続している。即ち、図12の連続空き領域リストによれば、連続した論理セクタ#1乃至#12が、上から1段目の空き領域を構成しており、また、連続した論理セクタ#30乃至#37が2段目の空き領域を構成している。
【0119】
しかしながら、ドライブ2から供給される空き領域リストによって表される空き領域は、連続した物理セクタによって構成されるとは限らない。
【0120】
即ち、ドライブ2から供給されたディフェクトリストが、例えば、図11に示したものであったとすると、光ディスク3の物理セクタ#107,#134,#135には、欠陥があり、論理セクタが割り当てられていない。従って、論理セクタ開始物理セクタ番号LSN_STARTが、例えば、上述したように100であるとすると、1段目の空き領域を構成する論理セクタ#1乃至#12は、本来、物理セクタ#101乃至112にそれぞれ割り当てられるが、物理セクタ#107には欠陥があるため、スリップ処理により論理セクタが割り当てられず、その結果、物理セクタ#101乃至#106には、論理セクタ#1乃至#6がそれぞれ割り当てられ、物理セクタ#107はスリップして、物理セクタ#108以降に、論理セクタ#7以降が割り当てられる。
【0121】
従って、図12の連続空き領域リストの1段目の空き領域は、連続した論理セクタ#1乃至#12で構成されてはいるが、連続した物理セクタによっては構成されておらず、物理セクタ#101乃至#106と、物理セクタ#108乃至#113との、2つの連続した物理セクタで構成されている。
【0122】
このため、図12の連続空き領域リストの1段目の空き領域を、物理的に連続した連続空き領域とするには、1段目の空き領域を、連続した物理セクタ#101乃至#106にそれぞれ割り当てられている論理セクタ#1乃至#6と、連続した物理セクタ#108乃至#113にそれぞれ割り当てられている論理セクタ#7乃至#12に分割する必要がある。
【0123】
ところで、連続した物理セクタ#101乃至#106にそれぞれ割り当てられている論理セクタ#1乃至#6のうちの最後の論理セクタ#6のLSNは、連続空き領域終点LSNとして、図11に示したディフェクトリストに登録されている。
【0124】
そこで、連続空き領域リスト作成部44は、図10のステップS28において、連続空き領域終点LSNを含む連続空き領域を、その先頭から連続空き領域終点LSNまでの連続空き領域と、それ以降の連続空き領域とに分割し、これにより、物理的に連続した空き領域とする。
【0125】
図12の連続空き領域リストの1段目の空き領域が、論理セクタ#1乃至#6で構成される連続空き領域と、論理セクタ#7乃至#12で構成される連続空き領域とに分割されることにより、図12の連続空き領域リストは、図13に示すように更新される。
【0126】
なお、図11に示したディフェクトリストによれば、連続した物理セクタ#134と#135に欠陥がある。ディフェクトリストの最初のPSNから、順次、注目PSNにする場合、連続した物理セクタ#134と#135のうちの最初に注目PSNとされる134によって、空き領域を分割すれば、物理セクタ#134と#135の間には連続した物理セクタが存在することはないから、後に注目PSNとされる物理セクタ#135によって、空き領域を分割する必要はない(分割できない)。このため、連続空き領域リスト作成部44は、図10のステップS26において、注目PSNが表す欠陥領域(物理セクタ)の直前の物理セクタが欠陥領域であるかどうかを判定し、注目PSNが表す欠陥領域の直前の物理セクタが欠陥領域である場合には、上述したように、ステップS27およびS28の処理を行わずにスキップするようになっている。
【0127】
図10に戻り、ステップS28の処理後は、ステップS29に進み、連続空き領域リスト作成部44は、注目PSNが、ディフェクトリストに記述された最後のPSNであるかどうかを判定する。ステップS29において、注目PSNが、ディフェクトリストに記述された最後のPSNでないと判定された場合、ステップS30に進み、連続空き領域リスト作成部44は、ディフェクトリストにおいて、注目PSNの次に記述されているPSNを、新たに注目PSNとして、ステップS26に戻り、以下、同様の処理が繰り返される。
【0128】
また、ステップS29において、注目PSNが、ディフェクトリストに記述された最後のPSNであると判定された場合、連続空き領域リスト作成処理を終了する。
【0129】
以上の連続空き領域リスト作成処理により、論理的には連続しているが、物理的には不連続である可能性のある空き領域が記述された図12の連続空き領域リストから、物理的に連続している連続空き領域が記述された図13の連続空き領域リストが作成される。
【0130】
次に、図14のフローチャートを参照して、リアサイン処理用のディフェクトリストを利用して行われるリアサイン処理利用型の連続空き領域リスト作成処理について説明する。
【0131】
連続空き領域リスト作成処理では、まず最初に、ステップS41において、記録制御部48が、情報要求コマンドを、ドライブ2に送信する。情報要求コマンドを受信したドライブ2は、図9で説明したように、ディフェクトリスト、空き領域リスト、論理セクタ開始物理セクタ番号LSN_STARTを、アロケーションマネージャに返してくるので、アロケーションマネージャは、ステップS42において、それらを受信することで、ディフェクトリスト、空き領域リスト、論理セクタ開始物理セクタ番号LSN_STARTを取得する。
【0132】
即ち、ドライブ2から送信されてくるディフェクトリストおよび空き領域リストは、リスト取得部41で受信され、リスト取得部41は、ディフェクトリストと空き領域リストを、ディフェクトリスト記憶部42と空き領域リスト記憶部43にそれぞれ供給して記憶させる。また、ドライブ2から送信されてくる論理セクタ開始物理セクタ番号は、連続空き領域リスト作成部44において受信される。
【0133】
ここで、図14の実施の形態では、ディフェクトリスト記憶部42に記憶されるディフェクトリストは、前述の図4に示したようなリアサイン処理で用いられるものであり、従って、欠陥がある物理セクタのPSNと、その物理セクタの代替となる正常な物理セクタ(以下、適宜、代替物理セクタという)のPSNとを対応付けた一覧である。
【0134】
その後、ステップS43に進み、連続空き領域リスト作成部44は、空き領域リスト記憶部42に記憶された空き領域リストを読み出し、連続空き領域リスト記憶部45に、連続空き領域リストとしてコピーして、ステップS44に進む。
【0135】
ステップS44では、連続空き領域リスト作成部44が、ディフェクトリスト43に記憶された、リアサイン処理で用いられるディフェクトリストに記述された、欠陥がある物理セクタの各PSNを、順次、注目PSNとして、その注目PSNによって特定される、欠陥がある物理セクタに割り当てられている論理セクタのLSNを求める。さらに、ステップS44では、連続空き領域リスト作成部44が、そのLSNを、連続空き領域を区分する論理セクタのLSNを表す連続空き領域区分LSNとして、注目PSNと対応付けて、ディフェクトリストに登録する。
【0136】
ここで、注目PSNによって特定される、欠陥がある物理セクタに割り当てられている論理セクタのLSNは、上述した式(2)によって求めることができる。
【0137】
従って、例えば、いま、論理セクタ開始物理セクタ番号LSN_STARTが、上述したように100であるとすると、ステップS44では、図15に示すように、ディフェクトリスト記憶部43に記憶されているディフェクトリストに、連続空き領域区分LSNが追加される。
【0138】
ステップS44において、ディフェクトリストの、欠陥がある物理セクタの各PSNに、連続空き領域区分LSNが対応付けられて登録された後は、ステップS45に進み、連続空き領域リスト作成部44は、ディフェクトリスト記憶部43に記憶されたディフェクトリストの最初の連続空き領域区分LSNを注目LSNとして、ステップS46に進む。ステップS46では、連続空き領域リスト作成部44は、ディフェクトリスト記憶部43に記憶されたディフェクトリストにおいて、注目LSNを含む連続空き領域が、連続空き領域リスト記憶部45に記憶された連続空き領域リストに存在するかどうかを判定する。ステップS46において、ディフェクトリストにおいて、注目LSNを含む連続空き領域が、連続空き領域リストに存在しないと判定された場合、ステップS47およびS48をスキップして、ステップS49に進む。
【0139】
また、ステップS46において、ディフェクトリストにおいて、注目LSNを含む連続空き領域が、連続空き領域リストに存在すると判定された場合、ステップS47に進み、連続空き領域リスト作成部44は、注目LSNを含む連続空き領域を、その先頭から注目LSNの直前までの連続空き領域、注目LSN、注目LSNの直後から最後までの連続空き領域に分割する。
【0140】
ここで、図16は、ドライブ2から供給された空き領域リストがコピーされた直後の連続空き領域リストの例を示している。
【0141】
なお、図16の連続空き領域リストは、図12に示した連続空き領域リストと同一の空き領域を表している。また、図15に示したディフェクトリストも、図11のディフェクトリストと同一の物理セクタに欠陥があることを表している。
【0142】
従って、図15のディフェクトリストおよび図16の連続空き領域リストによれば、論理セクタ開始物理セクタ番号LSN_STARTが、例えば、上述したように100であるとすると、1段目の空き領域を構成する論理セクタ#1乃至#12は、物理セクタ#101乃至112にそれぞれ割り当てられているが、物理セクタ#107には欠陥があるため、リアサイン処理により、物理セクタ#107は、その代替物理セクタである物理セクタ#1(図15)に置換される。従って、実質的には、論理セクタ#1乃至#6は、連続した物理セクタ#101乃至#106にそれぞれ割り当てられ、論理セクタ#7は、いわば孤立した物理セクタ#1に割り当てられ(リアサインされ)、論理セクタ#8乃至#12は、連続した物理セクタ#108乃至#12にそれぞれ割り当てられる。
【0143】
従って、図16の連続空き領域リストの1段目の空き領域は、連続した論理セクタ#1乃至#12で構成されてはいるが、連続した物理セクタによっては構成されておらず、物理セクタ#101乃至#106、物理セクタ#1、物理セクタ#108乃至#113の、3ブロックの物理セクタ(群)で構成されている。
【0144】
このため、図16の連続空き領域リストの1段目の空き領域を、物理的に連続した連続空き領域とするには、1段目の空き領域を、連続した物理セクタ#101乃至#106にそれぞれ割り当てられている論理セクタ#1乃至#6、代替物理セクタ#1に実質的に割り当てられている論理セクタ#7、連続した物理セクタ#108乃至#113にそれぞれ割り当てられている論理セクタ#8乃至#12に分割する必要がある。
【0145】
ところで、図16の連続空き領域リストの1段目の空き領域から、連続した物理セクタ#101乃至#106にそれぞれ割り当てられている論理セクタ#1乃至#6と、連続した物理セクタ#108乃至#112にそれぞれ割り当てられている論理セクタ#8乃至#12とを分割するための区分点を表す論理セクタ#7のLSNは、連続空き領域区分LSNとして、図15に示したディフェクトリストに登録されている。
【0146】
そこで、連続空き領域リスト作成部44は、図14のステップS47において、注目LSNとしての連続空き領域区分LSNを含む連続空き領域を、その先頭から注目LSNの直前までの連続空き領域、注目LSN、注目LSNの直後から最後までの連続空き領域に分割し、これにより、注目LSNの直前までの連続空き領域と、注目LSNの直後以降の連続空き領域を得る。
【0147】
図16の連続空き領域リストの1段目の空き領域が、論理セクタ#1乃至#6で構成される連続空き領域、論理セクタ#7だけでなる空き領域、論理セクタ#7乃至#12で構成される連続空き領域に分割されることにより、図16の連続空き領域リストは、図17に示すように更新される。
【0148】
図14に戻り、ステップS47の処理後は、ステップS48に進み、連続空き領域リスト作成部44は、連続空き領域リスト記憶部45に記憶された連続空き領域リストにおける注目LSNに付加されている連続フラグflagを0にリセットする。
【0149】
即ち、図14の実施の形態では、連続空き領域リスト作成部44は、連続空き領域リストに、空き領域を登録するときに、各空き領域に対して、その空き領域が、連続した複数の物理セクタで構成されるかどうかを表す連続フラグflagを付加し、さらに、図16に示すように、連続フラグflagを、空き領域が連続した複数の物理セクタで構成されることを表す、例えば1にセットするようになっている。一方、連続空き領域リストにおける注目LSNが表す空き領域は、1つの物理セクタ(代替物理セクタ)で構成され、連続した複数の物理セクタによっては構成されていない。そこで、連続空き領域リスト作成部44は、ステップS48において、連続空き領域リスト記憶部45に記憶された連続空き領域リストにおける注目LSNに付加されている連続フラグflagを0にリセットする。
【0150】
なお、このように、連続空き領域リストに、連続フラグflagを記述する場合には、その連続フラグflagを参照するだけで、連続空き領域リストに登録されている空き領域が、連続した複数の物理セクタで構成されるかどうかを、迅速に判断することができる。
【0151】
ステップS48の処理後は、ステップS49に進み、連続空き領域リスト作成部44は、注目LSNが、ディフェクトリストに記述された最後の連続空き領域区分LSNであるかどうかを判定する。ステップS49において、注目LSNが、ディフェクトリストに記述された最後の連続空き領域区分LSNでないと判定された場合、ステップS50に進み、連続空き領域リスト作成部44は、ディフェクトリストにおいて、注目LSNの次に記述されている連続空き領域区分LSNを、新たに注目LSNとして、ステップS46に戻り、以下、同様の処理が繰り返される。
【0152】
また、ステップS49において、注目LSNが、ディフェクトリストに記述された最後の連続空き領域区分LSNであると判定された場合、連続空き領域リスト作成処理を終了する。
【0153】
以上の連続空き領域リスト作成処理により、論理的には連続しているが、物理的には不連続である可能性のある空き領域が記述された図16の連続空き領域リストから、物理的に連続している連続空き領域が記述された図17の連続空き領域リストが作成される。
【0154】
次に、図8のアロケーションマネージャは、連続空き領域リストを参照し、光ディスク3へのデータの書き込み制御(記録制御)を行う。
【0155】
そこで、図18のフローチャートを参照して、図8のアロケーションマネージャによる書き込み制御処理について説明する。
【0156】
光ディスク3へのデータの書き込み時には、アロケーションマネージャのデータ設定部47に、光ディスク3に記録すべきデータが供給される。
【0157】
そして、ステップS61において、連続空き領域検出部46は、連続空き領域リスト記憶部45に記憶された連続空き領域リストを参照することにより、物理的に連続した空き領域(連続した物理セクタで構成される空き領域)である連続空き領域を検出し、データ設定部47および記録制御部48に供給して、ステップS62に進む。
【0158】
なお、連続空き領域検出部46は、例えば、連続空き領域リスト(図13、図17)の最初に記述されている連続空き領域を検出する。
【0159】
ステップS62では、データ設定部47が、そこに供給されるデータ(の先頭)から、ステップS61で検出された連続空き領域分のデータを抽出し(切り出し)、そのデータを、光ディスク3に連続的に書き込むデータとして設定して、記録制御部48に供給する。
【0160】
なお、ステップS61で検出された連続空き領域の大きさが、ECCブロックの整数倍の大きさでない場合、ステップS62では、例えば、ステップS61で検出された連続空き領域の大きさ以下で、ECCブロックの整数倍の最大の大きさのデータが抽出される。
【0161】
そして、ステップS63に進み、記録制御部48は、データ設定部47から供給されるデータを、ステップS61で検出された連続空き領域に書き込むことを指示するwriteコマンドを、その連続空き領域を表すLSNとともに、ドライブ2に送信して、ステップS64に進む。ステップS64では、記録制御部48は、データ設定部47から供給されたデータを、ドライブ2に送信して、ステップS65に進む。これにより、ドライブ2では、図9で説明したようにして、記録制御部48から供給されるデータが、光ディスク3の、ステップS61で検出された連続空き領域に記録される。
【0162】
ステップS65では、記録制御部48が、連続空き領域リスト記憶部45に記憶された連続空き領域リストを更新し、ステップS66に進む。
【0163】
即ち、ステップS61で検出された連続空き領域には、データが記録されることから、空き領域ではなくなる。そこで、ステップS65において、記録制御部48は、連続空き領域リストから、ステップS61で検出された連続空き領域を削除することにより、連続空き領域を更新する。
【0164】
ステップS66では、データ設定部47が、光ディスク3に書き込むべきデータが、まだ残っているかどうかを判定する。ステップS66において、光ディスク3に書き込むべきデータが、まだ残っていると判定された場合、ステップS61に戻り、以下、同様の処理が行われ、これにより、まだ残っているデータが、光ディスク3に記録される。
【0165】
一方、ステップS66において、光ディスク3に書き込むべきデータが残っていないと判定された場合、即ち、データ設定部47に供給されたデータが、すべて、光ディスク3に記録された場合、処理を終了する。
【0166】
以上のように、光ディスク3上の物理的に連続した連続空き領域が検出され、その連続空き領域に、データが連続して記録されるので、その連続空き領域に対する書き込み時には、ドライブ2においてシークが発生しない。従って、高ビットレートのデータを、リアルタイムで書き込むことができる。
【0167】
また、以上のようにして光ディスク3に書き込まれたデータは、例えば、従来と同様にして読み出されるが、連続空き領域に記録されたデータの読み出し時には、やはり、ドライブ2においてシークが発生しない。従って、高ビットレートのデータを、リアルタイムで読み出すことができる。
【0168】
次に、図18の書き込み制御処理によれば、上述したように、連続空き領域に対するデータの読み書き時にシークは発生しない。従って、ある1つの連続空き領域に、すべてのデータを記録することができる場合には、そのデータのリアルタイムでの読み書きが、シークによって妨げられることはない。
【0169】
しかしながら、データが、複数の連続空き領域に亘って記録される場合があり、この場合、ある連続空き領域から、他の連続空き領域に亘って、データの読み書きが行われると、その、ある連続空き領域から、他の連続空き領域に、データの読み書き対象が変わるときに、ドライブ2においてシークが発生する。
【0170】
いま、ドライブ2において発生する最大のシーク時間(最大シーク時間)をTmax[秒]と、光ディスク3に記録されたデータのデータレートをa[bit per second]と、ドライブ2の読み出しレートをb[bit per second]と、それぞれ表すこととして、シークが発生しても、データのリアルタイム再生が可能なケースについて考える。
【0171】
図19は、データレートaで再生されるデータの積算データ量である再生データ量と、ドライブ2において読み出しレートbで光ディスク3から読み出されるデータの積算データ量である読み出しデータ量とを示している。
【0172】
図19に示すように、読み出しデータ量が、再生データ量以上となっていれば、光ディスク3に記録されたデータをリアルタイムで再生することができる。
【0173】
そこで、いま、ドライブ2において、あるシーク(1回目のシーク)が行われてから、次のシーク(2回目のシーク)が行われるまでの間に読み出されるデータ量を、セグメント長ということとして、そのセグメント長をLで表すと、セグメント長Lのデータを、読み出しレートbで、光ディスク3から読み出すのに要する時間は、L/b[秒]である。
【0174】
従って、最大シーク時間Tmaxと、セグメント長Lのデータを光ディスク3から読み出す時間L/bとをあわせた時間Tmax+L/bの間に、データレートaで再生されるデータ量(Tmax+L/b)×aが、セグメント長L以下であれば、即ち、セグメント長Lが、データ量(Tmax+L/b)×a以上であれば、読み出しデータ量が、再生データ量以上となり、光ディスク3に記録されたデータをリアルタイムで再生することができる。
【0175】
以上から、データが、光ディスク3に、(Tmax+L/b)×a以上のセグメント長Lだけ物理的に連続して記録されていれば、光ディスク3に記録されたデータをリアルタイムで再生することができる。同様に、光ディスク3に対して、データをセグメント長Lだけ連続して記録すれば、データをリアルタイムで書き込むことができる。
【0176】
なお、データをリアルタイムで読み書きするためのセグメント長Lは、最大シーク時間Tmaxが長いほど長くなる。
【0177】
ここで、データをリアルタイムで読み書きするための最小のセグメント長L(ここでは、例えば、(Tmax+L/b)×a以上のセグメント長L)を、以下、適宜、最小セグメント長Lという。但し、データをリアルタイムで読み書きするための最小のセグメント長Lが、ECCブロックの長さ未満の場合は、最小セグメント長Lは、ECCブロックの長さとされる。なお、現実的には、データ(特に、画像データ)をリアルタイムで読み書きするための最小のセグメント長Lは、一般に、ECCブロックの長さより大である。
【0178】
次に、図20のフローチャートを参照して、データが複数の連続空き領域に亘って記録される場合であっても、リアルタイムでのデータの読み書きを可能とする書き込み制御処理について説明する。
【0179】
この場合、ステップS71において連続空き領域検出部46は、連続空き領域リスト記憶部45に記憶された連続空き領域リストを参照することにより、最小セグメント長L以上の連続空き領域を検出し、データ設定部47および記録制御部48に供給する。
【0180】
そして、以下、ステップS72乃至S76に順次進み、図18のステップS62乃至S66における場合とそれぞれ同様の処理が行われる。
【0181】
従って、この場合、光ディスク3上の最小セグメント長L以上の連続空き領域が検出され、その連続空き領域に、データが連続して記録されるので、ドライブ2において、ある連続空き領域から他の連続空き領域へのシークが生じても、データを、リアルタイムで読み書きすることができる。
【0182】
なお、最小セグメント長Lは、任意の値にすることが可能である。但し、最小セグメント長Lが短い場合には、シーク時間によっては、リアルタイムでのデータの読み書きができないことが生じ得る。逆に、最小セグメント長Lが長い場合には、シーク時間が大であっても、リアルタイムでのデータの読み書きを行うことが可能となる。
【0183】
次に、光ディスク3においては、フォーマット時に、欠陥が生じている場合の他、その後に、欠陥が、新たに生じることがある。このように、光ディスク3に新たな欠陥が生じた場合には、従来のドライブでは、例えば、リアサイン処理によって、データが、欠陥のある物理セクタを避けて正常な物理セクタに記録される。
【0184】
しかしながら、ドライブ2において、従来のドライブと同一のリアサイン処理を行うと、そのリアサイン処理によって、データは、不連続な物理セクタに亘って記録され、その不連続な物理セクタにアクセスする際に、シークが発生する。従って、そのシークの発生直前にデータが記録される記録領域が、最小セグメント長L未満である場合には、そのシークによって、リアルタイムでのデータ再生が妨げられることがある。
【0185】
そこで、ドライブ2は、図9で説明したように、データを書き込もうとした光ディスク3の記録領域(連続空き領域)に欠陥があった場合には、その書き込みを中止し、欠陥報告メッセージを、図8のアロケーションマネージャに送信する。
【0186】
そして、アロケーションマネージャは、欠陥報告メッセージを受信すると、最小セグメント長以上の連続空き領域に、書き込みが中止されたデータを再配置し、これにより、光ディスク3の最小セグメント長L未満の記録領域にデータが記録されることによって、リアルタイムでのデータ再生が妨げられることを防止するようになっている。
【0187】
アロケーションマネージャは、上述したように、欠陥報告メッセージを受信すると、最小セグメント長以上の連続空き領域に、書き込みが中止されたデータを再配置する書き込み制御処理を行うが、この書き込み制御処理には、データの再配置を、前述のスリップ処理を利用して行うものと、リアサイン処理を利用して行うものとがある。
【0188】
そこで、まず、図21のフローチャートを参照して、図8のアロケーションマネージャが、スリップ処理を利用して行うスリップ処理利用型の書き込み制御処理について説明する。
【0189】
図18で説明したように、光ディスク3へのデータの書き込み時には、アロケーションマネージャのデータ設定部47に、光ディスク3に記録すべきデータが供給される。
【0190】
そして、ステップS81において、記録制御部48は、データの記録(書き込み)中に、欠陥が発見されたかどうかを表す欠陥フラグrepに、初期値としての、例えば0をセットし、ステップS82に進む。
【0191】
ステップS82では、データ設定部47が、そこに供給されるデータの最初(先頭)から、最小セグメント長L以上の、ECCブロックの整数倍の大きさのデータを抽出し(切り出し)、光ディスク3に連続して書き込むデータである注目セグメントデータとして設定して、記録制御部48に供給する。
【0192】
その後、ステップS83に進み、連続空き領域検出部46は、連続空き領域リスト記憶部45に記憶された連続空き領域リストを参照することにより、注目セグメントデータ以上の大きさの連続空き領域を検出し、データ設定部47および記録制御部48に供給して、ステップS84に進む。
【0193】
ステップS84では、記録制御部48は、データ設定部47から供給される注目セグメントデータを、ステップS83で検出された連続空き領域に書き込むことを指示するwriteコマンドを、その連続空き領域を表すLSNとともに、ドライブ2に送信して、ステップS85に進む。ステップS85では、記録制御部48は、データ設定部47から供給された注目セグメントデータを、ドライブ2に送信して、ステップS86に進む。これにより、ドライブ2では、図9で説明したようにして、記録制御部48から供給される注目セグメントデータが、光ディスク3の、ステップS83で検出された連続空き領域に記録される。
【0194】
ステップS86では、記録制御部48が、ドライブ2から欠陥報告メッセージが送信されてきたかどうかを判定し、送信されてきたと判定された場合、即ち、注目セグメントデータを書き込もうとした連続空き領域に欠陥があった場合、ステップS87に進み、記録制御部48は、欠陥フラグrepに、欠陥が発見された旨を表す、例えば1をセットするとともに、新たな連続空き領域の検出を、連続空き領域検出部46に要求し、ステップS88に進む。
【0195】
ステップS88では、連続空き領域検出部46は、連続空き領域リスト記憶部45に記憶された連続空き領域リストを参照することにより、その連続空き領域リストにおいて、例えば、注目セグメントデータについて前回検出した連続空き領域の直後に記述されている連続空き領域の中から、注目セグメントデータ以上の大きさの連続空き領域を新たに検出し、データ設定部47および記録制御部48に供給する。
【0196】
そして、ステップS84に戻り、以下、上述の場合と同様の処理が行われる。この場合、ドライブ2では、図9で説明したようにして、記録制御部48から供給される注目セグメントデータが、光ディスク3の、ステップS88で新たに検出された連続空き領域に記録される。
【0197】
一方、ステップS86において、ドライブ2から欠陥報告メッセージが送信されてきていないと判定された場合、即ち、注目セグメントデータが、光ディスク3上の物理的に連続した記録領域に、正常に、連続して記録された場合、ステップS89に進み、記録制御部48は、連続空き領域リスト記憶部45に記憶された連続空き領域リストを更新する。
【0198】
ここで、図21の実施の形態では、ステップS83およびS88において、注目セグメントデータ以上の大きさの連続空き領域が検出される。この場合、連続空き領域が、注目セグメントデータと同一の大きさであるケースと、連続空き領域が、注目セグメントデータよりも大のケースとが存在する。
【0199】
連続空き領域が、注目セグメントデータと同一の大きさである場合、ステップS89では、その連続記録領域が、連続空き領域リストから削除される。一方、連続空き領域が、注目セグメントデータよりも大きい場合、ステップS89では、例えば、その連続空き領域の先頭から注目セグメントデータの大きさの分だけが、連続空き領域リストから削除される。
【0200】
その後、ステップS90に進み、データ設定部47が、光ディスク3に書き込むべきデータが、まだ残っているかどうかを判定する。ステップS90において、光ディスク3に書き込むべきデータが、まだ残っていると判定された場合、ステップS91に進み、データ設定部47は、そこに供給されたデータの次の最小セグメント長L以上の、ECCブロックの整数倍の大きさのデータを抽出し、新たな注目セグメントデータとして設定して、記録制御部48に供給する。
【0201】
ここで、上述したように、前回のステップS83またはS88で検出される連続空き領域が、注目セグメントデータよりも大のケースがあり、この場合、その連続空き領域のうちの先頭から、注目セグメントデータの大きさの分を除いた残りは、連続空き領域として残る。そして、この残った連続空き領域が、最小セグメント長L未満の場合には、その連続空き領域に、最小セグメント長L以上のデータを記録することができないため、以後、データが記録されないこととなる。従って、最小セグメント長L未満の連続空き領域が残ることは、光ディスク3の記録効率の観点から好ましくない。
【0202】
そこで、ステップS91では、データ設定部47は、前回のステップS83またはS88で検出された連続空き領域の先頭から前回の注目セグメントデータを記録した残りの連続空き領域を認識し、その連続空き領域に、新たな注目セグメントデータを記録したときに、その記録の結果残る連続空き領域の大きさが、最小セグメント長L未満とならないように、新たな注目セグメントデータを設定する。
【0203】
具体的には、データ設定部47は、例えば、最小セグメント長Lのデータを、新たな注目セグメントデータとして設定する。但し、その最小セグメント長Lの新たな注目セグメントデータを、連続空き領域に記録することによって残る連続空き領域が、最小セグメント長L未満となる場合には、データ設定部47は、連続空き領域と同一の大きさのデータを、新たな注目セグメントデータとして設定する。
【0204】
ステップS91において、新たな注目セグメントデータが設定された後は、ステップS83に戻り、以下、同様の処理が行われ、これにより、まだ残っているデータが、最小セグメント長L以上の物理的に連続した光ディスク3の記録領域に記録される。
【0205】
一方、ステップS90において、光ディスク3に書き込むべきデータが残っていないと判定された場合、即ち、データ設定部47に供給されたデータが、すべて、光ディスク3に記録された場合、ステップS92に進み、記録制御部48は、欠陥フラグrepが1であるかどうかを判定する。
【0206】
ステップS92において、欠陥フラグrepが1でないと判定された場合、即ち、光ディスク3にデータを記録するときに、欠陥が発見されなかった場合、ステップS93をスキップして、書き込み制御処理を終了する。
【0207】
また、ステップS92において、欠陥フラグrepが1であると判定された場合、即ち、光ディスク3にデータを記録するときに、欠陥が発見された場合、ステップS93に進み、例えば、図14で説明した連続空き領域リスト作成処理が行われ、これにより、連続空き領域リストを更新して、書き込み制御処理を終了する。
【0208】
即ち、光ディスク3にデータを記録するときに、欠陥が発見された場合には、図9で説明したように、ドライブ2において、ディフェクトリストが更新される。ディフェクトリストが更新されると、連続空き領域が変化することがあるので、連続空き領域リストを、その更新されたディフェクトリストに基づいて更新する必要がある。そこで、ステップS93では、連続空き領域リスト作成処理が行われることにより、連続空き領域リストが更新される。
【0209】
図21の書き込み制御処理によれば、データは、例えば、図22に示すように記録される。
【0210】
即ち、図22では、最小セグメント長L以上のデータSegment1,Segment2,Segment3が、図21の書き込み制御処理によって、光ディスク3に記録される様子を示している。
【0211】
図22では、まず最初に、データSegment1が、光ディスク3の連続空き領域に記録される。その後、次のデータSegment2が、データSegment1が記録された直後の連続空き領域に記録されるが、その記録の途中で、欠陥が発見されている。このため、データSegment2の書き込みが、欠陥が発見された時点で中止され、即座に、欠陥の直後の連続空き領域に、データSegment2が、いわばスリップされて書き込まれる。そして、その後、次のデータSegment3が、データSegment2が記録された直後の連続空き領域に記録される。
【0212】
以上のように、図21の書き込み制御処理によれば、データを書き込もうとした光ディスク3の記録領域(連続空き領域)に欠陥があった場合には、その書き込みが中止され、即座に、その欠陥のある記録領域の直後に、データが記録される。従って、光ディスク3の最小セグメント長L未満の記録領域にデータが記録されることによって、リアルタイムでのデータ再生が妨げられることを防止することができる。
【0213】
なお、図21の書き込み制御処理では、欠陥のある記録領域の直後に、データが記録されるため、欠陥のある記録領域の直前から、その直後へのシークは、短時間で可能である。
【0214】
次に、図23のフローチャートを参照して、図8のアロケーションマネージャが、スリップ処理を利用して行うスリップ処理利用型の書き込み制御処理の他の実施の形態について説明する。
【0215】
図21の実施の形態では、データの書き込み時に、光ディスク3の欠陥が発見された場合には、そのデータの書き込みを中止して、即座に、その欠陥のある記録領域の直後に、データを再配置するようにしたが、図23の実施の形態では、データの再配置が、すべてのデータの記録の終了後に行われるようになっている。
【0216】
即ち、図18で説明したように、光ディスク3へのデータの書き込み時には、アロケーションマネージャのデータ設定部47に、光ディスク3に記録すべきデータが供給される。
【0217】
そして、ステップS101において、記録制御部48は、欠陥フラグrepに、初期値としての0をセットし、ステップS102に進む。
【0218】
ステップS102では、データ設定部47が、図21のステップS82における場合と同様に、そこに供給されるデータの先頭から、最小セグメント長L以上の、ECCブロックの整数倍の大きさのデータを抽出し、光ディスク3に連続して書き込むデータである注目セグメントデータとして設定して、記録制御部48に供給する。
【0219】
そして、ステップS103に進み、記録制御部48は、前回の注目セグメントデータの書き込み中に、ドライブ2から欠陥報告メッセージが送信されてきたかどうかを判定する。
【0220】
ステップS103において、前回の注目セグメントデータの書き込み中に、ドライブ2から欠陥報告メッセージが送信されてきていないと判定された場合、即ち、前回の注目セグメントデータを書き込もうとした光ディスク3の記録領域に欠陥がなく、前回の注目セグメントデータを光ディスク3に記録することができた場合、ステップS104に進み、連続空き領域検出部46は、連続空き領域リスト記憶部45に記憶された連続空き領域リストを参照することにより、注目セグメントデータ以上の大きさの連続空き領域を検出し、データ設定部47および記録制御部48に供給して、ステップS106に進む。
【0221】
また、ステップS103において、前回の注目セグメントデータの書き込み中に、ドライブ2から欠陥報告メッセージが送信されてきたと判定された場合、即ち、前回の注目セグメントデータを書き込もうとした光ディスク3の記録領域に欠陥があり、その書き込みが中止され、前回の注目セグメントデータを光ディスク3に記録することができなかった場合、ステップS105に進み、連続空き領域検出部46は、連続空き領域リスト記憶部45に記憶された連続空き領域リストを参照することにより、前回の注目セグメントデータの書き込み時に発見された欠陥領域の直後にある、その前回の注目セグメントデータ以上の大きさの連続空き領域を検出し、その連続空き領域のうちの先頭から、前回の注目セグメントデータの分の大きさを、前回の注目セグメントデータを後で書き込むための連続空き領域(以下、適宜、予約領域という)として確保する。
【0222】
また、ステップS105では、連続空き領域検出部46は、予約領域とされた連続空き領域が予約領域である旨を、連続空き領域リスト記憶部45に記憶された連続空き領域リストに登録する。
【0223】
さらに、ステップS105では、連続空き領域検出部46は、連続空き領域リストを参照することにより、予約領域以降にある、注目セグメントデータ以上の大きさの連続空き領域を検出し、データ設定部47および記録制御部48に供給して、ステップS106に進む。
【0224】
ステップS106では、記録制御部48は、データ設定部47から供給される注目セグメントデータを、ステップS104またはS105で検出された連続空き領域に書き込むことを指示するwriteコマンドを、その連続空き領域を表すLSNとともに、ドライブ2に送信して、ステップS107に進む。ステップS107では、記録制御部48は、データ設定部47から供給された注目セグメントデータを、ドライブ2に送信して、ステップS108に進む。これにより、ドライブ2では、図9で説明したようにして、記録制御部48から供給される注目セグメントデータが、光ディスク3の、ステップS104またはS105で検出された連続空き領域に記録される。
【0225】
ステップS108では、記録制御部48が、ドライブ2から欠陥報告メッセージが送信されてきたかどうかを判定し、送信されてきたと判定された場合、即ち、注目セグメントデータを書き込もうとした連続空き領域に欠陥があった場合、ステップS110に進み、記録制御部48は、欠陥フラグrepに、欠陥が発見された旨を表す、例えば1をセットし、ステップS111に進む。
【0226】
ステップS111では、記録制御部48が、注目セグメントデータを、予備領域に待避して、ステップS112に進む。即ち、データ記憶部49には、光ディスク3に記録すべきデータを一時的に待避しておくための予備領域が設けられており、ステップS111では、記録制御部48は、欠陥が発見されることによって、光ディスク3に記録することができなかった注目セグメントデータを、その予備領域に記憶(待避)させ、ステップS112に進む。
【0227】
一方、ステップS108において、ドライブ2から欠陥報告メッセージが送信されてきていないと判定された場合、即ち、注目セグメントデータが、光ディスク3上の物理的に連続した記録領域に、正常に、連続して記録された場合、ステップS109に進み、記録制御部48は、図21のステップS89における場合と同様に、連続空き領域リスト記憶部45に記憶された連続空き領域リストを更新して、ステップS112に進む。
【0228】
ステップS112では、データ設定部47が、光ディスク3に書き込むべきデータが、まだ残っているかどうかを判定する。ステップS112において、光ディスク3に書き込むべきデータが、まだ残っていると判定された場合、ステップS113に進み、データ設定部47は、図21のステップS91における場合と同様に、そこに供給されたデータの次の最小セグメント長L以上の、ECCブロックの整数倍の大きさのデータを抽出し、新たな注目セグメントデータとして設定して、記録制御部48に供給する。
【0229】
そして、ステップS103に戻り、以下、同様の処理が行われ、これにより、まだ残っているデータが、最小セグメント長L以上の物理的に連続した光ディスク3の記録領域に記録される。
【0230】
一方、ステップS112において、光ディスク3に書き込むべきデータが残っていないと判定された場合、即ち、データ設定部47に供給されたデータが、すべて、光ディスク3に記録された(、または予備領域に記録された)場合、ステップS114に進み、記録制御部48は、欠陥フラグrepが1であるかどうかを判定する。
【0231】
ステップS114において、欠陥フラグrepが1でないと判定された場合、即ち、光ディスク3にデータを記録するときに、欠陥が発見されなかった場合、ステップS115およびS116をスキップして、書き込み制御処理を終了する。
【0232】
また、ステップS114において、欠陥フラグrepが1であると判定された場合、即ち、光ディスク3にデータを記録するときに、欠陥が発見され、そのとき注目セグメントデータとされたデータが、データ記憶部49の予備領域に記憶されている場合、ステップS115に進み、その予備領域に記憶されているデータを、光ディスク3の物理的に連続した記録領域に記録する再書き込み処理が行われ、ステップS116に進む。なお、再書き込み処理の詳細については、後述する。
【0233】
ステップS116では、例えば、図21のステップS93における場合と同様に、図14で説明した連続空き領域リスト作成処理が行われ、これにより、連続空き領域リストが更新されて、書き込み制御処理を終了する。
【0234】
次に、図24のフローチャートを参照して、図23のステップS115で行われる再書き込み処理について説明する。
【0235】
なお、データ記憶部49の予備領域に記憶された、注目セグメントデータとされた最小セグメント長L以上の各データを、以下、適宜、セグメントデータという。
【0236】
再書き込み処理では、まず最初に、ステップS121において、データ設定部47が、データ記憶部49の予備領域に記憶された最初のセグメントデータを抽出し(読み出し)、注目セグメントデータとして設定して、記録制御部48に供給する。
【0237】
その後、ステップS122に進み、連続空き領域検出部46は、連続空き領域リスト記憶部45に記憶された連続空き領域リストを参照することにより、注目セグメントデータを記録するのに確保された予約領域となっている連続空き領域を検出し、データ設定部47および記録制御部48に供給して、ステップS123に進む。
【0238】
ステップS123では、記録制御部48は、データ設定部47から供給される注目セグメントデータを、ステップS122で検出された連続空き領域に書き込むことを指示するwriteコマンドを、その連続空き領域を表すLSNとともに、ドライブ2に送信して、ステップS124に進む。ステップS124では、記録制御部48は、データ設定部47から供給された注目セグメントデータを、ドライブ2に送信して、ステップS125に進む。これにより、ドライブ2では、図9で説明したようにして、記録制御部48から供給される注目セグメントデータが、光ディスク3の、予備領域となっている連続空き領域に記録される。
【0239】
ステップS125では、記録制御部48が、ドライブ2から欠陥報告メッセージが送信されてきたかどうかを判定し、送信されてきたと判定された場合、即ち、注目セグメントデータを書き込もうとした連続空き領域に欠陥があった場合、ステップS126に進み、記録制御部48は、連続空き領域リストを参照することにより、注目セグメントデータの大きさ以上の新たな連続空き領域(予約領域ではない連続空き領域)を検出し、データ設定部47および記録制御部48に供給する。
【0240】
そして、ステップS123に戻り、以下、上述の場合と同様の処理が行われる。この場合、ドライブ2では、図9で説明したようにして、記録制御部48から供給される注目セグメントデータが、光ディスク3の、ステップS126で新たに検出された連続空き領域に記録される。即ち、予約領域となっている連続空き領域に、欠陥があった場合には、連続空き領域リストを参照することにより、光ディスク3の任意の位置にある新たな連続空き領域が検出され、その新たな連続空き領域に、注目セグメントデータが記録される。
【0241】
なお、このように、連続空き領域に、欠陥があった場合に、光ディスク3の任意の位置にある新たな連続空き領域を検出し、その新たな連続空き領域に、注目セグメントデータを記録する処理は、後述するリアサイン処理利用型の書き込み制御処理と等価である。
【0242】
一方、ステップS125において、ドライブ2から欠陥報告メッセージが送信されてきていないと判定された場合、即ち、注目セグメントデータが、光ディスク3上の物理的に連続した記録領域である予約領域に、正常に、連続して記録された場合、ステップS127に進み、記録制御部48は、連続空き領域リスト記憶部45に記憶された連続空き領域リストを更新する。
【0243】
即ち、ステップS127では、ステップS124で送信された注目セグメントデータが記録された連続空き領域が、連続空き領域リストから削除される。
【0244】
その後、ステップS128に進み、データ設定部47が、予備領域に、光ディスク3に書き込んでいないセグメントデータが、まだ残っているかどうかを判定する。ステップS128において、光ディスク3に書き込んでいないセグメントデータが、まだ残っていると判定された場合、ステップS129に進み、データ設定部47は、予備領域に記憶されている注目セグメントデータの次のセグメントデータを抽出し、新たな注目セグメントデータとして設定して、記録制御部48に供給する。
【0245】
そして、ステップS122に戻り、以下、同様の処理が行われ、これにより、まだ残っているセグメントデータが、最小セグメント長L以上の物理的に連続した光ディスク3の記録領域に記録される。
【0246】
一方、ステップS128において、光ディスク3に書き込んでいないセグメントデータが残っていないと判定された場合、即ち、予備領域に記憶されたセグメントデータが、すべて、光ディスク3に記録された場合、リターンする。
【0247】
図23の書き込み制御処理によれば、データは、例えば、図25に示すように記録される。
【0248】
即ち、図25では、最小セグメント長L以上のデータSegment1,Segment2,Segment3が、図23の書き込み制御処理によって、光ディスク3に記録される様子を示している。
【0249】
図25では、まず最初に、データSegment1が、光ディスク3の連続空き領域に記録される。その後、次のデータSegment2が、データSegment1が記録された直後の連続空き領域に記録されるが、その記録の途中で、欠陥が発見されている。このため、データSegment2の書き込みが、欠陥が発見された時点で中止され、データSegment2が予備領域に待避されている。
【0250】
その後、欠陥の直後の連続空き領域に、データSegment2と同一の大きさの連続空き領域が、予約領域として確保され、その予約領域の直後の連続空き領域に、次のデータSegment3が記録される。
【0251】
以上のようにして、データSegment1,Segment2,Segment3の記録(の試み)が終了した後、予備領域に待避されているデータSegment2が、予約領域となっている連続空き領域に記録される。
【0252】
以上のように、図23の書き込み制御処理によれば、データを書き込もうとした光ディスク3の記録領域(連続空き領域)に欠陥があった場合には、その書き込みが中止され、その欠陥のある記録領域の直後に、書き込みが中止されたデータを記録するための連続空き領域が予約領域として確保されるとともに、書き込みが中止されたデータが予備領域に待避される。そして、光ディスク3に書き込むべきデータすべての書き込み(の試み)が終了した後に、予備領域に待避されたデータが、予約領域に書き込まれる。従って、図23の書き込み制御処理でも、光ディスク3の最小セグメント長L未満の記録領域にデータが記録されることによって、リアルタイムでのデータ再生が妨げられることを防止することができる。
【0253】
さらに、図23の書き込み制御処理では、光ディスク3に書き込むべきデータすべての書き込みが終了した後に、予備領域に待避されたデータが、予約領域に書き込まれるので、ドライブ2に大きな負荷がかかることを防止することができる。
【0254】
なお、図23の書き込み制御処理でも、図21における場合と同様に、欠陥のある記録領域の直後に、データが記録されるため、欠陥のある記録領域の直前から、その直後へのシークは、短時間で可能である。
【0255】
次に、図26のフローチャートを参照して、図8のアロケーションマネージャが、リアサイン処理を利用して行うリアサイン処理利用型の書き込み制御処理について説明する。
【0256】
図18で説明したように、光ディスク3へのデータの書き込み時には、アロケーションマネージャのデータ設定部47に、光ディスク3に記録すべきデータが供給される。
【0257】
そして、ステップS141において、記録制御部48は、欠陥フラグrepに、初期値としての0をセットし、ステップS142に進む。
【0258】
ステップS142では、データ設定部47が、図21のステップS82における場合と同様に、そこに供給されるデータの先頭から、最小セグメント長L以上の、ECCブロックの整数倍の大きさのデータを抽出し、光ディスク3に連続して書き込むデータである注目セグメントデータとして設定して、記録制御部48に供給する。
【0259】
その後、ステップS143に進み、連続空き領域検出部46は、連続空き領域リスト記憶部45に記憶された連続空き領域リストを参照することにより、注目セグメントデータ以上の大きさの連続空き領域を検出し、データ設定部47および記録制御部48に供給して、ステップS144に進む。
【0260】
ステップS144では、記録制御部48は、データ設定部47から供給される注目セグメントデータを、ステップS143で検出された連続空き領域に書き込むことを指示するwriteコマンドを、その連続空き領域を表すLSNとともに、ドライブ2に送信して、ステップS145に進む。ステップS145では、記録制御部48は、データ設定部47から供給された注目セグメントデータを、ドライブ2に送信して、ステップS146に進む。これにより、ドライブ2では、図9で説明したようにして、記録制御部48から供給される注目セグメントデータが、光ディスク3の、ステップS143で検出された連続空き領域に記録される。
【0261】
ステップS146では、記録制御部48が、ドライブ2から欠陥報告メッセージが送信されてきたかどうかを判定し、送信されてきたと判定された場合、即ち、注目セグメントデータを書き込もうとした連続空き領域に欠陥があった場合、ステップS147に進み、記録制御部48は、欠陥フラグrepに、欠陥が発見された旨を表す1をセットするとともに、新たな連続空き領域の検出を、連続空き領域検出部46に要求し、ステップS143に戻る。
【0262】
この場合、ステップS143では、連続空き領域検出部46は、連続空き領域リスト記憶部45に記憶された連続空き領域リストを参照することにより、注目セグメントデータ以上の大きさの、欠陥報告メッセージによって報知された欠陥のない任意の連続空き領域を新たに検出し、データ設定部47および記録制御部48に供給する。
【0263】
なお、光ディスク3に欠陥があった場合に、ステップS143において検出する連続空き領域は、その欠陥がある連続空き領域以外であれば、光ディスク3上のどの位置にある連続空き領域であっても良い。
【0264】
また、連続空き領域リストにおいては、そこに記述されている連続空き領域を、通常記録用の連続空き領域と、欠陥が発見された場合の再配置用の連続記録領域とに分けておき、通常の場合、通常記録用の連続空き領域の中から、注目セグメントデータを書き込む連続空き領域を検出し、光ディスク3に欠陥があった場合には、再配置用の連続記録領域の中から、注目セグメントデータを書き込む連続空き領域を検出するようにすることが可能である。
【0265】
ステップS143において、新たな連続空き領域が検出された後は、ステップS144に進み、記録制御部48は、データ設定部47から供給される注目セグメントデータを、ステップS143で検出された新たな連続空き領域に書き込むことを指示するwriteコマンドを、その連続空き領域を表すLSNとともに、ドライブ2に送信して、ステップS145に進む。ステップS145では、記録制御部48は、データ設定部47から供給された注目セグメントデータを、再度、ドライブ2に送信して、ステップS146に進む。これにより、ドライブ2では、図9で説明したようにして、記録制御部48から供給される注目セグメントデータが、光ディスク3の、ステップS143で検出された新たな連続空き領域に記録される。
【0266】
一方、ステップS146において、ドライブ2から欠陥報告メッセージが送信されてきていないと判定された場合、即ち、注目セグメントデータが、光ディスク3上の物理的に連続した記録領域に、正常に、連続して記録された場合、ステップS148に進み、記録制御部48は、図21のステップS89における場合と同様に、連続空き領域リスト記憶部45に記憶された連続空き領域リストを更新し、ステップS149に進む。
【0267】
ステップS149では、データ設定部47が、光ディスク3に書き込むべきデータが、まだ残っているかどうかを判定する。ステップS149において、光ディスク3に書き込むべきデータが、まだ残っていると判定された場合、ステップS150に進み、データ設定部47は、図21のステップS91における場合と同様に、そこに供給されたデータの次の最小セグメント長L以上の、ECCブロックの整数倍の大きさのデータを抽出し、新たな注目セグメントデータとして設定して、記録制御部48に供給する。
【0268】
そして、ステップS143に戻り、以下、同様の処理が行われ、これにより、まだ残っているデータが、最小セグメント長L以上の物理的に連続した光ディスク3の記録領域に記録される。
【0269】
一方、ステップS149において、光ディスク3に書き込むべきデータが残っていないと判定された場合、即ち、データ設定部47に供給されたデータが、すべて、光ディスク3に記録された場合、ステップS151に進み、記録制御部48は、欠陥フラグrepが1であるかどうかを判定する。
【0270】
ステップS151において、欠陥フラグrepが1でないと判定された場合、即ち、光ディスク3にデータを記録するときに、欠陥が発見されなかった場合、ステップS152をスキップして、書き込み制御処理を終了する。
【0271】
また、ステップS151において、欠陥フラグrepが1であると判定された場合、即ち、光ディスク3にデータを記録するときに、欠陥が発見された場合、ステップS152に進み、例えば、図21のステップS93における場合と同様に、図14で説明した連続空き領域リスト作成処理が行われ、これにより、連続空き領域リストが更新されて、書き込み制御処理を終了する。
【0272】
図26の書き込み制御処理によれば、データは、例えば、図27に示すように記録される。
【0273】
即ち、図27では、最小セグメント長L以上のデータSegment1,Segment2,Segment3が、図26の書き込み制御処理によって、光ディスク3に記録される様子を示している。
【0274】
図27では、まず最初に、データSegment1が、光ディスク3の連続空き領域に記録される。その後、次のデータSegment2が、データSegment1が記録された直後の連続空き領域に記録されるが、その記録の途中で、欠陥が発見されている。このため、データSegment2の書き込みが、欠陥が発見された時点で中止され、光ディスク3上の任意の位置の連続空き領域が新たに検出される。そして、データSegment2が、欠陥発見後、即座に、新たな連続空き領域に、いわばリアサインされて書き込まれる。そして、その後、次のデータSegment3が、例えば、光ディスク3の欠陥がある記録領域の直後の連続空き領域に記録される。
【0275】
以上のように、図26の書き込み制御処理によれば、データを書き込もうとした光ディスク3の記録領域(連続空き領域)に欠陥があった場合には、その書き込みが中止され、即座に、新たな連続空き領域に、データが記録される。従って、光ディスク3の最小セグメント長L未満の記録領域にデータが記録されることによって、リアルタイムでのデータ再生が妨げられることを防止することができる。
【0276】
なお、図26の書き込み制御処理では、欠陥が発見された場合に検出する新たな連続空き領域は、その欠陥の位置に近い方が、シーク時間を短くすることができる。
【0277】
次に、図28のフローチャートを参照して、図8のアロケーションマネージャが、リアサイン処理を利用して行うリアサイン処理利用型の書き込み制御処理の他の実施の形態について説明する。
【0278】
図26の実施の形態では、データの書き込み時に、光ディスク3の欠陥が発見された場合には、そのデータの書き込みを中止して、即座に、新たな連続記録領域に、データを再配置するようにしたが、図28の実施の形態では、データの再配置が、図23における場合と同様に、すべてのデータの記録の終了後に行われるようになっている。
【0279】
即ち、図18で説明したように、光ディスク3へのデータの書き込み時には、アロケーションマネージャのデータ設定部47に、光ディスク3に記録すべきデータが供給される。
【0280】
そして、ステップS161において、記録制御部48は、欠陥フラグrepに、初期値としての0をセットし、ステップS162に進む。
【0281】
ステップS162では、データ設定部47が、図26のステップS142における場合と同様に、そこに供給されるデータの先頭から、最小セグメント長L以上の、ECCブロックの整数倍の大きさのデータを抽出し、光ディスク3に連続して書き込むデータである注目セグメントデータとして設定して、記録制御部48に供給する。
【0282】
そして、ステップS163に進み、連続空き領域検出部46は、連続空き領域リスト記憶部45に記憶された連続空き領域リストを参照することにより、注目セグメントデータ以上の大きさの連続空き領域を検出し、データ設定部47および記録制御部48に供給して、ステップS164に進む。
【0283】
ステップS164では、記録制御部48は、データ設定部47から供給される注目セグメントデータを、ステップS163で検出された連続空き領域に書き込むことを指示するwriteコマンドを、その連続空き領域を表すLSNとともに、ドライブ2に送信して、ステップS165に進む。ステップS165では、記録制御部48は、データ設定部47から供給された注目セグメントデータを、ドライブ2に送信して、ステップS166に進む。これにより、ドライブ2では、図9で説明したようにして、記録制御部48から供給される注目セグメントデータが、光ディスク3の、ステップS163で検出された連続空き領域に記録される。
【0284】
ステップS166では、記録制御部48が、ドライブ2から欠陥報告メッセージが送信されてきたかどうかを判定し、送信されてきたと判定された場合、即ち、注目セグメントデータを書き込もうとした連続空き領域に欠陥があった場合、ステップS167に進み、記録制御部48は、欠陥フラグrepに、欠陥が発見された旨を表す、例えば1をセットし、ステップS168に進む。
【0285】
ステップS168では、記録制御部48が、図23のステップS111における場合と同様に、注目セグメントデータを、データ記憶部49の予備領域に待避して、ステップS170に進む。
【0286】
一方、ステップS166において、ドライブ2から欠陥報告メッセージが送信されてきていないと判定された場合、即ち、注目セグメントデータが、光ディスク3上の物理的に連続した記録領域に、正常に、連続して記録された場合、ステップS169に進み、記録制御部48は、図26のステップS148における場合と同様に、連続空き領域リスト記憶部45に記憶された連続空き領域リストを更新して、ステップS170に進む。
【0287】
ステップS170では、データ設定部47が、光ディスク3に書き込むべきデータが、まだ残っているかどうかを判定する。ステップS170において、光ディスク3に書き込むべきデータが、まだ残っていると判定された場合、ステップS171に進み、データ設定部47は、図26のステップS150における場合と同様に、そこに供給されたデータの次の最小セグメント長L以上の、ECCブロックの整数倍の大きさのデータを抽出し、新たな注目セグメントデータとして設定して、記録制御部48に供給する。
【0288】
そして、ステップS163に戻り、以下、同様の処理が行われ、これにより、まだ残っているデータが、最小セグメント長L以上の物理的に連続した光ディスク3の記録領域に記録される。
【0289】
一方、ステップS170において、光ディスク3に書き込むべきデータが残っていないと判定された場合、即ち、データ設定部47に供給されたデータが、すべて、光ディスク3に記録された場合、ステップS172に進み、データ設定部47が、注目セグメントデータとされた最小セグメント長L以上のデータであるセグメントデータのうち、光ディスク3に書き込んでいないセグメントデータが、予備領域に存在するかどうかを判定する。
【0290】
ステップS172において、光ディスク3に書き込んでいないセグメントデータが、予備領域に存在すると判定された場合、ステップS173に進み、データ設定部47は、予備領域に記憶されているセグメントデータのうち、まだ光ディスク3に書き込まれていないセグメントデータの1つを、注目セグメントデータとして設定して、記録制御部48に供給する。
【0291】
そして、ステップS163に戻り、連続空き領域検出部46は、欠陥が発見されたときに行われる図26のステップS143における場合と同様に、連続空き領域リスト記憶部45に記憶された連続空き領域リストを参照することにより、注目セグメントデータ以上の大きさの、欠陥報告メッセージによって報知された欠陥がない任意の連続空き領域を検出し、データ設定部47および記録制御部48に供給する。そして、ステップS164に進み、以下、同様の処理が行われ、これにより、予備領域に待避されたセグメントデータが、最小セグメント長L以上の物理的に連続した光ディスク3の記録領域に記録される。
【0292】
一方、ステップS172において、光ディスク3に書き込んでいないセグメントデータが予備領域に存在しないと判定された場合、即ち、予備領域に記憶されたセグメントデータが、すべて、光ディスク3に記録された場合、ステップS174に進み、記録制御部48は、欠陥フラグrepが1であるかどうかを判定する。
【0293】
ステップS174において、欠陥フラグrepが1でないと判定された場合、即ち、光ディスク3にデータを記録するときに、欠陥が発見されなかった場合、ステップS175をスキップして、書き込み制御処理を終了する。
【0294】
また、ステップS174において、欠陥フラグrepが1であると判定された場合、即ち、光ディスク3にデータを記録するときに、欠陥が発見された場合、ステップS175に進み、例えば、図26のステップS152における場合と同様に、図14で説明した連続空き領域リスト作成処理が行われ、これにより、連続空き領域リストが更新されて、書き込み制御処理を終了する。
【0295】
図28の書き込み制御処理によれば、データは、例えば、図29に示すように記録される。
【0296】
即ち、図29では、最小セグメント長L以上のデータSegment1,Segment2,Segment3が、図28の書き込み制御処理によって、光ディスク3に記録される様子を示している。
【0297】
図29では、まず最初に、データSegment1が、光ディスク3の連続空き領域に記録される。その後、次のデータSegment2が、データSegment1が記録された直後の連続空き領域に記録されるが、その記録の途中で、欠陥が発見されている。このため、データSegment2の書き込みが、欠陥が発見された時点で中止され、データSegment2が予備領域に待避されている。
【0298】
その後、欠陥の直後の連続空き領域に、次のデータSegment3が記録され、以上のようにして、データSegment1,Segment2,Segment3の記録(の試み)が終了した後、予備領域に待避されているデータSegment2が、新たに検出された、欠陥のない連続空き領域に記録される。
【0299】
以上のように、図28の書き込み制御処理によれば、データを書き込もうとした光ディスク3の記録領域(連続空き領域)に欠陥があった場合には、その書き込みが中止され、書き込みが中止されたデータが予備領域に待避される。そして、光ディスク3に書き込むべきデータすべての書き込み(の試み)が終了した後に、予備領域に待避されたデータが、新たに検出された連続空き領域に書き込まれる。従って、図28の書き込み制御処理でも、光ディスク3の最小セグメント長L未満の記録領域にデータが記録されることによって、リアルタイムでのデータ再生が妨げられることを防止することができる。
【0300】
さらに、図28の書き込み制御処理では、光ディスク3に書き込むべきデータすべての書き込みが終了した後に、予備領域に待避されたデータが書き込まれるので、ドライブ2に大きな負荷がかかることを防止することができる。
【0301】
なお、例えば、図21および図22で説明したスリップ処理利用型の書き込み制御処理では、図22に示したように、データSegment1の記録後、次のデータSegment2の記録時に、欠陥が発見され、欠陥の直後の連続空き領域に、データSegment2がスリップされて書き込まれるが、この場合、データSegment1が記録された記録領域の直後から欠陥の位置までの記録領域は、いわば捨てられ、データの記録に使用されないことがある。
【0302】
そこで、データSegment2の記録時に、欠陥が発見された場合には、そのデータSegment2すべてをスリップするのではなく、例えば、図30に示すように、データSegment2のうちの、欠陥が発見されるまでにECCブロック単位で書き込まれた分は、そのまま有効とし、残りの分だけを、欠陥の直後の連続空き領域にスリップするようにすることができる。
【0303】
即ち、図30では、まず最初に、データSegment1が、光ディスク3の連続空き領域に記録される。その後、次のデータSegment2が、データSegment1が記録された直後の連続空き領域に記録されるが、その記録の途中で、欠陥が発見されている。このため、データSegment2の書き込みは、欠陥が発見されるまでにECCブロック単位で書き込むことができたところで中断され、データSegment2の残りが、欠陥の直後の連続空き領域にスリップされて書き込まれる。そして、その後、次のデータSegment3が、データSegment2が記録された直後の連続空き領域に記録される。
【0304】
この場合、光ディスク3の記録領域を有効利用することができる。なお、この場合、光ディスク3の最小セグメント長L未満の記録領域にデータが記録されることがあり得るため、シークが発生することによって、リアルタイム再生が妨げられることが生じうる。但し、注目セグメントデータを、最小セグメント長Lよりも、ある程度大きいものとすることによって、シークが発生した場合に、リアルタイム再生が妨げられる確率を低くすることができる。
【0305】
なお、上述の場合には、常に、最小セグメント長L以上のデータを、光ディスク3上の物理的に連続した記録領域に記録する記録制御処理を行い、これにより、データのリアルタイム再生を保証するようにしたが、常に、このような記録制御を行う必要はない。
【0306】
即ち、リアルタイムでの再生が要求されるデータについては、上述のようなリアルタイム再生を保証する記録制御を行い、リアルタイムでの再生が要求されないデータについては、例えば、従来と同様の記録制御を行うことが可能である。
【0307】
具体的には、リアルタイムでの再生が要求されないデータについては、例えば、アロケーションマネージャで特に処理を行わずに、ドライブ2側で、従来における場合と同様にして、光ディスク3への記録を行うようにすることができる。この場合、光ディスク3に欠陥があるときには、ドライブ2において、従来のリアサイン処理によって、その欠陥に対処することになる。なお、この場合、その後にリアルタイムでの再生が要求されるデータの記録が行われることに備えて、アロケーションマネージャは、ドライブ2から最新の空き領域リストとディフェクトリストを取得し、図14の連続空き領域リスト作成処理を行うことによって、連続空き領域リストを更新しておくのが望ましい。
【0308】
また、ドライブ2は、コンピュータ1からアンマウント(un−mount)することが可能である。ドライブ2のアンマウント時においては、アロケーションマネージャが管理(記憶)しているディフェクトリストや連続空き領域リストなどは、ドライブ2に転送するようにすることが可能である。
【0309】
以上、本発明を、光ディスク3にデータを記録する場合について説明したが、本発明は、光ディスク3以外の磁気ディスクや光磁気ディスク等のディスク状の記録媒体、さらには、磁気テープなどのテープ状の記録媒体、半導体メモリ等にデータを記録する場合にも適用可能である。
【0310】
なお、本実施の形態では、説明を簡単にするために、1つの物理セクタ(論理セクタ)が、1つのECCブロックに対応するものとしたが、本発明は、ECCブロックが複数の物理セクタで構成され、さらには、ドライブ2での読み書きや、空き領域リストおよびディフェクトリストの管理が、そのような複数の物理セクタで構成されるECCブロック単位で行われる場合にも適用可能である。
【0311】
【発明の効果】
以上の如く、本発明によれば、高ビットレートのデータを、リアルタイムで再生することが可能となる。
【図面の簡単な説明】
【図1】スリップ処理を説明する図である。
【図2】スリップ処理で用いられるディフェクトリストを示す図である。
【図3】リアサイン処理を説明する図である。
【図4】リアサイン処理で用いられるディフェクトリストを示す図である。
【図5】本発明を適用した記録再生システムの一実施の形態の構成例を示すブロック図である。
【図6】コンピュータ1のハードウェア構成例を示すブロック図である。
【図7】ドライブ2のハードウェア構成例を示すブロック図である。
【図8】アロケーションマネージャの機能的構成例を示すブロック図である。
【図9】ドライブ2の処理を説明するフローチャートである。
【図10】スリップ処理利用型の連続空き領域リスト作成処理を説明するフローチャートである。
【図11】スリップ処理利用型の連続空き領域リスト作成処理で用いられるディフェクトリストを示す図である。
【図12】空き領域リストがコピーされた直後の連続空き領域リストを示す図である。
【図13】スリップ処理利用型の連続空き領域リスト作成処理で作成される連続空き領域リストを示す図である。
【図14】リアサイン処理利用型の連続空き領域リスト作成処理を説明するフローチャートである。
【図15】リアサイン処理利用型の連続空き領域リスト作成処理で用いられるディフェクトリストを示す図である。
【図16】空き領域リストがコピーされた直後の連続空き領域リストを示す図である。
【図17】リアサイン処理利用型の連続空き領域リスト作成処理で作成される連続空き領域リストを示す図である。
【図18】アロケーションマネージャによる書き込み制御処理の第1実施の形態を説明するフローチャートである。
【図19】再生データ量と読み出しデータ量とを示す図である。
【図20】アロケーションマネージャによる書き込み制御処理の第2実施の形態を説明するフローチャートである。
【図21】アロケーションマネージャによる書き込み制御処理の第3実施の形態を説明するフローチャートである。
【図22】アロケーションマネージャによる書き込み制御処理の第3実施の形態を説明する図である。
【図23】アロケーションマネージャによる書き込み制御処理の第4実施の形態を説明するフローチャートである。
【図24】アロケーションマネージャによる再書き込み処理を説明するフローチャートである。
【図25】アロケーションマネージャによる書き込み制御処理の第4実施の形態を説明する図である。
【図26】アロケーションマネージャによる書き込み制御処理の第5実施の形態を説明するフローチャートである。
【図27】アロケーションマネージャによる書き込み制御処理の第5実施の形態を説明する図である。
【図28】アロケーションマネージャによる書き込み制御処理の第6実施の形態を説明するフローチャートである。
【図29】アロケーションマネージャによる書き込み制御処理の第6実施の形態を説明する図である。
【図30】記録効率を向上させるデータの書き込み方法を説明する図である。
【符号の説明】
1 コンピュータ, 2 ドライブ, 3 光ディスク, 4 信号入出力装置, 11 CPU, 12 ROM, 13 メモリコントローラ, 14 RAM,15 HD, 16 入力部, 17 出力部, 18 通信I/F, 19 I/Fコントローラ, 20 データ変換部, 31 スピンドルモータ, 32 サーボ制御部, 33 ピックアップ部, 34 RFアンプ, 35 信号処理部, 36 メモリコントローラ, 37 メモリ, 38 I/Fコントローラ,39 制御部, 41 リスト取得部, 42 空き領域リスト記憶部, 43 ディフェクトリスト記憶部, 44 連続空き領域リスト作成部, 45 連続空き領域リスト記憶部, 46 連続空き領域検出部, 47 データ設定部, 48 記録制御部, 49 データ記憶部[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a recording control device, a recording control method, and a program, and more particularly, to a recording control device and a recording method that enable high-bit-rate data to be reproduced in real time even if, for example, an optical disc has a defect. The present invention relates to a control method and a program.
[0002]
[Prior art]
For example, in a conventional drive that drives a disk-shaped recording medium such as an optical disk, a magneto-optical disk, and a magnetic disk, data is read and written in units of, for example, ECC (Error Checking and Correction) ECC blocks.
[0003]
In a conventional drive, a physical physical sector obtained by dividing a recording area of an optical disk or the like into a predetermined size is assigned to a logical logical sector. Then, a logical sector in which data is to be recorded is designated by an external device, and the drive records data in a physical sector assigned to the logical sector.
[0004]
In the drive, for example, a physical sector of a certain physical sector number is used as a reference for a physical sector of a user area (user area) which is a recording area opened to the user on the optical disk. Sectors are allocated sequentially.
[0005]
By the way, in a conventional drive, when a defective area, which is an area that cannot be read / written normally, exists in a recording medium, the defective area is dealt with by slip processing or reassignment processing (for example, see Patent Document 1). ).
[0006]
That is, for example, for the sake of simplicity, assuming that the size of an ECC block is equal to the size of a sector, a logical sector is not assigned to a defective physical sector (bad sector) in the slip processing. It is skipped (slid) and assigned to the next normal physical sector.
[0007]
Therefore, for example, as shown in FIG. 1, the physical sectors of physical sector numbers (hereinafter, appropriately referred to as PSNs (Physical Sector Numbers)) #N, # N + 1,. (Hereinafter, appropriately referred to as LSN (Logical Sector Number)), when assigned to logical sectors #n, # n + 1,..., Physical sectors of PSN # N + 3 (hereinafter, appropriately referred to as physical sectors N + 3) Is described as a bad sector, the physical sector N + 3, which is the bad sector, is skipped and a logical sector is allocated. As a result, in the example of FIG. 1, the logical sectors n, n + 1, n + 2 are respectively assigned to the physical sectors N, N + 1, N + 2, the physical sector N + 3 is skipped, and the physical sectors N + 4, N + 5,. , Logical sectors n + 3, n + 4,.
[0008]
Then, in the drive, as shown in FIG. 2, PSN # N + 3 of physical sector N + 3, which is a bad sector to which no logical sector is assigned, is registered in a defect list, which is a list of defective areas.
[0009]
When the slip processing is performed, when an access to a certain logical sector is requested, the drive determines the physical sector assigned to the logical sector, and the drive determines the logical sector before the logical sector (the logical sector before the logical sector). In a logical sector having an LSN smaller than the LSN of the sector), it is necessary to check how many bad sectors exist with reference to the defect list.
[0010]
Here, in the slip processing, the PSN of the physical sector assigned to the logical sector shifts, and the defective sector cannot be recognized from outside the drive. Therefore, the slip processing is generally performed at the time of formatting (certify) the optical disk.
[0011]
On the other hand, in the reassignment process, when the physical sector assigned to the logical sector is a bad sector, a normal physical sector is secured as a substitute for the bad sector.
[0012]
That is, in the reassignment process, for example, as shown in FIG. 3, when the physical sectors N, N + 1,... Are assigned to the logical sectors n, n + 1,. Sometimes, a certain physical sector in a spare area (spare area), which is a spare area reserved separately from the user area on the optical disk, is reserved as a substitute sector for a defective sector. In FIG. 3, a physical sector A in a spare area is reserved as an alternative area to the physical sector N + 3 which is a bad sector in the user area. In this case, the logical sectors n, n + 1,... Are assigned to the physical sectors N, N + 1,..., But for the bad sector N + 3, the normal physical sector A is reserved as an alternative sector. The logical sector n + 3 allocated to the bad sector N + 3 is substantially allocated to the physical sector A.
[0013]
Then, in the drive, as shown in FIG. 4, the PSN # N + 3 of the bad sector and the PSN # A of the physical sector A secured as a substitute sector for the bad sector N + 3 are associated with each other and registered in the defect list. .
[0014]
When the reassignment process is performed, when a request for access to a certain logical sector is made, the drive may perform a linear conversion using the logical sector to obtain a physical sector assigned to the logical sector. I'm done. However, if the obtained physical sector is a bad sector, the physical sector associated with the bad sector in the defect list is finally used as the physical sector assigned to the logical sector. .
[0015]
Here, even if the reassignment process is performed, the linear relationship between the LSN of the logical sector and the PSN of the physical sector is maintained, but the physical sector that is a bad sector is substantially replaced by another normal physical sector. Is replaced by For this reason, the reassignment process can be performed after formatting, and is generally performed when a new defective sector occurs after formatting the optical disc.
[0016]
In the slip processing, when the physical sector to be assigned to the logical sector is a bad sector, the physical sector assigned to the logical sector is slipped to the physical sector immediately after the bad sector, so that the logical sector is However, the physical sectors allocated to the logical sector are discontinuous on the optical disk. On the other hand, in the reassignment process, when a physical sector to be allocated to a logical sector is a bad sector, the physical sector allocated to the logical sector is substantially a physical sector in a spare area different from the user area. As a result, even if the logical sectors are continuous, the physical sectors allocated to the logical sectors are discontinuous on the optical disk.
[0017]
Therefore, in the drive, a seek is required in a portion where the physical sector is discontinuous. In the slip process, the physical sector assigned to the logical sector is slid to the physical sector immediately after the bad sector, whereas in the reassign process, the physical sector (substantially) assigned to the logical sector is In general, the seek time is longer when the reassignment process is performed than when the slip process is performed because the physical sector is replaced with a physical sector in a spare area different from the area.
[0018]
[Patent Document 1]
JP-A-06-068598.
[0019]
[Problems to be solved by the invention]
As described above, when the slip processing or the reassignment processing is performed, the drive accesses a discontinuous physical sector to cause a seek.
[0020]
Therefore, when high bit rate data, particularly, for example, moving image data is recorded on an optical disc and reproduced, a seek may occur, and the data may not be reproduced in real time.
[0021]
The present invention has been made in view of such a situation, and is intended to enable high-bit-rate data to be reproduced in real time even if an optical disk or the like has a defect.
[0022]
[Means for Solving the Problems]
The recording control device according to the present invention includes: a setting unit that sets data in a unit larger than a unit for performing ECC (Error Checking and Correction) as data of interest to be recorded on a recording medium; Recording control means for recording data in a continuous free area which is a continuous free area.
[0023]
The recording control method according to the present invention includes a setting step of setting data of a unit larger than a unit for performing ECC (Error Checking and Correction) as attention data to be recorded on a recording medium; A recording control step of recording data in a continuous free area which is a continuous free area.
[0024]
The program according to the present invention includes a setting step of setting data of a unit larger than a unit for performing ECC (Error Checking and Correction) as attention data to be recorded on a recording medium; A recording control step of recording data in a continuous empty area that is an empty area.
[0025]
In the recording control device, the recording control method, and the program according to the present invention, data of a unit larger than a unit for performing ECC (Error Checking and Correction) is set as attention data to be recorded on a recording medium, and the attention data is recorded. It is recorded in a continuous free area which is a physically continuous free area of the medium.
[0026]
BEST MODE FOR CARRYING OUT THE INVENTION
FIG. 5 shows a configuration example of an embodiment of a recording / reproducing system to which the present invention is applied.
[0027]
The recording / reproducing system shown in FIG. 5 is configured based on a
[0028]
In the embodiment of FIG. 5, AV (Audio Visual) data such as image data and audio data is output, and a VTR (Video Tape Recorder) or a TV tuner to which AV data can be input as necessary. Is connected to the
[0029]
FIG. 6 shows a hardware configuration example of the
[0030]
The CPU (Central Processing Unit) 11 executes, for example, a program stored in a ROM (Read Only Memory) 12 when a command is input by operating the
[0031]
The
[0032]
The
[0033]
The
[0034]
The I /
[0035]
The
[0036]
The above-described
[0037]
In the
[0038]
Here, the program executed by the
[0039]
Alternatively, the program may be temporarily or permanently stored on a removable recording medium such as a flexible disk, a CD-ROM (Compact Disc Only Memory), an MO (Magneto Optical) disk, a DVD (Digital Versatile Disc), a magnetic disk, or a semiconductor memory. It can be stored (recorded) in an appropriate manner. Such a removable recording medium can be provided as so-called package software.
[0040]
The program is installed in the
[0041]
Here, in the present specification, processing steps for describing a program for causing the
[0042]
Further, the program may be processed by one CPU or may be processed in a distributed manner by a plurality of CPUs. Further, the program may be transferred to a remote CPU and executed.
[0043]
Next, FIG. 7 illustrates an example of a hardware configuration of the
[0044]
The
[0045]
That is, at the time of data recording, a signal corresponding to data to be recorded is supplied from the
[0046]
The
[0047]
The
[0048]
Under the control of the control unit 39, the
[0049]
The I /
[0050]
The control unit 39 performs various processes for reading and writing data on the
[0051]
In the
[0052]
The ECC block needs to be, for example, one or more integral multiples of a physical sector that is the minimum data read / write unit for the
[0053]
In the
[0054]
Here, when the slip processing and the reassignment processing are performed in units of ECC blocks, a method of describing all PSNs of one or more physical sectors corresponding to the ECC blocks in the defect list, and, for example, the first physical Although there is a method of describing only the PSN of the sector, either method can be adopted.
[0055]
In the following, for the sake of simplicity, the description will be made assuming that an ECC block corresponds to one physical sector. However, the present invention is applicable regardless of how many physical sectors the ECC block corresponds to.
[0056]
Next, FIG. 8 shows an example of a functional configuration of the
[0057]
In the
[0058]
When the application program reads or writes data from or to the
[0059]
In the present embodiment, for example, an allocation manager is incorporated in one or both of an application program and a file system, and the allocation manager controls reading and writing of data from and to the
[0060]
That is, in the allocation manager, the
[0061]
The free area
[0062]
The continuous free area list creation unit 44 receives a logical sector start physical sector number (to be described later) from the
[0063]
The continuous free area list storage unit 45 stores the continuous free area list supplied from the continuous free area list creation unit 44, for example, overwriting the storage contents.
[0064]
The continuous free
[0065]
The data to be recorded on the
[0066]
The
[0067]
The data storage unit 49 temporarily stores data and the like necessary for the
[0068]
Next, the processing of the
[0069]
Various commands are supplied to the
[0070]
Therefore, the control unit 39 first determines whether or not a read command for instructing reading of data from the
[0071]
If it is determined in step S1 that the read command has been supplied, the process proceeds to step S2, where the control unit 39 converts the LSN into a PSN. That is, the read command is supplied together with the LSN of the logical sector (group) in which the data to be read from the
[0072]
Then, the process proceeds to step S3, where data is read in ECC block units from the position on the
[0073]
The
[0074]
Thereafter, the process proceeds to step S5, and the control unit 39 determines whether or not reading of all data requested by the read command has been completed. If it is determined in step S5 that the reading of the data requested by the read command has not been completed yet, the process returns to step S3, and the same processing is repeated to obtain the data that has not been read yet. Reading is performed.
[0075]
If it is determined in step S5 that reading of all data requested by the read command has been completed, the process returns to step S1, and the same processing is repeated.
[0076]
On the other hand, when it is determined in step S1 that the read command has not been supplied, the process proceeds to step S6, and the control unit 39 determines whether an information request command for requesting information held by the
[0077]
If it is determined in step S6 that the information request command has not been supplied, the process proceeds to step S9, and the control unit 39 determines whether a write command for instructing writing (recording) of data on the
[0078]
If it is determined in step S9 that the write command has not been supplied, the process returns to step S1, and the same processing is repeated.
[0079]
If it is determined in step S9 that the write command has been supplied, the process proceeds to step S10, where the control unit 39 converts the LSN into PSN. That is, the write command is supplied together with the LSN of the logical sector (group) in which data is to be written (hereinafter, referred to as the write LSN). In step S10, the write LSN supplied together with the write command is converted to PSN. Is done.
[0080]
Then, the process proceeds to step S11, where the I /
[0081]
In step S12, the data received by the I /
[0082]
On the other hand, the control unit 39 controls the
[0083]
Thereafter, the process proceeds to step S13, where the control unit 39 determines whether or not there is a defect at the position of the
[0084]
If it is determined in step S13 that the
[0085]
If it is determined in step S14 that all the data writing requested by the write command has been completed, the process proceeds to step S15, and the control unit 39 updates the free area list stored in the built-in memory. That is, the control unit 39 deletes the LSN of the logical sector of the
[0086]
On the other hand, if it is determined in step S13 that the
[0087]
Here, in the embodiment of FIG. 9, the operation of the
[0088]
At the time of formatting, the control unit 39 investigates a defect (defective sector) on the
[0089]
Next, the processing of the allocation manager of FIG. 8 will be described.
[0090]
As described above, the allocation manager creates the continuous free area list based on the defect list, the free area list, and the logical sector start physical sector number. It depends on whether the defect list used in the processing is for slip processing or reassignment processing.
[0091]
Therefore, first, with reference to the flowchart of FIG. 10, a description will be given of a slip processing use type continuous free area list creation processing performed using a slip processing defect list.
[0092]
In the continuous free area list creation processing, first, in step S21, the
[0093]
That is, the defect list and the free area list transmitted from the
[0094]
Here, in the embodiment of FIG. 10, the defect list stored in the defect
[0095]
Thereafter, the process proceeds to step S23, where the continuous free area list creating unit 44 reads the free area list stored in the free area
[0096]
In step S24, the continuous free area list creation unit 44 sequentially sets each PSN described in the defect list used in the slip processing, which is stored in the defect list 43, as the target PSN and sets the defect specified by the target PSN. The LSN of the logical sector assigned to the normal physical sector immediately before the area (bad sector) is obtained. Further, in step S24, the continuous free area list creation unit 44 registers the LSN as a continuous free area end point LSN representing the LSN of the end point of the continuous free area in association with the PSN of interest in the defect list.
[0097]
Here, the PSN is a number for the
[0098]
PSN = LSN + LSN_START (1)
[0099]
Further, the LSN of a logical sector assigned to a physical sector specified by a certain PSN is expressed by the following expression from Expression (1).
[0100]
LSN = PSN-LSN_START (2)
[0101]
On the other hand, in the slip processing, a logical sector is not allocated to a defective physical sector (defective sector), and the allocation of the logical sector is slipped to the next normal physical sector. Therefore, if the number of defective sectors existing from the logical sector start physical sector to the physical sector allocated to the logical sector specified by a certain LSN is represented by a function NOS (LSN) (NOS: Number of Slip) defect), the PSN of the physical sector assigned to the logical sector specified by a certain LSN when the slip processing is performed is expressed by the following equation from equation (1).
[0102]
PSN = LSN + LSN_START + NOS (LSN) (3)
[0103]
If the number of defective sectors existing from the logical sector start physical sector to the logical sector allocated to the physical sector specified by a certain PSN is represented by a function NOS (PSN), slip processing is performed. In this case, the LSN of the logical sector allocated to the physical sector specified by a certain PSN is expressed by the following equation from equation (3).
[0104]
LSN = PSN-LSN_START-NOS (PSN) (4)
[0105]
The mutual conversion between PSN and LSN when the slip processing is performed can be performed by Expressions (3) and (4).
[0106]
In the reassignment process, a defective physical sector (defective sector) is substantially replaced by another normal physical sector. However, even if the defective sector is a logical sector, a logical sector is allocated. The conversion between the PSN and the LSN in the case described above can be performed by the equations (1) and (2).
[0107]
The LSN of the logical sector allocated to the normal physical sector immediately before the defective area (physical sector having a defect) specified by the PSN described in the defect list used in the slip processing, that is, the continuous free area end point LSN is Therefore, in step S24, the continuous free area end point LSN is added to the defect list stored in the defect list storage unit 43, as shown in FIG.
[0108]
Here, in the present embodiment, it is assumed that the logical sector start physical sector number LSN_START is, for example, 100, and logical sectors starting from
[0109]
In the embodiment of FIG. 11, physical sectors having PSNs of 107, 134, and 135 are described as defect areas in the defect list. The number of defective areas from the
[0110]
The number of defective areas from the logical sector start
[0111]
Returning to FIG. 10, after the continuous free area end point LSN is registered in association with each PSN of the defect list in step S24, the process proceeds to step S25, and the continuous free area list creation unit 44 determines whether the defect list storage unit The first PSN in the defect list stored in 43 is set as the target PSN, and the process proceeds to step S26. In step S26, the continuous free area list creating unit 44 determines whether the physical sector immediately before the defective area (physical sector) represented by the PSN of interest is a defective area.
[0112]
In step S26, when it is determined that the physical sector immediately before the defective area represented by the PSN of interest is a defective area, that is, the physical sector immediately before the defective area represented by the PSN of interest is a defective area. If the physical sector to be represented cannot be the last physical sector in the continuous free area, steps S27 and S28 are skipped and the process proceeds to step S29.
[0113]
If it is determined in step S26 that the physical sector immediately before the defective area represented by the PSN of interest is not a defective area, the process proceeds to step S27, where the continuous free area list creation unit 44 stores the data in the defect list storage unit 43. In the defect list, it is determined whether or not a continuous free area including the continuous free area end point LSN associated with the PSN of interest exists in the continuous free area list stored in the continuous free area list storage unit 45. In step S27, when it is determined that the continuous free area including the continuous free area end point LSN associated with the PSN of interest in the defect list does not exist in the continuous free area list, step S28 is skipped and step S29 is performed. Proceed to.
[0114]
If it is determined in step S27 that the continuous free area including the continuous free area end point LSN associated with the PSN of interest in the defect list is present in the continuous free area list, the process proceeds to step S28, where the continuous free area is determined. The list creating unit 44 divides the continuous free area including the continuous free area end point LSN into a continuous free area from the head to the continuous free area end point LSN and a continuous free area thereafter.
[0115]
Here, FIG. 12 shows an example of the continuous free area list immediately after the free area list supplied from the
[0116]
The free area list supplied from the
[0117]
Here, in FIG. 12 (similarly in FIG. 13, FIG. 16, and FIG. 17, which will be described later), in order to make it easy to understand that continuous logical The free area is illustrated by changing the row (stage) for each of the continuous logical sectors (groups). In FIG. 12 (similarly in FIGS. 13, 16 and 17 described later), in addition to the LSN described in the free area list supplied from the
[0118]
As described above, the continuous free space list shown in FIG. 12 is a list immediately after the free space list supplied from the
[0119]
However, the free area represented by the free area list supplied from the
[0120]
That is, assuming that the defect list supplied from the
[0121]
Therefore, although the free space in the first row of the continuous free space list in FIG. 12 is constituted by the continuous
[0122]
Therefore, in order to make the first-stage free area in the continuous free-area list in FIG. 12 a physically continuous continuous free area, the first-stage free area is assigned to the continuous physical sectors # 101 to # 106. It is necessary to divide the logical sectors into
[0123]
By the way, the LSN of the last
[0124]
Therefore, in step S28 in FIG. 10, the continuous free area list creation unit 44 converts the continuous free area including the continuous free area end point LSN into a continuous free area from the beginning to the continuous free area end point LSN, and a subsequent continuous free area. The area is divided into a plurality of areas, whereby a physically continuous free area is obtained.
[0125]
The first stage free area in the continuous free area list in FIG. 12 is divided into a continuous free area composed of
[0126]
According to the defect list shown in FIG. 11, continuous physical sectors # 134 and # 135 have defects. When the attention PSN is sequentially set from the first PSN in the defect list, if the free area is divided by the first attention PSN of the continuous physical sectors # 134 and # 135, the
[0127]
Referring back to FIG. 10, after the processing in step S28, the process proceeds to step S29, in which the continuous free area list creating unit 44 determines whether the PSN of interest is the last PSN described in the defect list. If it is determined in step S29 that the PSN of interest is not the last PSN described in the defect list, the process proceeds to step S30, where the continuous free area list creating unit 44 writes the PSN of interest next to the PSN of interest in the defect list. The current PSN is newly set as the target PSN, and the process returns to step S26, and the same processing is repeated thereafter.
[0128]
If it is determined in step S29 that the PSN of interest is the last PSN described in the defect list, the continuous free area list creation processing ends.
[0129]
By the above-described continuous free area list creation processing, the continuous free area list in FIG. 12 in which free areas that are logically continuous but may be physically discontinuous are described, A continuous free area list in FIG. 13 in which continuous free areas are described is created.
[0130]
Next, with reference to the flowchart of FIG. 14, a description will be given of a reassignment-use-type continuous free area list creation process performed using a reassignment-use defect list.
[0131]
In the continuous free area list creation processing, first, in step S41, the
[0132]
That is, the defect list and the free area list transmitted from the
[0133]
Here, in the embodiment of FIG. 14, the defect list stored in the defect
[0134]
Thereafter, the process proceeds to step S43, where the continuous free area list creating unit 44 reads the free area list stored in the free area
[0135]
In step S44, the continuous free area list creation unit 44 sequentially sets each PSN of the physical sector having a defect, which is described in the defect list used in the reassignment process and stored in the defect list 43, as a target PSN. The LSN of the logical sector assigned to the defective physical sector specified by the PSN of interest is determined. Further, in step S44, the continuous free area list creating unit 44 registers the LSN in the defect list in association with the PSN of interest as a continuous free area division LSN representing the LSN of a logical sector that divides the continuous free area. .
[0136]
Here, the LSN of the logical sector specified by the PSN of interest and assigned to the physical sector having a defect can be obtained by the above equation (2).
[0137]
Therefore, for example, if the logical sector start physical sector number LSN_START is 100 as described above, in step S44, as shown in FIG. 15, the defect list stored in the defect list storage unit 43 includes A continuous free area division LSN is added.
[0138]
In step S44, after the continuous free area division LSN has been registered in association with each PSN of the physical sector having a defect in the defect list, the process proceeds to step S45, where the continuous free area list creation unit 44 The process proceeds to step S46 with the first continuous free area segment LSN of the defect list stored in the storage unit 43 as the target LSN. In step S <b> 46, the continuous free area list creation unit 44 stores the continuous free area including the LSN of interest in the defect list stored in the defect list storage unit 43 in the continuous free area list stored in the continuous free area list storage unit 45. To determine if it exists. In step S46, when it is determined that the continuous free area including the LSN of interest in the defect list does not exist in the continuous free area list, steps S47 and S48 are skipped, and the process proceeds to step S49.
[0139]
If it is determined in step S46 that the continuous free area including the LSN of interest in the defect list is present in the continuous free area list, the process proceeds to step S47, and the continuous free area list creation unit 44 determines whether the continuous free area including the LSN of interest is included. The free area is divided into a continuous free area from the head to the immediately preceding LSN, an attention LSN, and a continuous free area immediately after the LSN to the end.
[0140]
Here, FIG. 16 shows an example of the continuous free area list immediately after the free area list supplied from the
[0141]
Note that the continuous free area list in FIG. 16 represents the same free area as the continuous free area list shown in FIG. The defect list shown in FIG. 15 also indicates that the same physical sector as the defect list in FIG. 11 has a defect.
[0142]
Therefore, according to the defect list in FIG. 15 and the continuous free area list in FIG. 16, if the logical sector start physical sector number LSN_START is 100 as described above, for example, The
[0143]
Therefore, although the free space in the first row of the continuous free space list in FIG. 16 is composed of consecutive
[0144]
Therefore, in order to make the first-stage free area in the continuous free-area list in FIG. 16 a physically continuous continuous free area, the first-stage free area is assigned to continuous physical sectors # 101 to # 106.
[0145]
By the way, from the first free space in the continuous free space list in FIG. 16, the
[0146]
Therefore, in step S47 of FIG. 14, the continuous free area list creation unit 44 converts the continuous free area including the continuous free area segment LSN as the LSN of interest into the continuous free area from the beginning to immediately before the LSN of interest, the LSN of interest, It is divided into a continuous free area from immediately after the LSN of interest to the end, thereby obtaining a continuous free area immediately before the LSN of interest and a continuous free area immediately after the LSN of interest.
[0147]
The first vacant area in the continuous vacant area list in FIG. 16 includes a continuous vacant area composed of
[0148]
Returning to FIG. 14, after the processing in step S47, the process proceeds to step S48, in which the continuous free area list creating unit 44 determines whether or not the continuous free area list stored in the continuous free area list storage unit 45 has Reset the flag to 0.
[0149]
That is, in the embodiment of FIG. 14, the continuous free area list creating unit 44, when registering a free area in the continuous free area list, A continuity flag indicating whether a sector is composed of sectors is added. Further, as shown in FIG. 16, the continuity flag is set to, for example, 1 to indicate that the empty area is composed of a plurality of continuous physical sectors. It is designed to be set. On the other hand, the free area represented by the LSN of interest in the continuous free area list is constituted by one physical sector (alternate physical sector) and is not constituted by a plurality of continuous physical sectors. Therefore, the continuous free area list creation unit 44 resets the continuous flag “flag” added to the LSN of interest in the continuous free area list stored in the continuous free area list storage unit 45 in step S48.
[0150]
As described above, when the continuous flag is described in the continuous free area list, the free area registered in the continuous free area list is referred to as a plurality of continuous physical areas only by referring to the continuous flag. It can be quickly determined whether or not a sector is formed.
[0151]
After the process in step S48, the process proceeds to step S49, in which the continuous free area list creating unit 44 determines whether or not the LSN of interest is the last continuous free area section LSN described in the defect list. If it is determined in step S49 that the LSN of interest is not the last continuous free area division LSN described in the defect list, the process proceeds to step S50, where the continuous free area list creation unit 44 sets the next free LSN in the defect list next to the LSN of interest. Is set as a new target LSN, and the process returns to step S46, and the same processing is repeated thereafter.
[0152]
If it is determined in step S49 that the LSN of interest is the last continuous free area division LSN described in the defect list, the continuous free area list creation processing ends.
[0153]
By the above-described continuous free area list creation processing, the continuous free area list shown in FIG. 16 in which free areas that are logically continuous but may be physically discontinuous are described. A continuous free area list shown in FIG. 17 in which continuous continuous free areas are described is created.
[0154]
Next, the allocation manager of FIG. 8 controls writing (recording control) of data to the
[0155]
Therefore, a write control process by the allocation manager in FIG. 8 will be described with reference to a flowchart in FIG.
[0156]
When writing data to the
[0157]
Then, in step S61, the continuous free
[0158]
Note that the continuous free
[0159]
In step S62, the data setting unit 47 extracts (cuts out) the data of the continuous free space detected in step S61 from (the top of) the data supplied thereto, and continuously writes the data to the
[0160]
If the size of the continuous free area detected in step S61 is not an integral multiple of the ECC block, in step S62, for example, the size of the continuous free area is smaller than the size of the continuous free area detected in step S61. The data of the maximum size which is an integral multiple of is extracted.
[0161]
Then, the process proceeds to step S63, where the
[0162]
In step S65, the
[0163]
That is, since data is recorded in the continuous empty area detected in step S61, it is not an empty area. Therefore, in step S65, the
[0164]
In step S66, the data setting unit 47 determines whether data to be written on the
[0165]
On the other hand, if it is determined in step S66 that there is no data to be written on the
[0166]
As described above, a physically continuous continuous free area on the
[0167]
The data written on the
[0168]
Next, according to the write control process of FIG. 18, as described above, no seek occurs at the time of reading / writing data from / to the continuous free area. Therefore, if all data can be recorded in a certain continuous free area, the reading and writing of the data in real time is not hindered by the seek.
[0169]
However, data may be recorded over a plurality of continuous free areas. In this case, when data is read or written from one continuous free area to another continuous free area, a certain continuous When the data read / write target changes from the free area to another continuous free area, a seek occurs in the
[0170]
Now, let the maximum seek time (maximum seek time) occurring in
[0171]
FIG. 19 shows a reproduced data amount which is an integrated data amount of data reproduced at a data rate a, and a read data amount which is an integrated data amount of data read from the
[0172]
As shown in FIG. 19, if the read data amount is equal to or larger than the reproduction data amount, the data recorded on the
[0173]
Therefore, in the
[0174]
Therefore, the maximum seek time T max T, which is the sum of the time L / b for reading the data of the segment length L from the
[0175]
From the above, the data is stored on the
[0176]
The segment length L for reading and writing data in real time is the maximum seek time T max Is longer the longer.
[0177]
Here, the minimum segment length L for reading and writing data in real time (here, for example, (T max + L / b) × a or more segment length L) is hereinafter referred to as minimum segment length L as appropriate. However, when the minimum segment length L for reading and writing data in real time is smaller than the length of the ECC block, the minimum segment length L is set to the length of the ECC block. In reality, the minimum segment length L for reading and writing data (in particular, image data) in real time is generally larger than the length of an ECC block.
[0178]
Next, with reference to a flowchart of FIG. 20, a description will be given of a write control process that enables data to be read and written in real time even when data is recorded over a plurality of continuous free areas.
[0179]
In this case, in step S71, the continuous free
[0180]
Thereafter, the process sequentially proceeds to steps S72 to S76, and the same processes as those in steps S62 to S66 in FIG. 18 are performed.
[0181]
Therefore, in this case, a continuous free area of the minimum segment length L or more on the
[0182]
Note that the minimum segment length L can be set to an arbitrary value. However, when the minimum segment length L is short, data may not be read or written in real time depending on the seek time. Conversely, when the minimum segment length L is long, it is possible to read and write data in real time even if the seek time is long.
[0183]
Next, in the
[0184]
However, if the same reassignment processing as that of the conventional drive is performed in the
[0185]
Therefore, as described with reference to FIG. 9, when there is a defect in the recording area (continuous free area) of the
[0186]
When the allocation manager receives the defect report message, the allocation manager relocates the data for which the writing has been stopped to a continuous free area equal to or longer than the minimum segment length. Is recorded, thereby preventing real-time data reproduction from being hindered.
[0187]
As described above, upon receiving the defect report message, the allocation manager performs a write control process of relocating the data whose writing has been stopped to a continuous free area equal to or longer than the minimum segment length. Data relocation may be performed using the above-described slip processing or may be performed using the reassignment processing.
[0188]
Therefore, first, with reference to the flow chart of FIG. 21, a description will be given of a slip-control-based write control process performed by the allocation manager of FIG. 8 by using the slip process.
[0189]
As described with reference to FIG. 18, when writing data to the
[0190]
Then, in step S81, the
[0191]
In step S82, the data setting unit 47 extracts (cuts out) data of an integral multiple of the ECC block, which is equal to or longer than the minimum segment length L, from the beginning (head) of the data supplied thereto (cut out). The data is set as attention segment data which is data to be continuously written, and is supplied to the
[0192]
Thereafter, the process proceeds to step S83, where the continuous free
[0193]
In step S84, the
[0194]
In step S86, the
[0195]
In step S88, the continuous free
[0196]
Then, the process returns to step S84, and thereafter, the same processing as in the above-described case is performed. In this case, in the
[0197]
On the other hand, when it is determined in step S86 that the defect report message has not been transmitted from the
[0198]
Here, in the embodiment of FIG. 21, in steps S83 and S88, a continuous free area having a size equal to or larger than the target segment data is detected. In this case, there are a case where the continuous free area is the same size as the segment data of interest and a case where the continuous free area is larger than the segment data of interest.
[0199]
If the continuous free area is the same size as the segment data of interest, in step S89, the continuous recording area is deleted from the continuous free area list. On the other hand, when the continuous free area is larger than the attention segment data, in step S89, for example, only the size of the attention segment data from the head of the continuous free area is deleted from the continuous free area list.
[0200]
Thereafter, the process proceeds to step S90, and the data setting unit 47 determines whether or not data to be written on the
[0201]
Here, as described above, in some cases, the continuous free area detected in the previous step S83 or S88 is larger than the target segment data, and in this case, the target segment data starts from the top of the continuous free area. The remainder except for the size of remains as a continuous free area. If the remaining continuous free area is less than the minimum segment length L, data of the minimum segment length L or more cannot be recorded in the continuous free area, and no data is recorded thereafter. . Therefore, it is not preferable that a continuous free area less than the minimum segment length L remains from the viewpoint of the recording efficiency of the
[0202]
Therefore, in step S91, the data setting unit 47 recognizes the remaining continuous free area in which the previous segment data of interest has been recorded from the beginning of the continuous free area detected in the previous step S83 or S88, and stores the data in the continuous free area. When the new target segment data is recorded, the new target segment data is set so that the size of the continuous free area remaining as a result of the recording does not become less than the minimum segment length L.
[0203]
Specifically, the data setting unit 47 sets, for example, data having the minimum segment length L as new target segment data. However, if the continuous free area remaining after recording the new target segment data of the minimum segment length L in the continuous free area is less than the minimum segment length L, the data setting unit 47 sets the continuous free area to Data of the same size is set as new target segment data.
[0204]
After the new target segment data is set in step S91, the process returns to step S83, and thereafter, the same processing is performed, so that the remaining data is physically continuous data having the minimum segment length L or more. The recorded information is recorded in the recording area of the
[0205]
On the other hand, if it is determined in step S90 that there is no data to be written on the
[0206]
If it is determined in step S92 that the defect flag rep is not 1, that is, if no defect is found when recording data on the
[0207]
If it is determined in step S92 that the defect flag rep is 1, that is, if a defect is found when recording data on the
[0208]
That is, if a defect is found when recording data on the
[0209]
According to the write control process of FIG. 21, data is recorded, for example, as shown in FIG.
[0210]
That is, FIG. 22 shows a state in which data Segment1, Segment2, and Segment3 having the minimum segment length L or more are recorded on the
[0211]
In FIG. 22, first, the
[0212]
As described above, according to the write control process of FIG. 21, when there is a defect in the recording area (continuous free area) of the
[0213]
In the write control process of FIG. 21, since data is recorded immediately after the defective recording area, seeking from immediately before the defective recording area to immediately thereafter can be performed in a short time.
[0214]
Next, another embodiment of the write control process of the slip process utilizing type performed by the allocation manager of FIG. 8 by using the slip process will be described with reference to the flowchart of FIG.
[0215]
In the embodiment of FIG. 21, when a defect of the
[0216]
That is, as described with reference to FIG. 18, when writing data to the
[0217]
Then, in step S101, the
[0218]
In step S102, the data setting unit 47 extracts, from the head of the data supplied thereto, data having a size equal to or greater than the minimum segment length L and an integral multiple of the ECC block as in step S82 of FIG. Then, the data is set as attention segment data which is data to be continuously written on the
[0219]
Then, proceeding to step S103, the
[0220]
If it is determined in step S103 that the defect report message has not been transmitted from the
[0221]
Also, in step S103, when it is determined that a defect report message has been transmitted from the
[0222]
In step S105, the continuous free
[0223]
Further, in step S105, the continuous free
[0224]
In step S106, the
[0225]
In step S108, the
[0226]
In step S111, the
[0227]
On the other hand, when it is determined in step S108 that the defect report message has not been transmitted from the
[0228]
In step S112, the data setting unit 47 determines whether data to be written on the
[0229]
Then, the process returns to step S103, and thereafter, the same processing is performed, whereby the remaining data is recorded in the physically continuous recording area of the
[0230]
On the other hand, if it is determined in step S112 that there is no data to be written on the
[0231]
If it is determined in step S114 that the defect flag rep is not 1, that is, if no defect is found when recording data on the
[0232]
When it is determined in step S114 that the defect flag rep is 1, that is, when data is recorded on the
[0233]
In step S116, for example, as in step S93 in FIG. 21, the continuous free area list creation processing described in FIG. 14 is performed, whereby the continuous free area list is updated, and the write control processing ends. .
[0234]
Next, the rewriting process performed in step S115 in FIG. 23 will be described with reference to the flowchart in FIG.
[0235]
The data stored in the spare area of the data storage unit 49 and having a length equal to or longer than the minimum segment length L as the target segment data is hereinafter referred to as segment data as appropriate.
[0236]
In the rewriting process, first, in step S121, the data setting unit 47 extracts (reads) the first segment data stored in the spare area of the data storage unit 49, sets it as target segment data, and records it. It is supplied to the
[0237]
Thereafter, the process proceeds to step S122, where the continuous free
[0238]
In step S123, the
[0239]
In step S125, the
[0240]
Then, the process returns to step S123, and thereafter, the same processing as in the above-described case is performed. In this case, in the
[0241]
As described above, when there is a defect in the continuous free area, a process of detecting a new continuous free area at an arbitrary position on the
[0242]
On the other hand, when it is determined in step S125 that the defect report message has not been transmitted from the
[0243]
That is, in step S127, the continuous free area in which the target segment data transmitted in step S124 is recorded is deleted from the continuous free area list.
[0244]
Thereafter, the process proceeds to step S128, where the data setting unit 47 determines whether or not segment data that has not been written on the
[0245]
Then, the process returns to step S122, and thereafter, the same processing is performed. As a result, the remaining segment data is recorded in the physically continuous recording area of the
[0246]
On the other hand, if it is determined in step S128 that no segment data that has not been written on the
[0247]
According to the write control process of FIG. 23, data is recorded, for example, as shown in FIG.
[0248]
That is, FIG. 25 shows a state in which data Segment1, Segment2, and Segment3 having the minimum segment length L or more are recorded on the
[0249]
In FIG. 25, first, the data Segment1 is recorded in the continuous free area of the
[0250]
Thereafter, a continuous free area of the same size as the
[0251]
As described above, after the recording (trial) of the data Segment1, Segment2, and Segment3 is completed, the data Segment2 saved in the spare area is recorded in the continuous free area which is the reserved area.
[0252]
As described above, according to the write control process of FIG. 23, if there is a defect in the recording area (continuous free area) of the
[0253]
Further, in the write control process of FIG. 23, after all the data to be written to the
[0254]
In the write control process of FIG. 23 as well, the data is recorded immediately after the defective recording area, as in the case of FIG. 21, so that the seek from immediately before the defective recording area to immediately thereafter is performed. It is possible in a short time.
[0255]
Next, with reference to a flowchart of FIG. 26, a description will be given of a write control process using the reassignment process performed by the allocation manager of FIG. 8 by using the reassignment process.
[0256]
As described with reference to FIG. 18, when writing data to the
[0257]
Then, in step S141, the
[0258]
In step S142, the data setting unit 47 extracts, from the beginning of the data supplied thereto, data having a size equal to or greater than the minimum segment length L and an integral multiple of the ECC block as in step S82 of FIG. Then, the data is set as attention segment data which is data to be continuously written on the
[0259]
Thereafter, the process proceeds to step S143, where the continuous free
[0260]
In step S144, the
[0261]
In step S146, the
[0262]
In this case, in step S143, the continuous free
[0263]
If there is a defect in the
[0264]
Further, in the continuous free area list, the continuous free area described therein is divided into a continuous free area for normal recording and a continuous recording area for relocation when a defect is found, and In the case of (1), the continuous free area for writing the segment data of interest is detected from the continuous free area for normal recording, and if the
[0265]
After a new continuous free area is detected in step S143, the process proceeds to step S144, and the
[0266]
On the other hand, when it is determined in step S146 that the defect report message has not been transmitted from the
[0267]
In step S149, the data setting unit 47 determines whether data to be written to the
[0268]
Then, the process returns to step S143, and thereafter, the same processing is performed, whereby the remaining data is recorded in the physically continuous recording area of the
[0269]
On the other hand, if it is determined in step S149 that there is no data to be written on the
[0270]
If it is determined in step S151 that the defect flag rep is not 1, that is, if no defect is found when recording data on the
[0271]
If it is determined in step S151 that the defect flag rep is 1, that is, if a defect is found when recording data on the
[0272]
According to the write control process of FIG. 26, data is recorded, for example, as shown in FIG.
[0273]
That is, FIG. 27 shows a state in which data Segment1, Segment2, and Segment3 having the minimum segment length L or more are recorded on the
[0274]
In FIG. 27, first, the data Segment1 is recorded in the continuous free area of the
[0275]
As described above, according to the write control process of FIG. 26, if there is a defect in the recording area (continuous free area) of the
[0276]
In the write control process of FIG. 26, the seek time can be shortened when a new continuous free area detected when a defect is found is closer to the position of the defect.
[0277]
Next, another embodiment of the write control process using the reassignment process performed by the allocation manager in FIG. 8 using the reassignment process will be described with reference to the flowchart in FIG.
[0278]
In the embodiment of FIG. 26, when a defect of the
[0279]
That is, as described with reference to FIG. 18, when writing data to the
[0280]
Then, in step S161, the
[0281]
In step S162, the data setting unit 47 extracts, from the beginning of the data supplied thereto, data having a size equal to or greater than the minimum segment length L and an integral multiple of the ECC block, as in step S142 of FIG. Then, the data is set as attention segment data which is data to be continuously written on the
[0282]
Then, proceeding to step S163, the continuous free
[0283]
In step S164, the
[0284]
In step S166, the
[0285]
In step S168, the
[0286]
On the other hand, when it is determined in step S166 that the defect report message has not been transmitted from the
[0287]
In step S170, the data setting unit 47 determines whether data to be written to the
[0288]
Then, the process returns to step S163, and thereafter, the same processing is performed. As a result, the remaining data is recorded in the physically continuous recording area of the
[0289]
On the other hand, if it is determined in step S170 that there is no data to be written on the
[0290]
If it is determined in step S172 that the segment data that has not been written to the
[0291]
Then, the process returns to step S163, and the continuous free area list stored in the continuous free area list storage unit 45 is stored in the continuous free area list storage unit 45 in the same manner as in step S143 of FIG. 26 performed when a defect is found. , An arbitrary continuous free area having a size equal to or larger than the segment data of interest and having no defect notified by the defect report message is detected, and supplied to the data setting unit 47 and the
[0292]
On the other hand, if it is determined in step S172 that segment data not written on the
[0293]
If it is determined in step S174 that the defect flag rep is not 1, that is, if no defect is found when recording data on the
[0294]
If it is determined in step S174 that the defect flag rep is 1, that is, if a defect is found when recording data on the
[0295]
According to the write control process of FIG. 28, data is recorded, for example, as shown in FIG.
[0296]
That is, FIG. 29 shows a state in which the data Segment1, Segment2, and Segment3 having the minimum segment length L or more are recorded on the
[0297]
In FIG. 29, first, the data Segment1 is recorded in the continuous free area of the
[0298]
After that, the next data Segment3 is recorded in the continuous empty area immediately after the defect, and the data saved in the spare area after the recording (trial) of the data Segment1, Segment2, and Segment3 is completed as described above. Segment2 is recorded in a newly detected continuous free area having no defect.
[0299]
As described above, according to the write control process of FIG. 28, if there is a defect in the recording area (continuous free area) of the
[0300]
Further, in the write control process of FIG. 28, after the writing of all the data to be written to the
[0301]
For example, in the write control process using the slip process described with reference to FIGS. 21 and 22, as shown in FIG. 22, when the data Segment1 is recorded, when the next data Segment2 is recorded, a defect is found. Data Segment2 is slipped and written in the continuous empty area immediately after the data area. In this case, the recording area immediately after the recording area where the data Segment1 is recorded to the position of the defect is discarded and used for data recording. May not be done.
[0302]
Therefore, when a defect is found during the recording of the data Segment2, the entire data Segment2 is not slipped. For example, as shown in FIG. The portion written in ECC block units can be made valid as it is, and only the remaining portion can be slipped to the continuous free space immediately after the defect.
[0303]
That is, in FIG. 30, first, the
[0304]
In this case, the recording area of the
[0305]
In the case described above, a recording control process of always recording data having a length equal to or greater than the minimum segment length L in a physically continuous recording area on the
[0306]
That is, for data that requires real-time reproduction, recording control that guarantees real-time reproduction as described above is performed, and for data that does not require real-time reproduction, for example, the same recording control as in the related art is performed. Is possible.
[0307]
Specifically, for data that is not required to be reproduced in real time, for example, recording is performed on the
[0308]
In addition, the
[0309]
As described above, the present invention has been described for the case where data is recorded on the
[0310]
In the present embodiment, one physical sector (logical sector) corresponds to one ECC block for simplicity of description. However, the present invention provides that an ECC block is composed of a plurality of physical sectors. Further, the present invention is applicable to a case where reading and writing in the
[0311]
【The invention's effect】
As described above, according to the present invention, high bit rate data can be reproduced in real time.
[Brief description of the drawings]
FIG. 1 is a diagram illustrating a slip process.
FIG. 2 is a diagram showing a defect list used in a slip process.
FIG. 3 is a diagram illustrating a reassignment process.
FIG. 4 is a diagram showing a defect list used in a reassignment process.
FIG. 5 is a block diagram illustrating a configuration example of an embodiment of a recording / reproducing system to which the present invention has been applied.
FIG. 6 is a block diagram illustrating a hardware configuration example of a
FIG. 7 is a block diagram illustrating a hardware configuration example of a
FIG. 8 is a block diagram illustrating a functional configuration example of an allocation manager.
FIG. 9 is a flowchart illustrating processing of a
FIG. 10 is a flowchart illustrating a continuous free area list creation process using a slip process.
FIG. 11 is a diagram showing a defect list used in a continuous free area list creation process using a slip process.
FIG. 12 is a diagram showing a continuous free area list immediately after the free area list is copied.
FIG. 13 is a diagram showing a continuous free area list created in a continuous free area list creation process using a slip process.
FIG. 14 is a flowchart illustrating a continuous free area list creation process using a reassignment process.
FIG. 15 is a diagram showing a defect list used in a continuous free area list creation process using a reassignment process.
FIG. 16 is a diagram showing a continuous free area list immediately after the free area list is copied.
FIG. 17 is a diagram illustrating a continuous free area list created in a continuous free area list creation process using a reassignment process.
FIG. 18 is a flowchart illustrating a first embodiment of a write control process performed by an allocation manager.
FIG. 19 is a diagram showing a reproduction data amount and a read data amount.
FIG. 20 is a flowchart illustrating a second embodiment of the write control process performed by the allocation manager.
FIG. 21 is a flowchart illustrating a third embodiment of the write control process performed by the allocation manager.
FIG. 22 is a diagram illustrating a third embodiment of the write control process by the allocation manager.
FIG. 23 is a flowchart illustrating a fourth embodiment of the write control process performed by the allocation manager.
FIG. 24 is a flowchart illustrating a rewriting process performed by the allocation manager.
FIG. 25 is a diagram for explaining a fourth embodiment of the write control process by the allocation manager.
FIG. 26 is a flowchart illustrating a write control process performed by an allocation manager according to a fifth embodiment;
FIG. 27 is a diagram illustrating a fifth embodiment of the write control process by the allocation manager.
FIG. 28 is a flowchart illustrating a sixth embodiment of the write control process performed by the allocation manager.
FIG. 29 is a diagram illustrating a sixth embodiment of the write control process by the allocation manager.
FIG. 30 is a diagram illustrating a data writing method for improving recording efficiency.
[Explanation of symbols]
1 computer, 2 drive, 3 optical disk, 4 signal input / output device, 11 CPU, 12 ROM, 13 memory controller, 14 RAM, 15 HD, 16 input section, 17 output section, 18 communication I / F, 19 I / F controller , 20 data conversion section, 31 spindle motor, 32 servo control section, 33 pickup section, 34 RF amplifier, 35 signal processing section, 36 memory controller, 37 memory, 38 I / F controller, 39 control section, 41 list acquisition section, 42 free area list storage section, 43 defect list storage section, 44 continuous free area list creation section, 45 continuous free area list storage section, 46 continuous free area detection section, 47 data setting section, 48 recording control section, 49 data storage section
Claims (17)
ECC(Error Checking and Correction)を行う単位よりも大きい単位のデータを、前記記録媒体に記録する注目データとして設定する設定手段と、
前記注目データを、前記記録媒体の物理的に連続した空き領域である連続空き領域に記録させる記録制御手段と
を備えることを特徴とする記録制御装置。In a recording control device that performs control for recording data on a recording medium,
Setting means for setting data of a unit larger than a unit for performing ECC (Error Checking and Correction) as attention data to be recorded on the recording medium;
A recording control unit that records the target data in a continuous free area that is a physically continuous free area of the recording medium.
ことを特徴とする請求項1に記載の記録制御装置。2. The recording control apparatus according to claim 1, wherein, when there is a defective area in the continuous free area, the recording control means records the data of interest in a continuous free area immediately after the defective area. .
ことを特徴とする請求項2に記載の記録制御装置。3. The recording control unit according to claim 2, wherein when there is a defective area in the continuous empty area, the target data is immediately recorded in a continuous empty area immediately after the defective area. Recording control device.
前記連続空き領域に欠陥領域があったとき、その欠陥領域の直後にある、前記注目データ分の連続空き領域を確保するとともに、前記注目データを記憶しておき、
前記記録媒体に記録すべきデータの記録の終了後に、確保しておいた連続空き領域に、記憶しておいた注目データを記録させる
ことを特徴とする請求項2に記載の記録制御装置。The recording control means,
When there is a defective area in the continuous free area, a continuous free area immediately after the defective area is secured for the noted data, and the noted data is stored.
3. The recording control device according to claim 2, wherein after the recording of the data to be recorded on the recording medium is completed, the stored data of interest is recorded in the reserved continuous free area.
ことを特徴とする請求項1に記載の記録制御装置。2. The recording control according to claim 1, wherein when there is a defective area in the continuous free area, the recording control means records the data of interest in another arbitrary continuous free area of the recording medium. apparatus.
ことを特徴とする請求項5に記載の記録制御装置。6. The recording control unit according to claim 5, wherein when there is a defective area in the continuous free area, the data of interest is immediately recorded in another arbitrary continuous free area of the recording medium. Recording control device.
前記連続空き領域に欠陥領域があったとき、前記記録媒体の、他の任意の、前記注目データ分の連続空き領域を確保するとともに、前記注目データを記憶しておき、
前記記録媒体に記録すべきデータの記録の終了後に、確保しておいた連続空き領域に、記憶しておいた注目データを記録させる
ことを特徴とする請求項5に記載の記録制御装置。The recording control means,
When there is a defective area in the continuous free area, while securing a continuous free area for the other arbitrary data of the noted data of the recording medium, and storing the noted data,
6. The recording control apparatus according to claim 5, wherein after the recording of the data to be recorded on the recording medium is completed, the stored attention data is recorded in the reserved continuous free area.
ことを特徴とする請求項1に記載の記録制御装置。2. The recording control device according to claim 1, further comprising a continuous free area detection unit that detects the continuous free area.
ことを特徴とする請求項8に記載の記録制御装置。9. The recording control apparatus according to claim 8, wherein the continuous free area detection means detects a continuous free area based on a continuous free area list in which the continuous free areas on the recording medium are described.
ことを特徴とする請求項9に記載の記録制御装置。10. The recording control apparatus according to claim 9, further comprising a continuous free area list creating means for creating the continuous free area list.
ことを特徴とする請求項10に記載の記録制御装置。The continuous free area list creating means creates the continuous free area list based on a free area list describing free areas on the recording medium and a defect list describing defective areas on the recording medium. The recording control device according to claim 10, wherein:
ことを特徴とする請求項11に記載の記録制御装置。12. The recording control device according to claim 11, wherein the continuous empty area list creating unit acquires the empty area list and the defect list from a recording device that records data on the recording medium.
前記ディフェクトリストには、前記欠陥領域の物理的な位置が記述され、
前記空き領域リストには、前記空き領域の論理的な位置が記述されている場合において、
前記連続空き領域リスト作成手段は、
前記ディフェクトリストから、前記欠陥領域の直前の正常な記録領域の論理的な位置を、前記連続空き領域の終点位置として求め、
前記空き領域リストにおいて、連続している論理的な位置を、その先頭から前記終点位置までと、その残りとに分割し、それぞれを、前記連続空き領域とする
ことを特徴とする請求項12に記載の記録制御装置。For the recording device, by specifying a logical position on the recording medium, data is recorded at a physical position of the recording medium assigned to the logical position,
The defect list describes a physical position of the defect area,
In the case where the free area list describes the logical position of the free area,
The continuous free area list creating means,
From the defect list, a logical position of a normal recording area immediately before the defective area is determined as an end point position of the continuous free area,
13. The method according to claim 12, wherein in the free space list, a continuous logical position is divided into a part from the head to the end point and the rest thereof, each of which is the continuous free area. The recording control device according to the above.
前記ディフェクトリストには、前記欠陥領域の物理的な位置と、その欠陥領域の代替領域の物理的な位置とが対応付けられて記述され、
前記空き領域リストには、前記空き領域の論理的な位置が記述されている場合において、
前記連続空き領域リスト作成手段は、
前記ディフェクトリストから、前記欠陥領域の論理的な位置を、前記連続空き領域の区分位置として求め、
前記空き領域リストにおいて、連続している論理的な位置を、その先頭から前記区分位置の直前の位置までと、前記区分位置の直後の位置から最後までとに分割し、それぞれを、前記連続空き領域とする
ことを特徴とする請求項12に記載の記録制御装置。For the recording device, by specifying a logical position on the recording medium, data is recorded at a physical position of the recording medium assigned to the logical position,
In the defect list, a physical position of the defective area and a physical position of an alternative area of the defective area are described in association with each other,
In the case where the free area list describes the logical position of the free area,
The continuous free area list creating means,
From the defect list, a logical position of the defective area is determined as a division position of the continuous free area,
In the free space list, a continuous logical position is divided into a portion from the beginning to a position immediately before the partition position and a portion from the position immediately after the partition position to the end, and each is divided into the continuous free space. 13. The recording control device according to claim 12, wherein the recording control device is an area.
ことを特徴とする請求項1に記載の記録制御装置。The recording control device according to claim 1, wherein the recording medium is a disk-shaped recording medium.
ECC(Error Checking and Correction)を行う単位よりも大きい単位のデータを、前記記録媒体に記録する注目データとして設定する設定ステップと、
前記注目データを、前記記録媒体の物理的に連続した空き領域である連続空き領域に記録させる記録制御ステップと
を備えることを特徴とする記録制御方法。In a recording control method for performing control of recording data on a recording medium,
A setting step of setting data of a unit larger than a unit for performing ECC (Error Checking and Correction) as attention data to be recorded on the recording medium;
A recording control step of recording the data of interest in a continuous free area that is a physically continuous free area of the recording medium.
ECC(Error Checking and Correction)を行う単位よりも大きい単位のデータを、前記記録媒体に記録する注目データとして設定する設定ステップと、
前記注目データを、前記記録媒体の物理的に連続した空き領域である連続空き領域に記録させる記録制御ステップと
を備えることを特徴とするプログラム。In a program for causing a computer to perform recording control for performing control for recording data on a recording medium,
A setting step of setting data of a unit larger than a unit for performing ECC (Error Checking and Correction) as attention data to be recorded on the recording medium;
A recording control step of recording the target data in a continuous free area that is a physically continuous free area of the recording medium.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002292870A JP2004127458A (en) | 2002-10-04 | 2002-10-04 | Recording controller and recording control method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002292870A JP2004127458A (en) | 2002-10-04 | 2002-10-04 | Recording controller and recording control method, and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2004127458A true JP2004127458A (en) | 2004-04-22 |
Family
ID=32283994
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2002292870A Pending JP2004127458A (en) | 2002-10-04 | 2002-10-04 | Recording controller and recording control method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2004127458A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006031754A (en) * | 2004-07-12 | 2006-02-02 | Sony Corp | Recording and reproducing control method, and recording and reproducing control device |
-
2002
- 2002-10-04 JP JP2002292870A patent/JP2004127458A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006031754A (en) * | 2004-07-12 | 2006-02-02 | Sony Corp | Recording and reproducing control method, and recording and reproducing control device |
JP4496869B2 (en) * | 2004-07-12 | 2010-07-07 | ソニー株式会社 | Recording / reproducing control method and recording / reproducing control apparatus |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4855106B2 (en) | Method for recording data on optical recording medium or reproducing data from optical recording medium, and optical recording medium | |
US8274868B2 (en) | Optical recording medium, recording/reproducing apparatus and method, initialization method, and reinitialization method | |
JP4744569B2 (en) | Recording method and reproducing method suitable for recording / reproducing AV data, recording drive and reproducing drive thereof, information recording system, information reproducing system, and information recording medium | |
JP2008135182A (en) | Optical recording information storage medium, recording/reproducing method, and recording/reproducing device | |
JP2009187665A (en) | Optical recording and reproducing unit | |
JP2003223763A (en) | Device, unit, and method for information recording and reproducing, program and recording medium | |
JP2008135178A (en) | Recording/reproducing method | |
JP2000040310A (en) | Device and method for managing defect area of optical recording medium | |
US20070189143A1 (en) | Defect management information setting method, recording method, defect management method, program and recording medium, and information recording apparatus | |
US7697387B2 (en) | Information recording medium, and information recording apparatus and method | |
JP2004127459A (en) | Recording control device and recording control method, and program | |
JP4768573B2 (en) | Information recording medium, recording / reproducing apparatus, and recording / reproducing method capable of effectively performing recording prevention function | |
JP2004127458A (en) | Recording controller and recording control method, and program | |
JP2007511033A (en) | Information recording medium, recording / reproducing method, and recording / reproducing apparatus | |
JP2005327405A (en) | Recording method, information recording device, information reproducing device, program, and recording medium | |
JP2007513454A (en) | Recording apparatus, recording method, and information recording medium | |
JPWO2005004151A1 (en) | Information recording medium, recording apparatus and recording method for information recording medium, reproducing apparatus and reproducing method for information recording medium, computer program for recording or reproduction control, and data structure including control signal | |
JP4398468B2 (en) | Recording apparatus and method, and computer program | |
WO2005020238A1 (en) | Information recorder/reproducer, information recording/reproducing method and program | |
WO2006006491A1 (en) | Recording device | |
JP4073458B2 (en) | Information recording medium, information recording apparatus and method | |
JP2004030742A (en) | Optical disk storage medium storing data about firmware, optical disk information recording and reproducing device, and storage medium storing firmware updating program | |
JP2005302143A (en) | Initialization method, reproducing method, program and recording medium, data structure, information recording device, and information reproducing device | |
KR20050090289A (en) | Data writing control method for recording optical disc | |
JP2006302500A (en) | Information recording medium, information recording device and method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20050929 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20071115 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20071120 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20080121 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20080214 |