JP2010211880A - Disk driving device, control method thereof, program, and recording medium - Google Patents

Disk driving device, control method thereof, program, and recording medium Download PDF

Info

Publication number
JP2010211880A
JP2010211880A JP2009058160A JP2009058160A JP2010211880A JP 2010211880 A JP2010211880 A JP 2010211880A JP 2009058160 A JP2009058160 A JP 2009058160A JP 2009058160 A JP2009058160 A JP 2009058160A JP 2010211880 A JP2010211880 A JP 2010211880A
Authority
JP
Japan
Prior art keywords
command
sector
file
argument
read
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2009058160A
Other languages
Japanese (ja)
Inventor
Mamoru Oda
守 小田
Yukitake Shimizu
幸毅 清水
Tomoo Nishigaki
智夫 西垣
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.)
Sharp Corp
Original Assignee
Sharp 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 Sharp Corp filed Critical Sharp Corp
Priority to JP2009058160A priority Critical patent/JP2010211880A/en
Publication of JP2010211880A publication Critical patent/JP2010211880A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a disk driving device reading and/or writing data without requiring complex processing on a host. <P>SOLUTION: An optical disk drive 100 includes: a memory 140 for storing file system information read from an optical disk 30; an ATA/ATAPI interface 110 for receiving a file command using file designation information designating a file as an argument; and a control unit 120 for determining a sector on the optical disk 30 to be scanned by an optical pickup 130 by referring to the file system information stored in the memory 140. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、ディスクからデータを読み出したり、ディスクにデータを書き込んだりするディスクドライブ装置、及び、その制御方法に関する。また、その制御方法をコンピュータに実行させるプログラム、および、そのプログラムを記録した記録媒体に関する。   The present invention relates to a disk drive device that reads data from a disk or writes data to a disk, and a control method therefor. The present invention also relates to a program for causing a computer to execute the control method, and a recording medium on which the program is recorded.

データを記録するための記録媒体として、BD(Blu-ray Disc),DVD(Digital Versatile Disc),CD(Compact Disc)などの光ディスクが広く普及している。PC(Personal Computer),光ディスクプレイヤ,光ディスクレコーダなどのホスト装置は、ファイル単位で光ディスクからデータを読み出すために、通常、光ディスクに記録されたファイルシステム情報を利用する。   As recording media for recording data, optical discs such as BD (Blu-ray Disc), DVD (Digital Versatile Disc), and CD (Compact Disc) are widely used. A host device such as a PC (Personal Computer), an optical disc player, or an optical disc recorder normally uses file system information recorded on the optical disc in order to read data from the optical disc in units of files.

光ディスクに記録されたファイルシステム情報には、その光ディスクに記録されたファイルの各々について、そのファイルを指定するファイル指定情報(例えば、ファイル名)と、そのファイルを構成する一連のデータが記録されたセクタを指定するセクタ指定情報(例えば、論理ブロックアドレス、または、シリンダ番号、ヘッド番号、および、セクタ番号)とが関連付けて登録されている。光ディスクに用いられるファイルシステムとしては、UDF(Universal Disk Format)(BD,DVD用),ISO−9660(CD−ROM用)などが挙げられる。   In the file system information recorded on the optical disc, for each file recorded on the optical disc, file designation information (for example, a file name) for designating the file and a series of data constituting the file are recorded. Sector designation information (for example, a logical block address or a cylinder number, a head number, and a sector number) that designates a sector is registered in association with each other. Examples of file systems used for optical disks include UDF (Universal Disk Format) (BD, for DVD), ISO-9660 (for CD-ROM), and the like.

従来の光ディスクドライブ10に接続されたホスト装置20が、光ディスク30に記録された特定のファイルを構成する一連のデータを読み出す方法について、図7を参照して説明する。図7は、光ディスクドライブ10およびホスト装置20のブロック図である。光ディスクドライブ10は、ATA/ATAPIデバイスであり、光ディスクドライブ10とホスト装置20とは、ATA/ATAPIインターフェースを介して接続されている。   A method in which the host device 20 connected to the conventional optical disk drive 10 reads a series of data constituting a specific file recorded on the optical disk 30 will be described with reference to FIG. FIG. 7 is a block diagram of the optical disc drive 10 and the host device 20. The optical disk drive 10 is an ATA / ATAPI device, and the optical disk drive 10 and the host device 20 are connected via an ATA / ATAPI interface.

特定のファイルを指定してデータを読み出すファイルリードコマンド(システムコール)がアプリケーション21から与えられると、ホスト装置(ホストPC)20のOS(Operating System)22は、セクタを指定してデータを読み出すセクタリードコマンド(ATA/ATAPIコマンド)に変換し、ATA/ATAPI(SATA)インターフェース23を介して光ディスクドライブ10に渡す。   When a file read command (system call) for reading data by designating a specific file is given from the application 21, the OS (Operating System) 22 of the host device (host PC) 20 reads the data by designating a sector. It is converted into a read command (ATA / ATAPI command) and passed to the optical disc drive 10 via the ATA / ATAPI (SATA) interface 23.

この際、ホスト装置20のOS22は、光ディスクドライブ10に渡すセクタリードコマンドの引数を、ファイルシステム情報を参照して決定する(ファイルシステム情報は、予め光ディスクドライブ10から取得し、メモリ24に記憶しておく)。具体的には、ファイルリードコマンドの引数であるファイル指定情報に関連付けて登録されたセクタ指定情報(読み出し対象ファイルを構成する一連のデータが記録されているセクタを指定するセクタ指定情報)をファイルシステム情報から読み出し、光ディスクドライブ10に渡すセクタリードコマンドの引数を、ファイルシステム情報から読み出したセクタ指定情報に応じて決定する。   At this time, the OS 22 of the host device 20 determines the argument of the sector read command to be passed to the optical disc drive 10 with reference to the file system information (the file system information is acquired from the optical disc drive 10 in advance and stored in the memory 24). Leave). Specifically, sector designation information registered in association with file designation information that is an argument of the file read command (sector designation information that designates a sector in which a series of data constituting the read target file is recorded) is stored in the file system. The argument of the sector read command read from the information and passed to the optical disc drive 10 is determined according to the sector designation information read from the file system information.

セクタリードコマンドがATA/ATAPI(SATA)インターフェース11を介してホスト装置20から受け渡されると、光ディスクドライブ10のデバイス制御部12は、そのセクタリードコマンドの引数であるセクタ指定情報により指定されたセクタを走査し、これらのセクタに記録されたデータを読み出すように光ピックアップ13を制御する。そして、光ディスクドライブ10のデバイス制御部12は、このようにして光ディスク30から読み出されたデータを、ATA/ATAPI(SATA)インターフェース11を介してホストPC20に返す。   When the sector read command is delivered from the host device 20 via the ATA / ATAPI (SATA) interface 11, the device control unit 12 of the optical disc drive 10 specifies the sector designated by the sector designation information which is an argument of the sector read command. And the optical pickup 13 is controlled so as to read the data recorded in these sectors. Then, the device control unit 12 of the optical disc drive 10 returns the data read from the optical disc 30 in this way to the host PC 20 via the ATA / ATAPI (SATA) interface 11.

このようなシステムの一例として、特許文献1には、光ディスクに記録された実ファイルシステムをホスト装置に提供する光ディスクドライブと、光ディスクドライブから提供された実ファイルシステムを仮想ファイルシステムに変換して利用するホスト装置とからなるシステムが開示されている。   As an example of such a system, Patent Document 1 discloses that an actual file system recorded on an optical disk is provided to a host device, and an actual file system provided from the optical disk drive is converted into a virtual file system for use. A system comprising a host device is disclosed.

特開2008−107965号公報(公開日:2008年5月8日)JP 2008-107965 A (publication date: May 8, 2008)

従来技術においては、ファイルを指定してデータを読み出すシステムコールから、セクタを指定してデータを読み出すATA/APAPIコマンドへの変換を、光ディスクドライブ装置を利用するホスト装置において行わなければならない。ホスト装置においてシステムコールからATA/ATAPIコマンドへの変換を行うためには、光ディスクに記録されたファイルシステム情報を光ディスクドライブに読み出させて取得する機能や、取得したファイルシステム情報を参照して、システムコールの引数であるファイル指定情報を、ATA/ATAPIコマンドの引数であるセクタ指定情報に変換する機能などを、ホスト装置に実装する必要がある。すなわち、ホスト装置側に複雑な機能が必要になるという問題があった。   In the prior art, conversion from a system call for designating a file and reading data to an ATA / APAPI command for designating a sector and reading data must be performed in a host device using an optical disk drive. In order to convert the system call to the ATA / ATAPI command in the host device, the file system information recorded on the optical disk is read and acquired by the optical disk drive, and the acquired file system information is referred to. A function for converting file designation information, which is an argument of a system call, into sector designation information, which is an argument of an ATA / ATAPI command, must be installed in the host device. That is, there is a problem that a complicated function is required on the host device side.

特に、AVファイルの読み書きを行なう場合、実時間処理を実現するためには、ホスト装置においてドライブの状態を特定して、適切なタイミングで適切なATA/ATAPIコマンドを光ディスクドライブに発行することが必要となるが、ホスト装置にこのような機能を実装するのは容易ではないという問題があった。また、書き込みコマンドの実行が中断した場合のリカバー処理の実装に際しても同様の問題があった。   In particular, when reading and writing AV files, in order to realize real-time processing, it is necessary to specify the drive status in the host device and issue an appropriate ATA / ATAPI command to the optical disc drive at an appropriate timing. However, there is a problem that it is not easy to implement such a function in the host device. In addition, there is a similar problem when implementing the recovery process when the execution of the write command is interrupted.

なお、ここでは、光ディスクドライブを例に従来技術における問題点を説明したが、同様な問題がハードディスクドライブその他のディスクドライブ装置一般において生じ得ることは言うまでもない。   Here, the problem in the prior art has been described by taking an optical disk drive as an example, but it goes without saying that the same problem may occur in a hard disk drive and other disk drive devices in general.

本発明は、上記の課題に鑑みてなされたものであり、ホスト装置側に複雑な機能を実装することなく、データの読み出しや書き込みを行なうことが可能なディスクドライブを実現することにある。   The present invention has been made in view of the above problems, and an object of the present invention is to realize a disk drive capable of reading and writing data without mounting a complicated function on the host device side.

上記課題を解決するために、本発明に係るディスクドライブ装置は、ディスクから読み出したファイルシステム情報を記憶するメモリと、ファイルを指定するファイル指定情報を引数とするファイルコマンドを受け付けるインターフェースと、上記インターフェースが上記ファイルコマンドを受け付けた後、上記メモリに記憶された上記ファイルシステム情報に登録されているセクタ指定情報であって、該ファイルコマンドの引数により指定されたファイルを構成するデータが記録されているセクタを指定するセクタ指定情報に応じて、ヘッドに走査させる上記ディスク上のセクタを決定する制御手段と、を備えている、ことを特徴としている。   In order to solve the above problems, a disk drive device according to the present invention includes a memory for storing file system information read from a disk, an interface for receiving a file command having a file specification information for specifying a file as an argument, and the interface After the file command is received, sector designation information registered in the file system information stored in the memory, in which data constituting the file designated by the argument of the file command is recorded Control means for determining a sector on the disk to be scanned by the head in accordance with sector designation information for designating a sector.

また、上記課題を解決するために、本発明に係るディスクドライブ装置の制御方法は、ディスクから読み出したファイルシステム情報をメモリに記憶する記憶ステップと、ファイルを指定するファイル指定情報を引数とするファイルコマンドを受け付ける受付ステップと、上記ファイルコマンドを受け付けた後、上記メモリに記憶された上記ファイルシステム情報に登録されているセクタ指定情報であって、該ファイルコマンドの引数により指定されたファイルを構成するデータが記録されているセクタを指定するセクタ指定情報に応じて、ヘッドに走査させる上記ディスク上のセクタを決定する決定ステップと、を含んでいる、ことを特徴としている。   In order to solve the above problem, a method for controlling a disk drive device according to the present invention includes a storage step of storing file system information read from a disk in a memory, and a file having file specification information for specifying a file as arguments. A command accepting step; and after accepting the file command, sector designation information registered in the file system information stored in the memory, and constituting a file designated by an argument of the file command And determining a sector on the disk to be scanned by the head according to sector designation information designating a sector in which data is recorded.

上記構成によれば、上記ディスクドライブを利用するホスト装置は、ファイルを指定するファイル指定情報を引数とするファイルコマンドを上記インターフェースを介して上記ディスクドライブ装置に与えることにより、上記ディスクライブ装置を用いて上記ディスクにデータを記録したり、上記ディスクからデータを読み出したりすることができる。   According to the above configuration, a host device that uses the disk drive uses the disk drive device by giving a file command that has file designation information that designates a file as an argument to the disk drive device via the interface. Thus, data can be recorded on the disk and data can be read from the disk.

したがって、上記ディスクドライブを利用するホスト装置に、ファイル指定情報を引数とするファイルコマンドをセクタ指定情報を引数とするセクタコマンドに変換するという機能を実装することなく、データの読み出しや書き込みを行なうことができるディスクドライブ装置を実現することができる。   Therefore, the host device using the disk drive can read and write data without implementing a function of converting a file command having file designation information as an argument into a sector command having sector designation information as an argument. It is possible to realize a disk drive device that can

本発明に係るディスクドライブ装置において、上記インターフェースは、セクタを指定するセクタ指定情報を引数とするセクタコマンドを受け付け、上記制御手段は、上記インターフェースが上記セクタコマンドを受け付けた後、該セクタコマンドの引数に応じて、上記ヘッドに走査させる上記ディスク上のセクタを決定する、ことが好ましい。   In the disk drive device according to the present invention, the interface accepts a sector command having sector designation information for designating a sector as an argument, and the control means receives an argument of the sector command after the interface accepts the sector command. Accordingly, it is preferable to determine sectors on the disk to be scanned by the head.

上記構成によれば、上記ディスクドライブを利用するホスト装置は、ファイルを指定するファイル指定情報を引数とするファイルコマンドを上記インターフェースを介して上記ディスクドライブ装置に与えることによっても、セクタを指定するセクタ指定情報を引数とするセクタコマンドを与えることによって、上記ディスクライブ装置を用いて上記ディスクにデータを記録したり、上記ディスクからデータを読み出したりすることができる。   According to the above configuration, the host device using the disk drive can also specify a sector by giving a file command having file specification information specifying a file as an argument to the disk drive device via the interface. By giving a sector command having the designation information as an argument, it is possible to record data on the disk or read data from the disk using the above-described disk drive.

本発明に係るディスクドライブ装置においては、上記インターフェースが受け付けたコマンドを蓄積するコマンドバッファを備えており、上記制御手段は、上記コマンドバッファに蓄積されたコマンドを、優先度の高いコマンドから順に実行する、ことが好ましい。   The disk drive device according to the present invention includes a command buffer for storing the commands accepted by the interface, and the control means executes the commands stored in the command buffer in order from the command with the highest priority. Is preferable.

上記構成によれば、上記ディスクドライブを利用するホスト装置に、優先度の高いものから順にコマンドを発行するという機能を実装することなく、優先度の高いものから順にコマンドを実行するという機能を実現することができる。   According to the above configuration, the host device that uses the disk drive realizes the function of executing commands in order from the highest priority without implementing the function of issuing commands in order from the highest priority. can do.

本発明に係るディスクドライブ装置においては、上記インターフェースが受け付けた、データの書き込みを命じる書き込みコマンドを格納する書き込みコマンドバッファを備えており、上記制御手段は、上記書き込みコマンドの実行が中断された場合、該書き込みコマンドを上記書き込みコマンドバッファから読み出して再実行する、ことが好ましい。   In the disk drive device according to the present invention, the disk drive device includes a write command buffer that stores a write command for commanding data writing, which is accepted by the interface, and the control means, when execution of the write command is interrupted, Preferably, the write command is read from the write command buffer and re-executed.

上記構成によれば、上記ディスクドライブを利用するホスト装置に、実行が中断された書き込みコマンドを再発行するという機能を実装することなく、実行が中断された書き込みコマンドを再実行するという機能を実現することができる。   According to the above configuration, the host device that uses the disk drive realizes the function of re-executing the write command that has been interrupted without implementing the function of re-issuing the write command that has been interrupted. can do.

また、上記制御手段は、例えば、上記インターフェースが受け付けたファイル指定情報を引数とするファイルコマンドを、上記メモリに記憶された上記ファイルシステム情報を参照してセクタ指定情報を引数とするセクタコマンドに変換する変換手段と、上記変換手段により得られたセクタコマンドの引数に応じて、上記ヘッドに走査させる上記ディスク上のセクタを決定するデバイス制御手段とを含んだ構成とすることができる。   Further, the control means converts, for example, a file command having the file designation information received by the interface as an argument into a sector command having the sector designation information as an argument with reference to the file system information stored in the memory. And a device control unit that determines a sector on the disk to be scanned by the head in accordance with an argument of a sector command obtained by the conversion unit.

また、本発明に係るディスクドライブの制御方法に含まれる各ステップをコンピュータに実行させるプログラム、および、そのようなプログラムを記録したコンピュータ読み取り可能な記録媒体も本発明の範疇に含まれる。   Also included in the scope of the present invention are a program that causes a computer to execute each step included in the disk drive control method according to the present invention, and a computer-readable recording medium that records such a program.

本発明に係るディスクドライブ装置は、ディスクから読み出したファイルシステム情報を記憶するメモリと、ファイルを指定するファイル指定情報を引数とするファイルコマンドを受け付けるインターフェースと、上記インターフェースが上記ファイルコマンドを受け付けた後、上記メモリに記憶された上記ファイルシステム情報に登録されているセクタ指定情報であって、該ファイルコマンドの引数により指定されたファイルを構成するデータが記録されているセクタを指定するセクタ指定情報に応じて、ヘッドに走査させる上記ディスク上のセクタを決定する制御手段と、を備えている。   A disk drive device according to the present invention includes a memory that stores file system information read from a disk, an interface that accepts a file command that uses file designation information that designates a file as an argument, and after the interface accepts the file command. Sector designation information registered in the file system information stored in the memory, the sector designation information designating a sector in which data constituting the file designated by the argument of the file command is recorded. And a control means for determining sectors on the disk to be scanned by the head.

また、本発明に係るディスクドライブ装置の制御方法は、ディスクから読み出したファイルシステム情報をメモリに記憶する記憶ステップと、ファイルを指定するファイル指定情報を引数とするファイルコマンドを受け付ける受付ステップと、上記ファイルコマンドを受け付けた後、上記メモリに記憶された上記ファイルシステム情報に登録されているセクタ指定情報であって、該ファイルコマンドの引数により指定されたファイルを構成するデータが記録されているセクタを指定するセクタ指定情報に応じて、ヘッドに走査させる上記ディスク上のセクタを決定する決定ステップと、を含んでいる。   The disk drive device control method according to the present invention includes a storage step of storing file system information read from a disk in a memory, a reception step of receiving a file command having an argument of file specification information for specifying a file, After receiving the file command, the sector designation information registered in the file system information stored in the memory, and the sector in which the data constituting the file designated by the argument of the file command is recorded And determining a sector on the disk to be scanned by the head in accordance with the sector designation information to be designated.

したがって、上記ディスクドライブを利用するホスト装置は、ファイルを指定するファイル指定情報を引数とするファイルコマンドを上記インターフェースを介して上記ディスクドライブ装置に与えることにより、上記ディスクライブ装置を用いて上記ディスクにデータを記録したり、上記ディスクからデータを読み出したりすることができる。これにより、上記ディスクドライブを利用するホスト装置に、ファイル指定情報を引数とするコマンドを、セクタ指定情報を引数とするコマンドに変換するという機能を実装する必要がなくなる。   Therefore, a host device that uses the disk drive provides the disk drive device with a file command that uses file specification information for specifying a file as an argument to the disk drive device via the interface. Data can be recorded or read from the disk. This eliminates the need to implement a function for converting a command having file designation information as an argument into a command having sector designation information as an argument in the host device using the disk drive.

本発明の実施形態を示すものであり、光ディスクドライブおよび外部ホストのブロック図である。1, showing an embodiment of the present invention, is a block diagram of an optical disk drive and an external host. FIG. 本発明の実施形態を示すものであり、ATA/ATAPIコマンドに追加されたファイルコマンドを示した図である。FIG. 4 is a diagram illustrating a file command added to an ATA / ATAPI command according to the embodiment of this invention. 本発明の実施形態を示すものであり、readコマンドをREAD SECTOR(S)コマンドまたはREAD DMAコマンドに変換する方法を示したフローチャートである。6 is a flowchart illustrating a method of converting a read command into a READ SECTOR (S) command or a READ DMA command according to an embodiment of the present invention. 本発明の実施形態を示すものであり、writeコマンドをWRITE SECTOR(S)コマンドまたはWRITE DMAコマンドに変換する方法を示したフローチャートである。4 is a flowchart illustrating a method of converting a write command into a WRITE SECTOR (S) command or a WRITE DMA command according to an embodiment of the present invention. 本発明の実施形態を示すものであり、コマンドバッファに蓄積されたコマンドの実行順序を決める方法を示したフローチャートである。4 is a flowchart illustrating a method of determining an execution order of commands stored in a command buffer according to an embodiment of the present invention. 本発明の実施形態を示すものであり、書き込みコマンドの格納と再実行を行なう方法を示したフローチャートである。6 is a flowchart illustrating a method for storing and re-executing a write command according to an embodiment of the present invention. 従来技術を示すものであり、光ディスクドライブおよび外部ホストのブロック図である。It is a block diagram of an optical disk drive and an external host, showing the prior art.

本実施形態に係るディスクドライブ装置について、図面に基づいて説明すれば以下のとおりである。なお、本実施形態に係るディスクドライブ装置は、光ディスクからデータを読み出したり、光ディスクにデータを書き込んだりするディスクドライブ装置であるので、以下、これを「光ディスクドライブ」と呼称する。ただし、本発明は、ハードディスクドライブその他のドライブ装置一般に適用することができるものであり、光ディスクドライブにその適用範囲が限定されるものではない。   The disk drive device according to this embodiment will be described below with reference to the drawings. The disk drive device according to the present embodiment is a disk drive device that reads data from an optical disk or writes data to an optical disk. Therefore, this is hereinafter referred to as an “optical disk drive”. However, the present invention can be applied to general hard disk drives and other drive devices, and the scope of application thereof is not limited to optical disk drives.

(光ディスクドライブの構成)
本実施形態に係る光ディスクドライブ100の構成について、図1を参照して説明する。図1は、光ディスクドライブ100とホスト装置20のブロック図である。光ディスクドライブ100は、ATA/ATAPIデバイスであり、光ディスクドライブ100とホスト装置20とは、ATA/ATAPIインターフェースを介して接続されている。
(Configuration of optical disk drive)
The configuration of the optical disc drive 100 according to the present embodiment will be described with reference to FIG. FIG. 1 is a block diagram of the optical disk drive 100 and the host device 20. The optical disc drive 100 is an ATA / ATAPI device, and the optical disc drive 100 and the host device 20 are connected via an ATA / ATAPI interface.

図1に示したように、光ディスクドライブ100は、ATA/ATAPI(SATA)インターフェース110と、制御部120と、光ピックアップ130と、メモリ140とを備えている。   As shown in FIG. 1, the optical disc drive 100 includes an ATA / ATAPI (SATA) interface 110, a control unit 120, an optical pickup 130, and a memory 140.

制御部120は、セクタを指定するセクタ指定情報を引数とする既存のATA/ATAPIコマンド(セクタコマンドと呼称する)に加え、ファイルを指定するファイル指定情報を引数とする新規のATA/ATAPIコマンド(ファイルコマンドと呼称する)に応じた光ピックアップ130の制御を行い得るように、セクタコマンドに応じた光ピックアップ130の制御を行う従来のデバイス制御部121の機能を拡張したものである。ここでは、ファイルコマンドを対応するセクタコマンドに変換するコマンド変換部122を付加することによって、従来のデバイス制御部121の機能を拡張している。   In addition to the existing ATA / ATAPI command (referred to as a sector command) that uses sector designation information that designates a sector as an argument, the control unit 120 uses a new ATA / ATAPI command that uses file designation information that designates a file as an argument ( The function of the conventional device control unit 121 that controls the optical pickup 130 according to the sector command is extended so that the optical pickup 130 can be controlled according to the file command. Here, the function of the conventional device control unit 121 is expanded by adding a command conversion unit 122 that converts a file command into a corresponding sector command.

ATA/ATAPIインターフェース110を介して入力されたファイルコマンドは、コマンド変換部122に渡され、対応するセクタコマンドに変換され、デバイス制御部121に渡される。一方、ATA/ATAPIインターフェース110を介して入力されたセクタコマンドは、直接、デバイス制御部121に渡される。デバイス制御部121は、コマンド変換部122またはATA/ATAPIインターフェース110から渡されたセクタコマンドに応じて光ピックアップ130を制御する。すなわち、光ピックアップ130に走査させる光ディスク30上のセクタを、コマンド変換部122またはATA/ATAPIインターフェース110から渡されたセクタコマンドの引数であるセクタ指定情報に応じて決定する。   A file command input via the ATA / ATAPI interface 110 is transferred to the command conversion unit 122, converted into a corresponding sector command, and transferred to the device control unit 121. On the other hand, the sector command input via the ATA / ATAPI interface 110 is directly passed to the device control unit 121. The device controller 121 controls the optical pickup 130 according to the sector command passed from the command converter 122 or the ATA / ATAPI interface 110. That is, the sector on the optical disk 30 to be scanned by the optical pickup 130 is determined according to the sector designation information that is an argument of the sector command passed from the command conversion unit 122 or the ATA / ATAPI interface 110.

例えば、渡されたセクタコマンドがセクタリードコマンド(セクタ指定情報を引数とする読み出しコマンド)である場合、デバイス制御部121は、その引数により指定されたセクタに記録されたデータを読み出すように光ピックアップ130を制御する。また、渡されたセクタコマンドがセクタライトコマンド(セクタ指定情報を引数とする書き込みコマンド)である場合、デバイス制御部121は、その引数により指定されたセクタにデータを書き込むように光ピックアップ130を制御する。   For example, when the sector command passed is a sector read command (a read command using sector designation information as an argument), the device control unit 121 reads the data recorded in the sector designated by the argument so as to read the data. 130 is controlled. If the sector command passed is a sector write command (write command with sector designation information as an argument), the device control unit 121 controls the optical pickup 130 to write data in the sector designated by the argument. To do.

光ディスク30に記録されたファイルシステム情報には、光ディスク30に記録されたファイルの各々について、そのファイルを指定するファイル指定情報と、そのファイルを構成する一連のデータが格納されたセクタを指定するセクタ指定情報とが関連付けて登録されている。制御部120は、光ディスク30が挿入された直後に、このファイルシステム情報を光ディスク30から読み出し、読み出したファイルシステム情報をメモリ140に記憶する。また、制御部120は、光ディスク30が排出される直前に、メモリ140に記録されたファイルシステム情報を光ディスク30に書き込むとともに、メモリ140に記録されたファイルシステム情報を破棄する。   The file system information recorded on the optical disc 30 includes, for each file recorded on the optical disc 30, file designation information that designates the file and a sector that designates a sector in which a series of data constituting the file is stored. It is registered in association with the specified information. The control unit 120 reads the file system information from the optical disc 30 immediately after the optical disc 30 is inserted, and stores the read file system information in the memory 140. Further, immediately before the optical disc 30 is ejected, the control unit 120 writes the file system information recorded in the memory 140 to the optical disc 30 and discards the file system information recorded in the memory 140.

なお、光ディスク30から読み出してメモリ140に記憶するファイルシステム情報としては、UDFのような汎用のファイルシステムに関するファイルシステム情報が想定されるが、これに限定されず、光ディスク30に記録されたファイルの各々について、そのファイルを指定するファイル指定情報(例えば、ファイル名)と、そのファイルを構成する一連のデータが記録されたセクタを指定するセクタ指定情報(例えば、論理ブロックアドレス、または、シリンダ番号、ヘッド番号、および、セクタ番号)とが関連付けて登録されているものであれば何でもよい。   The file system information read from the optical disc 30 and stored in the memory 140 is assumed to be file system information related to a general-purpose file system such as UDF, but is not limited to this, and the file system information recorded on the optical disc 30 is not limited to this. For each, file designation information for designating the file (for example, a file name) and sector designation information for designating a sector in which a series of data constituting the file is recorded (for example, a logical block address or a cylinder number, As long as the head number and sector number) are registered in association with each other, anything may be used.

コマンド変換部122は、ファイルコマンドを対応するセクタコマンドに変換する際、メモリ140に記憶されたファイルシステム情報を参照することによって、デバイス制御部121に渡すセクタコマンドの引数(読み出し/書き込み対象セクタの先頭の論理ブロックアドレス、および、読み出し/書き込み対象セクタのセクタ数)を決定する。具体的には、ファイルコマンドの引数であるファイル指定情報と関連付けて登録されたセクタ指定情報をファイルシステム情報から読み出し、読み出したセクタ指定情報に応じてデバイス制御部121に渡すセクタコマンドの引数を決定する。コマンド変換部122によるコマンド変換の具体例については、参照する図面を代えて後述する。   The command conversion unit 122 refers to the file system information stored in the memory 140 when converting the file command into the corresponding sector command, and thereby the argument of the sector command (read / write target sector) to be passed to the device control unit 121. The first logical block address and the number of sectors of the read / write target sector) are determined. Specifically, the sector designation information registered in association with the file designation information that is an argument of the file command is read from the file system information, and the sector command argument to be passed to the device control unit 121 is determined according to the read sector designation information. To do. A specific example of command conversion by the command conversion unit 122 will be described later with reference to another drawing.

なお、ここでは、光ピックアップ130に走査させる光ディスク30上のセクタを、セクタコマンドに応じて決定する従来のデバイス制御部121に、ファイルコマンドを対応するセクタコマンドに変換するコマンド変換部122を付加することによって構成された制御部120について説明したが、これに限定されるわけではない。すなわち、制御部120は、ファイルコマンドの引数により指定されたファイルを構成するデータが記録されているセクタを指定するセクタ指定情報(メモリ140に記憶されたファイルシステム情報に登録されているセクタ指定情報のうち、ファイルコマンドの引数であるファイル指定情報に関連付けて登録されているセクタ指定情報)に応じて、光ピックアップ130に走査させる光ディスク30上のセクタを決定するものであればよく、ファイルコマンドをセクタコマンドに変換することを要さない。   Here, a command conversion unit 122 that converts a file command into a corresponding sector command is added to a conventional device control unit 121 that determines a sector on the optical disk 30 to be scanned by the optical pickup 130 according to a sector command. Although the control part 120 comprised by this was demonstrated, it is not necessarily limited to this. That is, the control unit 120 uses the sector designation information (sector designation information registered in the file system information stored in the memory 140) to designate the sector in which the data constituting the file designated by the argument of the file command is recorded. Of these, any sector on the optical disk 30 to be scanned by the optical pickup 130 may be determined in accordance with the sector designation information registered in association with the file designation information as an argument of the file command. There is no need to convert it to a sector command.

また、ここでは、光ディスクドライブ10に光ディスク30が挿入された時点で、ファイルシステム情報(の全部)を光ディスク30から読み出してメモリ140に記憶する構成について説明したが、これに限定されるわけではない。例えば、カレントディレクトリが変更される度に、変更後のカレントディレクトリに関するファイルシステム情報を光ディスク30から読み出してメモリ140に記憶する構成を採用してもよい。   Further, here, the configuration has been described in which the file system information (all of the file system information) is read from the optical disc 30 and stored in the memory 140 when the optical disc 30 is inserted into the optical disc drive 10, but the present invention is not limited to this. . For example, a configuration may be adopted in which file system information relating to the changed current directory is read from the optical disc 30 and stored in the memory 140 each time the current directory is changed.

(ATA/ATAPIコマンドに追加されたファイルコマンド)
次に、ATA/ATAPIコマンドに追加されたファイルコマンドについて、図2を参照して説明する。図2は、ATA/ATAPIコマンドに追加されたファイルコマンドを列挙した図である。
(File command added to ATA / ATAPI command)
Next, a file command added to the ATA / ATAPI command will be described with reference to FIG. FIG. 2 is a table listing file commands added to the ATA / ATAPI command.

ファイルコマンドは、ファイルに対するコマンドと、ディレクトリに対するコマンドとに大別される。   File commands are roughly classified into commands for files and commands for directories.

openコマンド,readコマンド,writeコマンド,closeコマンド,deleteコマンド,getStatコマンド,setStatコマンド,readAVコマンド,writeAVコマンドは、ファイルに対するコマンドであり、対象とするファイルを指定するファイル指定情報(例えば、ファイル名)を引数に含んでいる。一方、CreateDirコマンド,deleteDirコマンド,getFileListコマンドは、ディレクトリに対するコマンドであり、対象とするディレクトリを指定するディレクトリ指定情報(例えば、ディレクトリ名)を引数として含んでいる。   The open command, read command, write command, close command, delete command, getStat command, setStat command, readAV command, writeAV command are commands for files, and file specification information (for example, file name) that specifies the target file Is included in the argument. On the other hand, the CreateDir command, the deleteDir command, and the getFileList command are commands for directories, and include directory designation information (for example, a directory name) that designates a target directory as an argument.

なお、これらのファイルコマンドにおける引数の指定は、ファイルコマンドを発行するホスト装置20がATA/ATAPI(SATA)インターフェース110のcommandレジスタに引数の値を設定することにより行われる。   The designation of arguments in these file commands is performed by setting the argument value in the command register of the ATA / ATAPI (SATA) interface 110 by the host device 20 that issues the file command.

(コマンド変換の具体例)
次に、コマンド変換部122がファイルコマンドをセクタコマンドに変換する方法について、readコマンドとwriteコマンドとを例に挙げて説明する。
(Specific example of command conversion)
Next, a method in which the command conversion unit 122 converts a file command into a sector command will be described by taking a read command and a write command as examples.

図3は、コマンド変換部122がreadコマンド(ファイルリードコマンド)をREAD SECTOR(S)コマンドまたはREAD DMAコマンド(セクタリードコマンド)に変換する方法を示したフローチャートである。なお、READ SECTOR(S)コマンドおよびREAD DMAコマンドは、読み出し対象セクタの先頭の論理ブロックアドレスを表すSector Numberと、読み出し対象セクタのセクタ数を表すSector Countとを引数とする、ATA/ATAPIの読み出しコマンドである。   FIG. 3 is a flowchart showing how the command conversion unit 122 converts a read command (file read command) into a READ SECTOR (S) command or a READ DMA command (sector read command). Note that the READ SECTOR (S) command and the READ DMA command are ATA / ATAPI reads that use as arguments the Sector Number that represents the first logical block address of the sector to be read and the Sector Count that represents the number of sectors in the sector to be read. It is a command.

ATA/ATAPIインターフェース110を介してreadコマンドが入力されると、コマンド変換部122は、readコマンドの引数をATA/ATAPIインターフェース110のcommandレジスタから読み出す(S11)。具体的には、読み出し対象ファイルを指定するファイル指定情報と、読み出し対象データのサイズを指定するサイズ指定情報とを、ATA/ATAPIインターフェース110のcommandレジスタから読み出す。   When a read command is input via the ATA / ATAPI interface 110, the command conversion unit 122 reads an argument of the read command from the command register of the ATA / ATAPI interface 110 (S11). Specifically, the file designation information designating the read target file and the size designation information designating the size of the read target data are read from the command register of the ATA / ATAPI interface 110.

続いて、コマンド変換部122は、ステップS11において読み出したファイル指定情報に関連付けて登録されているセクタ指定情報(読み出し対象ファイルを構成する一連のデータが記録されたセクタを指定するセクタ指定情報)を、メモリ140に記憶されたファイルシステム情報から読み出す(S12)。   Subsequently, the command conversion unit 122 uses the sector designation information registered in association with the file designation information read in step S11 (sector designation information for designating a sector in which a series of data constituting the read target file is recorded). The file system information stored in the memory 140 is read (S12).

続いて、コマンド変換部122は、READ SECTOR(S)コマンドまたはREAD DMAコマンドの引数とするSector NumberおよびSector Countの値を、ステップS12において読み出したセクタ指定情報に応じて決定する(S13)。例えば、ステップS12において読み出したセクタ指定情報により指定されたセクタ(読み出し対象ファイルを構成する一例のデータが格納されたセクタ)の先頭の論理ブロックアドレスをSector Numberとし、ステップS11において読み出したサイズ指定情報により指定されたサイズ(読み出し対象データのサイズ)をセクタ数に換算したものをSector Countとする。   Subsequently, the command conversion unit 122 determines the values of Sector Number and Sector Count as arguments of the READ SECTOR (S) command or READ DMA command according to the sector designation information read in step S12 (S13). For example, the size designation information read in step S11 is set with the first logical block address of the sector designated by the sector designation information read in step S12 (sector storing the example data constituting the file to be read) as Sector Number. Sector Count is obtained by converting the size (size of read target data) specified by the above to the number of sectors.

続いて、コマンド変換部122は、S11において読み出したサイズ指定情報により指定されたサイズ(読み出し対象データのサイズ)を予め設定された閾値Thと比較する(S14)。そして、読み出し対象データのサイズが予め設定された閾値Thを下回っていた場合(S14:Yes)、READ SECTOR(S)コマンドをデバイス制御部121に渡す(S15)。一方、読み出し対象のデータのサイズが予め設定された閾値Thを上回っていた場合(S14:No)、READ DMAコマンドをデバイス制御部121に渡す(S16)。   Subsequently, the command conversion unit 122 compares the size specified by the size specification information read in S11 (the size of the data to be read) with a preset threshold Th (S14). If the size of the data to be read is below a preset threshold Th (S14: Yes), a READ SECTOR (S) command is passed to the device control unit 121 (S15). On the other hand, when the size of the data to be read exceeds the preset threshold Th (S14: No), the READ DMA command is passed to the device controller 121 (S16).

デバイス制御部121は、READ SECTOR(S)コマンドまたはREAD DMAコマンドの戻り値として、コマンドの実行に成功した場合にはtrueを、コマンドの実行に失敗した場合にはfalseを返す。コマンド変換部122は、デバイス制御部121がREAD SECTOR(S)コマンドまたはREAD DMAコマンドの実行に成功した場合(S17:Yes)には、readコマンドの戻り値としてtrueをホスト装置20に返し(S18)、デバイス制御部121がREAD SECTOR(S)コマンドまたはREAD DMAコマンドの実行に失敗した場合(S17:No)には、readコマンドの戻り値としてfalseをホスト装置20に返して(S19)、処理を終える。   As a return value of the READ SECTOR (S) command or the READ DMA command, the device control unit 121 returns true when the command has been successfully executed, and false when the command has failed. When the device control unit 121 succeeds in executing the READ SECTOR (S) command or the READ DMA command (S17: Yes), the command conversion unit 122 returns true to the host device 20 as a return value of the read command (S18). ) If the device control unit 121 fails to execute the READ SECTOR (S) command or the READ DMA command (S17: No), it returns false to the host device 20 as the return value of the read command (S19), and the processing Finish.

図4は、コマンド変換部122がwriteコマンド(ファイルライトコマンド)をWRITE SECTOR(S)コマンドまたはWRITE DMAコマンド(セクタライトコマンド)に変換する方法を示したフローチャートである。なお、WRITE SECTOR(S)コマンドおよびWRITE DMAコマンドは、書き込み対象セクタの先頭の論理ブロックアドレスを表すSector Numberと、書き込み対象セクタのセクタ数を表すSector Countとを引数とするATA/ATAPIの書き込みコマンドである。   FIG. 4 is a flowchart showing how the command conversion unit 122 converts a write command (file write command) into a WRITE SECTOR (S) command or a WRITE DMA command (sector write command). Note that the WRITE SECTOR (S) command and the WRITE DMA command are ATA / ATAPI write commands that use as arguments the Sector Number that represents the first logical block address of the write target sector and the Sector Count that represents the number of sectors in the write target sector. It is.

ATA/ATAPIインターフェース110を介してwriteコマンドが入力されると、コマンド変換部122は、writeコマンドの引数をATA/ATAPIインターフェース110のcommandレジスタから読み出す(S21)。具体的には、書き込み対象ファイルを指定するファイル指定情報と、書き込み対象データのサイズを指定するサイズ指定情報と、書き込み対象データとを、commandレジスタから読み出す。   When a write command is input via the ATA / ATAPI interface 110, the command conversion unit 122 reads an argument of the write command from the command register of the ATA / ATAPI interface 110 (S21). Specifically, the file designation information for designating the write target file, the size designation information for designating the size of the write target data, and the write target data are read from the command register.

続いて、コマンド変換部122は、ステップS21において読み出したファイル指定情報に関連付けて登録されたセクタ指定情報(書き込み対象ファイルを構成する一連のデータが記録されたセクタを指定するセクタ指定情報)を、メモリ140に記憶されたファイルシステム情報から読み出す(S22)。   Subsequently, the command conversion unit 122 converts the sector designation information registered in association with the file designation information read in step S21 (sector designation information for designating a sector in which a series of data constituting the file to be written is recorded) Read from the file system information stored in the memory 140 (S22).

続いて、コマンド変換部122は、WRITE SECTOR(S)コマンドまたはWRITE DMAコマンドの引数とするSector NumberおよびSector Countの値を、ステップS22において読み出したセクタ指定情報に応じて設定する(S23)。例えば、ステップS22において読み出したセクタ指定情報により指定されたセクタ(書き込み対象ファイルを構成する一連のデータが記録されたセクタ)の先頭の論理ブロックアドレスをSector Numberとし、ステップS21において読み出したサイズ指定情報により指定されたサイズ(書き込み対象データのサイズ)をセクタ数に換算したものをSector Countとする。   Subsequently, the command conversion unit 122 sets the values of Sector Number and Sector Count as arguments of the WRITE SECTOR (S) command or WRITE DMA command according to the sector designation information read in step S22 (S23). For example, the first logical block address of the sector (sector in which a series of data constituting the write target file is recorded) designated by the sector designation information read in step S22 is Sector Number, and the size designation information read in step S21 Sector Count is obtained by converting the size specified by (the size of data to be written) into the number of sectors.

続いて、コマンド変換部122は、S21において読み出したサイズ指定情報により指定された、書き込み対象データのサイズを予め設定された閾値Thと比較する(S24)。そして、書き込み対象データのサイズが予め設定された閾値Thを下回っていた場合(S24:Yes)、WRITE SECTOR(S)コマンドをデバイス制御部121に渡す(S25)。一方、書き込み対象データのサイズが予め設定された閾値Thを上回っていた場合(S24:No)、WRITE DMAコマンドをデバイス制御部121に渡す(S26)。   Subsequently, the command conversion unit 122 compares the size of the write target data designated by the size designation information read in S21 with a preset threshold Th (S24). If the size of the write target data is below the preset threshold Th (S24: Yes), the WRITE SECTOR (S) command is passed to the device control unit 121 (S25). On the other hand, when the size of the write target data exceeds the preset threshold Th (S24: No), the WRITE DMA command is passed to the device control unit 121 (S26).

デバイス制御部121は、WRITE SECTOR(S)コマンドまたはWRITE DMAコマンドの戻り値として、コマンドの実行に成功した場合にはtrueを、コマンドの実行に失敗した場合にはfalseを返す。コマンド変換部122は、デバイス制御部121がWRITE SECTOR(S)コマンドまたはWRITE DMAコマンドの実行に成功した場合(S27:Yes)には、writeコマンドの戻り値としてtrueをホスト装置20に返し、メモリ140に記憶されたファイルシステム情報を更新して(S28)、処理を終える。具体的には、ステップS22においてファイルシステム情報から読み出したセクタ指定情報を、ステップS25またはS26においてデバイス制御部121に渡されたWRITE SECTOR(S)コマンドまたはWRITE SECTOR(S)コマンドに応じて書き込み対象データが書き込まれたセクタを指定するセクタ指定情報に書き換える。一方、デバイス制御部121がWRITE SECTOR(S)コマンドまたはWRITE DMAコマンドの実行に失敗した場合(S27:No)には、writeコマンドの戻り値としてfalseをホスト装置20に返して(S29)、処理を終える。   As a return value of the WRITE SECTOR (S) command or the WRITE DMA command, the device control unit 121 returns true when the command is successfully executed and returns false when the command fails. When the device control unit 121 succeeds in executing the WRITE SECTOR (S) command or the WRITE DMA command (S27: Yes), the command conversion unit 122 returns true to the host device 20 as the return value of the write command, and the memory The file system information stored in 140 is updated (S28), and the process ends. Specifically, the sector designation information read from the file system information in step S22 is written according to the WRITE SECTOR (S) command or WRITE SECTOR (S) command passed to the device control unit 121 in step S25 or S26. It is rewritten to sector designation information that designates a sector in which data is written. On the other hand, when the device control unit 121 fails to execute the WRITE SECTOR (S) command or the WRITE DMA command (S27: No), it returns false to the host device 20 as a return value of the write command (S29), and processing Finish.

なお、図4では、書き込み対象データのサイズが書き込み対象ファイルのサイズよりも小さい場合を仮定したが、書き込み対象データのサイズが書き込み対象ファイルのサイズよりも大きい場合であっても、書き込み対象ファイルが記録されているセクタに記録しきれない分の書き込み対象データを空きセクタに記録するようにすればwriteコマンドを実行することができる。   In FIG. 4, it is assumed that the size of the write target data is smaller than the size of the write target file. However, even if the size of the write target data is larger than the size of the write target file, the write target file If the data to be written cannot be recorded in the recorded sector, the write command can be executed.

なお、ここでは、readコマンドおよびwriteコマンドをセクタコマンドに変換する方法について説明したが、他のファイルコマンドも略同様の方法で対応するセクタコマンドに変換することができる。コマンド変換部122がファイルコマンドをセクタコマンドに変換する方法は、従来のホスト装置20がファイルコマンド(システムコール)をセクタコマンド(ATA/ATAPIコマンド)に変換する方法と略同様である。   Although the method for converting the read command and the write command into the sector command has been described here, other file commands can be converted into the corresponding sector command by a substantially similar method. The method of converting the file command into the sector command by the command conversion unit 122 is substantially the same as the method of converting the file command (system call) into the sector command (ATA / ATAPI command) by the conventional host device 20.

(コマンドバッファ)
光ディスクドライブ100は、図1に示した構成に加え、ATA/ATAPIインターフェース110を介して入力されたコマンドを蓄積するコマンドバッファを備えていることが好ましい。そして、制御部120は、このコマンドバッファに蓄積されたコマンドを、優先度高い順に実行する構成とすることが好ましい。これにより、光ディスクドライブ100に、コマンドの実行順序を最適化するスケジューリング機能を持たせることができる。
(Command buffer)
The optical disc drive 100 preferably includes a command buffer for storing commands input via the ATA / ATAPI interface 110 in addition to the configuration shown in FIG. The control unit 120 is preferably configured to execute the commands stored in the command buffer in descending order of priority. Thereby, the optical disc drive 100 can be provided with a scheduling function for optimizing the command execution order.

図5に、制御部120がこのコマンドバッファに蓄積されたコマンドの実行順序を決めるアルゴリズムの一例を示す。   FIG. 5 shows an example of an algorithm in which the control unit 120 determines the execution order of commands stored in the command buffer.

制御部120は、ATA/ATAPIインターフェース110を介して新たなコマンドが入力されると(S31:Yes)、新たなコマンドをコマンドバッファに追加し(S32)、コマンドバッファに蓄積されたコマンドを優先度の高い順に並べ替える(S33)。そして、コマンドバッファに蓄積されたコマンドに未実行のコマンドがあるか否かを判定し(S34)、未実行のコマンドがあれば(S34:Yes)、未実行のコマンドのなかで最も優先度の高いコマンドを実行する(S35)という処理を繰り返す。   When a new command is input via the ATA / ATAPI interface 110 (S31: Yes), the control unit 120 adds the new command to the command buffer (S32), and assigns the command stored in the command buffer to the priority level. Sort in ascending order (S33). Then, it is determined whether or not there is an unexecuted command in the commands stored in the command buffer (S34). If there is an unexecuted command (S34: Yes), the command with the highest priority among the unexecuted commands is determined. The process of executing a high command (S35) is repeated.

このようなアルゴリズムにより、例えば、readAVコマンドを優先度の高いコマンド、その他のコマンドを優先度の低いコマンドとした場合に、readAVコマンドを他のコマンドより優先して実行することができる。これにより、実時間再生を要求されるAVデータの読み出しが他のコマンドの実行により阻害されることがなくなり、再生が飛んでしまうことを防止することができる。すなわち、ホスト装置20によるAVデータの読み出しがよりスムーズに行なえるようになる。   With such an algorithm, for example, when the readAV command is a command with a high priority and other commands are commands with a low priority, the readAV command can be executed with priority over other commands. As a result, reading of AV data that requires real-time playback is not hindered by the execution of other commands, and it is possible to prevent playback from skipping. That is, the AV data can be read more smoothly by the host device 20.

なお、コマンドバッファに蓄積するコマンドは、ファイルコマンドのみであってもよいし、セクタコマンドとファイルコマンドとの両方であってもよい。また、光ディスクドライブ100が備えているメモリ140を、ここで説明したコマンドバッファに流用してもよい。   Note that the command stored in the command buffer may be only a file command or both a sector command and a file command. Further, the memory 140 provided in the optical disc drive 100 may be used for the command buffer described here.

(書き込みコマンドバッファ)
また、光ディスクドライブ100は、図1に示した構成に加え、ATA/ATAPIインターフェース110を介して入力されたコマンドのうち書き込みコマンドを格納する、不揮発性メモリにより構成された書き込みコマンドバッファを備えていることが好ましい。そして、制御部120は、書き込みコマンドの実行が中断された場合、書き込みコマンドバッファに格納された書き込みコマンドを再実行する構成とすることが好ましい。これにより、突然の電源断などによって書き込みコマンドの実行が中断された場合であっても、ディスク上のデータに不整合(例えば、データの書き込みを行なったのに、管理データが書きかえが行なわれていないなど)が生じることを防止することができる。
(Write command buffer)
In addition to the configuration shown in FIG. 1, the optical disc drive 100 includes a write command buffer configured by a nonvolatile memory that stores a write command among commands input via the ATA / ATAPI interface 110. It is preferable. The control unit 120 preferably re-executes the write command stored in the write command buffer when execution of the write command is interrupted. As a result, even if the execution of the write command is interrupted due to a sudden power interruption or the like, the data on the disk is inconsistent (for example, the management data is rewritten even though the data has been written). Can be prevented.

図6に、制御部120が書き込みコマンドの格納と再実行を行なうアルゴリズムの一例を示す。   FIG. 6 shows an example of an algorithm for the control unit 120 to store and re-execute the write command.

制御部120は、図6(a)に示したように、ATA/ATAPIインターフェース110を介して入力されたコマンドが書き込みコマンドであるか否かを判定し(S41)、書き込みコマンドであれば書き込みコマンドバッファに格納する(S42)。この際、書き込み対象データなど、書き込みコマンドの引数についても同時に書き込みコマンドバッファに格納する。そして、書き込みコマンドの実行が成功した時点で(S43:Yes)、書き込みコマンドバッファに格納した書き込みコマンドを削除する(S44)。この際、書き込み対象データなど、書き込みコマンドの引数についても同時に書き込みコマンドバッファから削除する。これにより、書き込みコマンドの実行が中断された場合に(S43:No)、書き込みコマンドとその引数とが書き込みコマンドバッファに保存されることになる。   As shown in FIG. 6A, the control unit 120 determines whether the command input via the ATA / ATAPI interface 110 is a write command (S41). Store in the buffer (S42). At this time, write command arguments such as write target data are simultaneously stored in the write command buffer. Then, when the execution of the write command is successful (S43: Yes), the write command stored in the write command buffer is deleted (S44). At this time, write command arguments such as write target data are simultaneously deleted from the write command buffer. Thereby, when the execution of the write command is interrupted (S43: No), the write command and its argument are saved in the write command buffer.

また、制御部120は、図6(b)に示したように、制御部120を動作させるプログラムが再起動された時点で、書き込みコマンドバッファに書き込みコマンドが保存されているか否かを判定し(S45)、書き込みコマンドが保存されていれば(S45:Yes)、その書き込みコマンドを実行する(S46)。これにより、実行が中断された書き込みコマンドを再実行することができる。   Further, as shown in FIG. 6B, the control unit 120 determines whether or not the write command is stored in the write command buffer when the program for operating the control unit 120 is restarted ( If the write command is stored (S45), the write command is executed (S46). Thereby, the write command whose execution has been interrupted can be re-executed.

(プログラムおよび記録媒体)
最後に、光ディスクドライブ100に含まれている制御部120は、ハードウェアロジックによって構成すればよい。または、次のように、CPU(Central Processing Unit)を用いてソフトウェアによって実現してもよい。
(Program and recording medium)
Finally, the control unit 120 included in the optical disc drive 100 may be configured by hardware logic. Alternatively, it may be realized by software using a CPU (Central Processing Unit) as follows.

すなわち、制御部120は、各機能を実現するプログラムの命令を実行するMPUなどのCPU、このプログラムを格納したROM(Read Only Memory)、上記プログラムを実行可能な形式に展開するRAM(Random Access Memory)、および、上記プログラムおよび各種データを格納するメモリ等の記憶装置(記録媒体)を備えている。   That is, the control unit 120 includes a CPU such as an MPU that executes instructions of a program that realizes each function, a ROM (Read Only Memory) that stores the program, and a RAM (Random Access Memory) that expands the program into an executable format. ), And a storage device (recording medium) such as a memory for storing the program and various data.

そして、本発明の目的は、制御部120のプログラムメモリに固定的に担持されている場合に限らず、上記プログラムのプログラムコード(実行形式プログラム、中間コードプログラム、または、ソースプログラム)を記録した記録媒体を光ディスクドライブ100に供給し、光ディスクドライブ100が上記記録媒体に記録されている上記プログラムコードを読み出して実行することによっても、達成可能である。   The object of the present invention is not limited to the case where the program is stored in the program memory of the control unit 120, but a record in which the program code (executable program, intermediate code program, or source program) of the program is recorded. This can also be achieved by supplying a medium to the optical disc drive 100 and reading and executing the program code recorded on the recording medium by the optical disc drive 100.

上記記録媒体は、特定の構造または種類のものに限定されない。すなわちこの記録媒体は、たとえば、磁気テープやカセットテープ等のテープ系、フロッピー(登録商標)ディスク/ハードディスク等の磁気ディスクやCD−ROM/MO/MD/DVD/CD−R等の光ディスクを含むディスク系、ICカード(メモリカードを含む)/光カード等のカード系、あるいはマスクROM/EPROM/EEPROM/フラッシュROM等の半導体メモリ系などとすることができる。   The recording medium is not limited to a specific structure or type. That is, the recording medium includes, for example, a tape system such as a magnetic tape and a cassette tape, a magnetic disk such as a floppy (registered trademark) disk / hard disk, and an optical disk such as a CD-ROM / MO / MD / DVD / CD-R. System, a card system such as an IC card (including a memory card) / optical card, or a semiconductor memory system such as a mask ROM / EPROM / EEPROM / flash ROM.

また、制御部120(または光ディスクドライブ100)を通信ネットワークと接続可能に構成しても、本発明の目的を達成できる。この場合、上記のプログラムコードを、通信ネットワークを介して制御部120に供給する。この通信ネットワークは制御部120にプログラムコードを供給できるものであればよく、特定の種類または形態に限定されない。たとえばインターネット、イントラネット、エキストラネット、LAN、ISDN、VAN、CATV通信網、仮想専用網(Virtual Private Network)、電話回線網、移動体通信網、衛星通信網等であればよい。   The object of the present invention can be achieved even if the control unit 120 (or the optical disc drive 100) is configured to be connectable to a communication network. In this case, the program code is supplied to the control unit 120 via the communication network. The communication network is not limited to a specific type or form as long as it can supply the program code to the control unit 120. For example, the Internet, intranet, extranet, LAN, ISDN, VAN, CATV communication network, virtual private network, telephone line network, mobile communication network, satellite communication network, etc. may be used.

この通信ネットワークを構成する伝送媒体も、プログラムコードを伝送可能な任意の媒体であればよく、特定の構成または種類のものに限定されない。たとえばIEEE1394、USB、電力線搬送、ケーブルTV回線、電話線、ADSL(Asymmetric Digital Subscriber Line)回線等の有線でも、IrDAやリモコンのような赤外線、Bluetooth(登録商標)、802.11無線、HDR、携帯電話網、衛星回線、地上波デジタル網等の無線でも利用可能である。なお本発明は、上記プログラムコードが電子的な伝送で具現化された、搬送波に埋め込まれたコンピュータデータ信号の形態でも実現され得る。   The transmission medium constituting the communication network may be any medium that can transmit the program code, and is not limited to a specific configuration or type. For example, even with wired lines such as IEEE 1394, USB, power line carrier, cable TV line, telephone line, ADSL (Asymmetric Digital Subscriber Line) line, infrared rays such as IrDA and remote control, Bluetooth (registered trademark), 802.11 wireless, HDR, mobile phone It can also be used by radio such as a telephone network, a satellite line, and a terrestrial digital network. The present invention can also be realized in the form of a computer data signal embedded in a carrier wave in which the program code is embodied by electronic transmission.

(付記事項)
本発明は上述した実施形態に限定されるものではなく、請求項に示した範囲で種々の変更が可能であり、異なる実施形態にそれぞれ開示された技術的手段を適宜組み合わせて得られる実施形態についても本発明の技術的範囲に含まれる。
(Additional notes)
The present invention is not limited to the above-described embodiments, and various modifications can be made within the scope shown in the claims, and embodiments obtained by appropriately combining technical means disclosed in different embodiments. Is also included in the technical scope of the present invention.

本発明は、セクタを指定するセクタ指定情報を引数とするコマンドに応じて動作するディスクドライブ装置に利用することができる。特に、そのようなコマンドに応じて動作する光ディスクドライブ装置に取り分け好適に利用することができる。   The present invention can be used for a disk drive device that operates in response to a command having sector designation information for designating a sector as an argument. In particular, it can be suitably used for an optical disc drive apparatus that operates in response to such a command.

100 光ディスクドライブ(ディスクドライブ装置)
110 ATA/ATAPIインターフェース(インターフェース)
120 制御部(制御手段)
121 デバイス制御部(デバイス制御手段)
122 コマンド変換部(変換手段)
130 ピックアップ(ヘッド)
140 メモリ
100 Optical disk drive (disk drive device)
110 ATA / ATAPI interface (interface)
120 Control unit (control means)
121 Device control unit (device control means)
122 Command conversion unit (conversion means)
130 Pickup (Head)
140 memory

Claims (8)

ディスクから読み出したファイルシステム情報を記憶するメモリと、
ファイルを指定するファイル指定情報を引数とするファイルコマンドを受け付けるインターフェースと、
上記インターフェースが上記ファイルコマンドを受け付けた後、上記メモリに記憶された上記ファイルシステム情報に登録されているセクタ指定情報であって、該ファイルコマンドの引数により指定されたファイルを構成するデータが記録されているセクタを指定するセクタ指定情報に応じて、ヘッドに走査させる上記ディスク上のセクタを決定する制御手段と、を備えている、ことを特徴とするディスクドライブ装置。
A memory for storing file system information read from the disk;
An interface that accepts a file command that takes file specification information as an argument, and
After the interface receives the file command, sector designation information registered in the file system information stored in the memory, and data constituting the file designated by the argument of the file command is recorded. And a control means for determining a sector on the disk to be scanned by the head in accordance with sector designation information for designating a given sector.
上記インターフェースは、セクタを指定するセクタ指定情報を引数とするセクタコマンドを受け付け、
上記制御手段は、上記インターフェースが上記セクタコマンドを受け付けた後、該セクタコマンドの引数に応じて、上記ヘッドに走査させる上記ディスク上のセクタを決定する、ことを特徴とする請求項1に記載のディスクドライブ装置。
The interface accepts a sector command with a sector designation information that designates a sector as an argument,
2. The control unit according to claim 1, wherein after the interface receives the sector command, the control unit determines a sector on the disk to be scanned by the head according to an argument of the sector command. Disk drive device.
上記インターフェースが受け付けたコマンドを蓄積するコマンドバッファを備えており、
上記制御手段は、上記コマンドバッファに蓄積されたコマンドを、優先度の高いコマンドから順に実行する、ことを特徴とする請求項1または2に記載のディスクドライブ装置。
It has a command buffer that accumulates commands accepted by the interface,
3. The disk drive device according to claim 1, wherein the control means executes commands stored in the command buffer in order from a command having a higher priority.
上記インターフェースが受け付けた、データの書き込みを命じる書き込みコマンドを格納する書き込みコマンドバッファを備えており、
上記制御手段は、上記書き込みコマンドの実行が中断された場合、該書き込みコマンドを上記書き込みコマンドバッファから読み出して再実行する、ことを特徴とする請求項1から3までの何れか1項に記載のディスクドライブ装置。
It has a write command buffer that stores a write command that commands the writing of data accepted by the interface,
4. The control unit according to claim 1, wherein when the execution of the write command is interrupted, the control unit reads the write command from the write command buffer and re-executes the write command. 5. Disk drive device.
上記制御手段は、
上記インターフェースが受け付けたファイル指定情報を引数とするファイルコマンドを、上記メモリに記憶された上記ファイルシステム情報を参照してセクタ指定情報を引数とするセクタコマンドに変換する変換手段と、
上記変換手段により得られたセクタコマンドの引数に応じて、上記ヘッドに走査させる上記ディスク上のセクタを決定するデバイス制御手段とを含んでいる、ことを特徴とする請求項1から4までの何れか1項に記載のディスクドライブ装置。
The control means includes
Conversion means for converting a file command having the file designation information received by the interface as an argument into a sector command having the sector designation information as an argument with reference to the file system information stored in the memory;
5. A device control means for determining a sector on the disk to be scanned by the head according to an argument of a sector command obtained by the conversion means. 2. The disk drive device according to claim 1.
ディスクドライブ装置を制御する制御方法であって、
ディスクから読み出したファイルシステム情報をメモリに記憶する記憶ステップと、
ファイルを指定するファイル指定情報を引数とするファイルコマンドを受け付ける受付ステップと、
上記ファイルコマンドを受け付けた後、上記メモリに記憶された上記ファイルシステム情報に登録されているセクタ指定情報であって、該ファイルコマンドの引数により指定されたファイルを構成するデータが記録されているセクタを指定するセクタ指定情報に応じて、ヘッドに走査させる上記ディスク上のセクタを決定する決定ステップと、を含んでいる、ことを特徴とするディスクドライブ装置の制御方法。
A control method for controlling a disk drive device,
Storing the file system information read from the disk in a memory;
A reception step for receiving a file command having a file specification information for specifying a file as an argument;
Sector designation information registered in the file system information stored in the memory after receiving the file command, and a sector in which data constituting the file designated by the argument of the file command is recorded And a determining step for determining a sector on the disk to be scanned by the head according to sector specifying information for specifying the disk drive.
請求項6に記載の制御方法をコンピュータに実行させるためのプログラムであって、
上記制御方法が含んでいる上記各ステップをコンピュータに実行させるプログラム。
A program for causing a computer to execute the control method according to claim 6,
A program that causes a computer to execute the steps included in the control method.
請求項7に記載のプログラムを記録したコンピュータ読み取り可能な記録媒体。   A computer-readable recording medium on which the program according to claim 7 is recorded.
JP2009058160A 2009-03-11 2009-03-11 Disk driving device, control method thereof, program, and recording medium Pending JP2010211880A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009058160A JP2010211880A (en) 2009-03-11 2009-03-11 Disk driving device, control method thereof, program, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009058160A JP2010211880A (en) 2009-03-11 2009-03-11 Disk driving device, control method thereof, program, and recording medium

Publications (1)

Publication Number Publication Date
JP2010211880A true JP2010211880A (en) 2010-09-24

Family

ID=42971871

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009058160A Pending JP2010211880A (en) 2009-03-11 2009-03-11 Disk driving device, control method thereof, program, and recording medium

Country Status (1)

Country Link
JP (1) JP2010211880A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101151684B1 (en) 2010-12-17 2012-06-14 주식회사 히타치엘지 데이터 스토리지 코리아 Method for converting data in optical disc drive
JP2014505959A (en) * 2011-02-18 2014-03-06 アビニシオ テクノロジー エルエルシー Managing buffer overflow conditions

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09244932A (en) * 1996-03-06 1997-09-19 Ekushingu:Kk Disk array device
JPH10234038A (en) * 1997-02-21 1998-09-02 Hitachi Ltd Data processor, data form converter, data communication method and data processing system
JP2001222380A (en) * 2000-02-07 2001-08-17 Hitachi Ltd External storage device and information processing system with the same
JP2002244816A (en) * 2001-02-20 2002-08-30 Hitachi Ltd Disk device
JP2003272349A (en) * 2002-03-19 2003-09-26 Sony Corp Information processor and method, recording medium, and program
JP2004005830A (en) * 2002-05-31 2004-01-08 Sony Corp Information reading device, information writing device, information reading method, information writing method, program, and storage medium
JP2004078409A (en) * 2002-08-13 2004-03-11 Sony Corp Reproducing device and method, recording medium and program
JP2005293370A (en) * 2004-04-01 2005-10-20 Hitachi Ltd Storage control system
JP2006164439A (en) * 2004-11-10 2006-06-22 Teac Corp Optical disc apparatus
JP2007116214A (en) * 2005-10-17 2007-05-10 Sharp Corp Recording device, reproducing unit, recording/reproducing device, program, and recording medium thereof
JP2008071404A (en) * 2006-09-13 2008-03-27 Toshiba Corp Command management system and command management method
JP2008165881A (en) * 2006-12-27 2008-07-17 Toshiba Corp Magnetic disk device and its control method
JP2008293578A (en) * 2007-05-24 2008-12-04 Hitachi Ltd Stream data control module

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09244932A (en) * 1996-03-06 1997-09-19 Ekushingu:Kk Disk array device
JPH10234038A (en) * 1997-02-21 1998-09-02 Hitachi Ltd Data processor, data form converter, data communication method and data processing system
JP2001222380A (en) * 2000-02-07 2001-08-17 Hitachi Ltd External storage device and information processing system with the same
JP2002244816A (en) * 2001-02-20 2002-08-30 Hitachi Ltd Disk device
JP2003272349A (en) * 2002-03-19 2003-09-26 Sony Corp Information processor and method, recording medium, and program
JP2004005830A (en) * 2002-05-31 2004-01-08 Sony Corp Information reading device, information writing device, information reading method, information writing method, program, and storage medium
JP2004078409A (en) * 2002-08-13 2004-03-11 Sony Corp Reproducing device and method, recording medium and program
JP2005293370A (en) * 2004-04-01 2005-10-20 Hitachi Ltd Storage control system
JP2006164439A (en) * 2004-11-10 2006-06-22 Teac Corp Optical disc apparatus
JP2007116214A (en) * 2005-10-17 2007-05-10 Sharp Corp Recording device, reproducing unit, recording/reproducing device, program, and recording medium thereof
JP2008071404A (en) * 2006-09-13 2008-03-27 Toshiba Corp Command management system and command management method
JP2008165881A (en) * 2006-12-27 2008-07-17 Toshiba Corp Magnetic disk device and its control method
JP2008293578A (en) * 2007-05-24 2008-12-04 Hitachi Ltd Stream data control module

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101151684B1 (en) 2010-12-17 2012-06-14 주식회사 히타치엘지 데이터 스토리지 코리아 Method for converting data in optical disc drive
JP2014505959A (en) * 2011-02-18 2014-03-06 アビニシオ テクノロジー エルエルシー Managing buffer overflow conditions
KR101734883B1 (en) * 2011-02-18 2017-05-12 아브 이니티오 테크놀로지 엘엘시 Managing buffer overflow conditions

Similar Documents

Publication Publication Date Title
JP4635038B2 (en) Magnetic recording apparatus, encryption method, and encryption program
JP3977245B2 (en) Playback device
RU2440629C1 (en) Optical disc drive
WO2005088632A1 (en) Information processing device and method, program recording medium, and program
US20060056813A1 (en) Unified control and memory for a combined DVD/HDD system
JP2007034537A (en) Composite storage device, data writing method, and program
US20060250721A1 (en) Recording apparatus
US7613892B2 (en) Recording device, recording method, recording medium, and program
JP2005302152A (en) Composite type storage device, data writing method, and program
JP2010027105A (en) Disk-drive device and method for error recovery thereof
US20050259542A1 (en) Reproduction device and method, recording medium, and program
JP2010211880A (en) Disk driving device, control method thereof, program, and recording medium
US20060056814A1 (en) Unified control and memory for a combined DVD/HDD system
JP2010140380A (en) Controller for changing command execution sequence and storage device
JP5053945B2 (en) Recording medium initialization method and recording medium initialization apparatus
JP5301666B2 (en) Data recording apparatus and audio system
RU2523733C2 (en) Recording device and method of editing video and audio
WO2005041186A1 (en) Information recorder and information recording method and recording medium
JP2009059444A (en) Information processing device and information processing method
JP4984677B2 (en) Information processing device
US6496311B1 (en) Data recording/reproducing unit, data recording method, data reproducing method, data recording/reproducing method, hard disk controller, and AV-data recording/reproducing method
JP4536633B2 (en) RECORDING DEVICE, PROGRAM, AND RECORDING MEDIUM THEREOF
JP2010238336A (en) Recorder, recording method, program, and recording medium
JP2001043622A (en) Information processor
JP2004302704A (en) File management method and recording/reproducing device with file management function using it

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110223

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120123

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120131

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120327

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120828

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20121023

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20130226