JP2011129221A - Disk drive supporting interface by data sector different in size, and backup method for user data - Google Patents
Disk drive supporting interface by data sector different in size, and backup method for user data Download PDFInfo
- Publication number
- JP2011129221A JP2011129221A JP2009288713A JP2009288713A JP2011129221A JP 2011129221 A JP2011129221 A JP 2011129221A JP 2009288713 A JP2009288713 A JP 2009288713A JP 2009288713 A JP2009288713 A JP 2009288713A JP 2011129221 A JP2011129221 A JP 2011129221A
- Authority
- JP
- Japan
- Prior art keywords
- data
- backup
- sector
- data sector
- area
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims description 111
- 238000012545 processing Methods 0.000 claims abstract description 67
- 238000011084 recovery Methods 0.000 claims description 20
- 230000007246 mechanism Effects 0.000 claims description 8
- 230000008569 process Effects 0.000 description 94
- 238000007726 management method Methods 0.000 description 42
- 238000010586 diagram Methods 0.000 description 15
- 230000002159 abnormal effect Effects 0.000 description 12
- 238000001514 detection method Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 5
- 230000008859 change Effects 0.000 description 4
- 230000002950 deficient Effects 0.000 description 4
- 239000000284 extract Substances 0.000 description 3
- 238000001994 activation Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 230000008901 benefit Effects 0.000 description 1
- 238000005352 clarification Methods 0.000 description 1
- 238000012790 confirmation Methods 0.000 description 1
- 238000013523 data management Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000004904 shortening Methods 0.000 description 1
- 239000000725 suspension Substances 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
Images
Landscapes
- Signal Processing For Digital Recording And Reproducing (AREA)
Abstract
【課題】異なるサイズのデータ・セクタによるインターフェースをサポートするディスク・ドライブにおいて、ライト処理における電源切断において非書換えデータが消失することを防ぐ。
【解決手段】本発明の一実施形態において、HDDは、インターフェースにおいて、二つの異なるサイズのデータ・セクタをサポートする。磁気ディスク上のデータ・セクタは大サイズ・データ・セクタである。HDDは、ホストから小サイズ・データ・セクタによるライト・コマンドを受信し、その指定アドレス(書換え領域)の境界が磁気ディスク上の大サイズ・データ・セクタの境界と一致しない場合、ユーザ・データのバックアップ処理を行う。バックアップ領域は、1もしくは複数のデータ・トラックから構成されている。
【選択図】図8In a disk drive that supports an interface with data sectors of different sizes, non-rewritten data is prevented from being lost when power is turned off in write processing.
In one embodiment of the present invention, the HDD supports two different size data sectors at the interface. The data sector on the magnetic disk is a large size data sector. When the HDD receives a write command with a small data sector from the host and the boundary of the designated address (rewrite area) does not match the boundary of the large data sector on the magnetic disk, the HDD Perform backup processing. The backup area is composed of one or a plurality of data tracks.
[Selection] Figure 8
Description
本発明は異なるサイズのデータ・セクタによるインターフェースをサポートするディスク・ドライブ及びそのユーザ・データのバックアップ方法に関する。 The present invention relates to a disk drive that supports an interface with data sectors of different sizes and a method for backing up user data thereof.
ディスク・ドライブとして、光ディスク、光磁気ディスク、あるいはフレキシブル磁気ディスクなどの様々な態様のディスクを使用する装置が知られているが、その中で、ハードディスク・ドライブ(HDD)は、コンピュータの外部記憶装置として広く普及している。さらに、動画像記録再生装置あるいはカーナビゲーション・システムなど、多くの他の電子機器で使用されている。 As a disk drive, an apparatus using a disk of various modes such as an optical disk, a magneto-optical disk, or a flexible magnetic disk is known. Among them, a hard disk drive (HDD) is an external storage device of a computer. As widely used. Further, it is used in many other electronic devices such as a moving image recording / reproducing apparatus or a car navigation system.
HDDで使用される磁気ディスクは、複数のデータ・トラックと複数のサーボ・トラックとを有している。サーボ・トラックはアドレス情報を有する複数のサーボ・セクタから構成される。また、データ・トラックには、ユーザ・データを含んでいる複数のデータ・セクタが記録されている。円周方向に離間するサーボ・セクタの間に、データ・セクタが記録されている。 A magnetic disk used in the HDD has a plurality of data tracks and a plurality of servo tracks. The servo track is composed of a plurality of servo sectors having address information. In addition, a plurality of data sectors including user data are recorded on the data track. Data sectors are recorded between servo sectors spaced apart in the circumferential direction.
ヘッド・スライダはアクチュエータのサスペンション上に固着されている。アクチュエータが揺動軸を中心に揺動することによって、ヘッド・スライダを目的のデータ・トラックへ移動すると共に、そのトラック上に位置決めする。揺動するアクチュエータに支持されたヘッド・スライダのヘッド素子部が、サーボ・データのアドレス情報に従って所望のデータ・セクタにアクセスすることによって、データ・セクタへのデータ書き込み及びデータ・セクタからのデータ読み出しを行うことができる。 The head slider is fixed on the suspension of the actuator. As the actuator swings about the swing axis, the head slider moves to the target data track and is positioned on the track. The head element part of the head slider supported by the oscillating actuator accesses the desired data sector according to the servo data address information, thereby writing data to the data sector and reading data from the data sector. It can be performed.
HDDは、データ・セクタ単位で、磁気ディスク上のデータにアクセスする。典型的なHDDにおいて、データ・セクタのサイズは512バイトである。そのため、現在の多くのプログラム(ホスト)は、512バイトのデータ・セクタを基準として書かれている。一方、ソフトウェアが扱うデータ・サイズは、近年、益々増加しており、HDDのアクセス単位のデータ・サイズも、それに従い大きくすることが好ましいと考えられるようになってきている。一つの例としては、4Kバイト(4096バイト)のデータ・セクタ・サイズが提案されている。また、アクセスの単位であるデータ・セクタのサイズを大きくすることは、ユーザ・データ以外に必要とする付加的な冗長データを相対的に少なくし、記録面の容量を増加させることができる。 The HDD accesses data on the magnetic disk in units of data sectors. In a typical HDD, the data sector size is 512 bytes. For this reason, many current programs (hosts) are written based on 512-byte data sectors. On the other hand, the data size handled by software has increased more and more in recent years, and it is considered that it is preferable to increase the data size of the access unit of the HDD accordingly. As an example, a data sector size of 4 Kbytes (4096 bytes) has been proposed. Further, increasing the size of the data sector, which is a unit of access, can relatively reduce the additional redundant data required in addition to the user data and increase the capacity of the recording surface.
HDDのデータ・セクタ・サイズを変更することにおける一つの問題は、プログラム(ホスト)におけるデータ・セクタ・サイズの不統一である。大サイズのデータ・セクタが今後広まっていくとしても、すぐに全てのソフトウェア(ホスト)が大サイズ・データ・セクタを基準として書かれることは考えづらく、一部のソフトウェアは、従来の512バイト・データ・セクタを基準として書かれることが考えられる。また、ユーザが使用するプログラムは、新しいプログラムと古いプログラムとを含む。従って、HDDは、新たな大サイズ・データ・セクタに加え、従来の512バイト・データ・セクタをもサポートすることが要求される。 One problem in changing the data sector size of the HDD is the inconsistency of the data sector size in the program (host). Even if large-sized data sectors become widespread in the future, it is unlikely that all software (host) will be written on the basis of large-sized data sectors immediately. It can be written based on the data sector. The programs used by the user include new programs and old programs. Therefore, the HDD is required to support the conventional 512-byte data sector in addition to the new large size data sector.
このような課題を解決するため、従来の512バイト・データ・セクタと新たな大サイズ・データ・セクタ(4Kバイト・データ・セクタ)の双方をサポートするインターフェースを有するHDDが提案されている(例えば、特許文献1を参照)。このHDDは、4Kバイト・データ・セクタで磁気ディスクへのデータのライト及びリードを行う。コマンドは、アクセス先の先頭アドレスとデータ長とを指定する。512バイト・セクタ・サイズによるコマンドを受信すると、HDDは、指定アドレスを4Kバイト・セクタのアドレスに変換して、磁気ディスクへアクセスする。 In order to solve such a problem, an HDD having an interface that supports both a conventional 512-byte data sector and a new large-size data sector (4 Kbyte data sector) has been proposed (for example, , See Patent Document 1). This HDD writes and reads data to and from a magnetic disk with 4 Kbyte data sectors. The command specifies the start address and data length of the access destination. When a command with a 512-byte sector size is received, the HDD converts the designated address into an address of 4 Kbyte sector and accesses the magnetic disk.
512バイト単位で指定されたデータ(アクセス領域)の境界アドレスは、4Kバイトでの境界アドレスとは一致しないことがある。図13は、3つの4Kバイト・データ・セクタと、コマンドが512バイト・データ・セクタで指定した領域の例を示している。コマンドの指定領域は5Kバイトであり、先頭アドレスと末尾アドレスの双方は、4Kバイト・データ・セクタの境界アドレスとは一致しない。このような場合、HDDは、指定アドレスを含む3つ全ての4Kデータ・セクタにアクセスすることが必要である。つまり、その全ての領域がコマンドにより指定されているデータ・セクタ(中央のデータ・セクタ)の他、その一部のみに指定されたアドレス領域を含むデータ・セクタ(先頭及び末尾のデータ・セクタ)にもアクセスする。 The boundary address of data (access area) specified in 512-byte units may not match the boundary address in 4 Kbytes. FIG. 13 shows an example of an area specified by three 4 Kbyte data sectors and a command by 512 byte data sectors. The command specification area is 5 Kbytes, and both the head address and the end address do not match the boundary address of the 4 Kbyte data sector. In such a case, the HDD needs to access all three 4K data sectors including the designated address. In other words, in addition to the data sector specified by the command (center data sector), the data sector including the address area specified for only a part of the data sector (first and last data sector) Also access.
具体的には、リードにおいて、HDDは、指定アドレスのデータを含む全てのデータ・セクタを磁気ディスクからバッファに読み出す。一部のデータ・セクタは、ホストが指定したアドレス以外のデータも含む。そのため、HDDは、磁気ディスクから読み出したデータから必要なデータのみを抽出して、ホストに転送する。ライトにおいて、HDDは、一部に指定アドレスを含むデータ・セクタを読み出し、読み出したデータ・セクタの一部とホストから取得したデータから新たなセクタ・データを生成し、そのデータを磁気ディスクのデータ・セクタに書き込む。 Specifically, in reading, the HDD reads all data sectors including data of a specified address from the magnetic disk to a buffer. Some data sectors also contain data other than addresses specified by the host. Therefore, the HDD extracts only necessary data from the data read from the magnetic disk and transfers it to the host. In writing, the HDD reads a data sector partially including a specified address, generates new sector data from a part of the read data sector and data acquired from the host, and uses the data as data on the magnetic disk. • Write to the sector.
ライト・コマンドに従って磁気ディスクにデータを書き込んでいる途中で、予期しない電源切断が起きることがある。このような場合、コマンドが指定した書換え領域のデータ・セクタは最新のユーザ・データを記憶しておらず、ホストから取得したユーザ・データの一部もしくは全部が消失してしまう。しかし、エラーとなるデータ・セクタはホストがライト・コマンドにより指定したアドレスのデータ・セクタであり、消失する可能性があるデータも、そのライト・コマンドの対象となっているユーザ・データのみである。設計者は、この点を理解した上でソフトウェア(ホスト)の設計を行うことが可能であり、このデータ消失は許容された事象として取り扱うことができる。 An unexpected power cut may occur while data is being written to the magnetic disk according to the write command. In such a case, the data sector in the rewrite area designated by the command does not store the latest user data, and part or all of the user data acquired from the host is lost. However, the data sector in error is the data sector at the address specified by the host using the write command, and the only data that may be lost is the user data subject to the write command. . The designer can design the software (host) after understanding this point, and this data loss can be handled as an allowable event.
しかし、ホストとのインターフェースにおけるデータ・セクタ・サイズと、HDD内で磁気ディスクにアクセスするデータ・セクタ・サイズとが異なる場合、ライト処理における電源切断が新たな問題を引き起こす。上述のように、磁気ディスクのリード/ライトが4Kバイトの大サイズ・データ・セクタであり、ホストとのインターフェースが512バイトの小サイズ・データ・セクタである場合、ライト処理において、磁気ディスク上の書換え領域における先頭及び末尾のデータ・セクタは、その一部のデータのみが書き換えられる場合がある。 However, when the data sector size at the interface with the host is different from the data sector size for accessing the magnetic disk in the HDD, the power-off in the write processing causes a new problem. As described above, when the read / write of the magnetic disk is a large size data sector of 4 Kbytes and the interface with the host is a small size data sector of 512 bytes, in the write process, on the magnetic disk In some cases, only a part of the data sector at the beginning and end of the rewrite area is rewritten.
先頭あるいは末尾のデータ・セクタの書き込みの途中で電源切断が起きた場合、そのデータ・セクタ内で書換えの対象となっていないデータが消失してしまう。つまり、今回のライト・コマンドのデータとは異なるユーザ・データが消失する。この消失データは、ライト・コマンドを発行したホスト(プログラム)のユーザ・データ、あるいは、それと異なるホスト(プログラム)のユーザ・データである。 If the power is cut off during the writing of the first or last data sector, data not to be rewritten in the data sector is lost. That is, user data different from the current write command data is lost. This lost data is user data of the host (program) that issued the write command, or user data of a different host (program).
いずれの場合においても、このユーザ・データの消失は、ライト・コマンドを発行したホスト、あるいは、消失データの所有者であるホストが予定しいてないデータ消失である。従って、HDDは、このようなデータ消失を防止する技術を実装していることが要求される。さらに、データ消失を防止するための処理は、確実にかつ効率的に行うことが必要である。 In any case, this loss of user data is data loss that is not scheduled by the host that issued the write command or the host that owns the lost data. Therefore, the HDD is required to have a technique for preventing such data loss. Furthermore, it is necessary to reliably and efficiently perform processing for preventing data loss.
本発明の一態様は、大サイズ・データ・セクタと小サイズ・データ・セクタの双方をサポートするホスト・インターフェースを有し、前記大サイズ・データ・セクタによりディスクにアクセスするディスク・ドライブである。このディスク・ドライブは、ディスクにアクセスするヘッドと、前記ヘッドを前記ディスク上で移動する移動機構と、前記ヘッド及び前記移動機構を制御するコントローラとを含む。
前記コントローラは、ライト・コマンドを受信して、前記ライト・コマンドのデータ・セクタ・サイズを判定する。前記受信したライト・コマンドのデータ・セクタ・サイズが前記小サイズ・データ・セクタである場合に、前記ライト・コマンドが指定する書換え領域の先頭と末尾とのそれぞれが、前記ディスク上の大サイズ・データ・セクタの境界に一致するか判定する。前記先頭と末尾との一方が大サイズ・データ・セクタの境界に一致しない場合はその一方を含む大サイズ・データ・セクタを含むバックアップ・データを、双方が一致しない場合はその双方のそれぞれを含む大サイズ・データ・セクタを含むバックアップ・データを、前記ディスク上の1もしくは複数データ・トラックからなるバックアップ領域に格納する。これにより、ライト処理における電源切断においてデータ書換え領域外のデータが消失することを防ぐことができると共に、バックアップ・データのバックアップ領域への書き込みにおける遅延を小さくすることができる。
One aspect of the present invention is a disk drive having a host interface that supports both large and small data sectors and accessing the disk with the large data sectors. The disk drive includes a head that accesses the disk, a moving mechanism that moves the head on the disk, and a controller that controls the head and the moving mechanism.
The controller receives a write command and determines a data sector size of the write command. When the data sector size of the received write command is the small size data sector, each of the beginning and end of the rewrite area specified by the write command is a large size on the disk. Determine if it matches the data sector boundary. If one of the head and tail does not match the boundary of the large data sector, the backup data including the large data sector including the one is included, and if both do not match, both of the data are included. Backup data including a large size data sector is stored in a backup area consisting of one or more data tracks on the disk. As a result, it is possible to prevent data outside the data rewrite area from being lost when the power is turned off in the write process, and to reduce the delay in writing backup data to the backup area.
好ましい構成において、前記コントローラは、前記バックアップ領域へのシーク完了後、書き込み開始可能な最近のデータ・セクタからバックアップ・データの書き込みを開始する。これにより、バックアップ・データのバックアップ領域への書き込みにおける遅延をより小さくすることができる。 In a preferred configuration, after the seek to the backup area is completed, the controller starts writing backup data from the latest data sector where writing can be started. Thereby, the delay in writing backup data to the backup area can be further reduced.
好ましい構成において、前記コントローラは、前記バックアップ領域へのシーク完了後の予め設定されている規定番目のデータ・セクタから前記バックアップ・データを書き始める。これにより、シンプルな処理によりバックアップ・データのバックアップ領域への書き込みにおける遅延を小さくすることができる。 In a preferred configuration, the controller starts writing the backup data from a preset predetermined data sector after completion of seek to the backup area. As a result, the delay in writing the backup data to the backup area can be reduced by a simple process.
好ましい構成において、前記バックアップ・データは、最新のバックアップ・データであることを示すデータを含む。これにより、電源遮断からの回復処理において、最新のバックアップ・データを迅速かつ容易に見つけることができる。 In a preferred configuration, the backup data includes data indicating that it is the latest backup data. As a result, the latest backup data can be found quickly and easily in the recovery process from the power interruption.
前記最新のバックアップ・データであることを示すデータは、カウンタのカウンタ値であることが好ましい。これにより、シンプルな構成で最新のバックアップ・データであることを示すことができる。さらに、前記コントローラは、前記カウンタが規定の値に達すると、前記バックアップ領域を初期化することが好ましい。これにより、所定サイズのカウンタにより確実に最新のバックアップ・データを示すことができる。 The data indicating the latest backup data is preferably a counter value of a counter. As a result, it is possible to indicate that the backup data is the latest with a simple configuration. Furthermore, it is preferable that the controller initializes the backup area when the counter reaches a predetermined value. Thereby, the latest backup data can be surely indicated by the counter of a predetermined size.
前記バックアップ・データは、バックアップ元のアドレスを含むことが好ましい。これにより、他のデータを参照することなく、電源遮断から回復処理においてバックアップ元を特定することができる。 The backup data preferably includes a backup source address. As a result, the backup source can be specified in the recovery process from the power shutdown without referring to other data.
好ましくは、前記コントローラは、前記バックアップ・データを、前記バックアップ領域における連続領域に格納する。これにより、バックアップ処理時間を短縮することができる。 Preferably, the controller stores the backup data in a continuous area in the backup area. Thereby, the backup processing time can be shortened.
好ましい構成において、前記バックアップ・データはユーザ・データの前後のデータ・セクタに格納されているフラグを含み、前記コントローラは前記書き込み領域への新たなデータ書き込みの後において前記フラグを更新し、前記コントローラは、前記フラグ、前記バックアップ元のユーザ・データ及び前記書き換え領域のデータを使用して、データ書き込みにおける電源遮断に対応する回復処理を実行する。これにより、他のデータを参照することなく、バックアップ・データとバックアップ元のユーザ・データとにより、電源遮断に対応する回復処理を実行することができる。 In a preferred configuration, the backup data includes a flag stored in a data sector before and after user data, and the controller updates the flag after writing new data to the write area, and the controller Uses the flag, the user data of the backup source, and the data in the rewrite area to execute a recovery process corresponding to power shutdown in data writing. As a result, the recovery process corresponding to the power shutdown can be executed with the backup data and the backup source user data without referring to other data.
好ましい構成において、前記コントローラは、前記バックアップ・データを格納したデータ・セクタのアドレス情報を一時的に保持し、前記フラグの更新において前記アドレス情報を参照して前記フラグのアドレスを特定する。これにより、容易かつ迅速に更新すべきフラグを特定することができる。 In a preferred configuration, the controller temporarily holds address information of a data sector storing the backup data, and specifies the address of the flag by referring to the address information in updating the flag. Thereby, the flag which should be updated easily and rapidly can be specified.
好ましい構成において、前記コントローラは、前記先頭と前記末尾の双方が大サイズ・データ・セクタの境界と一致せず、前記末尾を含む末尾データ・セクタを前記先頭を含む先頭データ・セクタよりも先に読み出すことができ、前記末尾データ・セクタから前記先頭データ・セクタまでの時間が閾値よりも小さいとき、前記バックアップ領域へ格納するために、前記末尾データ・セクタの後に前記先頭データ・セクタを読み出す。これにより、バックアップ処理時間を短縮することができる。 In a preferred configuration, the controller is such that both the head and the tail do not coincide with the boundary of the large data sector, and the tail data sector including the tail is preceded by the head data sector including the head. When the time from the tail data sector to the head data sector is smaller than a threshold, the head data sector is read after the tail data sector for storage in the backup area. Thereby, the backup processing time can be shortened.
本発明の他の態様は、大サイズ・データ・セクタと小サイズ・データ・セクタの双方をサポートするホスト・インターフェースを有し、前記大サイズ・データ・セクタによりディスクにアクセスするディスク・ドライブにおいて、ユーザ・データをバックアップする方法である。この方法は、ライト・コマンドを受信する。前記ライト・コマンドのデータ・セクタ・サイズを判定する。前記受信したライト・コマンドのデータ・セクタ・サイズが前記小サイズ・データ・セクタである場合に、前記ライト・コマンドが指定する書換え領域の先頭と末尾とのそれぞれが、前記ディスク上の大サイズ・データ・セクタの境界に一致するか判定する。前記先頭と末尾との一方が大サイズ・データ・セクタの境界に一致しない場合はその一方を含む大サイズ・データ・セクタを含むバックアップ・データを、双方が一致しない場合はその双方のそれぞれを含む大サイズ・データ・セクタを含むバックアップ・データを、前記ディスク上の1もしくは複数データ・トラックからなるバックアップ領域に格納する。これにより、ライト処理における電源切断においてデータ書換え領域外のデータが消失することを防ぐことができると共に、バックアップ・データのバックアップ領域への書き込みにおける遅延を小さくすることができる。 Another aspect of the present invention is a disk drive having a host interface that supports both large data sectors and small data sectors, wherein the disk is accessed by the large data sectors. This is a method for backing up user data. This method receives a write command. The data sector size of the write command is determined. When the data sector size of the received write command is the small size data sector, each of the beginning and end of the rewrite area specified by the write command is a large size on the disk. Determine if it matches the data sector boundary. If one of the head and tail does not match the boundary of the large data sector, the backup data including the large data sector including the one is included, and if both do not match, both of the data are included. Backup data including a large size data sector is stored in a backup area consisting of one or more data tracks on the disk. As a result, it is possible to prevent data outside the data rewrite area from being lost when the power is turned off in the write process, and to reduce the delay in writing backup data to the backup area.
本発明によれば、異なるサイズのデータ・セクタによるインターフェースをサポートするディスク・ドライブにおいて、ライト処理における電源切断においてデータ書換え領域外のデータが消失することを防ぐことができ、そのためのバックアップ処理を効率的に行なうことができる。 ADVANTAGE OF THE INVENTION According to this invention, in the disk drive which supports the interface by the data sector of a different size, it can prevent that the data outside a data rewriting area | region is lose | disappeared at the power-off in write processing, and backup processing for that is efficient Can be done automatically.
以下に、本発明の実施の形態を説明する。説明の明確化のため、以下の記載及び図面は、適宜、省略及び簡略化がなされている。又、各図面において、同一要素には同一の符号が付されており、説明の明確化のため、必要に応じて重複説明は省略されている。以下においては、ディスク・ドライブの一例であるハードディスク・ドライブ(HDD)において、本発明の実施形態を説明する。 Hereinafter, embodiments of the present invention will be described. For clarity of explanation, the following description and drawings are omitted and simplified as appropriate. Moreover, in each drawing, the same code | symbol is attached | subjected to the same element and the duplication description is abbreviate | omitted as needed for clarification of description. In the following, an embodiment of the present invention will be described in a hard disk drive (HDD) which is an example of a disk drive.
本形態のHDDは、ホスト・インターフェースにおいて、大サイズのデータ・セクタと小サイズのデータ・セクタの双方をサポートする。つまり、ホストは、大サイズのデータ・セクタと小サイズのデータ・セクタのいずれにおいても、HDDにリード及びライトのコマンドを発行することができる。小サイズ・データ・セクタのサイズは、例えば、512バイトであり、大サイズ・データ・セクタのサイズは、例えば、4K(4096)バイトである。 The HDD according to the present embodiment supports both a large data sector and a small data sector in the host interface. In other words, the host can issue read and write commands to the HDD in both the large data sector and the small data sector. The size of the small size data sector is, for example, 512 bytes, and the size of the large size data sector is, for example, 4K (4096) bytes.
磁気ディスク上のデータ・セクタは大サイズ・データ・セクタである。HDDは、常に、大サイズ・データ・セクタにより、磁気ディスクにアクセス(リードあるいはライト)する。このように、磁気ディスク上のデータ・セクタ・サイズを大きくすることで、データ・セクタに必要とされる冗長データを低減し、記録面のデータ容量を大きくすることができる。 The data sector on the magnetic disk is a large size data sector. The HDD always accesses (reads or writes) the magnetic disk with large data sectors. As described above, by increasing the data sector size on the magnetic disk, it is possible to reduce redundant data required for the data sector and increase the data capacity of the recording surface.
本形態のHDDは、ホストから小サイズ・データ・セクタによるライト・コマンドを受信し、その指定アドレス(書換え領域)の境界が磁気ディスク上の大サイズ・データ・セクタの境界と一致しない場合、ユーザ・データのバックアップ処理を行う。これにより、予期しない電源切断がライト処理中に発生しても、書換え領域外にあってライト・コマンドと無関係なユーザ・データの消失を防ぐことができる。本形態は、このデータ・バックアップ処理に特徴を有している。本形態のライト処理について詳細に説明する前に、HDDの全体構成を説明する。 The HDD of this embodiment receives a write command with a small size data sector from the host, and if the boundary of the designated address (rewrite area) does not coincide with the boundary of the large size data sector on the magnetic disk, -Perform data backup processing. As a result, even if an unexpected power-off occurs during the write process, it is possible to prevent the loss of user data outside the rewrite area and unrelated to the write command. This embodiment is characterized by this data backup processing. Before describing the write processing of this embodiment in detail, the overall configuration of the HDD will be described.
図1は、HDDの全体構成を模式的に示すブロック図である。HDD1は、エンクロージャ10内に、データを記憶するディスクである磁気ディスク11を有している。スピンドル・モータ(SPM)14は、磁気ディスク11を所定の角速度で回転する。磁気ディスク11の各記録面に対応して、磁気ディスク11にアクセスするヘッド・スライダ12が設けられている。アクセスは、リード及びライトの上位概念である。各ヘッド・スライダ12は、磁気ディスク上を飛行するスライダと、スライダに形成され磁気信号と電気信号との間の変換を行うヘッド素子部とを備えている。
FIG. 1 is a block diagram schematically showing the overall configuration of the HDD. The
各ヘッド・スライダ12はアクチュエータ16の先端部に固定されている。アクチュエータ16はボイス・コイル・モータ(VCM)15に連結され、回動軸を中心に回動することによって、ヘッド・スライダ12を回転する磁気ディスク11上においてその半径方向に移動する。アクチュエータ16とVCM15とは、ヘッド・スライダ12の移動機構である。
Each
エンクロージャ10の外側に固定された回路基板20上には、回路が実装されている。モータ・ドライバ・ユニット22は、HDC/MPU23からの制御データに従って、SPM14及びVCM15を駆動する。揮発性メモリであるRAM24は、リード・データ及びライト・データを一時的に格納するバッファとして機能する。エンクロージャ10内のアーム電子回路(AE)13は、複数のヘッド・スライダ12の中から磁気ディスク11へのアクセスを行うヘッド・スライダ12を選択し、その再生信号を増幅してリード・ライト・チャネル(RWチャネル)21に送る。また、RWチャネル21からの記録信号を選択したヘッド・スライダ12に送る。なお、本発明は一つのヘッド・スライダ12のみを有するHDDに適用することができる。
A circuit is mounted on the
RWチャネル21は、リード処理において、AE13から取得したリード信号からデータを抽出し、デコード処理を行う。読み出されるデータは、ユーザ・データとサーボ・データとを含む。デコード処理されたリード・ユーザ・データ及びサーボ・データは、HDC/MPU23に供給される。また、RWチャネル21は、ライト処理において、HDC/MPU23から供給されたライト・データをコード変調し、更にコード変調されたライト・データをライト信号に変換してAE13に供給する。
In the read process, the
コントローラであるHDC/MPU23は、リード/ライト処理制御、コマンド実行順序の管理、サーボ信号を使用したヘッド・スライダ12のポジショニング制御(サーボ制御)、ホスト51との間のインターフェース制御、ディフェクト管理、エラーが発生した場合のエラー対応処理など、データ処理に関する必要な処理及びHDD1の全体制御を実行する。
The controller HDC /
本形態のHDD1のHDC/MPU23に含まれるホスト・インターフェースは、小サイズ・データ・セクタと大サイズ・データ・セクタの双方をサポートする。磁気ディスク11は、大サイズ・データ・セクタによりデータを記憶する。ホスト51からのコマンドが大サイズ・データ・セクタによってアドレス指定を行う場合、HDD1は通常の処理フローに従って磁気ディスク11からのデータ読み出し/データ書き込みを行えばよい。しかし、ホスト51からのコマンドが小サイズ・データ・セクタによるアクセスを要求する場合、HDD1は小サイズ・データ・セクタによるアクセスをエミュレートすることが必要となる。
The host interface included in the HDC /
本形態は小サイズ・データ・セクタによるライト処理におけるデータ・バックアップ処理に特徴を有しているが、まず、異なるデータ・セクタ・サイズに応じたリード/ライト処理の全体の流れを、図2のブロック図及び図3のフローチャートを参照して説明する。図2は、データ・セクタ・サイズに応じた処理を行う論理構成を模式的に示すブロック図である。ホスト・インターフェース及び磁気ディスク11へのアクセスは、全てHDC/MPU23が制御する。
The present embodiment is characterized by data backup processing in write processing by small size data sectors. First, the overall flow of read / write processing according to different data sector sizes is shown in FIG. This will be described with reference to the block diagram and the flowchart of FIG. FIG. 2 is a block diagram schematically showing a logical configuration for performing processing according to the data sector size. The HDC /
HDC/MPU23は、データ・サイズ検出部231、大サイズ・データ・セクタ制御部232、そして小サイズ・データ・セクタ制御部233を含む。HDC/MPU23は、ハードウェアであるHDCとMPUとを有しており、上記各機能要素は、ハードウェアあるいはMPUがファームウェアに従って動作することによって実現される。従って、HDC/MPU23は、上記各機能要素を別の回路構成として有する、あるいは異なるタイミングにおいて各機能要素として機能する。
The HDC /
ホスト51からコマンドを受信すると(S11におけるY)、データ・サイズ検出部231がそのコマンドが取り扱うデータのデータ・セクタ・サイズを特定する(S12)。典型的には、コマンドは、使用データ・セクタを示す情報を格納するフィールドを有しており、データ・サイズ検出部231は、そのフィールドを参照することにより、そのコマンドが前提とするデータ・セクタ・サイズを検出する。
When a command is received from the host 51 (Y in S11), the data
検出したデータ・セクタ・サイズが大サイズである場合(S12におけるY)、大サイズ・データ・セクタ制御部232がユーザ・データのリード/ライト処理を実行する。コマンドが指定するデータ・セクタ・サイズと磁気ディスク11のデータ・セクタ・サイズが同一であるため、大サイズ・データ・セクタ制御部232の処理は、一般的なHDDの処理と同じである。
When the detected data sector size is a large size (Y in S12), the large size data sector control unit 232 executes a user data read / write process. Since the data sector size specified by the command and the data sector size of the
ライト処理において、大サイズ・データ・セクタ制御部232はホスト51から大サイズ・データ・セクタ単位でユーザ・データを受信し(S13)、バッファ241に格納する。さらに、バッファ241からのデータを大サイズ・データ・セクタ単位でRWチャネル21に転送する。転送されたデータ・セクタは、RWチャネル21、AE13を介して、ヘッド・スライダ12により磁気ディスク11に書き込まれる。RWチャネル21、アクチュエータ16及びAE13は、大サイズ・データ・セクタ制御部232により制御される(S14)。
In the write process, the large size data sector control unit 232 receives user data in units of large size data sectors from the host 51 (S13) and stores the user data in the
リード処理においては、大サイズ・データ・セクタ制御部232は、RWチャネル21、アクチュエータ16及びAE13を制御して、コマンドが指定するアドレスのデータ・セクタを磁気ディスク11から読み出し、それをバッファ241に格納する(S14)。さらに、バッファ241から、読み出したデータ・セクタをホスト51に転送する(S15)。
In the read process, the large size data sector control unit 232 controls the
検出したデータ・セクタ・サイズが小サイズである場合(S12におけるN)、小サイズ・データ・セクタ制御部233がユーザ・データのリード/ライト処理を実行する。ライト処理において、小サイズ・データ・セクタ制御部233はホスト51から小サイズ・データ・セクタ単位でユーザ・データを受信し、バッファ241に格納する(S16)。その後、小サイズ・データ・セクタのエミュレーション制御を含む、磁気ディスク11へのデータ書き込み処理を実行する(S17)。この方法の詳細は後述する。
When the detected data sector size is a small size (N in S12), the small size data sector control unit 233 executes a user data read / write process. In the write processing, the small size data sector control unit 233 receives user data from the
リード処理においては、小サイズ・データ・セクタ制御部233は、RWチャネル21、アクチュエータ16及びAE13を制御して、コマンドが指定するアドレスのデータ・セクタを磁気ディスク11から読み出し、それをバッファ241に格納する(S17)。磁気ディスク11からの読み出しは、小サイズ・データ・セクタのエミュレーション制御を含む。この方法の詳細は後述する。その後、さらに、小サイズ・データ・セクタ制御部233は、バッファ241から、読み出したデータを小サイズ・データ・セクタ単位でホスト51に転送する(S18)。
In the read process, the small size data sector control unit 233 controls the
小サイズ・データ・セクタによる磁気ディスク11からのデータ読み出し処理について図4を参照して説明する。ホスト・インターフェースにおけるデータ・セクタ・サイズと磁気ディスク上のデータ・セクタ・サイズが異なる場合、ホストからのコマンドが指定するアドレスの境界と、磁気ディスク上のデータ・セクタの境界との不一致が起きる。そのため、小サイズ・データ・セクタ制御部233は、リード・コマンドが指示するアドレスのデータ以外のデータも磁気ディスク11から読み出す。
The data reading process from the
図4は、リード・コマンド指定アドレスの先頭アドレスと末尾アドレスの双方の境界が、磁気ディスク11のデータ・セクタの境界と一致していない場合を示している。磁気ディスク上の読み出し領域112のデータ・セクタは、6つの大サイズ・データ・セクタ111a〜111fであり、このコマンドが指定する読み出し領域112は、6つのデータ・セクタの領域内において、中央の4つのデータ・セクタ111b〜111eの全ての領域と、前後端のデータ・セクタ111a、111fのそれぞれの一部の領域を占める。
FIG. 4 shows a case where the boundary between the head address and the tail address of the read command designation address does not coincide with the data sector boundary of the
小サイズ・データ・セクタ制御部233は、リード・コマンドが小サイズ・データ・セクタ単位で指定するアドレスから、大サイズデータ・セクタ単位のデータ・セクタのアドレスを算出し、対応するデータ・セクタ111a〜111fを磁気ディスク11から読み出し、バッファ241に格納する。さらに、小サイズ・データ・セクタ制御部233は、読み出したデータから必要なデータを抽出し、小サイズ・データ・セクタ単位でホスト51にデータを転送する。
The small size data sector control unit 233 calculates the address of the data sector in the large size data sector unit from the address specified by the read command in the small size data sector unit, and the corresponding
次に、バックアップ処理を含むライト処理の流れを、図5のフローチャートを参照して説明する。ホスト51からライト・コマンドを受信すると、データ・サイズ検出部231がデータ・セクタ・サイズを特定し、小サイズ・データ・セクタのエミュレーション処理を行うか決定する(S21)。エミュレートを行わないのであれば(S21におけるN)、大サイズ・データ・セクタ制御部232が大サイズ・データ・セクタにより磁気ディスク11へのデータ書き込み処理を実行する(S22)。
Next, the flow of write processing including backup processing will be described with reference to the flowchart of FIG. When the write command is received from the
ライト・コマンドが小サイズ・データ・セクタでのアドレス指定を行う場合(S21におけるY)、小サイズ・データ・セクタ制御部233が小サイズ・データ・セクタにより磁気ディスク11へデータを書き込む。このとき、ライト・コマンドが指定する先頭及び末尾のアドレス境界が、磁気ディスク11上のデータ・セクタのアドレス境界に一致するか判定する(S23)。
When the write command specifies the address in the small size data sector (Y in S21), the small size data sector control unit 233 writes the data to the
アドレス境界が、先頭及び末尾の双方において一致している場合(S23におけるY)、小サイズ・データ・セクタ制御部233は、バックアップを行うことなく、磁気ディスク11へのデータ書き込みを行う。具体的には、小サイズ・データ・セクタ制御部233は小サイズ・データ・セクタを大サイズ・データ・セクタにまとめ、大サイズ・データ・セクタ制御部232と同様に、大サイズ・データ・セクタにより磁気ディスク11へのデータ書き込み処理を実行する(S22)。
If the address boundary matches at both the head and the tail (Y in S23), the small size / data / sector controller 233 writes data to the
アドレス境界が、先頭及び末尾の少なくとも一方において一致していない場合(S23におけるN)、小サイズ・データ・セクタ制御部233は、バックアップを含む、磁気ディスク11へのデータ書き込みを行う(S24)。データ書き込み処理におけるバックアップ処理ついて、図6A、図6Bを参照して説明する。データ書き込み処理において、ライト・コマンド指定アドレスの先頭アドレスと末尾アドレスの少なくとも一方の境界が磁気ディスク11のデータ・セクタと一致していないとき、本形態の小サイズ・データ・セクタ制御部233は、データ・バックアップ処理を行う。本実施形態は、このデータ書き込み処理におけるバックアップ処理に特徴を有している。
If the address boundary does not match at least one of the head and the tail (N in S23), the small size data sector control unit 233 writes data to the
以下において、ライト・コマンド指定アドレスの先頭アドレスと末尾アドレスの双方の境界が、磁気ディスク11のデータ・セクタと一致していないときの処理について説明を行う。何れか一方の境界が一致しないときは、その一致しないデータ・セクタのみのバックアップ処理を行う。退避させるデータ・セクタが異なる点以外は、それらのライト処理方法は基本的に同様である。双方の境界が磁気ディスク11のデータ・セクタと一致するときは、バックアップ処理は不要であり省略する。
In the following, processing when the boundary between both the start address and the end address of the write command designation address does not coincide with the data sector of the
図6Aは、磁気ディスク11上のバックアップ領域115へのバックアップ処理を模式的に示す図である。図6Aの例において、小サイズ・データ・セクタ制御部233は、複数セクタからなるデータ書き込み領域113における一部のセクタを、バックアップ領域115の一部領域116内に保存する。図6Bは、データ書き込み領域113及びその領域113内で新たなデータが書き込まれる書換え領域114、そして、バックアップ領域115においてバックアップ・ユーザ・データとバックアップ管理データが書き込まれる領域116とを模式的に示している。以下において、バックアップ処理で書き込まれるバックアップ・ユーザ・データとバックアップ管理データとを、バックアップ・データと呼ぶ。
FIG. 6A is a diagram schematically illustrating backup processing to the
上述のように、本例において、ライト・コマンド指定アドレスの先頭アドレスと末尾アドレスの双方の境界が、磁気ディスク11のデータ・セクタと一致していない。磁気ディスク11上のデータ書き込み領域113のデータ・セクタは、6つの大サイズ・データ・セクタ111a〜111fである。このコマンドが指定する領域114は、6つのデータ・セクタの領域内において、中央の4つのデータ・セクタ111b〜111eの全ての領域と、前後端のデータ・セクタ111a、111fのそれぞれの一部の領域を占める。
As described above, in this example, the boundary between the start address and the end address of the write command designation address does not coincide with the data sector of the
小サイズ・データ・セクタ制御部233は、ライト処理においては、磁気ディスク11へホスト51から取得したデータを書き込むと共に、必要なデータのバックアップ処理を行う。本実施形態の特徴として、バックアップ領域115は一つのデータ・トラックもしくは連続する複数データ・トラックからなる領域である。
In the write process, the small size / data / sector control unit 233 writes the data acquired from the
小サイズ・データ・セクタ制御部233は、バックアップ処理において、バックアップ領域115へのシーク完了後、バックアップ領域115内の既存データを無視して、新たなデータを書き込む。これにより、小サイズ・データ・セクタ制御部233は、シーク完了後、できるだけ早いタイミングで、バックアップ領域115において書き込みを開始することができる。
In the backup process, the small size data sector control unit 233 ignores the existing data in the
典型的には、小サイズ・データ・セクタ制御部233は、シーク完了を基準として、予め設定されている規定番目(好ましくは1番目)のデータ・セクタからバックアップ・データ(バックアップ管理データとバックアップ・ユーザ・データ)の書き込みを開始する。小サイズ・データ・セクタ制御部233は、HDC/MPU23の機能として可能なシーク完了からデータ書き込み開始までの最短時間で、バックアップ・データの書き込みを開始することが好ましい。好ましくは、小サイズ・データ・セクタ制御部233は、シーク完了後のフォロイング処理中のデータ・セクタ位置から直近で書き込み可能なデータ・セクタを指定して、その直近のデータ・セクタからバックアップ処理におけるデータを書き始める。
Typically, the small-size data sector control unit 233 sets the backup data (the backup management data and the backup data from the specified data sector (preferably the first)) set in advance with reference to the completion of seek. Starts writing user data. It is preferable that the small size data sector control unit 233 starts writing backup data in the shortest time from the completion of seek as a function of the HDC /
シーク完了の条件はHDD1の設計に依存する。例えば、ターゲット位置と現在ヘッド位置との差である位置誤差信号が規定の連続セクタ数において規定範囲内にあり、また、位置誤差信号の変化速度が規定の連続セクタ数において規定範囲内にあることを条件として、シーク処理が完了する。HDC/MPU23は、シーク処理の完了後、フォロイング処理に入る。好ましくは、小サイズ・データ・セクタ制御部233は、フォロイング処理に入る前から直近で書き込み可能なデータ・セクタ位置を並行して予測し、フォロイングに入った最初のデータ・セクタからバックアップ・データを書き込む。最初のデータ・セクタを書き込みデータ・セクタに指定することで処理時間を最も短くすることができる。
The seek completion condition depends on the design of the
このように、バックアップのための一つのデータ・トラックもしくは連続複数データ・トラックからなる領域を用意することで、小サイズ・データ・セクタ制御部233は、バックアップ領域115内の任意の位置からバックアップ・データの書き込みを開始することができる。これにより、バックアップ処理の処理時間を短縮することができる。
In this way, by preparing an area consisting of one data track or a plurality of continuous data tracks for backup, the small-size data sector control unit 233 can perform backup / backup from an arbitrary position in the
バックアップ領域は、HDD1の全記録領域内に一つ形成してもよく、記録面毎に一つ形成してもよい。あるいは各記録面が異なる半径位置の複数のバックアップ領域を有していてもよい。例えば、各ゾーンがバックアップ領域を有することで、バックアップ処理の処理時間を効果的に低減することができる。以下の具体的に説明する例においては、各記録面が一つのバックアップ領域を有する。
One backup area may be formed in the entire recording area of the
バックアップを行うデータは、ホスト指定データがその一部を占める大サイズ・データ・セクタである。つまり、ホスト指定アドレス(領域)の境界(先頭アドレスと末尾アドレス)がそのデータ・セクタ内の中央(データ・セクタの先頭アドレスと末尾アドレス以外のアドレス位置)に位置するデータ・セクタ111a、111fである。
Data to be backed up is a large size data sector in which host-specified data occupies a part. That is, in the
このようなデータ・セクタは、ライト・コマンドが指定する書換え領域114の外にあるユーザ・データ(ライト・コマンドと無関係のデータ)を含む。従って、データ・セクタの境界とそのデータ・セクタ内でのホスト指定領域の境界が一致していないデータ・セクタ111a、111fをバックアップすることで、磁気ディスク11へのデータ書き込み時に電源切断が起きても、ライト・コマンドが書換えを指定していない領域のユーザ・データを保護することができる。
Such a data sector includes user data (data unrelated to the write command) outside the
小サイズ・データ・セクタ制御部233は、ユーザ・データのバックアップ処理において、ユーザ・データのほかに、バックアップ管理データをバックアップ領域115に書き込む。これにより、電源切断時から必要なユーザ・データの回復を正確に行うことができる。好ましい構成において、小サイズ・データ・セクタ制御部233は、バックアップ・ユーザ・データを記録するデータ・セクタ111h、111iの前後のデータ・セクタ111g、111jにバックアップ管理データを書き込む。
The small size data sector control unit 233 writes backup management data in the
図7は、本構成におけるバックアップ管理データが含む情報を模式的に示す図である。バックアップ管理データとバックアップ・ユーザ・データ(ユーザ・データのバックアップ)とは、連続するデータ・セクタに書き込むことが好ましい。これにより、バックアップ処理時間を短縮することができる。バックアップ領域115内に欠陥セクタが存在するとき、それらはスキップされる。小サイズ・データ・セクタ制御部233による処理において、欠陥セクタは存在しないデータ・セクタとして扱われる。データを格納するデータ・セクタ間に欠陥セクタが存在する場合、データを格納しているデータ・セクタは連続していると見なす。
FIG. 7 is a diagram schematically showing information included in the backup management data in this configuration. The backup management data and the backup user data (user data backup) are preferably written in successive data sectors. Thereby, the backup processing time can be shortened. When defective sectors exist in the
バックアップ管理データは、開始セクタ111gと終了セクタ111jに格納されている。開始セクタ111gは、カウンタ値、バックアップ開始アドレス、バックアップ終了アドレス、そしてバックアップ開始フラグを格納している。終了セクタ111jは、カウンタ値、バックアップ開始アドレス、バックアップ終了アドレス、そしてバックアップ終了フラグを格納している。開始セクタ111gと終了セクタ111jのカウンタ値、バックアップ開始アドレス、バックアップ終了アドレスは同一の値である。
The backup management data is stored in the
小サイズ・データ・セクタ制御部233は、電源遮断からの回復処理においてこれを参照することで、いずれのデータが最後のバックアップ処理の対象データであるかを判定することができる。小サイズ・データ・セクタ制御部233は、バックアップ処理毎に、カウンタをインクリメントあるいはディクリメントして、新たなカウンタ値を生成し、その最新のカウンタ値を、バックアップ管理データに含める。 The small size data sector control unit 233 can determine which data is the target data of the last backup process by referring to this in the recovery process from the power shutdown. The small size data sector control unit 233 increments or decrements the counter for each backup process, generates a new counter value, and includes the latest counter value in the backup management data.
カウンタ値は、最新(最後)のバックアップ・ユーザ・データを示すデータである。最小あるいは最大のカウンタ値を示す領域が、最新(最後)のバックアップ・ユーザ・データを格納している。バックアップ開始アドレスは、退避されているユーザ・データの開始アドレス(本例においてデータ・セクタ111aのアドレス)である。バックアップ終了アドレスは、退避されているユーザ・データの終了アドレス(本例においてデータ・セクタ111fのアドレス)である。小サイズ・データ・セクタ制御部233は、これらを参照することで、電源遮断からの回復処理においてバックアップ・ユーザ・データのアドレスを知ることができる。
The counter value is data indicating the latest (last) backup user data. The area indicating the minimum or maximum counter value stores the latest (last) backup user data. The backup start address is the start address of the saved user data (in this example, the address of the
一つのデータ・セクタのみを退避させる場合、退避させていないデータ・セクタに対応するアドレスが、それを示せばよい。例えば、先頭データ・セクタのみを退避させる場合、バックアップ終了アドレスは、末尾データ・セクタが退避されていないことを示す。 When only one data sector is to be saved, an address corresponding to a data sector that has not been saved may be indicated. For example, when only the head data sector is saved, the backup end address indicates that the tail data sector is not saved.
バックアップ開始フラグとバックアップ終了フラグとは、バックアップ処理における電源切断時のステージ(状態)を示すデータである。小サイズ・データ・セクタ制御部233は、バックアップ処理において、これらフラグの書き込み及び書換えを行うことで、電源遮断からの回復処理において、いずれのステージで電源遮断が起きたかを特定することができる。バックアップ開始フラグは開始セクタ111gに格納され、バックアップ終了フラグは終了セクタ111jに格納される。カウンタ値は、両方のセクタに格納される。それら以外のデータは、いずれのデータ・セクタが格納してもよい、あるいは、双方のデータ・セクタに書き込んでもよい。
The backup start flag and the backup end flag are data indicating a stage (state) when the power is turned off in the backup process. The small size / data / sector control unit 233 can specify at which stage the power shutdown occurs in the recovery process from the power shutdown by writing and rewriting these flags in the backup process. The backup start flag is stored in the
本形態のバックアップ処理を含む小サイズ・データ・セクタによる書き込み(S24)について、図8のフローチャート及び図9の模式図を参照しながら説明を行なう。図9に示す状態ステージについては後述する。ホスト51からのライト・コマンドに応答して、小サイズ・データ・セクタ制御部233は、ホスト51からのライト・データをバッファ241に格納する(S241)。小サイズ・データ・セクタ制御部233は、アクチュエータ16を制御して、ライト・コマンドが指定するアドレスの先頭アドレスのデータ・セクタを含むターゲット・トラックへのシークを行う(S242)。図9の例では、書換え領域は一つのデータ・トラック上に存在する。
Writing with small size data sectors including backup processing of this embodiment (S24) will be described with reference to the flowchart of FIG. 8 and the schematic diagram of FIG. The state stage shown in FIG. 9 will be described later. In response to the write command from the
小サイズ・データ・セクタ制御部233は、RWチャネル21を制御して、アドレス境界が一致していない先頭データ・セクタと末尾データ・セクタとを読み出し、バッファ241に格納する(S243)。図9の例は、両方のデータ・セクタにおいて境界が一致しておらず、データ・セクタ111aとデータ・セクタ111fとが読み出される。
The small size data sector control unit 233 controls the
小サイズ・データ・セクタ制御部233は、ヘッド・スライダ12をバックアップ領域115へ移動する(シーク処理)(S244)。シーク完了後、小サイズ・データ・セクタ制御部233は、バックアップ・ユーザ・データとバックアップ管理データとをバックアップ領域115に書き込む(S245)。図9の例において、開始セクタ111g〜終了セクタ111jに、データが書き込まれる。書き込まれるデータは、図7を参照した説明と同様である。また、上述のように、好ましい構成において、小サイズ・データ・セクタ制御部233は、シーク完了後の最初のデータ・セクタからバックアップ・データの書き込みを開始する。
The small size data sector control unit 233 moves the
小サイズ・データ・セクタ制御部233は、バックアップ・データを格納する領域(セクタ111g〜セクタ111j)を示すアドレス・データをRAM24内に格納し、それを一時的に保持する(S246)。さらに、小サイズ・データ・セクタ制御部233は、データ書き込みを行うターゲット・トラックへヘッド・スライダ12を移動する(シーク処理)(S247)。
The small size data sector control unit 233 stores the address data indicating the area (
小サイズ・データ・セクタ制御部233は、ホスト51から取得したライト・データ、先頭データ・セクタ111a、そして末尾データ・セクタ111fにより、磁気ディスク11に書き込むデータ列を作成する(S248)。小サイズ・データ・セクタ制御部233は、作成したデータ列を磁気ディスク11に書き込む(S249)。図9の例において、データ・セクタ111a〜111fにデータを書き込む。
The small size data sector control unit 233 creates a data string to be written to the
小サイズ・データ・セクタ制御部233は、その後、バックアップ領域115へと戻り(シーク処理)(S250)、バックアップ管理データ内の、バックアップ開始フラグとバックアップ終了フラグを書き換える(S251)。このとき、小サイズ・データ・セクタ制御部233は、RAM24内に一時的に保持しておいたアドレスを参照し、書換えを行なうバックアップ・データのアドレスを特定する。
Thereafter, the small size data sector control unit 233 returns to the backup area 115 (seek processing) (S250), and rewrites the backup start flag and the backup end flag in the backup management data (S251). At this time, the small size data sector control unit 233 refers to the address temporarily held in the
図9において、バックアップ管理データは、2つのデータ・セクタ111g、111jに格納されている。バックアップされるユーザ・データを格納するデータ・セクタ111h、111iは、これらのデータ・セクタに挟まれている。データ・セクタ111hは書換え前のデータ・セクタ111aのデータを格納し、データ・セクタ111iは書換え前のデータ・セクタ111fのデータを格納する。
In FIG. 9, the backup management data is stored in two
先頭のデータ・セクタ111gが格納する状態フラグは、バックアップ開始フラグである。末尾のデータ・セクタ111jが格納する状態フラグは、バックアップ終了フラグである。本例において2つの状態フラグは1ビット・データであり、0及び1の一方が実行を示し、他方が完了を示す。
The status flag stored in the
バックアップ・ユーザ・データの書き込みにおいて(S245)、小サイズ・データ・セクタ制御部233は、「実行」を示すバックアップ開始フラグと「実行」を示すバックアップ終了フラグとを書き込む。ユーザ・データの書換え後のバックアップ管理データ書換え工程(S251)において、小サイズ・データ・セクタ制御部233は、「実行」から「完了」に、バックアップ開始フラグとバックアップ終了フラグのそれぞれを書き換える。 In writing the backup user data (S245), the small size data sector control unit 233 writes a backup start flag indicating “execution” and a backup end flag indicating “execution”. In the backup management data rewriting step (S251) after rewriting user data, the small size data sector control unit 233 rewrites each of the backup start flag and the backup end flag from “execute” to “complete”.
バックアップ開始フラグは、ユーザ・データのバックアップのための書き込み(S245)直前に書き込むことが重要であり、バックアップ終了フラグは書き込みの直後に書き込むことが重要である。このため、図9に示すように、バックアップ・ユーザ・データを格納するデータ・セクタが、バックアップ管理データを格納するデータ・セクタの間にあり、さらに、これらのデータ・セクタ(4つのデータ・セクタ)が連続していることが好ましい。上述のように、「連続している」とは使用可能なデータ・セクタが連続していることを意味し、欠陥セクタはカウントしない。 It is important to write the backup start flag immediately before writing for user data backup (S245), and it is important to write the backup end flag immediately after writing. For this reason, as shown in FIG. 9, there are data sectors for storing backup user data between data sectors for storing backup management data, and these data sectors (four data sectors). ) Is preferably continuous. As described above, “continuous” means that usable data sectors are continuous and does not count defective sectors.
図10には、バックアップ処理を伴うライト処理における状態ステージの遷移が示されている。電源フラグは、HDD1の電源が正常にOFFされたか否かを示すフラグである。電源フラグは、バックアップ管理データとは別に用意される。図10の例において、「FAIL」は処理途中で電源遮断が起きたことを意味する。
FIG. 10 shows the state stage transition in the write process accompanied by the backup process. The power flag is a flag indicating whether the power of the
図10の例において、バックアップ処理を伴うライト処理の状態は01〜13の13のステージで構成されている。状態00は、通常の状態であり、電源切断が起きることなくHDD1が通常終了したときの状態である。図10のテーブルは、電源遮断に対するデータ回復処理を説明するためのテーブルであり、上記ライト処理における各ステージの電源フラグは「FAIL」を示す。
In the example of FIG. 10, the state of the write process accompanied by the backup process is composed of 13
図10は、バックアップ領域115における、連続する4データ・セクタを例示している。バックアップ領域115の各データ・セクタが格納するデータは、ユーザ・データであるかバックアップ管理データであるかは決まっていない。以下において、一例として、特定の4データ・セクタのデータ変化を説明し、各データ・セクタが格納するデータ種類は、書換え前後で同一であるとする。
FIG. 10 illustrates four consecutive data sectors in the
例えば、特定の4データ・セクタは、上記データ・セクタ111g〜111jであり、特定のバックアップ処理前に、データ・セクタ111g、111jはそれぞれバックアップ管理データを格納し、データ・セクタ111h、111iは先頭ユーザ・データ・セクタと末尾ユーザ・データ・セクタを格納している。新たなバックアップ処理は、データ・セクタ111g、111jに新たなバックアップ管理データを格納し、データ・セクタ111h、111iに新たなバックアップ・ユーザ・データを格納する。
For example, the specific four data sectors are the
図8及び図9を参照して説明したように、バックアップ処理を伴うライト処理は、ステージ01の状態ステージから開始して、01〜13までの状態ステージに順次変化する。その後、HDD1が通常動作終了すると、状態はステージ13からステージ00に変化する。
As described with reference to FIGS. 8 and 9, the write process accompanied by the backup process starts from the state stage of
HDC/MPU23は、バックアップ処理を含むライト処理の途中で電源切断が起きた場合、バックアップ・ユーザ・データを使用してデータの回復を行う。正確に回復を行うためには、バックアップ処理を伴うライト処理のいずれの状態ステージにおいて処理が中断したかを知ることが必要である。図10は、00〜13の状態ステージを示すテーブルである。ステージ番号は便宜的につけたもので、HDC/MPU23がこの数字により状態ステージを管理するわけではない。
The HDC /
ステージ00とその他のステージとの違いは、電源切断フラグが示す状態である。上述のように、電源切断フラグは、HDD1が通常の動作終了をしたか、電源切断により異常動作終了したかを示すデータである。ステージ00は通常状態であるので、電源切断フラグは、通常動作終了を示している。他の状態ステージにおいて、電源切断フラグは異常終了を示している。
The difference between the
図10に示した状態ステージのそれぞれについて説明を行う前に、HDD1の起動から電源切断までの処理の流れを、図11のフローチャートを参照して説明する。HDD1が起動されると、HDC/MPU23は、起動処理を開始する(S31)。その起動処理内において、動作確認やパラメータ設定などの通常処理が終了した後に、前回の電源切断状態を、電源切断状態フラグを参照して特定する(S32)。電源切断状態フラグは、磁気ディスク11上の所定領域に記憶されている。
Before describing each of the state stages shown in FIG. 10, the flow of processing from the start of the
電源切断状態フラグが通常電源切断を示している場合(S32におけるSAFE)、HDC/MPU23は、バックアップ領域115を初期化する(S33)。初期化は、バックアップ領域115に規定のデータを書き込む(上書きする)。さらに、HDC/MPU23は、電源切断状態フラグをFAILに設定し(S34)、起動処理を終了する(S35)。
When the power-off state flag indicates normal power-off (SAFE in S32), the HDC /
起動後、HDC/MPU23(HDD1)は、通常の処理を実行する(S36)。その後に電源が切断されるとき、通常の電源切断である場合(S37におけるY)、HDC/MPU23は、電源切断状態フラグをSAFEに設定し(S39)、通常の電源切断処理を行い(S40)、HDD1は停止する。電源の切断が異常電源切断である場合(S37におけるN)、HDD1はそのまま停止する(異常電源切断:S38)。電源切断状態フラグはFAILのままである。
After startup, the HDC / MPU 23 (HDD 1) executes normal processing (S36). When the power is turned off after that, if it is a normal power-off (Y in S37), the HDC /
起動処理において、電源切断状態フラグが異常電源切断を示している場合(S32におけるFAIL)、HDC/MPU23は、バックアップ領域115において、最後のバックアップ処理に対応するデータをサーチする(S41)。具体的には、HDC/MPU23は、バックアップ管理データを格納するデータ・セクタのカウント値を参照し、最後のバックアップ処理を示すカウント値のデータ・セクタを特定する。バックアップ処理毎にカウンタをインクリメントする構成においては、最大カウント値のデータ・セクタが最後のバックアップ処理のデータ・セクタであり、ディクリメントする構成においては最小のカウント値のデータ・セクタが最後のバックアップ処理のデータ・セクタである。
In the startup process, when the power-off state flag indicates abnormal power-off (FAIL in S32), the HDC /
HDC/MPU23は、バックアップ・ユーザ・データと状態フラグとを使用して、電源切断時の状態ステージを特定する(S42)。HDC/MPU23は、さらに、その状態ステージに従った回復処理を実行する(S43)。電源切断時の状態ステージの特定方法及び回復方法については後述する。回復処理後、HDC/MPU23は、工程S33以下の工程を実行する。
The HDC /
このように、電源切断状態フラグは起動時にFAILに設定され、HDD1が通常停止する前にSAFEに設定される。このため、HDD1の動作中の予期せぬ電源切断が起きると、電源切断状態フラグはFAILのままであり、その後の起動時に、HDC/MPU23が、前回の異常停止を知ることができる。
As described above, the power-off state flag is set to FAIL at the time of startup, and is set to SAFE before the
図11のフローチャートを参照して説明したように、HDC/MPU23は、異常電源切断時の状態ステージに応じて回復処理を行う。以下において、図10のテーブル及び図9を参照して、各状態ステージ、状態ステージの特定方法、そして各状態ステージに対応した回復処理の内容について具体的に説明する。
As described with reference to the flowchart of FIG. 11, the HDC /
図9に示すように、HDC/MPU23が、ライト・コマンドを受信すると、状態は、ステージ01になる。ステージ01において、電源切断状態フラグは異常終了を示している。起動後の処理であるので、図11を参照して説明したように、電源切断状態フラグは異常終了を示す。これは、他の状態ステージにおいても同様である。
As shown in FIG. 9, when the HDC /
さらに、データ・セクタ111a〜111fへの書き込み前であるので、先頭データ・セクタ111aと末尾データ・セクタ111fとは、書換え前のデータである。バックアップ開始フラグと終了フラグとは、それぞれ完了(過去(前回もしくはそれ以前)のバックアップ処理の完了)を示している。カウント値はmであり、過去のバックアップ処理の番号を示す。
Furthermore, since it is before writing to the
次に、図9に示すように、バックアップ管理データ(開始セクタ111g)の書き込み開始により、状態はステージ01からステージ02へ変化する。開始セクタ111gの書き込みが完了していないので、図10に示すように、バックアップ開始フラグは読み取り不能の状態である。それ以外は、ステージ01と同じである。開始セクタ111gの書き込みが完了すると、状態はステージ02からステージ03へ移行する。
Next, as shown in FIG. 9, the state changes from
ステージ03において、バックアップ開始フラグが実行中を示し、さらに、カウント値が今回のバックアップ処理を示すnである。その他はステージ02と同じである。図9に示すように、ステージ03において、データ・セクタ111a、111fのユーザ・データが、データ・セクタ111h、111iへ書き込まれる。
In
ユーザ・データのバックアップが完了し、終了セクタ111jの書き込みが開始すると、状態はステージ03からステージ04へ移行する。終了セクタ111jの書き込みが完了していないので、バックアップ終了フラグとカウント値は読み取り不能の状態である。それ以外は、ステージ03と同じである。終了セクタ111jの書き込みが完了すると、状態はステージ04からステージ05へ移行する。ステージ05において、バックアップ終了フラグが実行中を示し、さらに、カウント値が今回のバックアップ処理を示すnを示す。その他はステージ04と同じである。
When the backup of the user data is completed and the writing of the
次に、書き込み領域における先頭データ・セクタ111aでのデータ書換え(新データの書き込み)が開始し、状態はステージ05からステージ06に移行する。先頭データ・セクタ111aの書換え完了前であるので、ステージ06において、先頭データ・セクタ111aは読み取り不能である。これ以外は、ステージ05と同じである。先頭データ・セクタ111aの書換え完了により、状態はステージ06からステージ07へ移行する。ステージ07において、先頭データ・セクタ111aのデータは、書換えられた新しいデータである。それ以外は、ステージ06と同じである。ステージ07において、書き込み領域のデータ・セクタ111b〜111eが書換えられる。
Next, data rewriting (writing of new data) in the
末尾データ・セクタ111fでのデータ書換えが開始し、状態はステージ07からステージ08に移行する。末尾データ・セクタ111fの書換え完了前であるので、ステージ08において、末尾データ・セクタ111fは読み取り不能である。これ以外は、ステージ07と同じである。末尾データ・セクタ111fの書換え完了により、状態はステージ08からステージ09へ移行する。ステージ09において、末尾データ・セクタ111fのデータは、書換えられた新しいデータである。これ以外は、ステージ08と同じである。
Data rewriting in the
次に、バックアップ領域115の開始セクタ111gにおいて、バックアップ開始フラグの書換えが開始し、状態はステージ09からステージ10に移行する。これは、実行から完了へのバックアップ開始フラグの書換えである。その他のデータは変化しない。HDC/MPU23は、RAM24内に今回のバックアップ処理におけるバックアップ管理データを格納している。HDC/MPU23は、それらを参照して開始セクタ111gの新たなデータを生成する。新たなデータにおいて、バックアップ開始フラグのみが元データから変化している。
Next, in the
開始セクタ111gの書換えが完了していないので、バックアップ開始フラグは読み取り不能の状態である。それ以外は、ステージ09と同じである。開始セクタ111gの書換えが完了すると、状態はステージ10からステージ11へ移行する。ステージ11において、バックアップ開始フラグが完了を示し、その他はステージ10と同じである。
Since rewriting of the
終了セクタ111jの書換えが開始すると、状態はステージ11からステージ12へ移行する。終了セクタ111jの書換えが完了していないので、バックアップ終了フラグは読み取り不能の状態である。それ以外は、ステージ11と同じである。終了セクタ111jの書換えが完了すると、状態はステージ12からステージ13へ移行する。ステージ13において、バックアップ終了フラグが完了を示し、その他はステージ12と同じである。
When rewriting of the
HDC/MPU23は、異常電源切断後の起動処理において、回復処理を行う(図11における工程S43)。回復処理は、HDC/MPU23が制御、実行し、HDC/MPU23は、回復処理部として機能する。この処理において、HDC/MPU23は、いずれの状態ステージにおいて電源切断が起きたかを特定する必要がある。HDC/MPU23は、バックアップ領域の状態フラグ、バックアップ・ユーザ・データ、そして、バックアップの対象であるデータ・セクタのユーザ・データを使用して、電源切断時の状態ステージを特定する。
The HDC /
このように、バックアップ・ユーザ・データ(データ・セクタ111h、111i)とバックアップ元のユーザ・データ(データ・セクタ111a、111f)とを状態ステージの特定に使用することで、必要な管理データ量を低減することができる。前回電源切断状態フラグは異常電源切断の有無を示すもので、異常電源切断における書き込み処理の状態を示すものとは異なる。
As described above, by using the backup user data (
図9、図10を参照して説明したように、バックアップ処理を含むライト処理の状態ステージは、4つのポイントにより特定することができる。バックアップ対象の先頭データ・セクタ111aのデータ、末尾データ・セクタ111fのデータ、バックアップ開始フラグ、そしてバックアップ終了フラグである。HDC/MPU23は、これら4つのポイントにより異常電源切断時の状態ステージを特定し、そのステージに応じた回復処理を行う。
As described with reference to FIGS. 9 and 10, the state stage of the write process including the backup process can be specified by four points. The data of the
具体的には、HDC/MPU23は、電源フラグがFAILを示しているとき、バックアップ領域115のバックアップ管理データにおいて、最終バックアップ処理のバックアップ・データを探索する。バックアップ管理データはカウント値を有している。HDC/MPU23は、バックアップ領域115内のカウント値を参照することで、最後のバックアップ処理のバックアップ・データ(管理データとユーザ・データ)を特定する。
Specifically, when the power flag indicates FAIL, the HDC /
さらに、HDC/MPU23は、そのバックアップ・データのバックアップ管理データとバックアップ・ユーザ・データ、そしてバックアップ元のユーザ・データを使用して、電源遮断時における状態ステージを特定する。バックアップ管理データは、バックアップ元のアドレス(図7におけるバックアップ開始アドレスとバックアップ終了アドレス)を有している。HDC/MPU23は、これらデータを参照することで、バックアップ元のユーザ・データを磁気ディスク11から読み出すことができる。HDC/MPU23が、データ・セクタ111aと111fの一方を正確に読み出すことができない場合、電源切断時の状態ステージは、ステージ06もしくはステージ08である。
Further, the HDC /
書換え領域のデータ・セクタ111a、111fと、バックアップ領域のデータ・セクタ111h、111iとを比較して、HDC/MPU23は、データ・セクタ111aと111fが新しいデータであるか、書換え前の古いデータであるかを判定することができる。書換え領域のデータとバックアップ領域のデータが一致していれば、書換え領域のデータは古いデータ、一致していなければ新しいデータである。バックアップ領域のデータ・セクタ111h、111iの一方を正確に読み出すことができない場合、状態はステージ03で、書換え領域のデータ・セクタのデータは古いデータである。
Comparing the
HDC/MPU23は、バックアップ領域のデータ・セクタ111g、111jからバックアップ開始フラグとバックアップ終了フラグを読み出すことができる。いずれかのデータ・セクタを正確に読み出すことができない場合も、図10に示すように、状態ステージ特定のための条件である。
The HDC /
HDC/MPU23は、書換え領域のデータ・セクタ111a、111fの双方の書換えが開始しておらず、古いデータである場合(状態ステージ01〜状態ステージ05)、HDC/MPU23は、バックアップ管理データを、ステージ01と同じ内容のデータにする。書換え領域及びバックアップ領域におけるユーザ・データについての処理はない。書換え領域にけるデータ更新は、ホスト51からのライト・コマンドから再開する。
When the HDC /
書換え領域のデータ・セクタ111a、111fの一方が新しいデータあるいは読み出し不能であり、かつ、バックアップ開始フラグとバックアップ終了フラグとが実行を示す場合(状態ステージ06〜状態ステージ08)、HDC/MPU23は、バックアップ領域のバックアップ・ユーザ・データを書換え領域データ・セクタ111a、111fに書き戻すことで、データ・セクタ111a、111fのデータを更新前の古いデータにする。さらに、HDC/MPU23は、バックアップ管理データを、ステージ01と同じ内容のデータにする。書換え領域におけるデータ更新は、ホスト51からのライト・コマンドから再開する。
When one of the
書換え領域のデータ・セクタ111a、111fの双方が書き換えられて、新しいデータを格納している場合(状態ステージ09〜状態ステージ13)、HDC/MPU23は、バックアップ管理データを、状態ステージ13のバックアップ管理データと同じ内容のデータにする。書換え領域におけるデータの更新は終了している。
When both
上述のように、HDC/MPU23は、バックアップ管理データ内にカウンタ値を格納する。カウンタがオーバーフローすると、最後のバックアップ処理を正確に特定することができない。そのため、HDC/MPU23は、カウンタ・オーバーフローの前に、カウンタとバックアップ領域の初期化処理を行なうことが好ましい。典型的には、カウンタ値が規定の値に達すると、HDC/MPU23は、カウンタとバックアップ領域の初期化処理を行なう。カウンタの初期化処理は、カウンタの値を初期値にセットする。バックアップ領域の初期化処理は、バックアップ領域に規定のデータを書き込む。
As described above, the HDC /
上述のように、小サイズ・データ・セクタ制御部233は、境界値がデータ・セクタと不一致のユーザ・データの書き込みにおいて、ユーザ・データのバックアップの後に、データ書換え領域に新たなデータを書き込み、さらに、バックアップ管理データを更新する。図9に示すように、ヘッド・スライダ12は、書換え領域113からバックアップ領域115に移動し、その後、書換え領域113に戻る。
As described above, the small size data sector control unit 233 writes new data in the data rewrite area after user data backup in writing user data whose boundary value does not match the data sector. Further, the backup management data is updated. As shown in FIG. 9, the
先頭データ・セクタと末尾データ・セクタの双方のバックアップを行なう処理において、小サイズ・データ・セクタ制御部233は、バックアップのために、常に、先頭データ・セクタを先に読み出してから末尾データ・セクタを読み出してもよい。この処理の流れは、図9に示す通りである。 In the process of backing up both the head data sector and the tail data sector, the small size data sector control unit 233 always reads the head data sector first and then the tail data sector for backup. May be read out. The flow of this process is as shown in FIG.
好ましい構成において、小サイズ・データ・セクタ制御部233は、処理時間(ユーザ・データのバックアップのためのデータ・セクタの読み出しからバックアップ管理データの更新まで)が短縮される場合、先頭データ・セクタの前に末尾データ・セクタを読み出す。小サイズ・データ・セクタ制御部233は、特定の条件が満足する場合に、末尾データ・セクタを読み出してから先頭データ・セクタを読み出し、それらをバックアップ領域に書き込む。 In a preferred configuration, when the processing time (from reading data sector for user data backup to updating backup management data) is shortened, the small size data sector control unit 233 Read the last data sector before. When the specific condition is satisfied, the small size data sector control unit 233 reads the tail data sector after reading the tail data sector and writes them in the backup area.
末尾データ・セクタから先頭データ・セクタまでの回転角度(時間)が短いとき、小サイズ・データ・セクタ制御部233は、バックアップのために末尾データ・セクタを先に読み出すことで、処理時間を短縮することができるケースがある。図12A、図12Bを参照して一例を説明する。図12A、図12Bにおいて、ESは末尾データ・セクタ、SSは先頭データ・セクタである。図12Aは、書き込みデータ・トラックの先頭データ・セクタSSの後に末尾データ・セクタESを読み出し、バックアップ領域への書き込みを行って、書き込みデータ・トラックに戻る処理の流れを示している。 When the rotation angle (time) from the end data sector to the start data sector is short, the small size data sector control unit 233 reads the end data sector first for backup, thereby shortening the processing time. There are cases that can be done. An example will be described with reference to FIGS. 12A and 12B. 12A and 12B, ES is the end data sector, and SS is the start data sector. FIG. 12A shows a flow of a process of reading the tail data sector ES after the head data sector SS of the write data track, writing to the backup area, and returning to the write data track.
具体的には、ヘッド・スライダ12は、フォロイングにおいて末尾データ・セクタESを通過した後、先頭データ・セクタSSを読み出し、その後、フォロイングを続けて、末尾データ・セクタESを読み出す。ヘッド・スライダ12は、バックアップ領域のトラックへ移動し、バックアップ・データを書き込む。その後、ヘッド・スライダ12は、ユーザ・データのトラックへと戻る。
Specifically, the
図12Aにおいて、末尾データ・セクタESから先頭データ・セクタSSまでの間隔が短いため、ヘッド・スライダ12の書き込みトラックへの復帰時に、ヘッド・スライダ12は先頭データ・セクタSS(の半径位置)を通過してしまっている。小サイズ・データ・セクタ制御部233は、新ユーザ・データの書き込みのため、ヘッド・スライダ12が先頭データ・セクタSSに到達するまでの時間を待つ。
In FIG. 12A, since the interval from the end data sector ES to the head data sector SS is short, the
図12Bは、末尾データ・セクタを先に読み出す処理の流れを示している。シーク完了後に、ヘッド・スライダ12は、先頭データ・セクタSSよりも前に、末尾データ・セクタESに到着する。ヘッド・スライダ12は、末尾データ・セクタES、先頭データ・セクタSSの順にデータ・セクタを読み出して、バックアップ領域に書き込む。その後、ヘッド・スライダ12は、ユーザ・データ・トラックに戻る。図12Aの例と同様に、小サイズ・データ・セクタ制御部233は、新ユーザ・データの書き込みのため、ヘッド・スライダ12が先頭データ・セクタSSに到達するまでの時間を待つ。
FIG. 12B shows the flow of processing for reading the tail data sector first. After the seek is completed, the
図12Bの処理と比較して、図12Aの処理は、先頭データ・セクタSSと末尾データ・セクタESの読み出しにおいて、多くの余分な処理時間を必要としている。ユーザ・データの書換え完了からバックアップ管理データの更新完了まで時間は、図12Aの処理の方が短い。しかし、図12Bにおけるバックアップ・ユーザ・データの読み出しの処理時間短縮は、バックアップ管理データの更新の処理時間の増加を上回っている。 Compared with the process of FIG. 12B, the process of FIG. 12A requires a lot of extra processing time in reading the head data sector SS and the tail data sector ES. The time from the completion of rewriting user data to the completion of updating backup management data is shorter in the process of FIG. 12A. However, the reduction in the backup user data read processing time in FIG. 12B exceeds the increase in the backup management data update processing time.
このように、末尾データ・セクタの読み出しから、ユーザ・データのバックアップを経ての先頭データ・セクタへの書き込み開始を同一周回で行なうことができないとき、もし、シーク完了後に末尾データ・セクタを先頭データ・セクタよりも先に読み出すことができるのであれば、末尾データ・セクタを先に読み出すことで処理時間を短縮することができる(図12B)。 In this way, if it is not possible to start writing to the first data sector after reading the last data sector through user data backup in the same cycle, if the last data sector is read after completion of seek, If the data can be read before the sector, the processing time can be shortened by reading the tail data sector first (FIG. 12B).
一方、同一周回において、先頭データ・セクタの読み出し及びその後の末尾データ・セクタの読み出し、バックアップ領域へのバックアップ・データの書き込みを終了し、さらに、次の周回で先頭データ・セクタへの書き込みを開始することができる場合(図9を参照)、小サイズ・データ・セクタ制御部233は、先頭データ・セクタを末尾データ・セクタよりも先に読み出す。先頭データ・セクタの読み出しと同一周回において書き込み領域のデータ・トラックに戻ってくることができる場合、すぐに新たなユーザ・データを先頭データ・セクタから書き込むことができる。 On the other hand, in the same cycle, reading of the first data sector and subsequent reading of the last data sector and writing of backup data to the backup area are completed, and writing to the first data sector is started in the next cycle. If it is possible (see FIG. 9), the small size data sector control unit 233 reads the head data sector before the tail data sector. If it is possible to return to the data track in the write area in the same round as the reading of the first data sector, new user data can be immediately written from the first data sector.
同一周回において、バックアップ・ユーザ・データの読み出し、そのバックアップ及び新たなユーザ・データの書き込み開始まで行うことができるかは、ユーザ・データ・トラックとバックアップ領域との間のシーク時間に依存する。好ましい構成において、末尾データ・セクタを先に読み出す条件として、末尾データ・セクタと先頭データ・セクタとの間の距離が、各データ・トラックに対応して登録されている。この条件距離は、データ・トラック毎に異なる、あるいは、ゾーン毎に異なる値を使用することができる。条件距離は、記録面において全トラックに共通であってもよい。 Whether the backup user data can be read, the backup, and the start of writing of the new user data can be performed in the same cycle depends on the seek time between the user data track and the backup area. In a preferred configuration, as a condition for reading the tail data sector first, the distance between the tail data sector and the head data sector is registered corresponding to each data track. This conditional distance can be different for each data track, or a different value can be used for each zone. The condition distance may be common to all tracks on the recording surface.
また、HDC/MPU23がコマンド・キューイング機能を有する場合、小サイズ・データ・セクタ制御部233は、複数のコマンドに対応するユーザ・データのバックアップ処理をまとめて行ってもよい。例えば、同一トラックあるいはディスクの同一周回において退避させるデータ・セクタにアクセス可能であり、かつ、バックアップ領域へのシークとバックアップ領域から書換え領域へのシークが同一の周回で可能である場合、小サイズ・データ・セクタ制御部233は、複数のコマンドをまとめて処理する。
When the HDC /
小サイズ・データ・セクタ制御部233は、各コマンドに対応するバックアップ・ユーザ・データを連続するデータ・セクタに書き込む、あるいは、それらを分けて書き込んでもよい。バックアップ・ユーザ・データを分ける場合、それぞれのデータに対して、バックアップ管理データが記録される。連続するデータ・セクタに記録する場合、それらの前後のデータ・セクタのみがバックアップ管理データを格納する。小サイズ・データ・セクタ制御部233は、複数コマンドを対象としていることを示すデータをバックアップ管理データ内に格納し、まとめられたコマンドに対応するデータが正常に回復されるようにする。 The small size data sector control unit 233 may write backup user data corresponding to each command to successive data sectors, or may write them separately. When dividing backup user data, backup management data is recorded for each data. When recording is performed in continuous data sectors, only the data sectors before and after the data sectors store backup management data. The small size / data / sector control unit 233 stores data indicating that a plurality of commands are targeted in the backup management data so that data corresponding to the combined commands can be recovered normally.
以上、本発明を好ましい実施形態を例として説明したが、本発明が上記の実施形態に限定されるものではない。当業者であれば、上記の実施形態の各要素を、本発明の範囲において容易に変更、追加、変換することが可能である。本発明は、HDD以外のディスク・ドライブに適用してもよい。ヘッド・スライダの移動機構は上記のロータリ・アクチュエータに限定されず、直線状にヘッド・スライダを移動する移動機構のように他の移動機構を使用することができる。本発明は、浮上ヘッド・スライダと異なるヘッドを有するディスク・ドライブに適用できる。例えば、ヘッド・スライダがディスクと常に接触していてもよい。 As mentioned above, although this invention was demonstrated taking preferable embodiment as an example, this invention is not limited to said embodiment. A person skilled in the art can easily change, add, and convert each element of the above-described embodiment within the scope of the present invention. The present invention may be applied to disk drives other than HDDs. The moving mechanism of the head slider is not limited to the rotary actuator described above, and other moving mechanisms such as a moving mechanism that moves the head slider linearly can be used. The present invention can be applied to a disk drive having a head different from the flying head slider. For example, the head slider may always be in contact with the disk.
上述のように、バックアップ・データは、ユーザ・データに加え、管理データを含み、1トラックまたは複数トラックで設けられたバックアップ領域の任意のデータ・セクタに回転待ちを最小限にするような形態でバックアップされることが好ましい。しかし、バックアップ・データ管理データを含まない処理に対しても本発明を適用することができる。例えば、バックアップ元のアドレスはライト・コマンドを磁気ディスクに保存しておくことで特定することができる。 As described above, backup data includes management data in addition to user data, in a form that minimizes the waiting time for rotation in any data sector of the backup area provided by one or more tracks. It is preferable to be backed up. However, the present invention can also be applied to processing that does not include backup data management data. For example, the backup source address can be specified by storing a write command on the magnetic disk.
ユーザ・データの先頭と末尾の一方のみが大サイズ・データ・セクタの境界と一致しない場合、その一方を含むデータ・セクタのみをバックアップすることが好ましいが、境界と一致する他方を含むデータ・セクタもバックアップしてもよい。HDDは、書き込み開始フラグと書き込み終了フラグとを使用して遮断時の状態を判定することが好ましいが、他のデータを使用して状態を特定してもよい。 If only one of the beginning and end of the user data does not match the boundary of the large data sector, it is preferable to back up only the data sector that includes the one, but the data sector that includes the other that matches the boundary You may also back up. The HDD preferably uses the write start flag and the write end flag to determine the shut-off state, but the status may be specified using other data.
1 ハードディスク・ドライブ、10 エンクロージャ、11 磁気ディスク
12 ヘッド・スライダ、13 アーム・エレクトロニクス
14 スピンドル・モータ、15 ボイス・コイル・モータ
16 アクチュエータ、20 回路基板、21 リード・ライト・チャネル
22 モータ・ドライバ・ユニット、23 ハードディスク・コントローラ/MPU
24 RAM、231 データ・サイズ検出部
232 大サイズ・データ・セクタ制御部、233 小サイズ・データ・セクタ制御部
241 バッファ
DESCRIPTION OF
24 RAM, 231 Data size detection unit 232 Large size data sector control unit 233 Small size data
Claims (17)
ディスクにアクセスするヘッドと、
前記ヘッドを前記ディスク上で移動する移動機構と、
前記ヘッド及び前記移動機構を制御するコントローラと、を含み、
前記コントローラは、
ライト・コマンドを受信して、前記ライト・コマンドのデータ・セクタ・サイズを判定し、
前記受信したライト・コマンドのデータ・セクタ・サイズが前記小サイズ・データ・セクタである場合に、前記ライト・コマンドが指定する書換え領域の先頭と末尾とのそれぞれが、前記ディスク上の大サイズ・データ・セクタの境界に一致するか判定し、
前記先頭と末尾との一方が大サイズ・データ・セクタの境界に一致しない場合はその一方を含む大サイズ・データ・セクタを含むバックアップ・データを、双方が一致しない場合はその双方のそれぞれを含む大サイズ・データ・セクタを含むバックアップ・データを、前記ディスク上の1もしくは複数データ・トラックからなるバックアップ領域に、格納する、
を有する、ディスク・ドライブ。 A disk drive having a host interface that supports both large and small data sectors, and accessing the disk with the large data sectors,
A head to access the disk;
A moving mechanism for moving the head on the disk;
A controller for controlling the head and the moving mechanism,
The controller is
Receive a write command, determine the data sector size of the write command,
When the data sector size of the received write command is the small size data sector, each of the beginning and end of the rewrite area specified by the write command is a large size on the disk. Determine if it matches the data sector boundary,
If one of the head and tail does not match the boundary of the large data sector, the backup data including the large data sector including the one is included, and if both do not match, both of the data are included. Storing backup data including large size data sectors in a backup area consisting of one or more data tracks on the disk;
Having a disk drive.
請求項1に記載のディスク・ドライブ。 The controller starts writing backup data from the latest data sector where writing can be started after completion of seek to the backup area.
The disk drive of claim 1.
請求項1に記載のディスク・ドライブ。 The controller starts to write the backup data from a preset specified data sector after completion of seeking to the backup area.
The disk drive of claim 1.
請求項1に記載のディスク・ドライブ。 The backup data includes data indicating the latest backup data,
The disk drive of claim 1.
請求項4に記載のディスク・ドライブ。 The data indicating the latest backup data is a counter value of a counter.
The disk drive according to claim 4.
請求項5に記載のディスク・ドライブ。 The controller initializes the backup area when the counter reaches a predetermined value.
The disk drive of claim 5.
請求項4に記載のディスク・ドライブ。 The backup data includes a backup source address,
The disk drive according to claim 4.
請求項1に記載のディスク・ドライブ。 The controller stores the backup data in a continuous area in the backup area;
The disk drive of claim 1.
前記コントローラは、前記書き込み領域への新たなデータ書き込みの後において前記フラグを更新し、
前記コントローラは、前記フラグ、前記バックアップ元のユーザ・データ及び前記書き換え領域のデータを使用して、データ書き込みにおける電源遮断に対応する回復処理を実行する、
請求項1に記載のディスク・ドライブ。 The backup data includes a flag stored in a data sector before and after the user data,
The controller updates the flag after writing new data to the write area,
The controller uses the flag, the user data of the backup source, and the data in the rewrite area to execute a recovery process corresponding to a power shutdown in data writing.
The disk drive of claim 1.
前記フラグの更新において、前記アドレス情報を参照して前記フラグのアドレスを特定する、
請求項9に記載のディスク・ドライブ。 The controller temporarily holds address information of a data sector storing the backup data,
In updating the flag, the address of the flag is specified with reference to the address information.
The disk drive of claim 9.
前記先頭と前記末尾の双方が大サイズ・データ・セクタの境界と一致せず、前記末尾を含む末尾データ・セクタを前記先頭を含む先頭データ・セクタよりも先に読み出すことができ、前記末尾データ・セクタから前記先頭データ・セクタまでの時間が閾値よりも小さいとき、
前記バックアップ領域へ格納するために、前記末尾データ・セクタの後に前記先頭データ・セクタを読み出す、
請求項9に記載のディスク・ドライブ。 The controller is
Both the head and the tail do not coincide with the boundary of the large data sector, the tail data sector including the tail can be read before the head data sector including the head, and the tail data When the time from the sector to the first data sector is smaller than the threshold value,
Read the head data sector after the tail data sector for storage in the backup area;
The disk drive of claim 9.
ライト・コマンドを受信し、
前記ライト・コマンドのデータ・セクタ・サイズを判定し、
前記受信したライト・コマンドのデータ・セクタ・サイズが前記小サイズ・データ・セクタである場合に、前記ライト・コマンドが指定する書換え領域の先頭と末尾とのそれぞれが、前記ディスク上の大サイズ・データ・セクタの境界に一致するか判定し、
前記先頭と末尾との一方が大サイズ・データ・セクタの境界に一致しない場合はその一方を含む大サイズ・データ・セクタを含むバックアップ・データを、双方が一致しない場合はその双方のそれぞれを含む大サイズ・データ・セクタを含むバックアップ・データを、前記ディスク上の1もしくは複数データ・トラックからなるバックアップ領域に、格納する、
方法。 A method of backing up user data in a disk drive having a host interface that supports both large data sectors and small data sectors and accessing the disks with the large data sectors. There,
Receive a write command,
Determine the data sector size of the write command,
When the data sector size of the received write command is the small size data sector, each of the beginning and end of the rewrite area specified by the write command is a large size on the disk. Determine if it matches the data sector boundary,
If one of the head and tail does not match the boundary of the large data sector, the backup data including the large data sector including the one is included, and if both do not match, both of the data are included. Storing backup data including large size data sectors in a backup area consisting of one or more data tracks on the disk;
Method.
請求項12に記載の方法。 After completion of seeking to the backup area, writing of backup data is started from the latest data sector where writing can be started.
The method of claim 12.
請求項12に記載の方法。 The backup data is started to be written from a preset specified data sector after completion of seek to the backup area.
The method of claim 12.
請求項12に記載の方法。 The backup data includes data indicating the latest backup data,
The method of claim 12.
請求項12に記載の方法。 The backup data is stored in a continuous area in the backup area.
The method of claim 12.
前記フラグは、前記書き込み領域への新たなデータ書き込みの後において更新され、
データ書き込みにおける電源遮断に対応する回復処理は、前記フラグ、前記バックアップ元のユーザ・データ及び前記書き換え領域のデータを使用して実行される、
請求項12に記載の方法。 The backup data includes a flag stored in a data sector before and after the user data,
The flag is updated after writing new data to the write area,
Recovery processing corresponding to power shutdown in data writing is performed using the flag, the user data of the backup source, and the data of the rewrite area.
The method of claim 12.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2009288713A JP2011129221A (en) | 2009-12-21 | 2009-12-21 | Disk drive supporting interface by data sector different in size, and backup method for user data |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2009288713A JP2011129221A (en) | 2009-12-21 | 2009-12-21 | Disk drive supporting interface by data sector different in size, and backup method for user data |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2011129221A true JP2011129221A (en) | 2011-06-30 |
Family
ID=44291637
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2009288713A Pending JP2011129221A (en) | 2009-12-21 | 2009-12-21 | Disk drive supporting interface by data sector different in size, and backup method for user data |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2011129221A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2013200728A (en) * | 2012-03-26 | 2013-10-03 | Nec Engineering Ltd | Data protection system of hard disk drive device, method of data protection, and program for the same |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH06332623A (en) * | 1993-05-24 | 1994-12-02 | Mitsubishi Electric Corp | Array type recorder and recorder |
| JP2008506219A (en) * | 2004-07-06 | 2008-02-28 | マグナム セミコンダクターズ, インコーポレイテッド | Real-time video data recovery after power loss |
| JP2008250918A (en) * | 2007-03-30 | 2008-10-16 | Sony Corp | Information processing apparatus, information processing method, and computer program |
| JP2009059444A (en) * | 2007-09-03 | 2009-03-19 | Sony Corp | Information processing apparatus and information processing method |
-
2009
- 2009-12-21 JP JP2009288713A patent/JP2011129221A/en active Pending
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH06332623A (en) * | 1993-05-24 | 1994-12-02 | Mitsubishi Electric Corp | Array type recorder and recorder |
| JP2008506219A (en) * | 2004-07-06 | 2008-02-28 | マグナム セミコンダクターズ, インコーポレイテッド | Real-time video data recovery after power loss |
| JP2008250918A (en) * | 2007-03-30 | 2008-10-16 | Sony Corp | Information processing apparatus, information processing method, and computer program |
| JP2009059444A (en) * | 2007-09-03 | 2009-03-19 | Sony Corp | Information processing apparatus and information processing method |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2013200728A (en) * | 2012-03-26 | 2013-10-03 | Nec Engineering Ltd | Data protection system of hard disk drive device, method of data protection, and program for the same |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP5339817B2 (en) | Disk drive device supporting interface with data sectors of different sizes and data write method thereof | |
| JP4886877B2 (en) | Recording medium control apparatus and method | |
| US6789163B2 (en) | Optimizing data transfer performance through partial write command purging in a disc drive | |
| JP2009020986A (en) | Disk drive device and method for storing table for managing data on non-volatile semiconductor memory area in disk drive device | |
| US6061805A (en) | Method for executing an error recovery procedure | |
| US6523142B1 (en) | Apparatus and method of performing in a disk drive commands issued from a host system | |
| US20040268033A1 (en) | Refreshing data in a data storage device | |
| US8117491B2 (en) | Disk-drive device and method for error recovery thereof | |
| US8320066B2 (en) | Storage device and read/write processing method therefor | |
| CN100495359C (en) | Method for partitioning hard disc drive and hard disc drive adapted thereto | |
| US20080151411A1 (en) | Startup processing method for medium storage device, controller for medium storage device, and medium storage device | |
| US20130194696A1 (en) | Disk drive and write control method | |
| JP2002100126A (en) | Recording and reproducing device, storage device, computer system, data processing method, program transmitting device | |
| JP2011129221A (en) | Disk drive supporting interface by data sector different in size, and backup method for user data | |
| US11899968B2 (en) | Magnetic disk apparatus and method | |
| WO2005045827A1 (en) | Information recorder, information recording method, and recording medium containing program | |
| JP4919983B2 (en) | Data storage device and data management method in data storage device | |
| JP2006350898A (en) | Storage device | |
| CN119495325A (en) | Magnetic disk device and writing method | |
| JP2006269027A (en) | Data storage device | |
| JP3847888B2 (en) | High speed host transfer method of rearranged data due to defects in disk device | |
| JPH03290873A (en) | Disk type storage device, controller of disk type storage device, and control method for disk type storage device | |
| US20040225710A1 (en) | Write processing method for stream type commands and medium storage apparatus | |
| JP2005129168A (en) | Information recording apparatus, information recording method, and program | |
| US12405750B2 (en) | Shingled magnetic recording drive with efficient skip-sequential writing |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20120711 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20121002 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20121221 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20130709 |
|
| A601 | Written request for extension of time |
Free format text: JAPANESE INTERMEDIATE CODE: A601 Effective date: 20131009 |
|
| A602 | Written permission of extension of time |
Free format text: JAPANESE INTERMEDIATE CODE: A602 Effective date: 20131015 |
|
| A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20140128 |