JP4798003B2 - Recording apparatus, recording method, program, and optical disk recording apparatus - Google Patents

Recording apparatus, recording method, program, and optical disk recording apparatus Download PDF

Info

Publication number
JP4798003B2
JP4798003B2 JP2007011114A JP2007011114A JP4798003B2 JP 4798003 B2 JP4798003 B2 JP 4798003B2 JP 2007011114 A JP2007011114 A JP 2007011114A JP 2007011114 A JP2007011114 A JP 2007011114A JP 4798003 B2 JP4798003 B2 JP 4798003B2
Authority
JP
Japan
Prior art keywords
data
size
writing
recording
recording medium
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2007011114A
Other languages
Japanese (ja)
Other versions
JP2008176889A (en
Inventor
貴裕 荒木
孝志 永友
則夫 田中
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sony Corp
Original Assignee
Sony Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sony Corp filed Critical Sony Corp
Priority to JP2007011114A priority Critical patent/JP4798003B2/en
Publication of JP2008176889A publication Critical patent/JP2008176889A/en
Application granted granted Critical
Publication of JP4798003B2 publication Critical patent/JP4798003B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

この発明は、記録装置、記録方法、プログラムおよび光ディスク記録装置に関する。詳しくは、この発明は、ホストコンピュータから送られてくる書き込み要求のあったデータのサイズが記録メディアの記録単位サイズより小さいとき、記録メディアからリードモデファイライト処理に必要な記録単位ブロックの読み出し処理を行った後にホストコンピュータに対して成功または同期エラーの通知を行うことにより、記録単位ブロックの読み出しができなかった場合であってもデータの書き込みを良好に行い得るようにした記録装置等に係るものである。   The present invention relates to a recording apparatus, a recording method, a program, and an optical disk recording apparatus. Specifically, the present invention performs the read processing of the recording unit block necessary for the read modify write process from the recording medium when the size of the data requested to be sent from the host computer is smaller than the recording unit size of the recording medium. Related to a recording apparatus or the like that can perform data writing satisfactorily even when the recording unit block cannot be read by notifying the host computer of success or synchronization error after It is.

光ディスクドライブは、装着された記録メディアとしての光ディスクの全てのアクセス可能記録領域に対して、この光ディスクの規格で定められたある単位サイズ毎にアドレスを割り当て、接続先のホストPC(Personal Computer)に対してその領域へのアクセスサービスを提供する。ここで、このアドレスを割り当てられた単位の領域を「アクセス単位ブロック」、そのサイズを「アクセス単位サイズ」とする。   The optical disk drive assigns an address to every accessible recording area of the optical disk as a loaded recording medium for each unit size defined by the standard of the optical disk, and sends it to a connected host PC (Personal Computer) Provide access services to that area. Here, the area of the unit to which this address is assigned is referred to as “access unit block”, and its size is referred to as “access unit size”.

ところで、このアクセス単位サイズは、必ずしも光ディスクに記録される単位サイズと等しくない。ここで、光ディスクに記録される単位の領域を「記録単位ブロック」、そのサイズを「記録単位サイズ」とする。記録単位サイズは、光ディスク上の傷などによるエラー訂正と記録容量などを考慮したもので、例えば、64Kバイトなどのサイズを持つ。これに対して、アクセス単位サイズは、主にホストPC側から要求されるキャッシュページサイズ(例えば、4Kバイト)以下のアクセスに対応するため、例えば、2Kバイトなど、記録単位サイズより小さくなる。   By the way, this access unit size is not necessarily equal to the unit size recorded on the optical disc. Here, the unit area recorded on the optical disc is referred to as “recording unit block”, and the size thereof is referred to as “recording unit size”. The recording unit size takes into account error correction due to scratches on the optical disk and the recording capacity, and has a size of 64 Kbytes, for example. On the other hand, the access unit size is smaller than the recording unit size, such as 2 Kbytes, in order to cope with accesses smaller than the cache page size (for example, 4 Kbytes) requested mainly from the host PC side.

このため、ホストPCから光ディスクドライブへ記録単位サイズ未満の書込み要求が発行される可能性がある。その場合、光ディスクドライブは、その書き込み要求による書込み処理で変更されるべきでないデータを変更しないように、一度記録単位ブロックをメモリ上に読み出し、当該記録単位ブロックに書込み要求のあったデータを部分的に上書きし、当該上書きされた記録単位ブロックを、再度、記録単位サイズで光ディスクへ書き戻すリードモデファイライト(Read Modify Write)処理を行う必要がある。例えば、特許文献1には、リードモデファイライト処理の一例が記載されている。   For this reason, a write request smaller than the recording unit size may be issued from the host PC to the optical disk drive. In that case, the optical disk drive once reads the recording unit block into the memory so as not to change the data that should not be changed in the writing process by the writing request, and partially writes the data requested to be written to the recording unit block. It is necessary to perform a read modify write process in which the overwritten recording unit block is written back to the optical disc in the recording unit size again. For example, Patent Document 1 describes an example of a read modify write process.

ここで、光ディスク上に、光ディスクドライブではリカバー不可能な傷が生じてしまった場合を考える。この傷が生じてしまった欠陥領域に、記録単位サイズで書き込みを行うと、光ディスクドライブは、光ディスク上の別の位置にある交替領域に、当該記録単位サイズで交替処理を行う。しかし、上述のリードモデファイライト処理が必要な記録単位サイズ未満の書きこみ要求に対しては、問題が生じる。   Here, let us consider a case where a scratch that cannot be recovered by the optical disc drive has occurred on the optical disc. When writing is performed in the recording unit size in the defective area where the scratch has occurred, the optical disk drive performs replacement processing in the replacement area at another position on the optical disk with the recording unit size. However, a problem arises with respect to a write request that is smaller than the recording unit size that requires the above-described read-modify-write processing.

何故なら、光ディスクドライブの書き込み処理の過程で、傷により変更されるべきでない下地となるデータをメモリ上に読み出すことができないため、記録単位サイズでの交替処理を行うことができない。ここで、記録単位サイズ未満での部分的交替処理を可能とする光ディスク規格であれば問題を生じない。しかし、この発明は、記録単位サイズでの交替しかサポートしていない規格に対する発明である。   This is because, in the course of the writing process of the optical disk drive, the underlying data that should not be changed due to scratches cannot be read out on the memory, so that the replacement process with the recording unit size cannot be performed. Here, there is no problem as long as the optical disc standard enables partial replacement processing with a recording unit size smaller than that. However, the present invention is an invention for a standard that only supports replacement in the recording unit size.

一方、光ディスクドライブは、例えば、ATA、SCSI、USBバスに接続されたストレージデバイスである。この光ディスクドライブでは、ホストPCから見たストレージデバイスの書き込み速度を高速化するため、ライトバックキャッシュング(Write-back caching)という方法が頻繁に用いられる。   On the other hand, the optical disk drive is a storage device connected to, for example, an ATA, SCSI, or USB bus. In this optical disc drive, a method called write-back caching is frequently used in order to increase the writing speed of the storage device as seen from the host PC.

ライトバックキャッシュングは、ホストPCから書きこみ要求のあったデータを、光ディスクドライブがメモリ(キャッシュメモリ)上に取り込んだ時点で、実際には光ディスクに対する書き込み処理が行われていないにも拘わらず、コマンド成功完了としてホストPCに通知し、見た目上書き込みを高速に完了させる方法である。このライトバックキャッシュングを用いることで、ホストPC側では、書き込みプロセスが早く解放されるなど、処理の高速化を期待できる。例えば、特許文献2には、ライトバックキャッシュング処理の一例が記載されている。
特開平9−22375号公報 特開2002−15499号公報
Write-back caching is a process in which data requested to be written by the host PC is taken into the memory (cache memory) by the optical disk drive, although the optical disk is not actually written. This is a method of notifying the host PC that the command has been completed successfully and completing the apparent writing at high speed. By using this write-back caching, the host PC can be expected to increase the processing speed, such as the writing process being released quickly. For example, Patent Document 2 describes an example of write-back caching processing.
Japanese Patent Laid-Open No. 9-22375 JP 2002-15499 A

光ディスクドライブ側は、キャッシュメモリが許す限りライトバックキャッシュングを行うことができる。しかし、光ディスクに対する書き込み処理はコマンド成功完了の通知に対して遅れて実行されるため、上述したように、リカバー不可能な傷が生じている記録単位ブロックに対して記録単位サイズ未満の書き込み要求が生じた場合には、交替処理を行うことができないことから、通常、遅延エラーとして、次の(別の)命令に対してホストPCに報告される。一方、記録単位サイズ、あるいはその整数倍の書き込み要求は、光ディスクドライブ側が交替処理を行って「成功」させることができるので、遅延エラーとなる可能性は低い。   The optical disk drive side can perform write back caching as long as the cache memory permits. However, since the writing process to the optical disk is delayed with respect to the notification of the command completion completion, as described above, a write request smaller than the recording unit size is issued to the recording unit block in which a scratch that cannot be recovered occurs. When this occurs, since the replacement process cannot be performed, a delay error is usually reported to the host PC for the next (another) instruction. On the other hand, a write request of the recording unit size or an integral multiple of the recording unit size can be made “successful” by performing an alternate process on the optical disc drive side, and therefore is unlikely to cause a delay error.

このように、リカバー不可能な傷が生じている記録単位ブロックに対して記録単位サイズ未満の書き込み要求が生じた場合、当該書き込み要求は失敗してしまう。ここで、問題となるのは、リカバー不可能な傷が生じている記録単位ブロックへの記録単位サイズ未満の書き込み要求に対しても、一度コマンド成功完了の通知が返されているため、ホストPC側でその書き込み要求の元データをキャッシュメモリから既に解放してしまっている可能性が生じることである。   Thus, when a write request smaller than the recording unit size is generated for a recording unit block in which a scratch that cannot be recovered occurs, the writing request fails. Here, the problem is that the host PC is notified of the successful completion of the command once even for a write request smaller than the recording unit size to the recording unit block in which an unrecoverable scratch has occurred. There is a possibility that the original data of the write request has already been released from the cache memory.

書き込み要求の元データがキャッシュメモリから解放されている場合、ホストPC側は再度別の領域に書き込みを行うことができず、結局、当該データの書き込み自体が失敗してしまう。   When the original data of the write request is released from the cache memory, the host PC side cannot write to another area again, and eventually the data writing itself fails.

この発明の目的は、記録単位ブロックの読み出しができなかった場合であってもデータの書き込みを良好に行い得るようにする、ことにある。   An object of the present invention is to enable good data writing even when a recording unit block cannot be read.

この発明の概念は、
ホストコンピュータから送られてくる書き込み要求のあったデータを、該書き込み要求のあったデータのサイズが記録メディアの記録単位サイズの整数倍であるときには、記録単位サイズ毎に記録単位ブロックとして上記記録メディアに書き込み、該書き込み要求のあったデータのサイズが上記記録メディアの記録単位サイズより小さいときには、リードモデファイライト処理により上記記録メディアに書き込む記録装置であって、
上記ホストコンピュータから送られてくる書き込み要求のあったデータをメモリに取り込むデータ取り込み手段と、
上記メモリに取り込まれたデータを上記記録メディアに書き込むデータ書き込み手段と、
上記メモリに取り込まれたデータのサイズを判別するデータサイズ判別手段と、
上記ホストコンピュータに対して、上記データ書き込み手段が上記メモリに取り込まれたデータを上記記録メディアに書き込む前に書き込み成功を通知する通知手段とを備え、
上記通知手段は、
上記データサイズ判別手段で上記メモリに取り込まれたデータのサイズが上記記録メディアの記録単位サイズの整数倍であると判別されるときは、上記ホストコンピュータに対して上記書き込み成功を通知し、
上記データサイズ判別手段で上記メモリに取り込まれたデータのサイズが上記記録メディアの記録単位サイズより小さいと判別されるとき、上記データ書き込み手段が上記記録メディアから上記リードモデファイライト処理に必要な記録単位ブロックの読み出しに成功したとき、上記ホストコンピュータに対して上記書き込み成功を通知す
録装置にある。
The concept of this invention is
When the size of the data requested to be written is an integer multiple of the recording unit size of the recording medium, the recording medium is recorded as a recording unit block for each recording unit size. When the size of the data requested to be written is smaller than the recording unit size of the recording medium, the recording device writes the recording medium by a read modify write process ,
Data fetching means for fetching into the memory the data requested for writing sent from the host computer;
Data writing means for writing the data captured in the memory to the recording medium;
Data size determining means for determining the size of data captured in the memory;
Notification means for notifying the host computer of successful writing before the data writing means writes the data fetched into the memory to the recording medium;
The notification means is
When it is determined that the size of the data fetched into the memory by the data size determination means is an integral multiple of the recording unit size of the recording medium, the host computer is notified of the writing success,
When the size of the data taken into the memory by the data size judging means is determined to be recorded unit size smaller than the recording media, recording required from the data writing means the recording medium in the read modify write process upon successful reading of the unit block, it notifies the successful write to said host computer
In the records system.

この発明において、ホストコンピュータから送られてくる書き込み要求のあったデータはメモリに取り込まれる。そして、このメモリに取り込まれたデータが光ディスク等の記録メディアに書き込まれる。この場合、書き込み要求のあったデータのサイズが記録単位サイズより小さいときは、リードモデファイライト処理により、当該データが記録メディアに書き込まれる。   In the present invention, data for which a write request is sent from the host computer is taken into the memory. Then, the data captured in the memory is written on a recording medium such as an optical disk. In this case, when the size of the data requested to be written is smaller than the recording unit size, the data is written to the recording medium by the read modify write process.

メモリに取り込まれたデータのサイズが判別され、その判別結果に応じて、ホストコンピュータに対する成功または同期エラーの通知がなされる。すなわち、メモリに取り込まれたデータのサイズが記録メディアの記録単位サイズより小さいと判別されるときには、記録メディアからリードモデファイライト処理に必要な記録単位ブロックの読み出し処理が行われた後に、ホストコンピュータに対して成功または同期エラーの通知が行われる。   The size of the data fetched into the memory is determined, and the success or synchronization error is notified to the host computer according to the determination result. That is, when it is determined that the size of the data captured in the memory is smaller than the recording unit size of the recording medium, the recording unit block necessary for the read modify write process is read from the recording medium, and then the host computer A success or synchronization error is notified.

この場合、記録単位ブロックの読み出しができたときは、リードモデファイライト処理が可能であるので、ホストコンピュータに対して成功が通知される。一方、記録メディア上の傷などにより記録単位ブロックの読み出しができなかったときは、リードモデファイライト処理が不可能であるので、ホストコンピュータに対して同期エラーが通知される。このように、リードモデファイライト処理に必要な記録単位ブロックの読み出しができなかった場合には、ホストコンピュータに同期エラーが通知されるため、ホストコンピュータ側は再度別の領域に書き込みを行うことが可能となる。   In this case, when the recording unit block can be read, the read-modify-write process is possible, and the success is notified to the host computer. On the other hand, when the recording unit block cannot be read due to a scratch on the recording medium or the like, the read-modify-write process is impossible, and a synchronization error is notified to the host computer. As described above, if the recording unit block required for the read modify write process cannot be read, a synchronization error is notified to the host computer, so the host computer can write to another area again. It becomes.

なお、この場合、ライトバックキャッシング処理とは異なる処理を行うので、ホストコンピュータ側では、書き込みプロセスが早く解放されるというメリットは得られなくなる。しかし、オペレーションシステム(OS)は、なるべく記録単位サイズで書き込みを行おうとするため、ホストコンピュータから送られてくる書き込み要求のあったデータのサイズが記録単位サイズより小さくなる頻度はそれ程多くはない。   In this case, since processing different from the write-back caching processing is performed, the host computer cannot obtain the advantage that the writing process is released quickly. However, since the operation system (OS) tries to write in the recording unit size as much as possible, the frequency of the data requested for writing sent from the host computer is less often than the recording unit size.

また、この発明において、例えば、メモリに取り込まれたデータのサイズが記録メディアの記録単位サイズの整数倍であると判別されるとき、直ちに、ホストコンピュータに対して成功の通知を行うようにされる。この場合、ライトバックキャッシング処理が行われるので、ホストコンピュータ側では、書き込みプロセスが早く解放されるというメリットがある。   Further, in the present invention, for example, when it is determined that the size of the data taken into the memory is an integral multiple of the recording unit size of the recording medium, a success notification is immediately sent to the host computer. . In this case, since write back caching is performed, there is an advantage that the writing process is released quickly on the host computer side.

この発明によれば、ホストコンピュータから送られてくる書き込み要求のあったデータのサイズが記録メディアの記録単位サイズより小さいとき、記録メディアからリードモデファイライト処理に必要な記録単位ブロックの読み出し処理を行った後にホストコンピュータに対して成功または同期エラーの通知を行うものであり、記録単位ブロックの読み出しができなかった場合であってもデータの書き込みを良好に行うことができる。   According to the present invention, when the size of the data requested to be sent from the host computer is smaller than the recording unit size of the recording medium, the recording unit block reading process necessary for the read modify write process is performed from the recording medium. After that, the host computer is notified of success or synchronization error, and even if the recording unit block cannot be read, data can be written satisfactorily.

以下、図面を参照して、この発明の実施の形態について説明する。図1は、実施の形態としての光ディスク記録装置100の構成例を示している。   Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 shows a configuration example of an optical disc recording apparatus 100 as an embodiment.

光ディスク記録装置100は、CPU(Central Processing Unit)101と、I/O(Input/Output)ブリッジ102と、メインメモリ103と、バスインタフェース(BUS I/F)104と、内部バス(例えば、ATAバス等)105と、光ディスクドライブ106と、ハードディスクドライブ(HDD)107とを有している。   An optical disc recording apparatus 100 includes a CPU (Central Processing Unit) 101, an I / O (Input / Output) bridge 102, a main memory 103, a bus interface (BUS I / F) 104, and an internal bus (for example, an ATA bus). Etc.) 105, an optical disk drive 106, and a hard disk drive (HDD) 107.

CPU101はホストコンピュータを構成している。CPU101およびメインメモリ103はI/Oブリッジ102に接続されている。そして、I/Oブリッジ102は、バスインタフェース104を介して、内部バス105に接続されている。また、光ディスクドライブ106およびハードディスクドライブ107は、それぞれ、内部バス105に接続されている。このような構成により、CPU101は、I/Oブリッジ102およびバスインタフェース104を利用して、内部バス105に接続された光ディスクドライブ106およびハードディスクドライブ107を制御可能とされている。   The CPU 101 constitutes a host computer. The CPU 101 and the main memory 103 are connected to the I / O bridge 102. The I / O bridge 102 is connected to the internal bus 105 via the bus interface 104. The optical disk drive 106 and the hard disk drive 107 are each connected to the internal bus 105. With such a configuration, the CPU 101 can control the optical disk drive 106 and the hard disk drive 107 connected to the internal bus 105 using the I / O bridge 102 and the bus interface 104.

光ディスクドライブ106には、記録メディアとしての光ディスク170が装着可能とされている。この光ディスクドライブ106は、コントローラ161と、バスインタフェース(BUS I/F)162と、内部バス163と、メディア入出力制御部164と、キャッシュメモリ165とを有している。   The optical disk drive 106 can be loaded with an optical disk 170 as a recording medium. The optical disk drive 106 includes a controller 161, a bus interface (BUS I / F) 162, an internal bus 163, a media input / output control unit 164, and a cache memory 165.

コントローラ161は、ドライブ全体の動作を制御する。このコントローラ161は、図示しないが、CPU、ROM(Read Only Memory)、RAM(Random Access Memory)等を備えた構成となっている。CPUは、ROMに格納されている制御プログラムを必要に応じて読み出し、読み出した制御プログラムをRAMに転送して展開し、当該展開された制御プログラムを読み出して実行することで、各部の動作を制御する。コントローラ161、メディア入出力制御部164およびキャッシュメモリ165は内部バス163に接続され、さらに、この内部バス163はバスインタフェース162を介して上述の内部バス105に接続されている。   The controller 161 controls the operation of the entire drive. Although not shown, the controller 161 includes a CPU, a ROM (Read Only Memory), a RAM (Random Access Memory), and the like. The CPU reads the control program stored in the ROM as necessary, transfers the read control program to the RAM, develops it, and reads and executes the developed control program, thereby controlling the operation of each unit. To do. The controller 161, media input / output control unit 164, and cache memory 165 are connected to the internal bus 163, and the internal bus 163 is connected to the internal bus 105 via the bus interface 162.

CPU101から書き込み命令およびデータ(書き込み要求のあったデータ)が送られてきた場合における光ディスクドライブ106の内部動作を説明する。すなわち、CPU101から内部バス105を介して送られてくる書き込み命令およびデータは、バスインタフェース162により受け取られ、一旦、キャッシュメモリ165に取り込まれる。その後に、キャッシュメモリ165に取り込まれたデータ(以下、「書き込みデータ」という)は、メディア入出力制御部164を利用して光ディスク170に書き込まれる。   An internal operation of the optical disc drive 106 when a write command and data (data requested to be written) is sent from the CPU 101 will be described. That is, a write command and data sent from the CPU 101 via the internal bus 105 are received by the bus interface 162 and are once taken into the cache memory 165. Thereafter, data (hereinafter referred to as “write data”) taken into the cache memory 165 is written to the optical disc 170 using the media input / output control unit 164.

光ディスクドライブ106では、キャッシュメモリ165に取り込まれた書き込みデータのサイズ(以下、「書き込みデータサイズ」という)が判別される。そして、書き込みデータサイズが記録単位サイズ(例えば、64Kバイト)より小さいとき(記録単位サイズ未満のとき)には、当該書き込みデータはリードモデファイライト処理により光ディスク170に書き込まれる。つまり、光ディスク170から一度記録単位ブロック(下地データ)をキャッシュメモリ165上に読み出し、当該記録単位ブロックに書込みデータを部分的に上書きし、当該上書きされた記録単位ブロックを、再度、記録単位サイズで光ディスク170へ書き戻す。一方、書き込みデータサイズが記録単位サイズ未満でないとき(記録単位サイズの整数倍であるとき)には、書き込みデータは、記録単位サイズ毎に記録単位ブロックとして、光ディスク170に書き込まれる。   In the optical disc drive 106, the size of the write data fetched into the cache memory 165 (hereinafter referred to as “write data size”) is determined. When the write data size is smaller than the recording unit size (for example, 64 Kbytes) (less than the recording unit size), the write data is written to the optical disc 170 by the read modify write process. That is, the recording unit block (background data) is once read from the optical disk 170 onto the cache memory 165, the write data is partially overwritten on the recording unit block, and the overwritten recording unit block is again recorded in the recording unit size. Write back to optical disc 170. On the other hand, when the write data size is not less than the recording unit size (when it is an integral multiple of the recording unit size), the write data is written to the optical disc 170 as a recording unit block for each recording unit size.

なお、光ディスクドライブ106は、記録単位サイズ未満での部分的交替処理はサポートしておらず、記録単位サイズでの交替しかサポートしていない。そのため、光ディスクドライブ106では、上述の書き込みデータサイズの判別結果に応じて、CPU101に対する成功または同期エラーの通知がなされる。   Note that the optical disc drive 106 does not support partial replacement processing with a recording unit size smaller than that, and only supports replacement with a recording unit size. Therefore, the optical disk drive 106 notifies the CPU 101 of success or a synchronization error in accordance with the determination result of the write data size.

書き込みデータサイズが記録単位サイズ未満であるときには、ライトバックキャッシュングとは異なる処理が行われる。つまり、光ディスク170からリードモデファイライト処理に必要な記録単位ブロック(下地データ)の読み出し処理が行われた後に、CPU101に対して成功または同期エラーの通知が行われる。この場合、記録単位ブロックの読み出しができたときは、リードモデファイライト処理が可能であるので、CPU101に対して成功が通知される。一方、光ディスク170上の傷などにより記録単位ブロックの読み出しができなかったときは、リードモデファイライト処理が不可能であるので、CPU101に対して同期エラーが通知される。   When the write data size is less than the recording unit size, processing different from write-back caching is performed. That is, after the recording unit block (background data) necessary for the read modify write process is read from the optical disc 170, the CPU 101 is notified of success or a synchronization error. In this case, when the recording unit block can be read, the read-modify-write process is possible, so the CPU 101 is notified of success. On the other hand, when the recording unit block cannot be read due to a scratch on the optical disk 170, the read-modify-write process is impossible, and therefore a synchronization error is notified to the CPU 101.

一方、書き込みデータサイズが記録単位サイズ未満でないとき(記録単位サイズの整数倍であるとき)には、ライトバックキャッシング処理が行われる。つまり、キャッシュメモリ165に書き込みデータが取り込まれると、直ちに、CPU101に対して成功の通知が行われる。   On the other hand, when the write data size is not less than the recording unit size (when it is an integral multiple of the recording unit size), a write back caching process is performed. That is, when the write data is fetched into the cache memory 165, the CPU 101 is immediately notified of success.

図2は、書き込みデータサイズが記録単位サイズ未満である場合における書き込み要求の処理モデルを示している。なお、このモデルでは、光ディスク170の記録単位サイズは64Kバイトであるとしている。   FIG. 2 shows a processing model of a write request when the write data size is less than the recording unit size. In this model, it is assumed that the recording unit size of the optical disc 170 is 64 Kbytes.

(1)まず、メインメモリ(ユーザメモリ)103からCPU101内の図示しないキャッシュメモリ(PCシステムキャッシュ)に書き込みデータを書き込む。この書き込みデータのサイズは4Kバイトである。   (1) First, write data is written from a main memory (user memory) 103 to a cache memory (PC system cache) (not shown) in the CPU 101. The size of this write data is 4K bytes.

(2)次に、CPU101から光ディスクドライブ106に、書き込み命令および書き込みデータを送る。光ディスクドライブ106は、この書き込み命令および書き込みデータを、キャッシュメモリ165に取り込む。   (2) Next, a write command and write data are sent from the CPU 101 to the optical disc drive 106. The optical disk drive 106 takes the write command and write data into the cache memory 165.

(3)次に、光ディスクドライブ106は、光ディスク170から、リードモデファイライト処理に必要な記録単位ブロック(下地データ)の読み出し処理を行う。この読み出し処理で得られる記録単位ブロックは、キャッシュメモリ165に取り込まれる。   (3) Next, the optical disk drive 106 performs a reading process of recording unit blocks (background data) necessary for the read modify write process from the optical disk 170. The recording unit block obtained by this reading process is taken into the cache memory 165.

(4)次に、光ディスク170から記録単位ブロックの読み出しができ、当該記録単位ブロックをキャッシュメモリ165に取り込んだ場合、光ディスクドライブ106はCPU101に成功を通知する。CPU101は、当該成功の通知を受けることで、書き込みプロセスを解放することが可能となる。一方、傷などの影響で光ディスク170から記録単位ブロックの読み出しができなかった場合、光ディスクドライブ106はCPU101に同期エラーを通知する。CPU101は、当該同期エラーの通知を受けることで、光ディスク170の別の記録領域を確保し、書き込み命令および書き込みデータを、再度光ディスクドライブ106に送ることが可能となる。   (4) Next, when the recording unit block can be read from the optical disc 170 and the recording unit block is taken into the cache memory 165, the optical disc drive 106 notifies the CPU 101 of success. Upon receiving the success notification, the CPU 101 can release the writing process. On the other hand, when the recording unit block cannot be read from the optical disc 170 due to scratches or the like, the optical disc drive 106 notifies the CPU 101 of a synchronization error. Upon receiving the notification of the synchronization error, the CPU 101 can secure another recording area of the optical disc 170 and send the write command and write data to the optical disc drive 106 again.

(5)次に、光ディスクドライブ106は、CPU101に成功を通知したとき、キャッシュメモリ165に取り込まれた記録単位ブロック(下地データ)に書き込みデータを部分的に上書きする。   (5) Next, when the optical disk drive 106 notifies the CPU 101 of success, the optical disk drive 106 partially overwrites the write data in the recording unit block (background data) fetched into the cache memory 165.

(6)次に、光ディスクドライブ106は、当該上書きして得られた記録単位ブロックを、光ディスク170に書き戻す。   (6) Next, the optical disc drive 106 writes back the recording unit block obtained by overwriting to the optical disc 170.

図3は、書き込みデータサイズが記録単位サイズ未満である場合における書き込み要求の従来の処理モデルを比較例として示している。なお、このモデルでも、光ディスク170の記録単位サイズは64Kバイトであるとしている。   FIG. 3 shows a conventional processing model of a write request when the write data size is smaller than the recording unit size as a comparative example. In this model as well, the recording unit size of the optical disc 170 is assumed to be 64 Kbytes.

(1)まず、メインメモリ(ユーザメモリ)103からCPU101内の図示しないキャッシュメモリ(PCシステムキャッシュ)に書き込みデータを書き込む。この書き込みデータのサイズは4Kバイトである。   (1) First, write data is written from a main memory (user memory) 103 to a cache memory (PC system cache) (not shown) in the CPU 101. The size of this write data is 4K bytes.

(2)次に、CPU101から光ディスクドライブ106に、書き込み命令および書き込みデータを送る。光ディスクドライブ106は、この書き込み命令および書き込みデータを、キャッシュメモリ165に取り込む。   (2) Next, a write command and write data are sent from the CPU 101 to the optical disc drive 106. The optical disk drive 106 takes the write command and write data into the cache memory 165.

(3)次に、光ディスクドライブ106は、CPU101に成功を通知する。CPU101は、当該成功の通知を受けることで、書き込みプロセスを解放することが可能となる。   (3) Next, the optical disk drive 106 notifies the CPU 101 of success. Upon receiving the success notification, the CPU 101 can release the writing process.

(4)次に、光ディスク170から、リードモデファイライト処理に必要な記録単位ブロック(下地データ)の読み出し処理を行う。   (4) Next, the recording unit block (background data) necessary for the read modify write process is read from the optical disc 170.

(5)次に、光ディスク170から記録単位ブロックの読み出しができたときは、キャッシュメモリ165に取り込まれた記録単位ブロック(下地データ)に書き込みデータを部分的に上書きする。   (5) Next, when the recording unit block can be read from the optical disc 170, the write data is partially overwritten on the recording unit block (background data) fetched into the cache memory 165.

(6)そして、光ディスクドライブ106は、当該上書きして得られた記録単位ブロックを、光ディスク170に書き戻す。   (6) Then, the optical disc drive 106 writes back the recording unit block obtained by overwriting to the optical disc 170.

なお、光ディスク170から記録単位ブロックの読み出しができなかったとき、光ディスクドライブ106は、上述の(5),(6)の処理を行うことができず、CPU101からの次の(別の)命令に対して、CPU101に遅延エラーとして報告する。この場合、CPU101は、上述の(3)の処理で成功の通知が返されているため、書き込み要求の元データをキャッシュメモリから既に解放してしまっている可能性がある。書き込み要求の元データがキャッシュメモリから解放されている場合、CPU101は再度別の領域に書き込みを行うことができなくなり、結局、当該データの書き込み自体が失敗する結果となる。   When the recording unit block cannot be read from the optical disc 170, the optical disc drive 106 cannot perform the processes (5) and (6) described above, and the next (other) command from the CPU 101 is not received. On the other hand, it reports to the CPU 101 as a delay error. In this case, there is a possibility that the CPU 101 has already released the original data of the write request from the cache memory because the success notification is returned in the process (3) described above. When the original data of the write request is released from the cache memory, the CPU 101 cannot write to another area again, and eventually the data writing itself fails.

図4のフローチャートは、光ディスクドライブ106のコントローラ161における書き込み命令(WRITEコマンド)に対するコマンド処理タスクを示している。   The flowchart of FIG. 4 shows a command processing task for a write command (WRITE command) in the controller 161 of the optical disc drive 106.

まず、コントローラ161は、ステップST1において、処理を開始し、その後にステップST2に移る。そして、コントローラ161は、ステップST2において、書き込み命令((WRITEコマンド)を受信してキャッシュメモリ165に取り込むと、ステップST3に移る。このステップST3において、コントローラ161は、遅延エラーキューが空であるか否かを判定する。   First, the controller 161 starts processing in step ST1, and then moves to step ST2. Then, when the controller 161 receives the write command ((WRITE command) and fetches it into the cache memory 165 in step ST2, the controller 161 proceeds to step ST3. In this step ST3, the controller 161 determines whether the delay error queue is empty. Determine whether or not.

コントローラ161は、遅延エラーキューが空でないときは、ステップST4に移る。このステップST4において、コントローラ161は、遅延エラーキューからエラーパケット(ERRORパケット)を取得する。そして、コントローラ161は、ステップST5において、CPU101に、エラーパケットを送信してエラー通知を行い、その後に、ステップST2の処理に戻る。   When the delay error queue is not empty, the controller 161 proceeds to step ST4. In step ST4, the controller 161 acquires an error packet (ERROR packet) from the delay error queue. In step ST5, the controller 161 transmits an error packet to the CPU 101 to notify the error, and then returns to the processing in step ST2.

なお、光ディスクドライブ106からCPU101への遅延エラーの通知は、CPU101から光ディスクドライブ106に何かしらの命令(コマンド)が送られてきたときのみ行われる。したがって、上述のステップST3〜ステップST5の動作のように、CPU101から光ディスクドライブ106に書き込み命令が送られてきた場合にも、遅延エラーキューが空でないときには、当該遅延エラーキューからエラーパケットが取得され、当該エラーパケットがCPU101に送信される。   The notification of the delay error from the optical disc drive 106 to the CPU 101 is performed only when any command (command) is sent from the CPU 101 to the optical disc drive 106. Therefore, even when a write command is sent from the CPU 101 to the optical disc drive 106 as in the operations of steps ST3 to ST5 described above, if the delay error queue is not empty, an error packet is acquired from the delay error queue. The error packet is transmitted to the CPU 101.

コントローラ161は、ステップST3で遅延エラーキューが空であるときは、ステップST6に移る。このステップST6において、コントローラ161は、書き込みデータ(WRITEデータ)を受信してキャッシュメモリ165に取り込むと、ステップST7に移る。このステップST7において、コントローラ161は、書き込みデータのデータサイズが、記録単位サイズ未満であるか、記録単位サイズの整数倍であるかを判定する。   When the delay error queue is empty at step ST3, the controller 161 proceeds to step ST6. In step ST6, when the controller 161 receives the write data (WRITE data) and loads it into the cache memory 165, the controller 161 proceeds to step ST7. In step ST7, the controller 161 determines whether the data size of the write data is less than the recording unit size or an integer multiple of the recording unit size.

データサイズが記録単位サイズの整数倍であるとき、コントローラ161は、ステップST8において、CPU101に成功を通知し、その後に、ステップST9に移る。このように書き込みデータのデータサイズが記録単位サイズの整数倍であるときには、書き込みデータがキャッシュメモリ165に取り込まれた時点でCPU101に成功を通知するものであり、ライトバックキャッシング処理が行われる。   When the data size is an integral multiple of the recording unit size, the controller 161 notifies the CPU 101 of success in step ST8, and then proceeds to step ST9. As described above, when the data size of the write data is an integral multiple of the recording unit size, the CPU 101 is notified of success when the write data is taken into the cache memory 165, and a write back caching process is performed.

ステップST7でデータサイズが記録単位サイズ未満であるとき、コントローラ161は、直ちに、ステップST9に移る。このように書き込みデータのデータサイズが記録単位サイズ未満であるときには、書き込みデータがキャッシュメモリ165に取り込まれた時点でCPU101に成功が通知されず、ライトバックキャッシング処理とは異なる処理となる。   When the data size is smaller than the recording unit size in step ST7, the controller 161 immediately moves to step ST9. As described above, when the data size of the write data is less than the recording unit size, the CPU 101 is not notified of success when the write data is taken into the cache memory 165, which is a process different from the write back caching process.

コントローラ161は、ステップST9において、ライトパケット(WRITEパケット)をIO要求キューに入れ、その後に、ステップST2の処理に戻る。そして、コントローラ161は、CPU101から書き込み命令(WRITEコマンド)を受信する都度、上述したと同様の処理を実行する。なお、ライトパケットは、書き込み命令と書き込みデータとから構成されている。   In step ST9, the controller 161 places the write packet (WRITE packet) in the IO request queue, and then returns to the processing in step ST2. Each time the controller 161 receives a write command (WRITE command) from the CPU 101, the controller 161 executes the same processing as described above. The write packet is composed of a write command and write data.

図5のフローチャートは、光ディスクドライブ106のコントローラ161における書き込み処理タスクを示している。   The flowchart in FIG. 5 shows a write processing task in the controller 161 of the optical disc drive 106.

まず、コントローラ161は、ステップST11において、処理を開始し、その後にステップST12に移る。このステップST12において、コントローラ161は、IO要求キューからライトパケットを取得する。そして、コントローラ161は、ステップST13において、書き込みデータのデータサイズが記録単位サイズ未満であるか、記録単位サイズの整数倍であるかを判定する。データサイズが記録単位サイズの整数倍であるとき、コントローラ161は、ステップST14に移る。一方、データサイズが記録単位サイズ未満であるとき、コントローラ161は、ステップST15に移る。   First, the controller 161 starts processing in step ST11, and then proceeds to step ST12. In step ST12, the controller 161 acquires a write packet from the IO request queue. In step ST13, the controller 161 determines whether the data size of the write data is less than the recording unit size or an integer multiple of the recording unit size. When the data size is an integral multiple of the recording unit size, the controller 161 moves to step ST14. On the other hand, when the data size is less than the recording unit size, the controller 161 moves to step ST15.

このステップST15において、コントローラ161は、メディア入出力制御部164を用いて、光ディスク170から、リードモデファイライト処理に必要な記録単位ブロック(下地データ)の読み出し処理を行う。そして、コントローラ161は、ステップST16において、当該読み出しが成功したか否かを判定する。読み出しが成功しなかったとき、コントローラ161は、ステップST17において、CPU101に同期エラーを通知し、その後に、ステップST12に戻る。CPU101は、当該同期エラーの通知を受けることで、光ディスク170の別の記録領域を確保し、書き込み命令および書き込みデータを、再度光ディスクドライブ106に送ることが可能となる。   In step ST15, the controller 161 uses the media input / output control unit 164 to read out the recording unit block (background data) necessary for the read modify write process from the optical disc 170. In step ST16, the controller 161 determines whether or not the reading is successful. When the reading is not successful, the controller 161 notifies the CPU 101 of a synchronization error in step ST17, and then returns to step ST12. Upon receiving the notification of the synchronization error, the CPU 101 can secure another recording area of the optical disc 170 and send the write command and write data to the optical disc drive 106 again.

ステップST16で読み出しが成功したとき、コントローラ161は、リードモデファイライト処理が可能になることから、ステップST18において、CPU101に成功を通知し、その後にステップST19に移る。CPU101は、当該成功の通知を受けることで、書き込みプロセスを解放することが可能となる。   When reading is successful in step ST16, the controller 161 can perform read-modify-write processing. Therefore, in step ST18, the controller 161 notifies the CPU 101 of success, and then proceeds to step ST19. Upon receiving the success notification, the CPU 101 can release the writing process.

コントローラ161は、ステップST19において、書き込みデータ(WRITEデータ)を作成し、その後に、ステップST14に移る。ここで、書き込みデータは、上述したように、キャッシュメモリ165に取り込まれた記録単位ブロック(下地データ)に、CPU101から送られてきた書き込みデータを部分的に上書きすることで作成される。   In step ST19, the controller 161 creates write data (WRITE data), and then proceeds to step ST14. Here, as described above, the write data is created by partially overwriting the write data sent from the CPU 101 on the recording unit block (background data) fetched into the cache memory 165.

コントローラ161は、ステップST14において、メディア入出力制御部164を用いて書き込みデータを光ディスク170に書き込む処理を行う。この場合、書き込みデータは、記録単位サイズ毎に、記録単位ブロックとして、光ディスク170に書き込まれる。そして、コントローラ161は、ステップST20において、書き込みが成功したか否かを判定する。書き込みが成功したとき、コントローラ161は、ステップST12の処理に戻る。   In step ST14, the controller 161 uses the media input / output control unit 164 to write data to the optical disc 170. In this case, the write data is written to the optical disc 170 as a recording unit block for each recording unit size. Then, in step ST20, the controller 161 determines whether or not the writing is successful. When the writing is successful, the controller 161 returns to the process of step ST12.

光ディスク170上の傷などが原因で書き込みが成功しなかったとき、コントローラ161は、ステップST21に移る。このステップST21において、コントローラ161は、記録領域の交替が可能であるか否かを判定する。交替が可能であるとき、コントローラ161は、ステップST22において、交替処理を行い、その後に、ステップST14の処理に戻り、以下上述したと同様の処理を行う。一方、交替が不可能であるとき、コントローラ161は、ステップST23に移る。このステップST23において、コントローラ161は、エラーパケットを遅延エラーキューに入れる。そして、コントローラ161は、ステップST23の処理の後に、ステップST12の処理に戻る。   When the writing is not successful due to a scratch on the optical disc 170 or the like, the controller 161 moves to step ST21. In step ST21, the controller 161 determines whether or not the recording area can be changed. When the replacement is possible, the controller 161 performs the replacement process in step ST22, and then returns to the process of step ST14 to perform the same process as described above. On the other hand, when the replacement is impossible, the controller 161 moves to step ST23. In step ST23, the controller 161 places the error packet in the delay error queue. And the controller 161 returns to the process of step ST12 after the process of step ST23.

なお、図4および図5に示すように、上述では書き込み命令のコマンド処理と書き込み処理とがマルチタスク構成とされているが、シングルタスク構成であってもよい。   As shown in FIG. 4 and FIG. 5, in the above description, the command processing and write processing of the write command have a multitask configuration, but a single task configuration may be used.

図6は、光ディスクドライブ106からCPU101に同期エラーが通知されたとき(図5のステップST17参照)、つまり同期エラー発生時の再記録の様子を示している。   FIG. 6 shows a state of re-recording when a synchronization error is notified from the optical disk drive 106 to the CPU 101 (see step ST17 in FIG. 5), that is, when a synchronization error occurs.

(1)CPU101から光ディスクドライブ106に、記録単位サイズ(64Kバイト)より小さいサイズの書き込みデータ(斜線図示)が書き込み命令と共に送られてくる。   (1) Write data (shown with diagonal lines) smaller than the recording unit size (64 Kbytes) is sent from the CPU 101 to the optical disc drive 106 together with a write command.

(2)光ディスクドライブ106は、書き込みデータのデータサイズが記録単位サイズ未満であるので、リードモデファイライト処理を行うために、CPU101側で確保された光ディスク170の記録領域から記録単位ブロック(下地データ)の読み出し処理を行うが、当該記録単位ブロックの読み出しに失敗する(「×」で図示)。   (2) Since the data size of the write data is less than the recording unit size, the optical disk drive 106 starts the recording unit block (background data) from the recording area of the optical disk 170 secured on the CPU 101 side in order to perform the read modify write process. However, reading of the recording unit block fails (indicated by “x”).

(3)光ディスクドライブ106はリードモデファイライト処理に必要な記録単位ブロック(下地データ)の読み出しに失敗したため、同期エラーをCPU101に通知する。   (3) Since the optical disk drive 106 has failed to read the recording unit block (background data) necessary for the read modify write process, it notifies the CPU 101 of a synchronization error.

(4)CPU101では、同期エラーの通知を受けて光ディスク170に新たな記録領域が確保される。そして、CPU101から光ディスクドライブ106に、再度、書き込みデータ(斜線図示)が付加された書き込み命令が送られてくる。光ディスクドライブ106では、CPU101側で新たに確保された記録領域に、リードモデファイライト処理により書き込みデータが書き込まれる。   (4) The CPU 101 secures a new recording area on the optical disc 170 in response to the notification of the synchronization error. Then, a write command to which write data (shown by hatching) is added is sent again from the CPU 101 to the optical disc drive 106. In the optical disk drive 106, write data is written into the recording area newly secured on the CPU 101 side by the read modify write process.

なお、光ディスクドライブ106は、CPU101側で新たに設定された光ディスク170の記録領域からリードモデファイライト処理に必要な記録単位ブロック(下地データ)の読み出しに失敗する場合には、再度、同期エラーをCPU101に通知することになる。   If the optical disk drive 106 fails to read the recording unit block (background data) necessary for the read-modify-write process from the recording area of the optical disk 170 newly set on the CPU 101 side, the optical disk drive 106 again sends a synchronization error to the CPU 101. Will be notified.

図7のフローチャートは、CPU101のファイルシステムドライバ(図示せず)の処理を示している。   The flowchart in FIG. 7 shows processing of a file system driver (not shown) of the CPU 101.

まず、ファイルシステムドライバは、ステップST31において、処理を開始し、ステップST32に移る。このステップST32において、ファイルシステムドライバは、図示しないOS(Operating System)からファイル書き込み要求を取得すると、ステップST33に移る。このステップST33において、ファイルシステムドライバは、光ディスク170に記録領域を確保済みであるか否かを判定する。記録領域を確保済みであるとき、ファイルシステムドライバは、ステップST34に移る。   First, in step ST31, the file system driver starts processing, and proceeds to step ST32. In step ST32, when the file system driver acquires a file write request from an OS (Operating System) (not shown), the file system driver moves to step ST33. In step ST33, the file system driver determines whether a recording area has been secured on the optical disc 170 or not. When the recording area has been secured, the file system driver moves to step ST34.

記録領域を確保済みでないとき、ファイルシステムドライバは、ステップST35に移る。このステップST35において、ファイルシステムドライバは、光ディスク170に記録領域の確保が可能であるか否かを判定する。記録領域の確保が不可能であるとき、ファイルシステムドライバは、ステップST36において、OSにエラー通知を行う。そして、ファイルシステムドライバは、ステップST37において、OSが書き込みデータをキャッシュメモリから解放した後、ステップST32の処理に戻る。   When the recording area is not secured, the file system driver moves to step ST35. In step ST35, the file system driver determines whether or not a recording area can be secured on the optical disc 170. When the recording area cannot be secured, the file system driver notifies the OS of an error in step ST36. In step ST37, the file system driver returns the processing to step ST32 after the OS releases the write data from the cache memory.

ステップST35で記録領域の確保が可能であるとき、ファイルシステムドライバは、ステップST38において、光ディスク170に記録領域を確保し、その後に、ステップST34に移る。   When the recording area can be secured in step ST35, the file system driver secures the recording area on the optical disc 170 in step ST38, and then proceeds to step ST34.

このステップST34において、ファイルシステムドライバは、キャッシュメモリに格納されている書き込みデータが付加された書き込み命令(WRITEコマンド)を発行し、光ディスクドライブ106に送る。そして、ファイルシステムドライバは、ステップST39において、書き込みが成功したか否かを判定する。この場合、ファイルシステムドライバは、光ディスクドライブ106から成功の通知がある場合には書き込みが成功したと判定し、光ディスクドライバ106から同期エラーの通知がある場合には書き込みが成功しなかったと判定する。   In this step ST34, the file system driver issues a write command (WRITE command) to which the write data stored in the cache memory is added and sends it to the optical disc drive 106. Then, in step ST39, the file system driver determines whether or not the writing is successful. In this case, the file system driver determines that writing has succeeded when there is a notification of success from the optical disc drive 106, and determines that writing has not succeeded when there is a notification of a synchronization error from the optical disc driver 106.

書き込みが成功したとき、ファイルシステムドライバは、ステップST40において、OSに成功を通知し、その後に、ステップST37を経て、ステップST32の処理に戻る。一方、書き込みが成功しなかったとき、ファイルシステムドライバは、ステップST41に移る。   When the writing is successful, the file system driver notifies the OS of the success in step ST40, and then returns to the processing of step ST32 via step ST37. On the other hand, when the writing is not successful, the file system driver moves to step ST41.

このステップST41において、ファイルシステムドライバは、光ディスク170に新たに記録領域を確保できるか否かを判定する。記録領域を確保できるとき、ファイルシステムドライバは、ステップST42において、記録領域を再確保し、その後にステップST34に戻る。ファイルシステムドライバは、このステップST34において、光ディスクドライブ106に、再度、キャッシュメモリに格納されている書き込みデータが付加された書き込み命令を送る。   In step ST41, the file system driver determines whether or not a new recording area can be secured on the optical disc 170. When the recording area can be secured, the file system driver reallocates the recording area in step ST42, and then returns to step ST34. In step ST34, the file system driver sends the optical disk drive 106 a write command to which the write data stored in the cache memory is added again.

また、ステップST41で記録領域を確保できないとき、ファイルシステムドライバは、ステップST43において、OSにエラーを通知し、その後に、ステップST37を経て、ステップST32の処理に戻る。   When the recording area cannot be secured in step ST41, the file system driver notifies the OS of an error in step ST43, and then returns to the processing of step ST32 via step ST37.

図1に示す光ディスク記録装置100においては、CPU101から光ディスクドライブ106に送られる書き込みデータのデータサイズが光ディスク170の記録単位サイズ未満である場合、光ディスクドライブ106は、当該書き込みデータがキャッシュメモリ165に格納された時点ではCPU101に成功を通知せず、リードモデファイライト処理に必要な記録単位ブロック(下地データ)を光ディスク170から読み出すことが成功した時点でCPU101に成功を通知する。   In the optical disc recording apparatus 100 shown in FIG. 1, when the data size of the write data sent from the CPU 101 to the optical disc drive 106 is less than the recording unit size of the optical disc 170, the optical disc drive 106 stores the write data in the cache memory 165. At that time, the CPU 101 is not notified of the success, and the CPU 101 is notified of the success when the recording unit block (background data) necessary for the read modify write process is successfully read from the optical disc 170.

そして、光ディスクドライブ106は、リードモデファイライト処理に必要な記録単位ブロック(下地データ)を光ディスク170から読み出すことに失敗した場合にはCPU101に同期エラーを通知する。そのため、CPU101は、当該同期エラーの通知を受けて、光ディスク170に新たな記録領域を確保して、データの書き込みを行うことが可能となる。   When the optical disk drive 106 fails to read the recording unit block (background data) necessary for the read modify write process from the optical disk 170, it notifies the CPU 101 of a synchronization error. Therefore, the CPU 101 can receive the synchronization error and secure a new recording area on the optical disc 170 to write data.

したがって、CPU101から光ディスクドライブ106に送られる書き込みデータのデータサイズが光ディスク170の記録単位サイズ未満である場合、光ディスクドライブ106ではライトバックキャッシュング処理とは異なる処理が行われることになるが、データの書き込みを良好に行うことができる。   Therefore, when the data size of the write data sent from the CPU 101 to the optical disc drive 106 is smaller than the recording unit size of the optical disc 170, the optical disc drive 106 performs processing different from the write back caching processing. Writing can be performed satisfactorily.

なお、この場合、ライトバックキャッシング処理とは異なる処理を行うので、CPU101側では、書き込みプロセスが早く解放されるというメリットは得られなくなる。しかし、オペレーションシステム(OS)は、なるべく記録単位サイズで書き込みを行おうとするため、CPU101から光ディスクドライブ106に送られてくる書き込みデータのサイズが記録単位サイズより小さくなる頻度はそれ程多くはない。   In this case, since processing different from the write-back caching processing is performed, the CPU 101 cannot obtain the advantage that the writing process is released quickly. However, since the operation system (OS) tries to write in the recording unit size as much as possible, the frequency of the size of the write data sent from the CPU 101 to the optical disk drive 106 is not so much smaller than the recording unit size.

また、図1に示す光ディスク記録装置100においては、CPU101から光ディスクドライブ106に送られる書き込みデータのデータサイズが光ディスク170の記録単位サイズの整数倍である場合には、光ディスクドライブ106は、当該書き込みデータがキャッシュメモリ165に格納された時点ではCPU101に成功を通知するものであって、ライトバックキャッシング処理が行われるので、CPU101側では、書き込みプロセスが早く解放されるというメリットがある。   In the optical disc recording apparatus 100 shown in FIG. 1, when the data size of the write data sent from the CPU 101 to the optical disc drive 106 is an integral multiple of the recording unit size of the optical disc 170, the optical disc drive 106 Is stored in the cache memory 165, the success is notified to the CPU 101, and the write back caching process is performed. Therefore, the CPU 101 has an advantage that the writing process is released quickly.

なお、上述実施の形態においては、記録メディアが光ディスク170である光ディスク記録装置100を例にとって説明したが、この発明は磁気ディスク、半導体メモリ等のその他の記録メディアを用いる記録装置にも同様に適用できることは勿論である。また、上述実施の形態における記録単位サイズの数値例は一例であって、これに限定されるものではない。   In the above embodiment, the optical disk recording apparatus 100 whose recording medium is the optical disk 170 has been described as an example. However, the present invention is similarly applied to a recording apparatus using other recording media such as a magnetic disk and a semiconductor memory. Of course you can. In addition, the numerical example of the recording unit size in the above embodiment is an example, and the present invention is not limited to this.

この発明は、例えば、書き込みデータのサイズが光ディスクの記録単位サイズより小さいとき、リードモデファイライト処理によりデータの書き込みを行うようにした光ディスク記録装置等に適用できる。   The present invention can be applied to, for example, an optical disk recording apparatus in which data is written by read-modify-write processing when the size of write data is smaller than the recording unit size of the optical disk.

実施の形態としての光ディスク記録装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the optical disk recording device as embodiment. 書き込みデータサイズが記録単位サイズ未満である場合における書き込み要求の処理モデルを示す図である。It is a figure which shows the processing model of a write request in case a write data size is less than a recording unit size. 書き込みデータサイズが記録単位サイズ未満である場合における書き込み要求の従来の処理モデルを比較例として示す図である。It is a figure which shows the conventional processing model of the write request in case a write data size is less than a recording unit size as a comparative example. 光ディスクドライブのコントローラにおける書き込み命令(WRITEコマンド)に対するコマンド処理タスクを示すフローチャートである。It is a flowchart which shows the command processing task with respect to the write command (WRITE command) in the controller of an optical disk drive. 光ディスクドライブのコントローラにおける書き込み処理タスクを示すフローチャートである。5 is a flowchart showing a write processing task in the controller of the optical disc drive. 光ディスクドライブからCPUに同期エラーが通知されたとき(同期エラー発生時)の再記録の様子を示す図である。It is a figure which shows the mode of re-recording when a synchronous error is notified to CPU from the optical disk drive (at the time of a synchronous error occurrence). CPUのファイルシステムドライバの処理を示すフローチャートである。It is a flowchart which shows the process of the file system driver of CPU.

符号の説明Explanation of symbols

100・・・光ディスク記録装置、101・・・CPU、102・・・I/Oブリッジ、103・・・メインメモリ、104・・・バスインタフェース、105・・・内部バス、106・・・光ディスクドライバ、107・・・ハードディスクドライブ、161・・・コントローラ、162・・・バスインタフェース、163・・・内部バス、164・・・メディア入出力制御部、165・・・キャッシュメモリ、170・・・光ディスク   DESCRIPTION OF SYMBOLS 100 ... Optical disk recording device, 101 ... CPU, 102 ... I / O bridge, 103 ... Main memory, 104 ... Bus interface, 105 ... Internal bus, 106 ... Optical disk driver 107, hard disk drive, 161, controller, 162, bus interface, 163, internal bus, 164, media input / output control unit, 165, cache memory, 170, optical disk

Claims (4)

ホストコンピュータから送られてくる書き込み要求のあったデータを、該書き込み要求のあったデータのサイズが記録メディアの記録単位サイズの整数倍であるときには、記録単位サイズ毎に記録単位ブロックとして上記記録メディアに書き込み、該書き込み要求のあったデータのサイズが上記記録メディアの記録単位サイズより小さいときには、リードモデファイライト処理により上記記録メディアに書き込む記録装置であって、
上記ホストコンピュータから送られてくる書き込み要求のあったデータをメモリに取り込むデータ取り込み手段と、
上記メモリに取り込まれたデータを上記記録メディアに書き込むデータ書き込み手段と、
上記メモリに取り込まれたデータのサイズを判別するデータサイズ判別手段と、
上記ホストコンピュータに対して、上記データ書き込み手段が上記メモリに取り込まれたデータを上記記録メディアに書き込む前に書き込み成功を通知する通知手段とを備え、
上記通知手段は、
上記データサイズ判別手段で上記メモリに取り込まれたデータのサイズが上記記録メディアの記録単位サイズの整数倍であると判別されるときは、上記ホストコンピュータに対して上記書き込み成功を通知し、
上記データサイズ判別手段で上記メモリに取り込まれたデータのサイズが上記記録メディアの記録単位サイズより小さいと判別されるとき、上記データ書き込み手段が上記記録メディアから上記リードモデファイライト処理に必要な記録単位ブロックの読み出しに成功したとき、上記ホストコンピュータに対して上記書き込み成功を通知す
録装置。
When the size of the data requested to be written is an integer multiple of the recording unit size of the recording medium, the recording medium is recorded as a recording unit block for each recording unit size. When the size of the data requested to be written is smaller than the recording unit size of the recording medium, the recording device writes the recording medium by a read modify write process ,
Data fetching means for fetching into the memory the data requested for writing sent from the host computer;
Data writing means for writing the data captured in the memory to the recording medium;
Data size determining means for determining the size of data captured in the memory;
Notification means for notifying the host computer of successful writing before the data writing means writes the data fetched into the memory to the recording medium;
The notification means is
When it is determined that the size of the data fetched into the memory by the data size determination means is an integral multiple of the recording unit size of the recording medium, the host computer is notified of the writing success,
When the size of the data taken into the memory by the data size judging means is determined to be recorded unit size smaller than the recording media, recording required from the data writing means the recording medium in the read modify write process upon successful reading of the unit block, it notifies the successful write to said host computer
Record apparatus.
ホストコンピュータから送られてくる書き込み要求のあったデータを、該書き込み要求のあったデータのサイズが記録メディアの記録単位サイズの整数倍であるときには、記録単位サイズ毎に記録単位ブロックとして上記記録メディアに書き込み、該書き込み要求のあったデータのサイズが上記記録メディアの記録単位サイズより小さいときには、リードモデファイライト処理により上記記録メディアに書き込む記録方法であって、
上記ホストコンピュータから送られてくる書き込み要求のあったデータをメモリに取り込むデータ取り込みステップと、
上記メモリに取り込まれたデータを上記記録メディアに書き込むデータ書き込みステップと、
上記メモリに取り込まれたデータのサイズを判別するデータサイズ判別ステップと、
上記ホストコンピュータに対して、上記データ書き込みステップで上記メモリに取り込まれたデータを上記記録メディアに書き込む前に書き込み成功を通知する通知ステップとを備え、
上記通知ステップでは、
上記データサイズ判別ステップで上記メモリに取り込まれたデータのサイズが上記記録メディアの記録単位サイズの整数倍であると判別されるときは、上記ホストコンピュータに対して上記書き込み成功を通知し、
上記データサイズ判別ステップで上記メモリに取り込まれたデータのサイズが上記記録メディアの記録単位サイズより小さいと判別されるとき、上記データ書き込みステップで上記記録メディアから上記リードモデファイライト処理に必要な記録単位ブロックの読み出しに成功したとき、上記ホストコンピュータに対して上記書き込み成功を通知す
録方法。
When the size of the data requested to be written is an integer multiple of the recording unit size of the recording medium, the recording medium is recorded as a recording unit block for each recording unit size. And when the size of the data requested to be written is smaller than the recording unit size of the recording medium, the recording method of writing to the recording medium by a read modify write process ,
A data fetching step of fetching into the memory the data requested for writing sent from the host computer;
A data writing step of writing the data captured in the memory to the recording medium;
A data size determining step for determining the size of the data captured in the memory;
A notification step of notifying the host computer of successful writing before writing the data captured in the memory in the data writing step to the recording medium;
In the notification step above,
When it is determined that the size of the data captured in the memory in the data size determination step is an integral multiple of the recording unit size of the recording medium, the host computer is notified of the writing success,
When the size of the data taken into the memory by the data size determining step is determined to record unit size smaller than the recording medium, the recording needed from the recording medium by the data writing step to the read modify write process upon successful reading of the unit block, it notifies the successful write to said host computer
Record method.
ホストコンピュータから送られてくる書き込み要求のあったデータを、該書き込み要求のあったデータのサイズが記録メディアの記録単位サイズの整数倍であるときには、記録単位サイズ毎に記録単位ブロックとして上記記録メディアに書き込み、該書き込み要求のあったデータのサイズが上記記録メディアの記録単位サイズより小さいときには、リードモデファイライト処理により上記記録メディアに書き込む記録方法であって、
上記ホストコンピュータから送られてくる書き込み要求のあったデータをメモリに取り込むデータ取り込みステップと、
上記メモリに取り込まれたデータを上記記録メディアに書き込むデータ書き込みステップと、
上記メモリに取り込まれたデータのサイズを判別するデータサイズ判別ステップと、
上記ホストコンピュータに対して、上記データ書き込みステップで上記メモリに取り込まれたデータを上記記録メディアに書き込む前に書き込み成功を通知する通知ステップとを備え、
上記通知ステップでは、
上記データサイズ判別ステップで上記メモリに取り込まれたデータのサイズが上記記録メディアの記録単位サイズの整数倍であると判別されるときは、上記ホストコンピュータに対して上記書き込み成功を通知し、
上記データサイズ判別ステップで上記メモリに取り込まれたデータのサイズが上記記録メディアの記録単位サイズより小さいと判別されるとき、上記データ書き込みステップで上記記録メディアから上記リードモデファイライト処理に必要な記録単位ブロックの読み出しに成功したとき、上記ホストコンピュータに対して上記書き込み成功を通知す録方法を
コンピュータに実行させるためのプログラム。
When the size of the data requested to be written is an integer multiple of the recording unit size of the recording medium, the recording medium is recorded as a recording unit block for each recording unit size. And when the size of the data requested to be written is smaller than the recording unit size of the recording medium, the recording method of writing to the recording medium by a read modify write process ,
A data fetching step of fetching into the memory the data requested for writing sent from the host computer;
A data writing step of writing the data captured in the memory to the recording medium;
A data size determining step for determining the size of the data captured in the memory;
A notification step of notifying the host computer of successful writing before writing the data captured in the memory in the data writing step to the recording medium;
In the notification step above,
When it is determined that the size of the data captured in the memory in the data size determination step is an integral multiple of the recording unit size of the recording medium, the host computer is notified of the writing success,
When the size of the data taken into the memory by the data size determining step is determined to record unit size smaller than the recording medium, the recording needed from the recording medium by the data writing step to the read modify write process upon successful reading of the unit block, the record how to notify the successful write to said host computer,
A program that causes a computer to execute.
ホストコンピュータと光ディスクドライブとがバスを介して接続された光ディスク記録装置であって、
上記光ディスクドライブは、
上記ホストコンピュータから送られてくる書き込み要求のあったデータを、該書き込み要求のあったデータのサイズが記録メディアの記録単位サイズの整数倍であるときには、記録単位サイズ毎に記録単位ブロックとして上記記録メディアに書き込み、該書き込み要求のあったデータのサイズが上記記録メディアの記録単位サイズより小さいときには、リードモデファイライト処理により上記記録メディアに書き込み、
上記ホストコンピュータから送られてくる書き込み要求のあったデータをメモリに取り込むデータ取り込み手段と、
上記メモリに取り込まれたデータを上記記録メディアに書き込むデータ書き込み手段と、
上記メモリに取り込まれたデータのサイズを判別するデータサイズ判別手段と、
上記ホストコンピュータに対して、上記データ書き込み手段が上記メモリに取り込まれたデータを上記記録メディアに書き込む前に書き込み成功を通知する通知手段とを備え、
上記通知手段は、
上記データサイズ判別手段で上記メモリに取り込まれたデータのサイズが上記記録メディアの記録単位サイズの整数倍であると判別されるときは、上記ホストコンピュータに対して上記書き込み成功を通知し、
上記データサイズ判別手段で上記メモリに取り込まれたデータのサイズが上記記録メディアの記録単位サイズより小さいと判別されるとき、上記データ書き込み手段が上記記録メディアから上記リードモデファイライト処理に必要な記録単位ブロックの読み出しに成功したとき、上記ホストコンピュータに対して上記書き込み成功を通知す
ディスク記録装置。
An optical disk recording apparatus in which a host computer and an optical disk drive are connected via a bus,
The optical disc drive is
The data requested to be sent from the host computer is recorded as a recording unit block for each recording unit size when the size of the data requested to be written is an integral multiple of the recording unit size of the recording medium. When writing to the medium and the size of the data requested to be written is smaller than the recording unit size of the recording medium, writing to the recording medium by a read modify write process,
Data fetching means for fetching into the memory the data requested for writing sent from the host computer;
Data writing means for writing the data captured in the memory to the recording medium;
Data size determining means for determining the size of data captured in the memory;
Notification means for notifying the host computer of successful writing before the data writing means writes the data fetched into the memory to the recording medium;
The notification means is
When it is determined that the size of the data fetched into the memory by the data size determination means is an integral multiple of the recording unit size of the recording medium, the host computer is notified of the writing success,
When the size of the data taken into the memory by the data size judging means is determined to be recorded unit size smaller than the recording media, recording required from the data writing means the recording medium in the read modify write process upon successful reading of the unit block, it notifies the successful write to said host computer
An optical disk recording device.
JP2007011114A 2007-01-22 2007-01-22 Recording apparatus, recording method, program, and optical disk recording apparatus Expired - Fee Related JP4798003B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007011114A JP4798003B2 (en) 2007-01-22 2007-01-22 Recording apparatus, recording method, program, and optical disk recording apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007011114A JP4798003B2 (en) 2007-01-22 2007-01-22 Recording apparatus, recording method, program, and optical disk recording apparatus

Publications (2)

Publication Number Publication Date
JP2008176889A JP2008176889A (en) 2008-07-31
JP4798003B2 true JP4798003B2 (en) 2011-10-19

Family

ID=39703789

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007011114A Expired - Fee Related JP4798003B2 (en) 2007-01-22 2007-01-22 Recording apparatus, recording method, program, and optical disk recording apparatus

Country Status (1)

Country Link
JP (1) JP4798003B2 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4344485B2 (en) * 2000-03-08 2009-10-14 パナソニック株式会社 Information recording medium, information recording method, and information reproducing method
JP2005129168A (en) * 2003-10-24 2005-05-19 Ricoh Co Ltd Device and method for recording information, and program
JP4503500B2 (en) * 2005-06-29 2010-07-14 シャープ株式会社 RECORDING DEVICE, PROGRAM THEREOF, AND RECORDING MEDIUM

Also Published As

Publication number Publication date
JP2008176889A (en) 2008-07-31

Similar Documents

Publication Publication Date Title
JP4788528B2 (en) Disk control device, disk control method, and disk control program
JP5409159B2 (en) Information processing apparatus, information processing apparatus control method, and program
KR20150035560A (en) Optimized context drop for a solid state drive(ssd)
US20080025706A1 (en) Information recording apparatus and control method thereof
US7913029B2 (en) Information recording apparatus and control method thereof
US10346051B2 (en) Storage media performance management
US20100185793A1 (en) Storage device and data transfer method for the same
US20070168604A1 (en) Information recording apparatus and method for controlling the same
US8320066B2 (en) Storage device and read/write processing method therefor
JP2007102436A (en) Storage controller and storage control method
JP2006099802A (en) Storage controller, and control method for cache memory
KR102152724B1 (en) Video managing apparatus and method of surveillance systems
JP4798003B2 (en) Recording apparatus, recording method, program, and optical disk recording apparatus
JP4706029B2 (en) Storage device, data writing method, and data writing program
JP2007323377A (en) Recording apparatus, method for writing management data and method for repairing management data
JP5235692B2 (en) Data access device and data access program
US20050240686A1 (en) Method for downloading firmware of peripheral equipment, and peripheral equipment
US20070174739A1 (en) Disk device, method of writing data in disk device, and computer product
JP4984677B2 (en) Information processing device
WO2005041186A1 (en) Information recorder and information recording method and recording medium
JP2009059444A (en) Information processing device and information processing method
JP4579998B2 (en) Restore management program, restore management method, and restore management apparatus
JP2002189572A (en) Disk storage device, information processing equipment provided with the same and processing method when failing in write
JP2006277042A (en) Array controller, disk array control method, and program
JP2011086324A (en) Storage device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20091118

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110210

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110222

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110408

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110510

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110614

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20110705

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110718

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

Free format text: PAYMENT UNTIL: 20140812

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20140812

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees