JP2007334970A - Recording device, method, and program - Google Patents

Recording device, method, and program Download PDF

Info

Publication number
JP2007334970A
JP2007334970A JP2006164134A JP2006164134A JP2007334970A JP 2007334970 A JP2007334970 A JP 2007334970A JP 2006164134 A JP2006164134 A JP 2006164134A JP 2006164134 A JP2006164134 A JP 2006164134A JP 2007334970 A JP2007334970 A JP 2007334970A
Authority
JP
Japan
Prior art keywords
recording medium
data
recording
writing
control unit
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.)
Withdrawn
Application number
JP2006164134A
Other languages
Japanese (ja)
Inventor
Ryogo Ito
亮吾 伊藤
Junichi Yokota
淳一 横田
Hiroshi Shimono
浩 下野
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 JP2006164134A priority Critical patent/JP2007334970A/en
Publication of JP2007334970A publication Critical patent/JP2007334970A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To restore a destroyed sector into a recordable and reproducible state again. <P>SOLUTION: A media control unit 152 counts how many times writing to the same sector is performed, and if the writing is not successful although exceeding the limited number of times, the media control unit 152 stores information indicating the sector where the writing ended in failure as bad sector information in a nonvolatile memory 33. Further, the media control unit 152 when requested by an application 101 to perform mounting processing and formatting processing requests the device driver 103 corresponding to the recording medium 104 to read the sector where the writing ended in failure based upon the bad sector information in the nonvolatile memory 33, and also perform mounting processing and formatting processing. The present invention is applicable to a recording and reproducing device which records data to a recording medium. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、記録装置および方法、並びにプログラムに関し、特に、アクセス中のセクタが破壊されたとしても、マウント処理またはフォーマット処理の際に、交替セクタ処理を発動させることができるようにした記録装置および方法、並びにプログラムに関する。   The present invention relates to a recording apparatus and method, and a program, and more particularly to a recording apparatus and a recording apparatus that can activate an alternate sector process during mount processing or format processing even when a sector being accessed is destroyed. The present invention relates to a method and a program.

例えば、ハードディスクドライブ(HDD)に対して記録処理を行った際に、振動や衝撃、温度や湿度、その他の要因が影響して、所望のセクタへ正しくデータを書き込めない場合がある。   For example, when recording processing is performed on a hard disk drive (HDD), data may not be correctly written to a desired sector due to influences of vibration, shock, temperature, humidity, and other factors.

このような場合に対する提案の1つとして、特許文献1には、リトライ回数を増減させる工夫などが提案されている。   As one of proposals for such a case, Patent Document 1 proposes a device for increasing or decreasing the number of retries.

特開2003−22628号公報Japanese Patent Laid-Open No. 2003-22628

しかしながら、所望のセクタへ正しくデータを書き込めない場合には、HDD内部にて交替セクタ処理を行わないと、そのセクタに対して書き込みリトライを行ったとしても、再び書き込みエラーとなるときがある。したがって、単に、リトライ回数やタイムアウト値などを増減させるだけでは、リトライ効果が得られず、結果的に、所望のセクタへデータが書きこめない場合があった。   However, if data cannot be correctly written to a desired sector, if a replacement sector process is not performed inside the HDD, a write error may occur again even if a write retry is performed on that sector. Therefore, simply increasing or decreasing the number of retries, timeout value, etc., does not provide a retry effect, and as a result, data cannot be written to a desired sector.

本発明は、このような状況に鑑みてなされたものであり、アクセス中のセクタが破壊されたとしても、マウント処理またはフォーマット処理の際に、交替セクタ処理を発動させることで、そのセクタを再び、記録再生可能状態に復旧することができるようにするものである。   The present invention has been made in view of such a situation, and even if a sector being accessed is destroyed, the alternate sector process is activated at the time of the mount process or the format process, so that the sector is restored. Thus, it is possible to recover to a recordable / reproducible state.

本発明の一側面の記録装置は、記録媒体にデータを記録する記録装置において、前記記録媒体の所定の記録単位の領域へのデータの書き込みを制御する書込制御手段と、前記所定の記録単位の領域への前記データの書き込みが成功したか否かを判定する書込判定手段と、前記書込判定手段により前記データの書き込みが失敗したと判定された場合、前記データの書き込みが失敗した前記所定の記録単位の領域の情報を記憶する記憶手段とを備える。   The recording apparatus according to one aspect of the present invention is a recording apparatus that records data on a recording medium, wherein the recording control unit controls data writing to an area of a predetermined recording unit of the recording medium; and the predetermined recording unit A write determination means for determining whether or not the writing of the data to the area of the data has succeeded, and the writing determination means determines that the writing of the data has failed, the writing of the data has failed. Storage means for storing information of a predetermined recording unit area.

前記記録媒体のマウント処理を制御するマウント制御手段と、前記マウント制御手段により制御される前記記録媒体のマウント処理の際に、前記記憶手段に記憶された前記データの書き込みが失敗した前記所定の記録単位の領域の情報に基づいて、前記所定の記録単位の領域からのデータの読み出しを制御する読出制御手段とをさらに備えることができる。   A mount control unit for controlling the mounting process of the recording medium; and the predetermined recording in which writing of the data stored in the storage unit has failed during the mounting process of the recording medium controlled by the mount control unit. Read control means for controlling reading of data from the predetermined recording unit area based on the unit area information may be further provided.

前記記憶手段に記憶された前記データの書き込みが失敗した前記所定の記録単位の領域の情報に記載の書き込み失敗回数が所定の閾値より多いか否かを判定する回数判定手段をさらに備え、前記回数判定手段により前記書き込み失敗回数が所定の閾値より多いと判定された場合、前記読出制御手段は、前記記録媒体全面に対しての読み出しを順次制御することができる   The number of times determination means for determining whether or not the number of write failures described in the information of the area of the predetermined recording unit in which the writing of the data stored in the storage means has failed is greater than a predetermined threshold, the number of times When the determination means determines that the number of write failures is greater than a predetermined threshold, the read control means can sequentially control reading from the entire surface of the recording medium.

前記記録媒体のフォーマット処理を制御するフォーマット制御手段と、前記フォーマット制御手段により制御される前記記録媒体のフォーマット処理の際に、前記記憶手段に記憶された前記データの書き込みが失敗した前記所定の記録単位の領域の情報に基づいて、前記所定の記録単位の領域からのデータの読み出しを制御する読出制御手段とをさらに備えることができる。   A format control means for controlling the formatting process of the recording medium; and the predetermined recording in which writing of the data stored in the storage means has failed during the formatting process of the recording medium controlled by the format control means. Read control means for controlling reading of data from the predetermined recording unit area based on the unit area information may be further provided.

前記記憶手段に記憶された前記データの書き込みが失敗した前記所定の記録単位の領域の情報に記載の書き込み失敗回数が所定の閾値より多いか否かを判定する回数判定手段をさらに備え、前記回数判定手段により前記書き込み失敗回数が所定の閾値より多いと判定された場合、前記読出制御手段は、前記記録媒体全面に対しての読み出しを順次制御することができる。   The number of times determination means for determining whether or not the number of write failures described in the information of the area of the predetermined recording unit in which the writing of the data stored in the storage means has failed is greater than a predetermined threshold, the number of times When the determination unit determines that the number of write failures is greater than a predetermined threshold, the read control unit can sequentially control reading from the entire surface of the recording medium.

本発明の一側面の記録方法は、記録媒体にデータを記録する記録装置の記録方法において、前記記録媒体の所定の記録単位の領域へのデータの書き込みを制御し、前記所定の記録単位の領域への前記データの書き込みが成功したか否かを判定し、前記データの書き込みが失敗したと判定された場合、前記データの書き込みが失敗した前記所定の記録単位の領域の情報を記憶手段に記憶させるステップを含む。   According to another aspect of the present invention, there is provided a recording method of a recording apparatus for recording data on a recording medium, wherein the writing of data to an area of a predetermined recording unit of the recording medium is controlled, and the area of the predetermined recording unit It is determined whether or not the writing of the data to the storage device succeeds, and when it is determined that the writing of the data has failed, information on the area of the predetermined recording unit in which the writing of the data has failed is stored in the storage unit Including a step.

本発明の一側面のプログラムは、記録媒体にデータを記録する記録装置に、前記記録媒体の所定の記録単位の領域へのデータの書き込みを制御し、前記所定の記録単位の領域への前記データの書き込みが成功したか否かを判定し、前記データの書き込みが失敗したと判定された場合、前記データの書き込みが失敗した前記所定の記録単位の領域の情報を記憶手段に記憶させるステップを含む処理を実行させる。   A program according to one aspect of the present invention controls a data writing to an area of a predetermined recording unit of the recording medium in a recording apparatus that records the data on the recording medium, and the data to the area of the predetermined recording unit Determining whether or not the writing of the data has succeeded, and if it is determined that the writing of the data has failed, storing information on an area of the predetermined recording unit in which the writing of the data has failed is included in a storage unit Execute the process.

本発明においては、記録媒体の所定の記録単位の領域へのデータの書き込みが制御され、前記所定の記録単位の領域への前記データの書き込みが成功したか否かが判定される。そして、前記データの書き込みが失敗したと判定された場合、前記データの書き込みが失敗した前記所定の記録単位の領域の情報が記憶手段に記憶される。   In the present invention, the writing of data to the area of the predetermined recording unit of the recording medium is controlled, and it is determined whether or not the writing of the data to the area of the predetermined recording unit is successful. When it is determined that the data writing has failed, information on the area of the predetermined recording unit in which the data writing has failed is stored in the storage unit.

本発明によれば、セクタが破壊されても、マウント処理やフォーマット処理の際に、交替セクタ処理を発動させることができる。これにより、破壊されたセクタを、再び記録再生可能状態に復旧することができる。   According to the present invention, even if the sector is destroyed, the replacement sector process can be activated during the mount process or the format process. As a result, the destroyed sector can be restored to the recordable / reproducible state again.

以下に本発明の実施の形態を説明するが、本発明の構成要件と、明細書または図面に記載の実施の形態との対応関係を例示すると、次のようになる。この記載は、本発明をサポートする実施の形態が、明細書または図面に記載されていることを確認するためのものである。従って、明細書または図面中には記載されているが、本発明の構成要件に対応する実施の形態として、ここには記載されていない実施の形態があったとしても、そのことは、その実施の形態が、その構成要件に対応するものではないことを意味するものではない。逆に、実施の形態が構成要件に対応するものとしてここに記載されていたとしても、そのことは、その実施の形態が、その構成要件以外の構成要件には対応しないものであることを意味するものでもない。   Embodiments of the present invention will be described below. Correspondences between constituent elements of the present invention and the embodiments described in the specification or the drawings are exemplified as follows. This description is intended to confirm that the embodiments supporting the present invention are described in the specification or the drawings. Therefore, even if there is an embodiment which is described in the specification or the drawings but is not described here as an embodiment corresponding to the constituent elements of the present invention, that is not the case. It does not mean that the form does not correspond to the constituent requirements. Conversely, even if an embodiment is described here as corresponding to a configuration requirement, that means that the embodiment does not correspond to a configuration requirement other than the configuration requirement. It's not something to do.

本発明の一側面の記録装置は、記録媒体(例えば、図2の記録媒体104)にデータを記録する記録装置(例えば、図1の記録再生装置1)において、前記記録媒体の所定の記録単位の領域へのデータの書き込みを制御する書込制御手段(例えば、図3の書込制御部171)と、前記所定の記録単位の領域への前記データの書き込みが成功したか否かを判定する書込判定手段(例えば、図5のステップS106の処理を行う図3のメディア制御部152)と、前記書込判定手段により前記データの書き込みが失敗したと判定された場合、前記データの書き込みが失敗した前記所定の記録単位の領域の情報(例えば、図4の不良セクタ情報)を記憶する記憶手段(例えば、図1の不揮発性メモリ33)とを備える。   A recording apparatus according to one aspect of the present invention is a recording apparatus (for example, the recording / reproducing apparatus 1 in FIG. 1) that records data on a recording medium (for example, the recording medium 104 in FIG. 2). A write control means (for example, the write control unit 171 in FIG. 3) for controlling the writing of data to the area, and whether or not the data has been successfully written to the area of the predetermined recording unit. When it is determined by the writing determination means (for example, the media control unit 152 in FIG. 3 that performs the processing of step S106 in FIG. 5) and the writing determination means that the writing of the data has failed, the writing of the data is performed. Storage means (for example, the non-volatile memory 33 in FIG. 1) for storing information on the area of the predetermined recording unit that has failed (for example, defective sector information in FIG. 4).

前記記録媒体のマウント処理を制御するマウント制御手段(例えば、図3のマウント制御部173)と、前記マウント制御手段により制御される前記記録媒体のマウント処理の際に、前記記憶手段に記憶された前記データの書き込みが失敗した前記所定の記録単位の領域の情報に基づいて、前記所定の記録単位の領域からのデータの読み出しを制御する読出制御手段(例えば、図3の読出制御部172)とをさらに備えることができる。   Mount control means (for example, the mount control unit 173 in FIG. 3) for controlling the mounting process of the recording medium and the storage means stored in the storage means during the mounting process of the recording medium controlled by the mount control means Read control means (for example, the read control unit 172 in FIG. 3) for controlling reading of data from the area of the predetermined recording unit based on information of the area of the predetermined recording unit in which the data writing has failed. Can further be provided.

前記記憶手段に記憶された前記データの書き込みが失敗した前記所定の記録単位の領域の情報に記載の書き込み失敗回数が所定の閾値より多いか否かを判定する回数判定手段(例えば、図8のステップS173の処理を行う図3のメディア制御部152)をさらに備え、前記回数判定手段により前記書き込み失敗回数が所定の閾値より多いと判定された場合、前記読出制御手段は、前記記録媒体全面に対しての読み出しを順次制御することができる   Number determination means for determining whether or not the number of write failures described in the information of the area of the predetermined recording unit in which the writing of the data stored in the storage means has failed is greater than a predetermined threshold (for example, FIG. 3 that performs the process of step S173, and when the number of times of writing failure is determined to be greater than a predetermined threshold by the number of times determination unit, the reading control unit is placed on the entire surface of the recording medium. Can be controlled sequentially.

前記記録媒体のフォーマット処理を制御するフォーマット制御手段(例えば、図3のフォーマット制御部174)と、前記フォーマット制御手段により制御される前記記録媒体のフォーマット処理の際に、前記記憶手段に記憶された前記データの書き込みが失敗した前記所定の記録単位の領域の情報に基づいて、前記所定の記録単位の領域からのデータの読み出しを制御する読出制御手段(例えば、図3の読出制御部172)とをさらに備えることができる。   Format control means (for example, the format control unit 174 in FIG. 3) for controlling the format processing of the recording medium and the storage means stored in the storage means during the format processing of the recording medium controlled by the format control means Read control means (for example, the read control unit 172 in FIG. 3) for controlling reading of data from the area of the predetermined recording unit based on information of the area of the predetermined recording unit in which the data writing has failed. Can further be provided.

前記記憶手段に記憶された前記データの書き込みが失敗した前記所定の記録単位の領域の情報に記載の書き込み失敗回数が所定の閾値より多いか否かを判定する回数判定手段(例えば、図9のステップS203の処理を行う図3のメディア制御部152)をさらに備え、前記回数判定手段により前記書き込み失敗回数が所定の閾値より多いと判定された場合、前記読出制御手段は、前記記録媒体全面に対しての読み出しを順次制御することができる。   Number determination means for determining whether or not the number of write failures described in the information of the area of the predetermined recording unit in which the writing of the data stored in the storage means has failed is greater than a predetermined threshold (for example, FIG. 9 3 for performing the process of step S203, and when the number of times of the writing failure is determined to be greater than a predetermined threshold by the number of times determination unit, the reading control unit is placed on the entire surface of the recording medium. The reading can be sequentially controlled.

本発明の一側面の記録方法は、記録媒体にデータを記録する記録装置の記録方法において、前記記録媒体の所定の記録単位の領域へのデータの書き込みを制御し(例えば、図5のステップS104)、前記所定の記録単位の領域への前記データの書き込みが成功したか否かを判定し(例えば、図5のステップS106)、前記データの書き込みが失敗したと判定された場合、前記データの書き込みが失敗した前記所定の記録単位の領域の情報を記憶手段に記憶させる(例えば、図5のステップS110)ステップを含む。   A recording method according to one aspect of the present invention is a recording method of a recording apparatus that records data on a recording medium, and controls writing of data in an area of a predetermined recording unit of the recording medium (for example, step S104 in FIG. 5). ), It is determined whether or not the writing of the data to the area of the predetermined recording unit has succeeded (for example, step S106 in FIG. 5), and if it is determined that the writing of the data has failed, A step of storing information on the area of the predetermined recording unit in which the writing has failed (for example, step S110 in FIG. 5).

本発明は、ハードディスクドライブ(HDD)などを記録媒体として用いるビデオカメラ、デジタルスチルカメラ、パーソナルコンピュータや、HDDなどの記録媒体にデータを記録する記録装置(例えば、HDDレコーダ)などに適用することができる。   The present invention can be applied to a video camera, a digital still camera, a personal computer using a hard disk drive (HDD) or the like as a recording medium, and a recording device (for example, HDD recorder) that records data on a recording medium such as an HDD. it can.

以下、図を参照して本発明の実施の形態について説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

図1は、本発明を適用した記録再生装置1の一実施形態に係る構成例を示す図である。この記録再生装置1は、例えば、デジタルスチルカメラ、デジタルビデオカメラなどとして構成され、撮影した画像(または音声)のデータを、磁気ディスク、光ディスク、光磁気ディスク、半導体メモリなどの記録媒体に記録したり、記録媒体に記録された画像(または音声)のデータを再生したりする。   FIG. 1 is a diagram showing a configuration example according to an embodiment of a recording / reproducing apparatus 1 to which the present invention is applied. The recording / reproducing apparatus 1 is configured as, for example, a digital still camera or a digital video camera, and records captured image (or audio) data on a recording medium such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory. Or the image (or audio) data recorded on the recording medium is reproduced.

図1において、光学レンズ11は、カメラ機能部12の制御に基づいて、被写体の画像の光を集光し、集光した光を、光電変換部13に結像させる。   In FIG. 1, the optical lens 11 condenses the light of the image of the subject based on the control of the camera function unit 12, and forms the focused light on the photoelectric conversion unit 13.

カメラ機能部12は、CPU(central processing unit)51の制御に基づいて、光学レンズ11による被写体の撮影動作を開始させたり、終了させたりする他、光学レンズ11のズーム率、取り込む光量などを適宜制御する。   Based on the control of a CPU (central processing unit) 51, the camera function unit 12 starts and ends the photographing operation of the subject by the optical lens 11, and appropriately adjusts the zoom rate of the optical lens 11, the amount of light to be captured, and the like. Control.

光電変換部13は、例えば、CCD(charge-coupled device)やC-MOS(Complementary-Metal Oxide Semiconductor)などの光電変換素子により構成され、光学レンズ11から供給される光を電気的信号に変換し、画像信号処理部14に供給する。   The photoelectric conversion unit 13 is configured by a photoelectric conversion element such as a charge-coupled device (CCD) or a complementary-metal oxide semiconductor (C-MOS), and converts light supplied from the optical lens 11 into an electrical signal. To the image signal processing unit 14.

画像信号処理部14は、光電変換部13から供給される信号に基づいて、画像のデータを生成する。画像信号処理部14は、例えば、CPU51の制御に基づいて、被写体の画像に対応するアナログの信号を、A/D(Analog to Digital)変換して、デジタルの画像のデータとし、その画像のデータに対して、例えば、ホワイトバランスの調整、欠陥画素の補間などの画像処理を適用する。また、画像信号処理部14は、CPU51の制御に基づいて、MEPG(Motion Picture Experts Group)、JPEG(Joint Photographic Expert Group)などの方式による画像のデータの圧縮符号化を行ったり、圧縮符号化された画像のデータの復号を行ったりする。   The image signal processing unit 14 generates image data based on the signal supplied from the photoelectric conversion unit 13. For example, the image signal processing unit 14 performs A / D (Analog to Digital) conversion on an analog signal corresponding to the image of the subject under the control of the CPU 51 to obtain digital image data, and the image data For example, image processing such as white balance adjustment and defective pixel interpolation is applied. Further, the image signal processing unit 14 performs compression coding of image data by a method such as MEPG (Motion Picture Experts Group), JPEG (Joint Photographic Expert Group), or the like based on the control of the CPU 51. Decode the image data.

また、画像信号処理部14は、被写体の画像に対応するアナログの信号を、A/D変換して、ホワイトバランスを調整し、または欠陥画素を補間した画像のデータを、ディスプレイ16および画像入出力部15に供給する。より具体的には、画像信号処理部14は、その画像データを、ディスプレイ16の入力方式である、例えば、RGB(Red, Green, Blue)信号に変換して、ディスプレイ16に供給し、同様に、画像信号処理部14は、RGB信号を画像入出力部15にも供給する。   Further, the image signal processing unit 14 performs A / D conversion on an analog signal corresponding to the image of the subject, adjusts the white balance, or outputs image data obtained by interpolating defective pixels, and the image data is input to the display 16. To the unit 15. More specifically, the image signal processing unit 14 converts the image data into an RGB (Red, Green, Blue) signal, which is an input method of the display 16, and supplies the converted signal to the display 16. The image signal processing unit 14 also supplies RGB signals to the image input / output unit 15.

画像入出力部15は、例えば、外部の装置から供給される画像信号を、画像信号処理部14に供給し、また、画像信号処理部14から出力される画像のデータに対応する信号を、外部の装置に出力する。ディスプレイ16は、例えば、LCD(Liquid Crystal Display)などにより構成され、画像信号処理部14から出力される画像のデータに対応する信号に基づく画像を表示する。   The image input / output unit 15 supplies, for example, an image signal supplied from an external device to the image signal processing unit 14, and outputs a signal corresponding to image data output from the image signal processing unit 14 to the external Output to the device. The display 16 is configured by an LCD (Liquid Crystal Display), for example, and displays an image based on a signal corresponding to image data output from the image signal processing unit 14.

音声入出力部21は、例えば、マイクロフォンなどにより集音された音声信号を、音声処理部22に供給し、また、音声処理部22から出力される音声のデータに対応する音声を、スピーカなどに出力する。音声処理部22は、CPU51の制御のもと、音声入出力部21から供給される音声の信号に基づいて、圧縮符号化された音声のデータを生成したり、圧縮符号化された音声のデータの復号を行ったりする。   For example, the audio input / output unit 21 supplies an audio signal collected by a microphone or the like to the audio processing unit 22, and outputs audio corresponding to audio data output from the audio processing unit 22 to a speaker or the like. Output. Under the control of the CPU 51, the audio processing unit 22 generates compression-encoded audio data based on the audio signal supplied from the audio input / output unit 21, or the compression-encoded audio data Or decryption.

RAM(Random Access Memory)31は、ドライブ36に装着される記録媒体から読み出されるプログラムなどのデータ、またはプログラムによる処理に伴って生成されるデータなどを記憶し、必要に応じてCPU51に供給する。ROM(Read Only Memory)32は、予め記憶されているデータを、必要に応じてCPU51に供給する。不揮発性メモリ33は、例えば、EEPROM(Electrically Erasable Programmable Read-Only Memory)などで構成され、CPU51の処理に用いられる各種のデータを記憶する。   A RAM (Random Access Memory) 31 stores data such as a program read from a recording medium attached to the drive 36 or data generated in accordance with processing by the program, and supplies the data to the CPU 51 as necessary. A ROM (Read Only Memory) 32 supplies data stored in advance to the CPU 51 as necessary. The non-volatile memory 33 is configured by, for example, an EEPROM (Electrically Erasable Programmable Read-Only Memory) and stores various data used for the processing of the CPU 51.

操作入力部34は、例えば、操作キーまたはボタンなどを有する構成とされ、ユーザにより入力された操作に対応する信号を、CPU51に出力する。   The operation input unit 34 has, for example, an operation key or a button, and outputs a signal corresponding to the operation input by the user to the CPU 51.

通信部35は、例えば、ネットワークカードなどにより構成され、Ethernet(登録商標)、USB(Universal Serial Bus)などの有線通信のインタフェース、または、IEEE802.11a/b/g、Bluetoothなどの無線通信のインタフェースとして機能し、CPU51の制御に基づいて、ネットワークに接続される他の装置との通信を行う。   The communication unit 35 includes, for example, a network card and the like, and is a wired communication interface such as Ethernet (registered trademark) or USB (Universal Serial Bus) or a wireless communication interface such as IEEE802.11a / b / g or Bluetooth. And communicates with other devices connected to the network based on the control of the CPU 51.

ドライブ36には、例えば、HDD(Hard Disk Drive)などの磁気ディスク、DVD(Digital Versatile Disk)やCD(Compact Disk)、Blu-ray DiscやHD-DVD(High Definition DVD)などの光ディスク、MD(登録商標)(Mini-Disk))などの光磁気ディスク、フラッシュメモリ、メモリースティック(登録商標)などの半導体メモリなどで構成される各種の記録媒体が装着される。ドライブ36は、装着された記録媒体にアクセスし、データを記録したり、記録したデータを読み出したりする。   Examples of the drive 36 include magnetic disks such as HDD (Hard Disk Drive), optical disks such as DVD (Digital Versatile Disk) and CD (Compact Disk), Blu-ray Disc and HD-DVD (High Definition DVD), MD ( Various recording media including a magneto-optical disk such as a registered trademark (Mini-Disk), a flash memory, and a semiconductor memory such as a Memory Stick (registered trademark) are mounted. The drive 36 accesses the mounted recording medium, records data, and reads recorded data.

センサ37は、角速度センサや加速度センサ、温度センサなどで構成され、例えば、光学的な補正を行うため、画像のぶれを検出したりする。検出された画像のぶれは、CPU51を介して、画像信号処理部14に供給される。電源38は、記録再生装置1を駆動させるために必要となる電力を供給する。   The sensor 37 includes an angular velocity sensor, an acceleration sensor, a temperature sensor, and the like. For example, in order to perform optical correction, an image blur is detected. The detected image blur is supplied to the image signal processing unit 14 via the CPU 51. The power source 38 supplies electric power necessary for driving the recording / reproducing apparatus 1.

CPU51は、各種の演算を行ってデータの処理を行い、記録再生装置1全体の動作を制御する。   The CPU 51 performs various calculations to process data, and controls the overall operation of the recording / reproducing apparatus 1.

図2は、記録再生装置1における記録媒体104へのデータの記録、または記録媒体104からのデータの読み出しの仕組みを説明する図である。同図において、アプリケーション101は、CPU51で実行されるソフトウェアの最上位のレイヤに属するソフトウェアであり、例えば、動画像の記録または再生の処理を制御する。   FIG. 2 is a diagram for explaining a mechanism for recording data on the recording medium 104 or reading data from the recording medium 104 in the recording / reproducing apparatus 1. In the figure, an application 101 is software belonging to the highest layer of software executed by the CPU 51, and controls, for example, recording or playback processing of moving images.

アプリケーション101は、自身が行う処理に伴って、記録または再生が必要となるデータについて、例えば、所定の記録単位のデータで構成されるファイルを単位としてアクセスする。アプリケーション101は、所定のファイルにアクセスするとき、ファイルシステム102にアクセス要求を出力する。また、アプリケーション101は、ファイルシステム102からのファイルのアクセス要求に対する応答を受け、必要に応じて、ユーザに通知するため、その応答に対応する画像を生成して、ディスプレイ16に表示させる。   The application 101 accesses data that needs to be recorded or reproduced in accordance with processing performed by itself, for example, in units of a file composed of data of a predetermined recording unit. The application 101 outputs an access request to the file system 102 when accessing a predetermined file. Further, the application 101 receives a response to the file access request from the file system 102 and generates an image corresponding to the response and displays it on the display 16 in order to notify the user as necessary.

ファイルシステム102は、記録媒体104のどこに何のファイルがあるのか、その情報を管理するためのソフトウェアであり、やはりCPU51により実行されるソフトウェアとされる。ファイルシステム102は、例えば、FAT(ファット)16またはFAT32などにより構成される。なお、FAT32の詳細は、「Microsoft Extensible Firmware Initiative FAT32 File System Specification」に開示されている。   The file system 102 is software for managing information about where and what files are on the recording medium 104, and is also software executed by the CPU 51. The file system 102 is configured by, for example, FAT (Fat) 16 or FAT32. The details of FAT32 are disclosed in “Microsoft Extensible Firmware Initiative FAT32 File System Specification”.

ファイルシステム102は、アプリケーション101からアクセス要求のあったファイルについて、所定のビット量で構成されるクラスタに分解し、クラスタ単位でアクセスする。例えば、アプリケーション101からファイルシステム102に対して、ファイルの読み出しが要求された場合、ファイルシステム102は、そのファイルの実データが記録されているクラスタを該当クラスタとして検索する。また例えば、アプリケーション101からファイルシステム102に対してファイルの書き込みが要求された場合、ファイルシステム102は、ファイルの実データを書き込み可能な空きクラスタを該当クラスタとして検索する。   The file system 102 decomposes a file requested to be accessed from the application 101 into clusters each having a predetermined bit amount, and accesses them in units of clusters. For example, when the application 101 requests the file system 102 to read a file, the file system 102 searches for a cluster in which actual data of the file is recorded as a corresponding cluster. For example, when the application 101 requests the file system 102 to write a file, the file system 102 searches for a free cluster into which the actual data of the file can be written as the corresponding cluster.

そして、ファイルシステム102は、検索された該当クラスタをLBA(Logical Block Addressing)に変換し、デバイスドライバ103に対して、セクタ単位でアクセスを要求する。また、ファイルシステム102は、自身が出力したアクセス要求に基づいてデバイスドライバ103から供給された応答に基づいて、ファイルのアクセス要求に対する応答をアプリケーション101に出力する。   Then, the file system 102 converts the found cluster into LBA (Logical Block Addressing), and requests the device driver 103 to access in units of sectors. Further, the file system 102 outputs a response to the file access request to the application 101 based on the response supplied from the device driver 103 based on the access request output by itself.

デバイスドライバ103は、ドライブ36の動作を制御するためのソフトウェアであり、やはりCPU51により実行されるソフトウェアとされる。デバイスドライバ103は、ファイルシステム102からのアクセス要求に基づいて、ドライブ36を制御してドライブ36に装着される記録媒体104にセクタ単位でアクセスする。これにより、ドライブ36が、自身に装着された記録媒体104の要求されたセクタにアクセスする。ここでセクタは、クラスタよりさらに細かい記録単位であり(複数のセクタによりクラスタが構成される)、LBAによりアクセスすべきセクタが指定される。また、自身が出力したセクタ単位のアクセス要求に基づいて記録媒体104(実際にはドライブ36)から供給された応答に基づいて、セクタのアクセス要求に対する応答をファイルシステム102に出力する。   The device driver 103 is software for controlling the operation of the drive 36 and is also software executed by the CPU 51. The device driver 103 controls the drive 36 based on an access request from the file system 102 to access the recording medium 104 mounted on the drive 36 on a sector basis. As a result, the drive 36 accesses the requested sector of the recording medium 104 attached to the drive 36. Here, the sector is a recording unit finer than the cluster (a cluster is composed of a plurality of sectors), and the sector to be accessed is specified by the LBA. Further, based on a response supplied from the recording medium 104 (actually the drive 36) based on the sector-by-sector access request output by itself, a response to the sector access request is output to the file system 102.

記録媒体104(ドライブ36)は、デバイスドライバ103からのアクセス要求に基づいて、アクセス要求のあったセクタにデータを書き込み(記録し)、またはアクセス要求のあったセクタからデータを読み出す処理を行い、その処理結果を、セクタのアクセス要求に対する応答としてデバイスドライバ103に出力する。例えば、記録媒体104は、デバイスドライバ103からセクタ単位での読み出しが要求された場合、セクタ毎に記録されているデータをデバイスドライバ103に供給する。   Based on the access request from the device driver 103, the recording medium 104 (drive 36) writes (records) data in the sector requested to access or reads data from the sector requested to access, The processing result is output to the device driver 103 as a response to the sector access request. For example, when the device driver 103 requests reading in units of sectors, the recording medium 104 supplies data recorded for each sector to the device driver 103.

ここで、例えば、HDDなどの記録媒体104では、一般的に所定のエラー条件を満たした場合、HDD内部にて交替セクタ処理が実行される。所定のエラー条件の1つに、HDD内部における不良セクタ登録処理があるが、HDDの種別によっては、その不良セクタ登録処理が、読み出し処理をトリガにして実行されるものがある。このようなHDDにおいては、従来、書き込み処理中に、振動や衝撃、温度や湿度、またはその他の要因にて、現在アクセスしているセクタを破壊してしまい、書き込み処理がエラーになり、再度書き込み処理を行ったとしても、不良セクタ登録処理が行われない。したがって、交替セクタ処理も行われず、結果として、エラー終了してしまう場合があった。   Here, for example, in the recording medium 104 such as an HDD, when a predetermined error condition is generally satisfied, an alternate sector process is executed inside the HDD. One of the predetermined error conditions is a bad sector registration process in the HDD. Depending on the type of the HDD, the bad sector registration process may be executed with a read process as a trigger. Conventionally, in such HDDs, the sector that is currently accessed is destroyed due to vibration, shock, temperature, humidity, or other factors during the write process, and the write process becomes an error and the write process is repeated. Even if the processing is performed, the bad sector registration processing is not performed. Therefore, the replacement sector process is not performed, and as a result, an error may end.

すなわち、この場合、そのセクタへの読み出し処理が実行されない限り、HDD内部における不良セクタ登録処理および交替セクタ処理が実行されないということになる。   That is, in this case, unless the reading process for the sector is executed, the bad sector registration process and the replacement sector process in the HDD are not executed.

そこで、本発明においては、書き込み処理が失敗した場合、書き込み処理が失敗した不良セクタの情報を不揮発性メモリに記憶、更新しておき、その更新された情報を、次回のマウント処理、またはフォーマット処理の際に参照し、そのタイミングで、書き込み処理に失敗したセクタに対して、ダミーの読み出し処理を実行する。   Therefore, in the present invention, when the writing process fails, the information of the defective sector in which the writing process has failed is stored and updated in the nonvolatile memory, and the updated information is used for the next mounting process or formatting process. At this time, a dummy read process is executed for the sector in which the write process has failed.

なお、読み出し処理を「ダミーの」と表している理由は、読み出し処理の目的が、HDDから所望のデータを読み出すことではなく、不良セクタ登録処理がHDD内部にて行われることを期待するものだからである。また、本発明における不良セクタの情報を不揮発性メモリに記憶、更新する処理は、上述したCPU51で実行されるソフトウェアによる処理であり、HDD内部にて行われる不良セクタ登録処理とは全く異なる処理である。   The reason why the read process is expressed as “dummy” is that the purpose of the read process is not to read desired data from the HDD, but to expect that the bad sector registration process is performed inside the HDD. It is. In addition, the process of storing and updating the bad sector information in the nonvolatile memory according to the present invention is a process performed by the software executed by the CPU 51 described above, and is completely different from the bad sector registration process performed inside the HDD. is there.

このような処理を実行する場合の図2のファイルシステム102およびデバイスドライバ103は、図3に示される機能ブロックで構成される。   When executing such processing, the file system 102 and the device driver 103 of FIG. 2 are configured by the functional blocks shown in FIG.

なお、図3の例においては、HDDである記録媒体104がドライブ36に装着されている例を説明するため、記録媒体104へのアクセスを制御するデバイスドライバ103しか示されていないが、実際には、ドライブ36に装着されている記録媒体の数だけの個々のデバイスドライバが備えられる。   In the example of FIG. 3, only the device driver 103 that controls access to the recording medium 104 is shown to describe an example in which the recording medium 104 that is an HDD is mounted in the drive 36. Are provided with as many individual device drivers as the number of recording media loaded in the drive 36.

ファイルシステム102は、記録制御部151およびメディア制御部152により構成されている。記録制御部151は、アプリケーション101のうち、ファイルの記録処理を実行するアプリケーションから、ファイル名とともに実データが供給され、記録媒体104に対するファイルの書き込みが要求された場合、その実データを、RAM31の書込バッファメモリ181に一旦蓄積し、デバイスドライバ103を制御して、書き込みが要求された記録媒体104において、ファイルの実データを書き込み可能な空きクラスタを該当クラスタとして検索する。   The file system 102 includes a recording control unit 151 and a media control unit 152. When the real data is supplied together with the file name from the application 101 that executes the file recording process among the applications 101 and the writing of the file to the recording medium 104 is requested, the recording control unit 151 stores the real data in the RAM 31. The data is temporarily stored in the embedded buffer memory 181 and the device driver 103 is controlled to search the recording medium 104 requested to be written for a free cluster in which the actual data of the file can be written as the corresponding cluster.

メディア制御部152は、ファイルの記録処理を実行するアプリケーションからの要求に応じて、記録制御部151により検索された該当クラスタをLBAに変換し、書き込みが要求された記録媒体104に対応するデバイスドライバ103に対して、セクタ単位で書き込みを要求し、これに対応して書き込みの結果がデバイスドライバ103から通知される。メディア制御部152は、同じセクタの書き込みの度、RAM31またはレジスタなどに、書き込み実行回数をカウントしており、制限回数を超えても書き込みが成功しない場合には、上位アプリケーションに書き込みエラーを通知し、書き込みが失敗したセクタの情報を、不良セクタ情報として、不揮発性メモリ33に記憶する。すなわち、不揮発性メモリ33に記憶されている不良セクタ情報は、異なるセクタについて、書き込みが失敗する度に、書き込みが失敗したセクタの情報で更新される。   In response to a request from an application that executes a file recording process, the media control unit 152 converts the corresponding cluster retrieved by the recording control unit 151 into an LBA, and a device driver corresponding to the recording medium 104 for which writing has been requested. 103 is requested in units of sectors, and in response to this, the result of writing is notified from the device driver 103. The media control unit 152 counts the number of executions of writing to the RAM 31 or the register every time the same sector is written, and if the writing is not successful even if the limit number is exceeded, the media control unit 152 notifies the upper application of a write error. The information on the sector in which writing has failed is stored in the nonvolatile memory 33 as bad sector information. That is, the bad sector information stored in the non-volatile memory 33 is updated with information on the sector in which the writing has failed each time writing to a different sector fails.

メディア制御部152は、アプリケーション101のうち、記録媒体104のマウント処理を実行するアプリケーションからの要求に応じて、要求された記録媒体104に対応するデバイスドライバ103に対して、不揮発性メモリ33の不良セクタ情報に基づく、書き込みが失敗したセクタの読み出し処理を要求するとともに、マウント処理を要求する。   In response to a request from an application that executes the mount processing of the recording medium 104 in the application 101, the media control unit 152 determines that the non-volatile memory 33 is defective for the device driver 103 corresponding to the requested recording medium 104. Based on the sector information, a read process of the sector in which writing has failed is requested and a mount process is requested.

メディア制御部152は、アプリケーション101のうち、記録媒体104のフォーマット処理を実行するアプリケーションからの要求に応じて、要求された記録媒体104に対応するデバイスドライバ103に対して、不揮発性メモリ33の不良セクタ情報に基づく、書き込みが失敗したセクタの読み出し処理を要求するとともに、フォーマット処理を要求する。   In response to a request from the application 101 that executes the format process of the recording medium 104 in the application 101, the media control unit 152 determines that the nonvolatile memory 33 is defective for the device driver 103 corresponding to the requested recording medium 104. Based on the sector information, a read process of the sector in which writing has failed is requested and a format process is requested.

デバイスドライバ103は、記録媒体104に対して、データの書き込みを行わせる書込制御部171、記録媒体104からデータの読み出しを行わせる読出制御部172、記録媒体104のマウント処理を行わせるマウント制御部173、および、記録媒体104のフォーマット処理を行わせるフォーマット処理部174により構成されている。   The device driver 103 includes a write control unit 171 that writes data to the recording medium 104, a read control unit 172 that reads data from the recording medium 104, and a mount control that performs mount processing of the recording medium 104. And a format processing unit 174 that causes the format process of the recording medium 104 to be performed.

書込制御部171は、メディア制御部152の要求に応じて、ドライブ36を制御し、RAM31に構成される書込バッファ181に蓄積されたデータを、対応する記録媒体104における書き込みが要求されたセクタから、Nセクタ(N>0)分書き込ませ、その処理結果をメディア制御部152に通知する。   The write control unit 171 controls the drive 36 in response to a request from the media control unit 152, and data stored in the write buffer 181 configured in the RAM 31 is requested to be written in the corresponding recording medium 104. The sector is written for N sectors (N> 0), and the processing result is notified to the media control unit 152.

読出制御部172は、メディア制御部152の要求に応じて、ドライブ36を制御し、対応する記録媒体104における読み出しが要求されたセクタから、Nセクタ(N>0)分のデータを読み出させ、読み出されたデータを、 RAM31に構成される読出バッファメモリ182に蓄積し、その処理結果をメディア制御部152に通知する。   The read control unit 172 controls the drive 36 in response to a request from the media control unit 152, and reads data for N sectors (N> 0) from the sector requested to be read from the corresponding recording medium 104. The read data is stored in the read buffer memory 182 configured in the RAM 31, and the processing result is notified to the media control unit 152.

マウント制御部173は、メディア制御部152の要求に応じて、ドライブ36を制御し、記録媒体104を認識させ、記録再生可能状態にするマウント処理を行わせ、その処理結果をメディア制御部152に通知する。   The mount control unit 173 controls the drive 36 in response to a request from the media control unit 152 to cause the recording medium 104 to be recognized and to perform a mount process for enabling recording and reproduction. The processing result is sent to the media control unit 152. Notice.

フォーマット制御部174は、メディア制御部152の要求に応じて、ドライブ36を制御し、記録媒体104の初期化を行うフォーマット処理を行わせ、その処理結果をメディア制御部152に通知する。   The format control unit 174 controls the drive 36 in response to a request from the media control unit 152, performs a format process for initializing the recording medium 104, and notifies the media control unit 152 of the processing result.

RAM31には、記録媒体104に記録されるファイルの実データが蓄積される書込バッファメモリ181、記録媒体104から読み出されたデータが蓄積される読出バッファメモリ182が構成されている。   The RAM 31 includes a write buffer memory 181 that stores actual data of files recorded on the recording medium 104 and a read buffer memory 182 that stores data read from the recording medium 104.

不揮発性メモリ33には、図4に示される不良セクタ情報が記憶されている。図4は、不揮発性メモリ33に記憶される不良セクタ情報の構造例を示している。   The nonvolatile memory 33 stores the bad sector information shown in FIG. FIG. 4 shows a structure example of bad sector information stored in the nonvolatile memory 33.

不良セクタ情報は、書き込み処理中、異なるセクタについて書き込みが失敗する(すなわち、上位に対して書き込みエラーが通知される)度に更新されるものであり、2バイトからなる書き込み失敗回数、6バイトからなる不良セクタ番号(LBA)、2バイトからなるセクタカウントで構成される。   The bad sector information is updated every time writing fails in a different sector during the writing process (that is, a writing error is notified to the host). It consists of a bad sector number (LBA) and a sector count consisting of 2 bytes.

書き込み失敗回数は、0乃至65,535の数字のうち、書き込み処理中、異なるセクタについて書き込みが失敗した回数であり、この書き込み失敗回数は、書き込みが失敗する度に1ずつインクリメントされる。   The number of writing failures is the number of times that writing has failed for different sectors among the numbers 0 to 65,535 during the writing process, and this number of writing failures is incremented by 1 each time writing fails.

不良セクタ番号は、書き込みが失敗したセクタの開始アドレスが、例えば「XXXXXXXX」というように、LBA(Logical Block Addressing)で登録される。セクタカウントは、書き込みサイズ、すなわち、書き込みが失敗したセクタ数が、例えば、「YYYYYYYY」というように登録される。   The bad sector number is registered by LBA (Logical Block Addressing), for example, “XXXXXXXX” as the start address of the sector in which writing failed. As the sector count, the write size, that is, the number of sectors in which the write has failed is registered, for example, “YYYYYYYY”.

以上のように、書き込み処理中、書き込みエラーとなる度に、書き込み失敗回数が、インクリメントされ、書き込みエラーとなったセクタの情報が不良セクタ番号およびセクタカウントとして追加されることで、不良セクタ情報が更新されていく。   As described above, each time a write error occurs during the write process, the number of write failures is incremented, and information on the sector in which the write error has occurred is added as a bad sector number and sector count. It will be updated.

次に、図5のフローチャートを参照して、記録再生装置1における記録処理について説明する。なお、以下、記録再生装置1のドライブ36に装着されている、HDDである記録媒体104にデータを記録する例を説明する。   Next, recording processing in the recording / reproducing apparatus 1 will be described with reference to the flowchart of FIG. In the following, an example in which data is recorded on the recording medium 104 that is an HDD mounted on the drive 36 of the recording / reproducing apparatus 1 will be described.

例えば、アプリケーション101のうち、ファイルの記録処理を実行するアプリケーションから、ファイル名とともに実データが供給され、記録媒体104に対するファイルの書き込みが要求された場合、記録制御部151は、その実データを、RAM31の書込バッファメモリ181に一旦蓄積するとともに、デバイスドライバ103を制御して、書き込みが要求された記録媒体104において、ファイルの実データを書き込み可能な空きクラスタを該当クラスタとして検索する。   For example, when actual data is supplied together with the file name from an application 101 that executes file recording processing, and the writing of the file to the recording medium 104 is requested, the recording control unit 151 stores the actual data in the RAM 31. Are temporarily stored in the write buffer memory 181, and the device driver 103 is controlled to search the recording medium 104 requested to be written for a free cluster in which the actual data of the file can be written as the corresponding cluster.

ステップS101において、メディア制御部152は、不揮発性メモリ33から、不良セクタ情報を読み出す。メディア制御部152は、ステップS102において、例えば、RAM31に記憶される書き込み実行回数を0に設定(リセット)させ、ステップS103およびS104において、記録媒体104に対応するデバイスドライバ103の書込制御部171に要求し、記録媒体104へのデータの書き込み処理を実行させる。   In step S <b> 101, the media control unit 152 reads bad sector information from the nonvolatile memory 33. For example, the media control unit 152 sets (resets) the number of write executions stored in the RAM 31 to 0 in step S102, and the write control unit 171 of the device driver 103 corresponding to the recording medium 104 in steps S103 and S104. To write data to the recording medium 104.

すなわち、書込制御部171は、メディア制御部152の要求に応じて、ステップS103において、記録媒体104の書き込み処理に即したタイムアウト値を設定し、ステップS104において、ドライブ36を制御し、書込バッファメモリ181に蓄積されたデータを、記録媒体104におけるセクタXから、Nセクタ(N>0)書き込ませる。なお、セクタXは、書き込みを開始する1つのセクタを表している。   That is, the write control unit 171 sets a timeout value in accordance with the write processing of the recording medium 104 in step S103 in response to a request from the media control unit 152, and controls the drive 36 in step S104 to write data. Data stored in the buffer memory 181 is written from sector X in the recording medium 104 to N sectors (N> 0). Sector X represents one sector from which writing is started.

ステップS105において、メディア制御部152は、RAM31に記憶される書き込み実行回数をインクリメントさせる。   In step S <b> 105, the media control unit 152 increments the number of write executions stored in the RAM 31.

書込制御部171は、ステップS104において書き込み処理を終了すると、ドライブ36からの応答に基づいて、処理結果を、メディア制御部152に通知してくる。その通知に基づき、ステップS106において、メディア制御部152は、書き込みが成功したか否かを判定し、書き込みが成功したと判定した場合、処理は、ステップS107に進む。ステップS107において、メディア制御部152は、書き込み成功を、記録制御部151を介して、上位のアプリケーション101に通知し、その後、記録媒体104の記録処理を終了させる。   When the write control unit 171 finishes the write process in step S104, the write control unit 171 notifies the media control unit 152 of the processing result based on the response from the drive 36. Based on the notification, in step S106, the media control unit 152 determines whether or not the writing is successful. If the media control unit 152 determines that the writing is successful, the process proceeds to step S107. In step S <b> 107, the media control unit 152 notifies the upper application 101 of the writing success via the recording control unit 151, and thereafter ends the recording process of the recording medium 104.

ステップS106において、書き込みが失敗したと判定された場合、処理は、ステップS108に進む。ステップS108において、メディア制御部152は、RAM31に記憶される書き込み実行回数が予め設定されている制限回数よりも少ないか否かを判定し、書き込み実行回数が予め設定されている制限回数よりも少ないと判定した場合、処理は、ステップS103に戻り、それ以降の処理が繰り返される。すなわち、制限回数までは、書き込みのリトライ制御が実行される。   If it is determined in step S106 that the writing has failed, the process proceeds to step S108. In step S108, the media control unit 152 determines whether or not the write execution count stored in the RAM 31 is less than a preset limit count, and the write execution count is less than the preset limit count. If it is determined, the process returns to step S103, and the subsequent processes are repeated. In other words, write retry control is executed up to the limit number of times.

ステップS108において、書き込み実行回数が予め設定されている制限回数を超えたと判定された場合、メディア制御部152は、書き込みエラーとして、ステップS109において、ステップS101において読み出した不良セクタ情報を、書き込みが失敗したセクタの情報で更新する。すなわち、書き込み失敗回数がインクリメントされ、書き込みが失敗したセクタの情報に基づく不良セクタ番号およびセクタカウントが追加されて、不良セクタ情報が更新される。   If it is determined in step S108 that the number of write executions exceeds the preset limit, the media control unit 152 fails to write the bad sector information read in step S101 in step S109 as a write error. Update with the information of the selected sector. That is, the number of write failures is incremented, the bad sector number and sector count based on the information of the sector in which the write has failed are added, and the bad sector information is updated.

ステップS110において、メディア制御部152は、更新した不良セクタ情報を、不揮発性メモリ33に格納する。そして、メディア制御部152は、ステップS111において、書き込みエラーを、記録制御部151を介して、上位のアプリケーション101に通知し、その後、記録媒体104の記録処理を終了させる。   In step S <b> 110, the media control unit 152 stores the updated bad sector information in the nonvolatile memory 33. In step S <b> 111, the media control unit 152 notifies the upper application 101 of the write error via the recording control unit 151, and then ends the recording process of the recording medium 104.

これに対応して、アプリケーション101は、書き込みエラーをユーザに通知するための画像を生成し、生成した画像を、ディスプレイ16に表示させる。   In response to this, the application 101 generates an image for notifying the user of a writing error, and causes the display 16 to display the generated image.

以上のように、記録処理においては、書き込み処理の再度実行(リトライ)を所定の回数実行した後、書き込みエラーとなる度に、書き込みエラーとなった(すなわち、書き込みが失敗した)セクタの情報が追加されて、不良セクタ情報が更新される。   As described above, in the recording process, after executing the write process again (retry) a predetermined number of times, each time a write error occurs, information on the sector that has caused the write error (that is, the write has failed) is stored. In addition, the bad sector information is updated.

次に、図6のフローチャートを参照して、記録再生装置1における記録媒体104のマウント処理について説明する。   Next, the mounting process of the recording medium 104 in the recording / reproducing apparatus 1 will be described with reference to the flowchart of FIG.

記録再生装置1に電源が入ると、CPU51は、アプリケーション101、ファイルシステム102、デバイスドライバ103などのソフトウェアを実行する。また、HDDである記録媒体104も起動される。   When the recording / reproducing apparatus 1 is turned on, the CPU 51 executes software such as the application 101, the file system 102, and the device driver 103. In addition, the recording medium 104 that is an HDD is also activated.

例えば、アプリケーション101のうち、記録媒体104のマウント処理を実行するアプリケーションから、記録媒体104に対するマウント処理が要求される。メディア制御部152は、ステップS131において、不揮発性メモリ33から、不良セクタ情報を読み出し、ステップS132において、その先頭2バイトに記載の書き込み失敗回数が0であるか否かを判定する。   For example, a mounting process for the recording medium 104 is requested from an application that executes the mounting process for the recording medium 104 in the application 101. In step S131, the media control unit 152 reads out bad sector information from the nonvolatile memory 33, and in step S132, determines whether the number of write failures described in the first 2 bytes is zero.

ステップS132において、書き込み失敗回数が0ではないと判定された場合、処理はステップS133に進む。メディア制御部152は、ステップS133において、不良セクタ情報から、不良セクタ番号とセクタカウントの組み合わせを1つ読み出し、ステップS134とS135において、デバイスドライバ103の読出制御部172に要求し、記録媒体104における、読み出した不良セクタ番号とセクタカウントの組み合わせに基づくセクタからのデータの読み出し処理を実行させる。   If it is determined in step S132 that the number of write failures is not 0, the process proceeds to step S133. In step S133, the media control unit 152 reads one combination of the bad sector number and the sector count from the bad sector information. In steps S134 and S135, the media control unit 152 requests the read control unit 172 of the device driver 103 to read the combination. Then, the process of reading data from the sector based on the combination of the read bad sector number and the sector count is executed.

すなわち、読出制御部172は、メディア制御部152の要求に応じて、ステップS134において、HDDである記録媒体104の読み出し処理に即したタイムアウト値を設定し、ステップS135において、ドライブ36を制御し、記録媒体104における、不良セクタ番号のセクタから、セクタカウントが示すNセクタのデータを読み出させ、読み出されたデータを、読出バッファメモリ182に蓄積する。そして、読出制御部172は、ドライブ36からの応答に基づいて、その処理結果を、メディア制御部152に通知する。   That is, in response to a request from the media control unit 152, the read control unit 172 sets a timeout value in accordance with the read process of the recording medium 104 that is an HDD in step S134, and controls the drive 36 in step S135. The data of N sectors indicated by the sector count is read from the sector of the bad sector number on the recording medium 104, and the read data is stored in the read buffer memory 182. The read control unit 172 notifies the media control unit 152 of the processing result based on the response from the drive 36.

このとき、記録媒体104(すなわち、HDD)内部においては、これらのセクタ(不良セクタ番号のセクタから、Nセクタのセクタ領域)が破壊されている場合には、これらのセクタからデータが読み出されないので、不良セクタ登録処理が実行される。これにより、記録媒体104内部においては、交替セクタ処理が発動される。   At this time, in the recording medium 104 (that is, the HDD), when these sectors (sector area of bad sector number to sector area of N sector) are destroyed, data is not read from these sectors. Therefore, the bad sector registration process is executed. As a result, alternate sector processing is activated within the recording medium 104.

メディア制御部152は、ステップS136において、不良セクタ情報の書き込み失敗回数をデクリメントし、ステップS137において、不良セクタ情報の書き込み失敗回数が0であるか否かを判定する。ステップS137において、書き込み失敗回数が0ではないと判定された場合、処理は、ステップS133に戻り、それ以降の処理が繰り返される。ステップS137において、書き込み失敗回数が0であると判定された場合、処理は、ステップS138に進む。   In step S136, the media control unit 152 decrements the number of bad sector information write failures, and in step S137, determines whether the number of bad sector information write failures is zero. If it is determined in step S137 that the number of write failures is not 0, the process returns to step S133, and the subsequent processes are repeated. If it is determined in step S137 that the number of write failures is 0, the process proceeds to step S138.

ステップS138において、メディア制御部152は、不揮発性メモリ33の不良セクタ情報をリセットする。すなわち、メディア制御部152は、不揮発性メモリ33の不良セクタ情報における、書き込み失敗回数を0に設定し、不良セクタ番号とセクタカウントを削除する。その後、処理は、ステップS139に進む。   In step S138, the media control unit 152 resets the bad sector information in the nonvolatile memory 33. That is, the media control unit 152 sets the number of write failures in the bad sector information of the nonvolatile memory 33 to 0, and deletes the bad sector number and the sector count. Thereafter, the processing proceeds to step S139.

一方、ステップS132において、書き込み失敗回数が0であると判定された場合も、処理はステップS139に進む。   On the other hand, if it is determined in step S132 that the number of write failures is 0, the process proceeds to step S139.

ステップS139において、メディア制御部152は、要求された記録媒体104に対応するデバイスドライバ103のマウント制御部173に対して、マウント処理を要求し、マウント制御部173に、記録媒体104のマウント処理を実行させる。すなわち、マウント制御部173は、ステップS139において、メディア制御部152の要求に応じて、ドライブ36を制御し、記録媒体104を認識させ、記録再生可能状態にするマウント処理を行わせ、その処理結果をメディア制御部152に通知する。   In step S139, the media control unit 152 requests the mount control unit 173 of the device driver 103 corresponding to the requested recording medium 104 to perform the mount process, and the mount control unit 173 performs the mount process of the recording medium 104. Let it run. That is, in step S139, the mount control unit 173 controls the drive 36 in response to a request from the media control unit 152, causes the recording medium 104 to be recognized, and performs a mount process for enabling the recording / playback. Is notified to the media control unit 152.

これに対応して、メディア制御部152により、マウント処理の結果が、記録媒体104のマウント処理を実行する上位のアプリケーションに通知され、図6のマウント処理は終了される。   In response to this, the media control unit 152 notifies the result of the mounting process to a higher-order application that executes the mounting process of the recording medium 104, and the mounting process in FIG.

なお、図6の例においては、ステップS139における実際のマウント処理の前に、不良セクタ情報に基づく記録媒体104の読み出し処理が行われる場合を説明したが、例えば、ステップS131の前に、実際にマウント処理が行われてから、不良セクタ情報に基づく記録媒体104の読み出し処理が行われるようにすることもできる。   In the example of FIG. 6, the case where the reading process of the recording medium 104 based on the defective sector information is performed before the actual mounting process in step S139 has been described. However, for example, before the step S131, the reading process is actually performed. It is also possible to perform the reading process of the recording medium 104 based on the bad sector information after the mounting process is performed.

以上のように、記録媒体104をマウントする際に、不揮発性メモリ33に記憶されている不良セクタ情報に基づく読み出し処理を行うようにしたので、書き込み時に書き込みが失敗したセクタについて、記録媒体104(すなわち、HDD)内部において、効果的に、交替セクタ処理を発動させることが可能になる。   As described above, when the recording medium 104 is mounted, the reading process based on the defective sector information stored in the nonvolatile memory 33 is performed, so that the recording medium 104 ( In other words, it is possible to effectively execute the replacement sector process inside the HDD).

したがって、次回、書き込み時に書き込みが失敗したセクタに対して、書き込み処理が行われる際には、殆どの場合、交替セクタ処理済みであり、論理セクタは同じであっても、物理セクタが異なるので、所望のセクタにデータを書き込むことができるようになる。すなわち、書き込みが失敗したセクタを再び、記録再生可能状態に復旧させることが可能になる。   Therefore, when the write process is performed on the sector that failed to be written next time, in most cases, the replacement sector process has been completed, and even if the logical sector is the same, the physical sector is different. Data can be written in a desired sector. That is, it becomes possible to restore the sector in which the writing has failed to a recordable / reproducible state again.

また、記録再生装置1の起動時などにおいて記録媒体104をマウントする時間は、もともと、ユーザが待ち状態であるときであるので、この時間を利用して、不良セクタ情報に基づく読み出し処理を行うことは、ユーザにとっては、例えば、他の処理中(例えば、記録処理中など)に行う場合よりもあまり負荷にならないため、とても効果的である。   Further, since the time for mounting the recording medium 104 at the time of starting the recording / reproducing apparatus 1 is originally when the user is in a waiting state, the reading process based on the bad sector information is performed using this time. This is very effective for the user because, for example, the load is not so great as compared with the case of performing it during other processing (for example, during recording processing).

次に、図7のフローチャートを参照して、記録再生装置1における記録媒体104のフォーマット処理について説明する。なお、図7の例においては、ステップS159のフォーマット処理が、ステップS139のマウント処理と異なる点が図6の例と異なるだけであり、図7のステップS151乃至S158の処理は、図6のステップS131乃至S138の処理と基本的に同様の処理を行う。   Next, the format processing of the recording medium 104 in the recording / reproducing apparatus 1 will be described with reference to the flowchart of FIG. 7 is different from the example of FIG. 6 in that the format process in step S159 is different from the mount process in step S139. The processes in steps S151 to S158 in FIG. Processing basically similar to the processing of S131 to S138 is performed.

例えば、アプリケーション101のうち、記録媒体104のフォーマット処理を実行するアプリケーションから、記録媒体104に対するフォーマット処理が要求される。メディア制御部152は、ステップS151において、不揮発性メモリ33から、不良セクタ情報を読み出し、ステップS152において、その先頭2バイトに記載の書き込み失敗回数が0であるか否かを判定する。   For example, a format process for the recording medium 104 is requested from an application that executes the format process for the recording medium 104 in the application 101. In step S151, the media control unit 152 reads out bad sector information from the nonvolatile memory 33, and in step S152, determines whether the number of write failures described in the first 2 bytes is zero.

ステップS152において、書き込み失敗回数が0ではないと判定された場合、処理はステップS153に進む。メディア制御部152は、ステップS153において、不良セクタ情報から、不良セクタ番号とセクタカウントの組み合わせを1つ読み出し、ステップS154とS155において、デバイスドライバ103の読出制御部172に要求し、記録媒体104における、読み出した不良セクタ番号とセクタカウントの組み合わせに基づくセクタからのデータの読み出し処理を実行させる。   If it is determined in step S152 that the number of write failures is not 0, the process proceeds to step S153. In step S153, the media control unit 152 reads one combination of the bad sector number and the sector count from the bad sector information, requests the read control unit 172 of the device driver 103 in steps S154 and S155, Then, the process of reading data from the sector based on the combination of the read bad sector number and the sector count is executed.

すなわち、読出制御部172は、メディア制御部152の要求に応じて、ステップS154において、HDDである記録媒体104の読み出し処理に即したタイムアウト値を設定し、ステップS155において、ドライブ36を制御し、記録媒体104における、不良セクタ番号のセクタから、セクタカウントが示すNセクタのデータを読み出させ、読み出されたデータを、読出バッファメモリ182に蓄積する。そして、読出制御部172は、ドライブ36からの応答に基づいて、その処理結果を、メディア制御部152に通知する。   That is, in response to a request from the media control unit 152, the read control unit 172 sets a timeout value in accordance with the read process of the recording medium 104 that is an HDD in step S154, and controls the drive 36 in step S155. The data of N sectors indicated by the sector count is read from the sector of the bad sector number on the recording medium 104, and the read data is stored in the read buffer memory 182. The read control unit 172 notifies the media control unit 152 of the processing result based on the response from the drive 36.

このとき、記録媒体104(すなわち、HDD)内部においては、これらのセクタ(不良セクタ番号のセクタから、Nセクタのセクタ領域)が破壊されている場合には、これらのセクタからデータが読み出されないので、不良セクタ登録処理が実行される。これにより、記録媒体104内部においては、交替セクタ処理が発動される。   At this time, in the recording medium 104 (that is, the HDD), when these sectors (sector area of bad sector number to sector area of N sector) are destroyed, data is not read from these sectors. Therefore, the bad sector registration process is executed. As a result, alternate sector processing is activated within the recording medium 104.

メディア制御部152は、ステップS156において、不良セクタ情報の書き込み失敗回数をデクリメントし、ステップS157において、不良セクタ情報の書き込み失敗回数が0であるか否かを判定する。ステップS157において、書き込み失敗回数が0ではないと判定された場合、処理は、ステップS153に戻り、それ以降の処理が繰り返される。ステップS157において、書き込み失敗回数が0であると判定された場合、処理は、ステップS158に進む。   In step S156, the media control unit 152 decrements the number of bad sector information write failures. In step S157, the media control unit 152 determines whether the number of bad sector information write failures is zero. If it is determined in step S157 that the number of write failures is not 0, the process returns to step S153, and the subsequent processes are repeated. If it is determined in step S157 that the number of write failures is 0, the process proceeds to step S158.

ステップS158において、メディア制御部152は、不揮発性メモリ33の不良セクタ情報をリセットする。すなわち、メディア制御部152は、不揮発性メモリ33の不良セクタ情報における、書き込み失敗回数を0に設定し、不良セクタ番号とセクタカウントを削除する。その後、処理は、ステップS159に進む。   In step S158, the media control unit 152 resets the bad sector information in the nonvolatile memory 33. That is, the media control unit 152 sets the number of write failures in the bad sector information of the nonvolatile memory 33 to 0, and deletes the bad sector number and the sector count. Thereafter, the processing proceeds to step S159.

一方、ステップS152において、書き込み失敗回数が0であると判定された場合も、処理はステップS159に進む。   On the other hand, if it is determined in step S152 that the number of write failures is 0, the process proceeds to step S159.

ステップS159において、メディア制御部152は、要求された記録媒体104に対応するデバイスドライバ103のフォーマット制御部174に対して、フォーマット処理を要求し、フォーマット制御部174に、記録媒体104のフォーマット処理を実行させる。すなわち、フォーマット制御部174は、ステップS159において、メディア制御部152の要求に応じて、ドライブ36を制御し、ドライブ36を制御し、記録媒体104の初期化を行うフォーマット処理を行わせ、その処理結果をメディア制御部152に通知する。   In step S159, the media control unit 152 requests the format control unit 174 of the device driver 103 corresponding to the requested recording medium 104 to perform the format process, and the format control unit 174 performs the format process of the recording medium 104. Let it run. That is, in step S159, the format control unit 174 controls the drive 36 in response to a request from the media control unit 152, controls the drive 36, and performs a format process for initializing the recording medium 104. The result is notified to the media control unit 152.

これに対応して、メディア制御部152により、フォーマット処理の結果が、記録媒体104のフォーマット処理を実行する上位のアプリケーションに通知され、図7のフォーマット処理は終了される。   In response to this, the media control unit 152 notifies the result of the formatting process to an upper application that executes the formatting process of the recording medium 104, and the formatting process of FIG.

なお、図7の例においても、ステップS159における実際のフォーマット処理の前に、不良セクタ情報に基づく記録媒体104の読み出し処理が行われる場合を説明したが、例えば、ステップS151の前に、実際にフォーマット処理が行われてから、不良セクタ情報に基づく記録媒体104の読み出し処理が行われるようにすることもできる。   In the example of FIG. 7, the case where the reading process of the recording medium 104 based on the bad sector information is performed before the actual formatting process in step S159 has been described. However, for example, before the step S151, the reading process is actually performed. After the format process is performed, the recording medium 104 can be read based on the bad sector information.

この場合、例えば、フォーマット処理により、記録媒体104で実行される不良セクタ登録処理で登録された不良セクタ情報が消去されてしまうという記録媒体104にも対応することができる。   In this case, for example, it is possible to cope with the recording medium 104 in which the bad sector information registered in the bad sector registration process executed on the recording medium 104 is erased by the formatting process.

すなわち、このような記録媒体104においては、記録媒体104の読み出し処理の後に、フォーマット処理が行われてしまうと、交替セクタ処理が発動される前に、記録媒体104の読み出し処理により登録された不良セクタ情報が消去されてしまう場合がある。したがって、記録媒体104の種類によっては、ステップS151の前に、実際にフォーマット処理が行われてから、不良セクタ情報に基づく記録媒体104の読み出し処理が行われるようにすることで、フォーマット処理により、記録媒体104で実行される不良セクタ登録処理で登録された不良セクタ情報が消去されてしまうことを抑制することができる。   That is, in such a recording medium 104, if the formatting process is performed after the reading process of the recording medium 104, the defect registered by the reading process of the recording medium 104 before the replacement sector process is activated. Sector information may be erased. Therefore, depending on the type of the recording medium 104, the formatting process can be performed by performing the reading process of the recording medium 104 based on the bad sector information after the formatting process is actually performed before step S151. It is possible to prevent the bad sector information registered in the bad sector registration process executed on the recording medium 104 from being erased.

以上のように、記録媒体104をフォーマットする際に、不揮発性メモリ33に記憶されている不良セクタ情報に基づく読み出し処理を行うようにしたので、書き込み時に書き込みが失敗したセクタについて、記録媒体104(すなわち、HDD)内部において、効果的に、交替セクタ処理を発動させることが可能になる。   As described above, when the recording medium 104 is formatted, the reading process based on the bad sector information stored in the nonvolatile memory 33 is performed, so that the recording medium 104 ( In other words, it is possible to effectively execute the replacement sector process inside the HDD).

したがって、次回、書き込み時に書き込みが失敗したセクタに対して、書き込み処理が行われる際には、殆どの場合、交替セクタ処理済みであり、論理セクタは同じであっても、物理セクタが異なるので、所望のセクタにデータを書き込むことができるようになる。すなわち、書き込みが失敗したセクタを再び、記録再生可能状態に復旧させることが可能になる。   Therefore, when the write process is performed on the sector that failed to be written next time, in most cases, the replacement sector process has been completed, and even if the logical sector is the same, the physical sector is different. Data can be written in a desired sector. That is, it becomes possible to restore the sector in which the writing has failed to a recordable / reproducible state again.

また、ユーザの指示により、記録媒体104をフォーマットする時間も、マウント処理の時間と同様に、もともと、ユーザが待ち状態であるときであるので、この時間を利用して、不良セクタ情報に基づく読み出し処理を行うことは、ユーザにとっては、例えば、他の処理中に行う場合よりもあまり負荷にならないため、効果的である。   In addition, the time for formatting the recording medium 104 according to the user's instruction is originally the time when the user is in a waiting state, similarly to the time for the mounting process. Performing the process is effective for the user because, for example, it is less burdensome than when performing other processes.

次に、図8のフローチャートを参照して、図6のマウント処理の他の例を説明する。なお、図8のステップS171,S172,S174乃至S178,S180,S181の処理は、図6のステップS131乃至S139の処理と基本的に同様の処理を行うため、繰り返しになるのでその詳細な説明は適宜省略する。   Next, another example of the mounting process of FIG. 6 will be described with reference to the flowchart of FIG. The processes in steps S171, S172, S174 to S178, S180, and S181 in FIG. 8 are basically the same as the processes in steps S131 to S139 in FIG. Omitted as appropriate.

メディア制御部152は、ステップS171において、不揮発性メモリ33から、不良セクタ情報を読み出し、ステップS172において、不良セクタ情報の先頭2バイトに記載の書き込み失敗回数が0であるか否かを判定する。   In step S171, the media control unit 152 reads bad sector information from the nonvolatile memory 33, and in step S172, determines whether the number of write failures described in the first two bytes of the bad sector information is zero.

ステップS172において、書き込み失敗回数が0ではないと判定された場合、処理はステップS173に進む。ステップS173において、メディア制御部152は、書き込み失敗回数が予め設定されている閾値より少ないか否かを判定し、書き込み失敗回数がその閾値よりも少ないと判定した場合、処理は、ステップS174に進む。   If it is determined in step S172 that the number of write failures is not 0, the process proceeds to step S173. In step S173, the media control unit 152 determines whether or not the number of write failures is less than a preset threshold. If the media control unit 152 determines that the number of write failures is less than the threshold, the process proceeds to step S174. .

メディア制御部152は、ステップS174において、不良セクタ情報から、不良セクタ番号とセクタカウントの組み合わせを1つ読み出し、ステップS175とS176において、デバイスドライバ103の読出制御部172に要求し、記録媒体104における、読み出した不良セクタ番号とセクタカウントの組み合わせに基づくセクタからのデータの読み出し処理を実行させる。   In step S174, the media control unit 152 reads one combination of the bad sector number and the sector count from the bad sector information, requests the read control unit 172 of the device driver 103 in steps S175 and S176, Then, the process of reading data from the sector based on the combination of the read bad sector number and the sector count is executed.

すなわち、読出制御部172は、メディア制御部152の要求に応じて、ステップS175において、HDDである記録媒体104の読み出し処理に即したタイムアウト値を設定し、ステップS176において、ドライブ36を制御し、記録媒体104における、不良セクタ番号のセクタから、セクタカウントが示すNセクタのデータを読み出させ、読み出されたデータを、読出バッファメモリ182に蓄積する。そして、読出制御部172は、ドライブ36からの応答に基づいて、その処理結果を、メディア制御部152に通知する。   That is, in response to a request from the media control unit 152, the read control unit 172 sets a timeout value in accordance with the read process of the recording medium 104 that is an HDD in step S175, and controls the drive 36 in step S176. The data of N sectors indicated by the sector count is read from the sector of the bad sector number on the recording medium 104, and the read data is stored in the read buffer memory 182. The read control unit 172 notifies the media control unit 152 of the processing result based on the response from the drive 36.

このとき、記録媒体104(すなわち、HDD)内部においては、これらのセクタ(不良セクタ番号のセクタから、Nセクタのセクタ領域)が破壊されている場合には、これらのセクタからデータが読み出されないので、不良セクタ登録処理が実行される。これにより、記録媒体104内部においては、交替セクタ処理が発動される。   At this time, in the recording medium 104 (that is, the HDD), when these sectors (sector area of bad sector number to sector area of N sector) are destroyed, data is not read from these sectors. Therefore, the bad sector registration process is executed. As a result, alternate sector processing is activated within the recording medium 104.

メディア制御部152は、ステップS177において、不良セクタ情報の書き込み失敗回数をデクリメントし、ステップS178において、不良セクタ情報の書き込み失敗回数が0であるか否かを判定する。ステップS178において、書き込み失敗回数が0ではないと判定された場合、処理は、ステップS174に戻り、それ以降の処理が繰り返される。ステップS178において、書き込み失敗回数が0であると判定された場合、処理は、ステップS180に進む。   In step S177, the media control unit 152 decrements the number of bad sector information write failures, and in step S178, determines whether the number of bad sector information write failures is zero. If it is determined in step S178 that the number of write failures is not 0, the process returns to step S174, and the subsequent processes are repeated. If it is determined in step S178 that the number of write failures is 0, the process proceeds to step S180.

ステップS173において、書き込み失敗回数がその閾値以上であると判定された場合、処理は、ステップS179に進む。この場合、書き込み失敗回数があまりにも多い、すなわち、記録媒体104において破壊されているセクタがあまりにも多いので、ステップS179において、メディア制御部152は、デバイスドライバ103の読出制御部172に要求し、記録媒体104全面に対して、順次データの読み出し処理を実行させる。   If it is determined in step S173 that the number of write failures is equal to or greater than the threshold, the process proceeds to step S179. In this case, since the number of write failures is too large, that is, there are too many sectors destroyed in the recording medium 104, the media control unit 152 requests the read control unit 172 of the device driver 103 in step S179, Data reading processing is sequentially executed on the entire surface of the recording medium 104.

すなわち、読出制御部172は、ステップS179において、ドライブ36を制御し、記録媒体104全面に対して、順次データを読み出させ、読み出されたデータを、読出バッファメモリ182に蓄積する。そして、読出制御部172は、ドライブ36からの応答に基づいて、その処理結果を、メディア制御部152に通知する。その後、処理は、ステップS180に進む。   That is, the read control unit 172 controls the drive 36 in step S179 to sequentially read data from the entire surface of the recording medium 104, and accumulates the read data in the read buffer memory 182. The read control unit 172 notifies the media control unit 152 of the processing result based on the response from the drive 36. Thereafter, the processing proceeds to step S180.

このときも、記録媒体104(すなわち、HDD)内部においては、読み出しを行ったセクタが破壊されている場合には、これらのセクタからデータが読み出されないので、不良セクタ登録処理が実行される。これにより、記録媒体104内部においては、交替セクタ処理が発動される。   Also at this time, in the recording medium 104 (that is, the HDD), when the read sector is destroyed, data is not read from these sectors, so that the bad sector registration process is executed. As a result, alternate sector processing is activated within the recording medium 104.

なお、この場合、記録媒体104には破壊されているセクタがあまりにも多いので、そのことを、上位のアプリケーション101に通知して、記録媒体104には破壊されているセクタが多いことを通知する画像などを、ディスプレイ16に表示させ、ユーザに通知することもできる。これにより、ユーザは、記録媒体104が着脱可能である場合、記録媒体104そのものが異常となってしまう前に交換したり、修理したりすることができる。   In this case, since there are too many sectors destroyed in the recording medium 104, this is notified to the higher-level application 101, and the recording medium 104 is notified that there are many sectors destroyed. An image or the like can be displayed on the display 16 to notify the user. Thus, when the recording medium 104 is detachable, the user can replace or repair the recording medium 104 before it becomes abnormal.

ステップS180において、メディア制御部152は、不揮発性メモリ33の不良セクタ情報をリセットする。すなわち、メディア制御部152は、不揮発性メモリ33の不良セクタ情報における、書き込み失敗回数を0に設定し、不良セクタ番号とセクタカウントを削除する。その後、処理は、ステップS181に進む。   In step S180, the media control unit 152 resets the bad sector information in the nonvolatile memory 33. That is, the media control unit 152 sets the number of write failures in the bad sector information in the nonvolatile memory 33 to 0, and deletes the bad sector number and the sector count. Thereafter, the process proceeds to step S181.

一方、ステップS172において、書き込み失敗回数が0であると判定された場合も、処理はステップS181に進む。   On the other hand, also when it is determined in step S172 that the number of write failures is 0, the process proceeds to step S181.

ステップS181において、メディア制御部152は、要求された記録媒体104に対応するデバイスドライバ103のマウント制御部173に対して、マウント処理を要求し、マウント制御部173に、記録媒体104のマウント処理を実行させる。すなわち、マウント制御部173は、ステップS181において、メディア制御部152の要求に応じて、ドライブ36を制御し、記録媒体104を認識させ、記録再生可能状態にするマウント処理を行わせ、その処理結果をメディア制御部152に通知する。   In step S181, the media control unit 152 requests the mount control unit 173 of the device driver 103 corresponding to the requested recording medium 104 to perform a mount process, and causes the mount control unit 173 to perform the mount process of the recording medium 104. Let it run. That is, in step S181, the mount control unit 173 controls the drive 36 in response to a request from the media control unit 152, causes the recording medium 104 to be recognized, and performs a mount process for enabling recording and reproduction. Is notified to the media control unit 152.

これに対応して、メディア制御部152により、マウント処理の結果が、記録媒体104のマウント処理を実行する上位のアプリケーションに通知され、図8のマウント処理は終了される。   In response to this, the media control unit 152 notifies the result of the mounting process to a higher-order application that executes the mounting process of the recording medium 104, and the mounting process in FIG.

なお、図8の例においても、ステップS181における実際のマウント処理の前に、不良セクタ情報に基づく記録媒体104の読み出し処理が行われる場合を説明したが、例えば、ステップS171の前に、実際にマウント処理が行われてから、不良セクタ情報に基づく記録媒体104の読み出し処理が行われるようにすることもできる。   In the example of FIG. 8, the case where the reading process of the recording medium 104 based on the defective sector information is performed before the actual mounting process in step S181 has been described. It is also possible to perform the reading process of the recording medium 104 based on the bad sector information after the mounting process is performed.

以上のように、記録媒体104をマウントする際に、不揮発性メモリ33に記憶されている不良セクタ情報に基づく読み出し処理を行うようにし、さらに、書き込み失敗回数があまりにも多い場合、記録媒体104全体について順次読み出し処理を行うようにしたので、書き込み時に書き込みが失敗したセクタについて、効率的に、記録媒体104(すなわち、HDD)内部において交替セクタ処理を発動させることが可能になる。   As described above, when the recording medium 104 is mounted, the reading process based on the bad sector information stored in the nonvolatile memory 33 is performed, and if the number of write failures is too large, the entire recording medium 104 Thus, the alternate sector process can be efficiently activated inside the recording medium 104 (that is, the HDD) for the sector that failed to be written at the time of writing.

次に、図9のフローチャートを参照して、記録再生装置1における記録媒体104のフォーマット処理について説明する。なお、図9のステップS201,S202,S204乃至S208,S210,S211の処理は、図8のステップS151乃至S159の処理と基本的に同様の処理を行うため、繰り返しになるのでその詳細な説明は適宜省略する。   Next, the format process of the recording medium 104 in the recording / reproducing apparatus 1 will be described with reference to the flowchart of FIG. The processes in steps S201, S202, S204 to S208, S210, and S211 in FIG. 9 are basically the same as the processes in steps S151 to S159 in FIG. Omitted as appropriate.

メディア制御部152は、ステップS201において、不揮発性メモリ33から、不良セクタ情報を読み出し、ステップS202において、その先頭2バイトに記載の書き込み失敗回数が0であるか否かを判定する。   In step S201, the media control unit 152 reads bad sector information from the nonvolatile memory 33, and in step S202, determines whether the number of write failures described in the first two bytes is zero.

ステップS202において、書き込み失敗回数が0ではないと判定された場合、処理はステップS203に進む。ステップS203において、メディア制御部152は、書き込み失敗回数が予め設定されている閾値より少ないか否かを判定し、書き込み失敗回数がその閾値よりも少ないと判定した場合、処理は、ステップS204に進む。   If it is determined in step S202 that the number of write failures is not 0, the process proceeds to step S203. In step S203, the media control unit 152 determines whether or not the number of write failures is less than a preset threshold. If the media control unit 152 determines that the number of write failures is less than the threshold, the process proceeds to step S204. .

メディア制御部152は、ステップS204において、不良セクタ情報から、不良セクタ番号とセクタカウントの組み合わせを1つ読み出し、ステップS205とS206において、デバイスドライバ103の読出制御部172に要求し、記録媒体104における、読み出した不良セクタ番号とセクタカウントの組み合わせに基づくセクタからのデータの読み出し処理を実行させる。   In step S204, the media control unit 152 reads one combination of the bad sector number and the sector count from the bad sector information. In steps S205 and S206, the media control unit 152 requests the read control unit 172 of the device driver 103 to read the combination. Then, the process of reading data from the sector based on the combination of the read bad sector number and the sector count is executed.

すなわち、読出制御部172は、メディア制御部152の要求に応じて、ステップS205において、HDDである記録媒体104の読み出し処理に即したタイムアウト値を設定し、ステップS206において、ドライブ36を制御し、記録媒体104における、不良セクタ番号のセクタから、セクタカウントが示すNセクタのデータを読み出させ、読み出されたデータを、読出バッファメモリ182に蓄積する。そして、読出制御部172は、ドライブ36からの応答に基づいて、その処理結果を、メディア制御部152に通知する。   That is, in response to a request from the media control unit 152, the read control unit 172 sets a timeout value in accordance with the read process of the recording medium 104 that is an HDD in step S205, and controls the drive 36 in step S206. The data of N sectors indicated by the sector count is read from the sector of the bad sector number on the recording medium 104, and the read data is stored in the read buffer memory 182. The read control unit 172 notifies the media control unit 152 of the processing result based on the response from the drive 36.

このとき、記録媒体104(すなわち、HDD)内部においては、これらのセクタ(不良セクタ番号のセクタから、Nセクタのセクタ領域)が破壊されている場合には、これらのセクタからデータが読み出されないので、不良セクタ登録処理が実行される。これにより、記録媒体104内部においては、交替セクタ処理が発動される。   At this time, in the recording medium 104 (that is, the HDD), when these sectors (sector area of bad sector number to sector area of N sector) are destroyed, data is not read from these sectors. Therefore, the bad sector registration process is executed. As a result, alternate sector processing is activated within the recording medium 104.

メディア制御部152は、ステップS207において、不良セクタ情報の書き込み失敗回数をデクリメントし、ステップS208において、不良セクタ情報の書き込み失敗回数が0であるか否かを判定する。ステップS208において、書き込み失敗回数が0ではないと判定された場合、処理は、ステップS204に戻り、それ以降の処理が繰り返される。ステップS208において、書き込み失敗回数が0であると判定された場合、処理は、ステップS210に進む。   In step S207, the media control unit 152 decrements the number of bad sector information write failures. In step S208, the media control unit 152 determines whether the number of bad sector information write failures is zero. If it is determined in step S208 that the number of write failures is not 0, the process returns to step S204, and the subsequent processes are repeated. When it is determined in step S208 that the number of write failures is 0, the process proceeds to step S210.

ステップS203において、書き込み失敗回数がその閾値以上であると判定された場合、処理は、ステップS209に進む。この場合、書き込み失敗回数があまりにも多い、すなわち、破壊されているセクタがあまりにも多いので、ステップS209において、メディア制御部152は、デバイスドライバ103の読出制御部172に要求し、記録媒体104全面に対して、順次データの読み出し処理を実行させる。   If it is determined in step S203 that the number of write failures is equal to or greater than the threshold, the process proceeds to step S209. In this case, since the number of write failures is too large, that is, there are too many destroyed sectors, in step S209, the media control unit 152 requests the read control unit 172 of the device driver 103 to perform the entire recording medium 104. In response to this, sequential data read processing is executed.

すなわち、読出制御部172は、ステップS209において、ドライブ36を制御し、記録媒体104全面に対して、順次データを読み出させ、読み出されたデータを、読出バッファメモリ182に蓄積する。そして、読出制御部172は、ドライブ36からの応答に基づいて、その処理結果を、メディア制御部152に通知する。その後、処理は、ステップS210に進む。   That is, the read control unit 172 controls the drive 36 in step S209 to sequentially read data from the entire surface of the recording medium 104, and accumulates the read data in the read buffer memory 182. The read control unit 172 notifies the media control unit 152 of the processing result based on the response from the drive 36. Thereafter, the process proceeds to step S210.

このときも、記録媒体104(すなわち、HDD)内部においては、読み出しを行ったセクタが破壊されている場合には、これらのセクタからデータが読み出されないので、不良セクタ登録処理が実行される。これにより、記録媒体104内部においては、交替セクタ処理が発動される。   Also at this time, in the recording medium 104 (that is, the HDD), when the read sector is destroyed, data is not read from these sectors, so that the bad sector registration process is executed. As a result, alternate sector processing is activated within the recording medium 104.

なお、この場合も、図8の例の場合と同様に、記録媒体104には破壊されているセクタがあまりにも多いので、そのことを、上位のアプリケーション101に通知して、記録媒体104には破壊されているセクタが多いことを通知する画像などを、ディスプレイ16に表示させ、ユーザに通知することもできる。   In this case as well, as in the case of the example of FIG. 8, the recording medium 104 has too many destroyed sectors. An image or the like notifying that there are many destroyed sectors can be displayed on the display 16 to notify the user.

ステップS210において、メディア制御部152は、不揮発性メモリ33の不良セクタ情報をリセットする。すなわち、メディア制御部152は、不揮発性メモリ33の不良セクタ情報における、書き込み失敗回数を0に設定し、不良セクタ番号とセクタカウントを削除する。その後、処理は、ステップS211に進む。   In step S210, the media control unit 152 resets bad sector information in the nonvolatile memory 33. That is, the media control unit 152 sets the number of write failures in the bad sector information in the nonvolatile memory 33 to 0, and deletes the bad sector number and the sector count. Thereafter, the process proceeds to step S211.

一方、ステップS202において、書き込み失敗回数が0であると判定された場合も、処理はステップS211に進む。   On the other hand, also when it is determined in step S202 that the number of write failures is 0, the process proceeds to step S211.

ステップS211において、メディア制御部152は、要求された記録媒体104に対応するデバイスドライバ103のフォーマット制御部174に対して、フォーマット処理を要求し、フォーマット制御部174に、記録媒体104のフォーマット処理を実行させる。すなわち、フォーマット制御部174は、ステップS211において、メディア制御部152の要求に応じて、ドライブ36を制御し、ドライブ36を制御し、記録媒体104の初期化を行うフォーマット処理を行わせ、その処理結果をメディア制御部152に通知する。   In step S <b> 211, the media control unit 152 requests the format control unit 174 of the device driver 103 corresponding to the requested recording medium 104 to perform format processing, and causes the format control unit 174 to perform format processing of the recording medium 104. Let it run. That is, in step S211, the format control unit 174 controls the drive 36 in response to a request from the media control unit 152, controls the drive 36, and performs a format process for initializing the recording medium 104. The result is notified to the media control unit 152.

これに対応して、メディア制御部152により、フォーマット処理の結果が、記録媒体104のフォーマット処理を実行する上位のアプリケーションに通知され、図9のフォーマット処理は終了される。   In response to this, the media control unit 152 notifies the result of the formatting process to a higher-level application that executes the formatting process of the recording medium 104, and the formatting process in FIG.

なお、図9の例においても、ステップS211における実際のフォーマット処理の前に、不良セクタ情報に基づく記録媒体104の読み出し処理が行われる場合を説明したが、例えば、ステップS201の前に、実際にフォーマット処理が行われてから、不良セクタ情報に基づく記録媒体104の読み出し処理が行われるようにすることもできる。   In the example of FIG. 9, the case where the reading process of the recording medium 104 based on the bad sector information is performed before the actual formatting process in step S211 has been described. However, for example, before the step S201, the reading process is actually performed. After the format process is performed, the recording medium 104 can be read based on the bad sector information.

この場合も、例えば、フォーマット処理により、記録媒体104で実行される不良セクタ登録処理で登録された不良セクタ情報が消去されてしまうという記録媒体104にも対応することができる。   In this case, for example, it is possible to cope with the recording medium 104 in which the bad sector information registered in the bad sector registration process executed in the recording medium 104 is erased by the formatting process.

以上のように、記録媒体104をフォーマットする際に、不揮発性メモリ33に記憶されている不良セクタ情報に基づく読み出し処理を行うようにし、さらに、書き込み失敗回数があまりにも多い場合、記録媒体104全体について順次読み出し処理を行うようにしたので、書き込み時に書き込みが失敗したセクタについて、効率的に、記録媒体104(すなわち、HDD)内部において交替セクタ処理を発動させることが可能になる。   As described above, when the recording medium 104 is formatted, the reading process based on the defective sector information stored in the nonvolatile memory 33 is performed, and if the number of write failures is too large, the entire recording medium 104 Thus, the alternate sector process can be efficiently activated inside the recording medium 104 (that is, the HDD) for the sector that failed to be written at the time of writing.

なお、本発明は、特にHDDに対して適用した場合に効果的であるため、上記説明においては、HDDである記録媒体104を用いて説明したが、これに限定されることなく、ランダムアクセス可能な記録媒体全般と、その制御に用いる各種デバイスに対して適用可能である。また、本発明は、着脱可能な記録媒体に対しても、本体内蔵の記録媒体と同様に、適用可能である。また、ファイルシステムに関しても、UDF(Universal Disk Format)などであってもよく、FAT32またはFAT16に限定されるものではない。   Since the present invention is particularly effective when applied to an HDD, the above description has been made using the recording medium 104 that is an HDD. However, the present invention is not limited to this, and random access is possible. The present invention can be applied to all kinds of recording media and various devices used for the control. The present invention can also be applied to a detachable recording medium in the same manner as the recording medium built in the main body. The file system may be UDF (Universal Disk Format) or the like, and is not limited to FAT32 or FAT16.

また、ダミーの読み出し処理を挿入しない方が、リトライ効果が得られる記録媒体に対しては、記録媒体104の種別を先に判別することで、不良セクタ情報の更新を行わない記録処理を行わせるようにすることもできる。この場合、不良セクタ情報における書き込み失敗回数は0となるため、マウント処理やフォーマット処理の際には、ダミーの読み出し処理は実行されない。   In addition, for a recording medium that can obtain a retry effect when a dummy reading process is not inserted, the recording process that does not update bad sector information is performed by first determining the type of the recording medium 104. It can also be done. In this case, since the number of write failures in the bad sector information is 0, the dummy read process is not executed during the mount process or the format process.

以上のように、不良セクタ情報を更新する処理を組み合わせたリトライ制御を有する記録処理において、動画像や静止画像、音声などの各種ファイルのデータを記録媒体に記録することにより、振動や衝撃、温度や湿度、または、その他の要因によって、アクセス中のセクタを破壊してしまったとしても、その次に行われるマウント処理やフォーマット処理の際に、効果的に、HDD内部にて、交替セクタ処理を発動させることが可能となり、そして、その後、破壊されたセクタを、再び、記録再生可能な状態に復旧させることができる。   As described above, in recording processing having retry control combined with processing for updating bad sector information, recording data of various files such as moving images, still images, and audio on a recording medium, vibration, shock, temperature Even if the sector being accessed is destroyed due to humidity, humidity, or other factors, the alternate sector processing is effectively performed in the HDD during the next mounting or formatting process. Then, the destroyed sector can be restored to a recordable / reproducible state again.

以上においては、本発明を記録再生装置に適用した例について説明したが、本発明を汎用のパーソナルコンピュータに適用することも可能である。図10は、パーソナルコンピュータ601の構成例を示すブロック図である。なお、本発明が適用される記録媒体に記録する記録装置の実施の形態は、図1に示される記録再生装置1および図10に示されるパーソナルコンピュータ601に限定されず、所定のファイルシステムを利用して、記録媒体の記録および読み出しの制御が可能な記録装置であれば構わない。具体的には、例えば、PDA(Personal Digital Assistants)、携帯電話機、または、デジタル電化製品(例えば、テレビジョン受像機やハードディスク録画装置)等様々な実施の形態が可能である。   In the above, an example in which the present invention is applied to a recording / reproducing apparatus has been described. However, the present invention can also be applied to a general-purpose personal computer. FIG. 10 is a block diagram illustrating a configuration example of the personal computer 601. The embodiment of the recording apparatus for recording on the recording medium to which the present invention is applied is not limited to the recording / reproducing apparatus 1 shown in FIG. 1 and the personal computer 601 shown in FIG. 10, but uses a predetermined file system. Any recording apparatus capable of controlling recording and reading of the recording medium may be used. Specifically, for example, various embodiments such as a PDA (Personal Digital Assistants), a mobile phone, or a digital appliance (for example, a television receiver or a hard disk recording device) are possible.

図10の例において、CPU(Central Processing Unit)611は、ROM(Read Only Memory)612、または記憶部618に記憶されているプログラムに従って各種の処理を実行する。RAM(Random Access Memory)613には、CPU611が実行するプログラムやデータなどが適宜記憶される。これらのCPU611、ROM612、およびRAM613は、バス614により相互に接続されている。   In the example of FIG. 10, a CPU (Central Processing Unit) 611 executes various processes according to a program stored in a ROM (Read Only Memory) 612 or a storage unit 618. A RAM (Random Access Memory) 613 appropriately stores programs executed by the CPU 611 and data. These CPU 611, ROM 612, and RAM 613 are connected to each other by a bus 614.

CPU611にはまた、バス614を介して入出力インタフェース615が接続されている。入出力インタフェース615には、ユーザが操作して、テキストを入力するキーボード631、ポインティングデバイスの一例であるマウス632、画像を入力するスキャナ633、音声を入力するマイクロフォン634等の入力デバイスで構成される入力部616、ディスプレイなどの表示部641、音声を出力するスピーカ642、紙に文字または画像を印刷して、いわゆるハードコピーを出力するプリンタ643、紙に文字または画像を描画するプロッタ644等の出力デバイスで構成される出力部617が接続されている。   An input / output interface 615 is also connected to the CPU 611 via the bus 614. The input / output interface 615 includes input devices such as a keyboard 631 for inputting text by a user, a mouse 632 as an example of a pointing device, a scanner 633 for inputting an image, and a microphone 634 for inputting sound. Output from an input unit 616, a display unit 641 such as a display, a speaker 642 that outputs sound, a printer 643 that prints characters or images on paper and outputs a so-called hard copy, a plotter 644 that draws characters or images on paper An output unit 617 composed of devices is connected.

さらに、入出力インタフェース615には、プログラムや各種データを記録するHDD619、およびLAN(Local Area Network)またはインターネットを含むネットワークを介してデータを通信する、USB(Universal Serial Bus)インタフェース651,IEEE(Institute of Electrical and Electronic Engineers)1394インタフェース652、ブルートゥースインタフェース653,IEEE802.11インタフェース654などで構成される通信部618が接続されている。   Further, the input / output interface 615 includes an HDD 619 for recording programs and various data, a USB (Universal Serial Bus) interface 651, an IEEE (Institute) for communicating data via a LAN (Local Area Network) or a network including the Internet. A communication unit 618 including a 1394 interface 652, a Bluetooth interface 653, an IEEE 802.11 interface 654, and the like is connected.

USBインタフェース651は、USBの規格に基づき、ケーブルを介して(有線通信で)、他の機器と通信する。IEEE1394インタフェース652は、IEEE1394の規格に基づき、ケーブルを介して、他の機器と通信する。同様に、ブルートゥースインタフェース653は、ブルートゥースの規格に基づき、他の機器と無線通信する。IEEE802.11インタフェース654は、IEEE802.11a,IEEE802.11b、またはIEEE802.11gなどの規格に基づき、他の機器と無線通信する。   The USB interface 651 communicates with other devices via a cable (by wired communication) based on the USB standard. The IEEE1394 interface 652 communicates with other devices via a cable based on the IEEE1394 standard. Similarly, the Bluetooth interface 653 performs wireless communication with other devices based on the Bluetooth standard. The IEEE802.11 interface 654 performs wireless communication with other devices based on standards such as IEEE802.11a, IEEE802.11b, or IEEE802.11g.

入出力インタフェース615にはまた、必要に応じてドライブ620が接続され、磁気ディスク661、光ディスク662、光磁気ディスク663、或いは半導体メモリ664などが適宜装着され、それらから読み出されたコンピュータプログラムが、必要に応じてHDD619にインストールされる。   A drive 620 is connected to the input / output interface 615 as necessary, and a magnetic disk 661, an optical disk 662, a magneto-optical disk 663, a semiconductor memory 664, or the like is appropriately mounted, and a computer program read from them is loaded. Installed in the HDD 619 as necessary.

ドライブ620は、CPU611の制御に基づいて、装着されている磁気ディスク661、光ディスク662、光磁気ディスク663、或いは半導体メモリ664などの記録媒体に記録されているデータを読み出し、CPU611に供給する。また、CPU611より供給されたデータを、ドライブ620に装着される磁気ディスク661、光ディスク662、光磁気ディスク663、或いは半導体メモリ664などに記憶させる。   The drive 620 reads data recorded on a recording medium such as a magnetic disk 661, an optical disk 662, a magneto-optical disk 663, or a semiconductor memory 664 mounted based on the control of the CPU 611 and supplies the data to the CPU 611. Further, the data supplied from the CPU 611 is stored in the magnetic disk 661, the optical disk 662, the magneto-optical disk 663, or the semiconductor memory 664 mounted on the drive 620.

なお、上述した一連の処理は、ハードウェアにより実行させることもできるし、ソフトウェアにより実行させることもできる。上述した一連の処理をソフトウェアにより実行させる場合には、そのソフトウェアを構成するプログラムが、インターネットなどのネットワークや、リムーバブルメディアなどからなる記録媒体からインストールされる。   The series of processes described above can be executed by hardware, or can be executed by software. When the above-described series of processing is executed by software, a program constituting the software is installed from a network such as the Internet or a recording medium such as a removable medium.

この記録媒体は、図10に示される、装置本体とは別に、ユーザにプログラムを配信するために配布される、プログラムが記録されている磁気ディスク(フロッピディスク(登録商標)を含む)661、光ディスク(CD-ROM(Compact Disk-Read Only Memory),DVD(Digital Versatile Disk)を含む)662、光磁気ディスク(MD(Mini-Disk)(登録商標)を含む)663、もしくは半導体メモリ664などよりなるリムーバブルメディアにより構成されるものだけでなく、装置本体に予め組み込まれた状態でユーザに配信される、プログラムが記録されているROM612や、HDD619に含まれるハードディスクなどで構成されるものも含む。   This recording medium is a magnetic disk (including a floppy disk (registered trademark)) 661 on which a program is recorded, which is distributed to distribute the program to the user, separately from the apparatus main body shown in FIG. (Including CD-ROM (Compact Disk-Read Only Memory), DVD (Digital Versatile Disk)) 662, magneto-optical disk (including MD (Mini-Disk) (registered trademark)) 663, or semiconductor memory 664 This includes not only a removable medium but also a ROM 612 in which a program is recorded and a hard disk included in the HDD 619, which is distributed to the user in a state of being incorporated in the apparatus main body in advance.

なお、本明細書において、プログラム記録媒体に格納されるプログラムを記述するステップは、記載された順序に沿って時系列的に行われる処理はもちろん、必ずしも時系列的に処理されなくとも、並列的あるいは個別に実行される処理をも含むものである。   In the present specification, the step of describing the program stored in the program recording medium is not limited to the processing performed in time series in the order described, but is not necessarily performed in time series. Or the process performed separately is also included.

本発明を適用した記録再生装置の一実施形態に係る構成例を示す図である。It is a figure which shows the structural example which concerns on one Embodiment of the recording / reproducing apparatus to which this invention is applied. 図1の記録再生装置における記録媒体へのデータの記録、または記録媒体からのデータの読み出しの仕組みを説明する図である。FIG. 2 is a diagram for explaining a mechanism for recording data on a recording medium or reading data from the recording medium in the recording / reproducing apparatus of FIG. 1. 図1のCPUで実行されるソフトウェアの機能的構成例を示すブロック図である。It is a block diagram which shows the functional structural example of the software performed with CPU of FIG. 図1の不揮発性メモリに記憶される不良セクタ情報の構造例を示す図である。It is a figure which shows the structural example of the bad sector information memorize | stored in the non-volatile memory of FIG. 図1の記録再生装置における記録媒体の記録処理を説明するフローチャートである。3 is a flowchart for explaining recording medium recording processing in the recording / reproducing apparatus of FIG. 1. 図1の記録再生装置における記録媒体のマウント処理を説明するフローチャートである。3 is a flowchart for explaining a recording medium mounting process in the recording / reproducing apparatus of FIG. 1. 図1の記録再生装置における記録媒体のフォーマット処理を説明するフローチャートである。6 is a flowchart for explaining a recording medium formatting process in the recording / reproducing apparatus of FIG. 1. 図1の記録再生装置における記録媒体のマウント処理の他の例を説明するフローチャートである。6 is a flowchart for explaining another example of a recording medium mounting process in the recording / reproducing apparatus of FIG. 1. 図1の記録再生装置における記録媒体のフォーマット処理の他の例を説明するフローチャートである。6 is a flowchart for explaining another example of a recording medium formatting process in the recording / reproducing apparatus of FIG. 1. 本発明を適用したコンピュータの一実施の形態の構成例を示すブロック図である。It is a block diagram which shows the structural example of one Embodiment of the computer to which this invention is applied.

符号の説明Explanation of symbols

1 記録再生装置, 16 ディスプレイ, 31 RAM, 33 不揮発性メモリ, 36 ドライブ, 51 CPU, 101 アプリケーション, 102 ファイルシステム, 103 デバイスドライバ, 104 記録媒体, 151 記録制御部, 152 メディア制御部, 171 書込制御部, 172 読出制御部, 173 マウント制御部, 174 フォーマット制御部   1 recording / playback device, 16 display, 31 RAM, 33 non-volatile memory, 36 drive, 51 CPU, 101 application, 102 file system, 103 device driver, 104 recording medium, 151 recording control unit, 152 media control unit, 171 writing Control unit, 172 Read control unit, 173 Mount control unit, 174 Format control unit

Claims (7)

記録媒体にデータを記録する記録装置において、
前記記録媒体の所定の記録単位の領域へのデータの書き込みを制御する書込制御手段と、
前記所定の記録単位の領域への前記データの書き込みが成功したか否かを判定する書込判定手段と、
前記書込判定手段により前記データの書き込みが失敗したと判定された場合、前記データの書き込みが失敗した前記所定の記録単位の領域の情報を記憶する記憶手段と
を備える記録装置。
In a recording apparatus for recording data on a recording medium,
Write control means for controlling the writing of data to an area of a predetermined recording unit of the recording medium;
Write determination means for determining whether or not the writing of the data to the area of the predetermined recording unit is successful;
And a storage unit configured to store information on an area of the predetermined recording unit in which the data writing has failed when the writing determining unit determines that the data writing has failed.
前記記録媒体のマウント処理を制御するマウント制御手段と、
前記マウント制御手段により制御される前記記録媒体のマウント処理の際に、前記記憶手段に記憶された前記データの書き込みが失敗した前記所定の記録単位の領域の情報に基づいて、前記所定の記録単位の領域からのデータの読み出しを制御する読出制御手段と
をさらに備える請求項1に記載の記録装置。
Mount control means for controlling the mounting process of the recording medium;
The predetermined recording unit based on the information of the area of the predetermined recording unit in which the writing of the data stored in the storage unit failed during the mounting process of the recording medium controlled by the mount control unit The recording apparatus according to claim 1, further comprising: a reading control unit that controls reading of data from the area.
前記記憶手段に記憶された前記データの書き込みが失敗した前記所定の記録単位の領域の情報に記載の書き込み失敗回数が所定の閾値より多いか否かを判定する回数判定手段をさらに備え、
前記回数判定手段により前記書き込み失敗回数が所定の閾値より多いと判定された場合、前記読出制御手段は、前記記録媒体全面に対しての読み出しを順次制御する
請求項2に記載の記録装置。
A number of times determination means for determining whether or not the number of write failures described in the information of the area of the predetermined recording unit in which the writing of the data stored in the storage means has failed is greater than a predetermined threshold;
The recording apparatus according to claim 2, wherein when the number determination unit determines that the number of write failures is greater than a predetermined threshold, the read control unit sequentially controls reading from the entire surface of the recording medium.
前記記録媒体のフォーマット処理を制御するフォーマット制御手段と、
前記フォーマット制御手段により制御される前記記録媒体のフォーマット処理の際に、前記記憶手段に記憶された前記データの書き込みが失敗した前記所定の記録単位の領域の情報に基づいて、前記所定の記録単位の領域からのデータの読み出しを制御する読出制御手段と
をさらに備える請求項1に記載の記録装置。
Format control means for controlling format processing of the recording medium;
The predetermined recording unit based on the information of the area of the predetermined recording unit in which the writing of the data stored in the storage unit failed during the formatting process of the recording medium controlled by the format control unit The recording apparatus according to claim 1, further comprising: a reading control unit that controls reading of data from the area.
前記記憶手段に記憶された前記データの書き込みが失敗した前記所定の記録単位の領域の情報に記載の書き込み失敗回数が所定の閾値より多いか否かを判定する回数判定手段をさらに備え、
前記回数判定手段により前記書き込み失敗回数が所定の閾値より多いと判定された場合、前記読出制御手段は、前記記録媒体全面に対しての読み出しを順次制御する
請求項4に記載の記録装置。
A number of times determination means for determining whether or not the number of write failures described in the information of the area of the predetermined recording unit in which the writing of the data stored in the storage means has failed is greater than a predetermined threshold;
The recording apparatus according to claim 4, wherein when the number determination unit determines that the number of write failures is greater than a predetermined threshold, the read control unit sequentially controls reading from the entire surface of the recording medium.
記録媒体にデータを記録する記録装置の記録方法において、
前記記録媒体の所定の記録単位の領域へのデータの書き込みを制御し、
前記所定の記録単位の領域への前記データの書き込みが成功したか否かを判定し、
前記データの書き込みが失敗したと判定された場合、前記データの書き込みが失敗した前記所定の記録単位の領域の情報を記憶手段に記憶させる
ステップを含む記録方法。
In a recording method of a recording apparatus for recording data on a recording medium,
Controlling the writing of data to a predetermined recording unit area of the recording medium;
Determining whether the data has been successfully written to the predetermined recording unit area;
A recording method including a step of storing, in a storage unit, information on an area of the predetermined recording unit in which the data writing has failed when it is determined that the data writing has failed.
記録媒体にデータを記録する記録装置に、
前記記録媒体の所定の記録単位の領域へのデータの書き込みを制御し、
前記所定の記録単位の領域への前記データの書き込みが成功したか否かを判定し、
前記データの書き込みが失敗したと判定された場合、前記データの書き込みが失敗した前記所定の記録単位の領域の情報を記憶手段に記憶させる
ステップを含む処理を実行させるプログラム。
In a recording device that records data on a recording medium,
Controlling the writing of data to a predetermined recording unit area of the recording medium;
Determining whether the data has been successfully written to the predetermined recording unit area;
When it is determined that the data writing has failed, a program for executing processing including a step of storing in a storage unit information on an area of the predetermined recording unit in which the data writing has failed.
JP2006164134A 2006-06-14 2006-06-14 Recording device, method, and program Withdrawn JP2007334970A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006164134A JP2007334970A (en) 2006-06-14 2006-06-14 Recording device, method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006164134A JP2007334970A (en) 2006-06-14 2006-06-14 Recording device, method, and program

Publications (1)

Publication Number Publication Date
JP2007334970A true JP2007334970A (en) 2007-12-27

Family

ID=38934299

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006164134A Withdrawn JP2007334970A (en) 2006-06-14 2006-06-14 Recording device, method, and program

Country Status (1)

Country Link
JP (1) JP2007334970A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013109651A (en) * 2011-11-22 2013-06-06 Canon Marketing Japan Inc Medical checkup information processing device, medical checkup information processing method, and program
CN116661698A (en) * 2023-06-16 2023-08-29 浙江清环智慧科技有限公司 Management method and device for storage in inspection well drainage monitoring equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013109651A (en) * 2011-11-22 2013-06-06 Canon Marketing Japan Inc Medical checkup information processing device, medical checkup information processing method, and program
CN116661698A (en) * 2023-06-16 2023-08-29 浙江清环智慧科技有限公司 Management method and device for storage in inspection well drainage monitoring equipment
CN116661698B (en) * 2023-06-16 2024-02-13 浙江清环智慧科技有限公司 Management method and device for storage in inspection well drainage monitoring equipment

Similar Documents

Publication Publication Date Title
JP5378378B2 (en) Coded removable storage device that allows change detection
JP4051776B2 (en) Video information recording apparatus and video information reproducing apparatus
JP2010198407A (en) Information processor, data recording control method, and program
JP5374254B2 (en) Image file transfer device
JP2007334970A (en) Recording device, method, and program
JP2008077780A (en) Recording device, recording method and recording program, recording and reproducing device, recording and reproducing method and recording and reproducing program, and imaging device
JP5053945B2 (en) Recording medium initialization method and recording medium initialization apparatus
JP2010011314A (en) Camera system and recorder
JP5762014B2 (en) REPRODUCTION DEVICE AND REPRODUCTION DEVICE CONTROL METHOD
JP2007059004A (en) Information processor and method, program, and recording medium
JP4921118B2 (en) Video signal processing apparatus, video signal processing method, and program
JP2006260158A (en) Information processing apparatus, information processing method and program
JP2007334971A (en) Recording device, method, and program
JP2007279873A (en) Data recorder
JP4356011B2 (en) Recording apparatus and method, imaging apparatus, recording medium, and program
JP7475930B2 (en) Imaging device and control method thereof
JP4103890B2 (en) Recording method and recording apparatus
JP5950798B2 (en) Recording apparatus and control method thereof
JP4680948B2 (en) RECORDING / REPRODUCING DEVICE, RECORDING DEVICE, AND RECORDING METHOD
JP4596274B2 (en) Image recording apparatus, image recording method, and image recording program
JP4850419B2 (en) Information processing apparatus, information processing method, program, and storage medium
JP5063382B2 (en) Recording / reproducing apparatus, recording apparatus and reproducing apparatus
JP2009181603A (en) Digital information recording/reproducing system
JP4845482B2 (en) Recording / reproducing apparatus and recording method
JP2006164085A (en) Update control unit

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20090901