JP2007334463A - Auxiliary storage device and data transferring method - Google Patents

Auxiliary storage device and data transferring method Download PDF

Info

Publication number
JP2007334463A
JP2007334463A JP2006163006A JP2006163006A JP2007334463A JP 2007334463 A JP2007334463 A JP 2007334463A JP 2006163006 A JP2006163006 A JP 2006163006A JP 2006163006 A JP2006163006 A JP 2006163006A JP 2007334463 A JP2007334463 A JP 2007334463A
Authority
JP
Japan
Prior art keywords
data
buffer
host device
sector
read
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2006163006A
Other languages
Japanese (ja)
Inventor
Noriyuki Yamaguchi
敬之 山口
Takahiro Saito
高裕 齋藤
Atsushi Kanamaru
淳 金丸
Wataru Ichihara
亘 市原
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.)
HGST Netherlands BV
Original Assignee
Hitachi Global Storage Technologies Netherlands BV
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 Hitachi Global Storage Technologies Netherlands BV filed Critical Hitachi Global Storage Technologies Netherlands BV
Priority to JP2006163006A priority Critical patent/JP2007334463A/en
Publication of JP2007334463A publication Critical patent/JP2007334463A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To efficiently transfer the data of segments fragmented in the sector buffer of a magnetic disk device to a host device. <P>SOLUTION: Data from an LBA2000h to an LBA31FFh are stored in a sector buffer, and data from an LBA3000h to the LBA31FFh are fragmented. When receiving a read command to the data from the LBA2000h to the LBA31FFh from a host device, a magnetic disk device generates transfer information by connecting the fragmented segments, and transfers it to the host device by one time processing. As a result, it is possible to prevent the data from being reproduced or transferred from a magnetic disk, or the data from being transferred for every fragmented segment although the data are stored in the sector buffer. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明はセクタ・バッファを搭載した補助記憶装置からホスト装置に対して行うデータの転送技術に関し、さらにはセクタ・バッファ上で断片化したデータをホスト装置に効率的に転送する技術に関する。   The present invention relates to a technology for transferring data from an auxiliary storage device equipped with a sector buffer to a host device, and more particularly to a technology for efficiently transferring data fragmented on a sector buffer to a host device.

コンピュータ・システムでは、CPUが実行するプログラムを記憶したり作業領域を提供したりする主記憶装置の他にデータをほぼ恒久的に記録する補助記憶装置を採用している。補助記憶装置は、一般的に、主記憶装置に比べて記憶容量が大きいため大容量記憶装置といわれたりする。また、CPUに付属する主記憶装置以外の外部の記憶装置という意味から外部記憶装置といわれたりすることもある。補助記憶装置の例として、磁気ディスク装置、フロッピィ・ディスク装置(フロッピィ・ディスクは商標)、光磁気ディスク装置、CD−RWドライブ、DVD−RWドライブなどがある。   The computer system employs an auxiliary storage device that records data almost permanently in addition to a main storage device that stores a program executed by a CPU and provides a work area. The auxiliary storage device is generally called a mass storage device because it has a larger storage capacity than the main storage device. Moreover, it may be called an external storage device in the meaning of an external storage device other than the main storage device attached to the CPU. Examples of the auxiliary storage device include a magnetic disk device, a floppy disk device (floppy disk is a trademark), a magneto-optical disk device, a CD-RW drive, and a DVD-RW drive.

これらの補助記憶装置は、SCSIやIDEといったインターフェース回路を通じてホスト装置としてのコンピュータ・システムに接続され、ホスト装置から送られたデータを記録したり、記録していたデータをホスト装置に送ったりしている。これらの補助記憶装置では、ホスト装置とのデータの通信時間と内部における読み取りまたは書き込み処理の時間との差を吸収したり通信時間を短縮したりするためにセクタ・バッファを設けている。   These auxiliary storage devices are connected to a computer system as a host device through an interface circuit such as SCSI or IDE, and record data sent from the host device or send recorded data to the host device. Yes. In these auxiliary storage devices, a sector buffer is provided in order to absorb the difference between the data communication time with the host device and the internal read or write processing time or shorten the communication time.

代表的な補助記憶装置の1つである磁気ディスク装置では、セクタ・バッファとしてSRAMまたはDRAMといった半導体メモリが使用されている。セクタ・バッファにはリード・バッファとライト・バッファで構成されているものがある。図6に示すセクタ・バッファ1では、ホスト装置から要求された読み取りデータを一時的に記憶しておくリード・バッファとホスト装置から転送された書き込みデータを一時的に記憶しておくライト・バッファで構成されている。   In a magnetic disk device that is one of typical auxiliary storage devices, a semiconductor memory such as SRAM or DRAM is used as a sector buffer. Some sector buffers include a read buffer and a write buffer. The sector buffer 1 shown in FIG. 6 includes a read buffer that temporarily stores read data requested from the host device and a write buffer that temporarily stores write data transferred from the host device. It is configured.

いま、リード・バッファにnからmまでの連続する論理ブロック・アドレスのデータが記憶されているものとする。ここで、論理ブロック・アドレスとは、磁気ディスクにアクセスできる最小単位となるデータ・セクタのアドレスをいう。つぎに、ホスト装置からnからmまでの論理ブロック・アドレスに対するリード・コマンドを受け取ったときは、プロセッサは磁気ディスクからデータを再生しないでリード・バッファに記憶してあったデータ・ブロックを読み出して転送することで高速な読み取り動作を実現する。リード・バッファにnからmまでの連続する論理ブロック・アドレスのデータ・ブロックが記憶されている状態で、ホスト装置からnからmまでの間にあるn+x1からn+x2までの連続する論理ブロック・アドレスに対するライト・コマンドを受け取ったときは、プロセッサはホスト装置から書き込みデータを受け取ってライト・バッファに記憶した時点でホスト装置に転送処理完了の状態を返送し、ホスト装置を書き込み動作から解放して高速な書き込み動作を実現する。   Now, it is assumed that data of consecutive logical block addresses from n to m are stored in the read buffer. Here, the logical block address refers to the address of the data sector that is the smallest unit that can access the magnetic disk. Next, when a read command for logical block addresses from n to m is received from the host device, the processor reads the data block stored in the read buffer without reproducing the data from the magnetic disk. High-speed reading operation is realized by transferring. With data blocks of successive logical block addresses from n to m stored in the read buffer, for successive logical block addresses from n + x1 to n + x2 between n and m from the host device When a write command is received, the processor returns write processing completion status to the host device when it receives write data from the host device and stores it in the write buffer. Write operation is realized.

このとき、リード・バッファに記憶されていたn+x1からn+x2までのデータは、ライト・バッファに記憶されたn+x1からn+x2までのデータで更新されているので、リード・バッファの論理ブロック・アドレスn+x1からn+x2は無効にされる。この状態でホスト装置からnからmまでの論理ブロック・アドレスに対するリード・コマンドを受け取ったときは、プロセッサは、nからn+x1−1までのデータをリード・バッファから読み出してホスト装置に転送し、つづいて、磁気ディスクからn+x1からmまでのデータを再生してホスト装置に転送する。あるいは、nからn+x1−1までのデータを転送したあとに、さらにリード・バッファあるいはライト・バッファにそれ以降のデータが存在するか否かを検索して転送する。いずれの方法でも余分な転送時間を費やしてしまう。   At this time, since the data from n + x1 to n + x2 stored in the read buffer is updated with the data from n + x1 to n + x2 stored in the write buffer, the logical block addresses n + x1 to n + x2 of the read buffer are updated. Is disabled. In this state, when a read command for logical block addresses n to m is received from the host device, the processor reads data from n to n + x1-1 from the read buffer and transfers it to the host device. Thus, data from n + x1 to m is reproduced from the magnetic disk and transferred to the host device. Alternatively, after transferring the data from n to n + x1-1, it is further searched whether there is subsequent data in the read buffer or the write buffer and transferred. Either method consumes extra transfer time.

特許文献1には、メモリの断片化に伴う不都合を解消するために、断片化の有無、空きメモリ先頭アドレスおよび領域サイズなどの断片化情報を検出して、空き領域の結合作業を行う技術を開示している。この技術では断片化の対策がメモリ上でのデータの移動によって実現されている。特許文献2は、ディスクのデータに断片化が発生したときに、バッファに蓄積したデータが空にならないように、ディスク上で再配置してから読み出す技術を開示している。特許文献3は、HDDのバッファ・セグメントをセグメント・テーブルの設定で動的に変更し、バッファの断片化を防ぐ技術を開示している。
特開2003−331239号公報 特開2000−21086号公報 特開平11−120690号公報
Japanese Patent Application Laid-Open No. 2004-133867 discloses a technique for detecting a fragmentation information such as the presence / absence of fragmentation, a free memory head address, and a region size and performing a concatenation operation of free regions in order to eliminate inconveniences associated with memory fragmentation. Disclosure. In this technique, countermeasures against fragmentation are realized by moving data on a memory. Patent Document 2 discloses a technique for reading data after being rearranged on the disk so that the data stored in the buffer does not become empty when fragmentation occurs in the data on the disk. Patent Document 3 discloses a technique for dynamically changing a buffer segment of an HDD by setting a segment table and preventing fragmentation of the buffer.
JP 2003-331239 A JP 2000-21086 A Japanese Patent Laid-Open No. 11-120690

連続する論理ブロック・アドレスのデータがセクタ・バッファの論理的なアドレスの順番に並ばないでデータが記憶されている状態を本明細書においては断片化ということにする。ライト・バッファにn+x1からn+x2までのデータが書き込まれたあとにライト・バッファに記憶されている更新されたデータでリード・バッファの対応するデータを上書きして断片化を防止する方法も考えられる。しかし、セクタ・バッファの中でデータを移動させるには所定の時間を必要とし、また制御も複雑になるという短所がある。また、nからn+x1までのデータを転送したあとに、さらに、それ以降のデータがバッファに記憶されていないかどうかを検索して、セクタ・バッファにデータが存在していればセクタ・バッファから残りのデータを転送することも考えられる。しかし、この方法でもデータ転送を複数回繰り返すことになるので、十分に高速化が図られているとは言い難い。   In this specification, the state in which data is stored without consecutive logical block address data being arranged in the logical address order of the sector buffer is referred to as fragmentation. A method of preventing fragmentation by overwriting the corresponding data in the read buffer with the updated data stored in the write buffer after the data from n + x1 to n + x2 is written in the write buffer is also conceivable. However, moving the data in the sector buffer requires a predetermined time and has a disadvantage of complicated control. Further, after transferring the data from n to n + x1, it is further searched whether or not the subsequent data is stored in the buffer, and if there is data in the sector buffer, the remaining data is stored in the sector buffer. It is also conceivable to transfer the data. However, even with this method, data transfer is repeated a plurality of times, and it is difficult to say that the speed has been sufficiently increased.

そこで本発明の目的は、補助記憶装置においてセクタ・バッファに断片化して記憶されたデータをホスト装置に高速に転送する転送方法を提供することにある。さらに本発明の目的は、そのような高速転送を実現する補助記憶装置を提供することにある。   SUMMARY OF THE INVENTION An object of the present invention is to provide a transfer method for transferring data stored in a fragmented state in a sector buffer in an auxiliary storage device to a host device at high speed. A further object of the present invention is to provide an auxiliary storage device that realizes such high-speed transfer.

本発明の原理は、セクタ・バッファにおいて断片化したセグメントに記憶されたデータ・ブロックに対するアドレスを指定したホスト装置からのリード・コマンドに対して、一度の処理でデータ転送するために、断片化したセグメントをデータ転送前に連続させるための転送情報を生成して論理的に並び替える点にある。断片化したセグメントに記憶されたデータ・ブロックのアドレスに対するリード・コマンドがホスト装置から送られてくると、補助記憶装置は転送情報に基づいて転送することにより、一度の処理でデータ転送を完了することができる。   The principle of the present invention is that fragmentation is performed in order to transfer data in a single process in response to a read command from a host device that specifies an address for a data block stored in a fragmented segment in a sector buffer. Transfer information for making the segments continuous before data transfer is generated and rearranged logically. When a read command for the address of the data block stored in the fragmented segment is sent from the host device, the auxiliary storage device completes the data transfer in one process by transferring based on the transfer information be able to.

本発明の態様では、ホスト装置から、読み取りにかかる複数のデータ・ブロックのアドレスを指定したリード・コマンドを受け取る。そして複数のデータ・ブロックのうち先頭に配置された先頭データ・ブロックが前記セクタ・バッファに存在するか否かを検索する。つづいて、先頭データ・ブロックと複数のデータ・ブロックのいずれかがセクタ・バッファの異なるセグメントに存在する場合に、複数のデータ・ブロック全体のページ・アドレスを連続させる転送情報を生成する。転送情報は、転送の都度バッファ管理テーブルのアドレス情報に基づいてプロセッサが生成する。転送情報は、1つのリード・コマンドに対して生成されるセクタ・バッファのページ・アドレスとページ数で構成されるテーブルである。最後に、転送情報に基づいてアドレスが指定されたデータ・ブロックをセクタ・バッファから読み出してホスト装置に転送する。   In the aspect of the present invention, a read command specifying addresses of a plurality of data blocks to be read is received from the host device. Then, it is searched whether or not the head data block arranged at the head of the plurality of data blocks exists in the sector buffer. Subsequently, when either the first data block or the plurality of data blocks are present in different segments of the sector buffer, transfer information for generating continuous page addresses of the plurality of data blocks is generated. The transfer information is generated by the processor based on the address information in the buffer management table for each transfer. The transfer information is a table composed of a sector buffer page address and the number of pages generated for one read command. Finally, the data block whose address is specified based on the transfer information is read from the sector buffer and transferred to the host device.

本発明により、補助記憶装置においてセクタ・バッファに断片化して記憶されたデータをホスト装置に高速に転送する方法を提供することができた。さらに本発明により、そのような高速転送を実現する補助記憶装置を提供することができた。   According to the present invention, it is possible to provide a method for transferring data stored in a fragmented state in a sector buffer in an auxiliary storage device to a host device at high speed. Furthermore, according to the present invention, an auxiliary storage device that realizes such high-speed transfer can be provided.

[装置の構成]
図1は、本発明の実施の形態にかかる磁気ディスク装置10の概略を示すブロック図である。磁気ディスク装置10は、コンピュータや音楽記録再生装置などのホスト装置11に接続され、ホスト装置11から受け取ったデータを磁気ディスク25に記録したり、磁気ディスク25に記録したデータをホスト装置11に転送したりする。ホスト・インターフェース回路13は、ホスト装置11と磁気ディスク装置10とのデータ通信を制御するATA規格の回路である。ホスト装置11と磁気ディスク装置10との間では、ホスト・インターフェース回路13を通じてデータ、コマンド、および制御情報などの入出力が行われる。
[Device configuration]
FIG. 1 is a block diagram showing an outline of a magnetic disk device 10 according to an embodiment of the present invention. The magnetic disk device 10 is connected to a host device 11 such as a computer or a music recording / reproducing device, and records data received from the host device 11 on the magnetic disk 25 or transfers data recorded on the magnetic disk 25 to the host device 11. To do. The host interface circuit 13 is an ATA standard circuit that controls data communication between the host device 11 and the magnetic disk device 10. Data, commands, control information, and the like are input / output between the host device 11 and the magnetic disk device 10 through the host interface circuit 13.

ホスト装置11は、磁気ディスク装置10にデータを書き込んだり、磁気ディスク装置10からデータを読み取ったりするときに、ホスト・インターフェース回路13上に割り当てられたATAレジスタのアドレスにアクセスする。ATAレジスタにはコマンド・レジスタ、ステータス・レジスタ、データ・レジスタ、シリンダ・ロー/ハイ・レジスタ、セクタ・ナンバー・レジスタ、セクタ・カウント・レジスタなどがある。   The host device 11 accesses the address of the ATA register assigned on the host interface circuit 13 when writing data to the magnetic disk device 10 or reading data from the magnetic disk device 10. The ATA register includes a command register, a status register, a data register, a cylinder low / high register, a sector number register, and a sector count register.

ホスト装置11は磁気ディスク装置10との間でデータ転送をするときに、コマンド・レジスタに、リード・コマンドまたはライト・コマンドを書き込み、シリンダ・ロー/ハイ・レジスタとセクタ/ナンバー・レジスタに先頭のデータ・セクタの論理ブロック・アドレス(以後、LBAという。)を書き込む。さらにセクタ・カウント・レジスタに書き込みまたは読み出しにかかるデータ・セクタの数を指定してデータの送受信を行う。磁気ディスク装置10は、リード・コマンドまたはライト・コマンドの実行過程においてエラーが発生したときに、ステータス・レジスタのエラー・ビットを設定してホスト装置11に報告する。磁気ディスク装置10は、ホスト装置11との間でデータ転送が完了したとき、ステータス・レジスタに状態を設定し、ホスト装置11はそれを読み取ってデータ転送の完了を認識する。   When the host device 11 transfers data to or from the magnetic disk device 10, the read command or write command is written to the command register, and the head is written to the cylinder low / high register and the sector / number register. Write the logical block address (hereinafter referred to as LBA) of the data sector. Furthermore, data transmission / reception is performed by designating the number of data sectors to be written to or read from the sector count register. When an error occurs in the execution process of the read command or the write command, the magnetic disk device 10 sets an error bit in the status register and reports it to the host device 11. When the data transfer with the host device 11 is completed, the magnetic disk device 10 sets a state in the status register, and the host device 11 reads it to recognize the completion of the data transfer.

セクタ・バッファ31は揮発性半導体メモリの一例であるSDRAMで形成されている。セクタ・バッファ31は、磁気ディスク装置10の内部における処理速度とホスト装置11に対するデータ転送速度との差を吸収してパフォーマンスを向上させるために、リード・キャッシュ機能やライト・キャッシュ機能を実現する。セクタ・バッファ31は、機能的にリード・バッファとライト・バッファに分割されている。ただし、リード・バッファとライト・バッファを物理的に分離させてもよい。リード・バッファはホスト装置11からの読み取りのために磁気ディスク25から読み取ったデータを記憶する領域で、ライト・バッファはホスト装置からの書き込みにかかるデータを記憶する領域である。リード・バッファとライト・バッファはそれぞれリング・バッファ方式でデータを記憶する。   The sector buffer 31 is formed by an SDRAM which is an example of a volatile semiconductor memory. The sector buffer 31 realizes a read cache function and a write cache function in order to improve the performance by absorbing the difference between the processing speed inside the magnetic disk device 10 and the data transfer speed to the host device 11. The sector buffer 31 is functionally divided into a read buffer and a write buffer. However, the read buffer and the write buffer may be physically separated. The read buffer is an area for storing data read from the magnetic disk 25 for reading from the host apparatus 11, and the write buffer is an area for storing data related to writing from the host apparatus. Each of the read buffer and the write buffer stores data by a ring buffer method.

CRC回路27は、ホスト・インターフェース回路13からバッファ・コントローラ15に送られてきたユーザ・データに対して、巡回冗長検査(CRC)方式に基づく生成多項式を使用して冗長バイトとしてのエラー検査コード(以後、CRCCという。)を計算してバッファ・コントローラ15に送る。本実施の形態においては、CRCCはデータ・セクタの単位に相当する512バイトのユーザ・データごとに計算され4バイトで構成されている。バッファ・コントローラ15は、セクタ・バッファ31およびCRC回路27へのデータの入出力を制御する。バッファ・コントローラ15は、512バイトのユーザ・データと4バイトのCRCCからなる516バイトのデータ・セットをセクタ・バッファ31の所定のアドレスに記憶するために、セクタ・バッファ31を制御する。バッファ・コントローラ15は、リング・バッファ方式でセクタ・バッファ31に対するデータの記憶動作を制御するためにアドレス管理テーブルを備える。   The CRC circuit 27 uses the generator polynomial based on the cyclic redundancy check (CRC) method on the user data sent from the host interface circuit 13 to the buffer controller 15 to generate an error check code (redundant byte). Hereinafter, CRCC is calculated and sent to the buffer controller 15. In this embodiment, the CRCC is calculated for each 512-byte user data corresponding to a data sector unit, and is composed of 4 bytes. The buffer controller 15 controls input / output of data to the sector buffer 31 and the CRC circuit 27. The buffer controller 15 controls the sector buffer 31 in order to store a 516-byte data set consisting of 512-byte user data and 4-byte CRCC at a predetermined address of the sector buffer 31. The buffer controller 15 includes an address management table for controlling the data storing operation for the sector buffer 31 in a ring buffer method.

CRC回路27は、ホスト装置11にデータを送る前および磁気ディスク25にデータを書き込む前に、セクタ・バッファ31からバッファ・コントローラ15に読み出されたデータ・セットに対して生成多項式を使用してビット反転エラーの有無を検査する。CRC回路27は、データ・セットから検出したエラーをMPUユニット33に通知する。   The CRC circuit 27 uses a generator polynomial for the data set read from the sector buffer 31 to the buffer controller 15 before sending data to the host device 11 and before writing data to the magnetic disk 25. Check for bit reversal errors. The CRC circuit 27 notifies the MPU unit 33 of the error detected from the data set.

チャネル・インターフェース回路17は、バッファ・コントローラ15、リード・チャネル19、ライト・チャネル21、およびECC回路29に対するデータの入出力動作を制御する。ECC回路29は、記録動作時においてバッファ・コントローラ15からチャネル・インターフェース回路17に送られた記録にかかるデータ・セットから、リードソロモン方式でエラー訂正コード(以後、ECCという。)を算出してチャネル・インターフェース回路17に送る。ECCは、516バイトのデータ・セットごとに20バイト〜40バイト程度生成される。   The channel interface circuit 17 controls data input / output operations with respect to the buffer controller 15, the read channel 19, the write channel 21, and the ECC circuit 29. The ECC circuit 29 calculates an error correction code (hereinafter referred to as ECC) by a Reed-Solomon method from a data set for recording sent from the buffer controller 15 to the channel interface circuit 17 at the time of recording operation. Send to interface circuit 17 The ECC is generated about 20 to 40 bytes for each 516-byte data set.

ECC回路29は、再生動作においてリード・チャネル19からチャネル・インターフェース回路17に送られたデータ・セットとECCから、エラー・シンドロームを計算してデータ・セットにビット反転エラーがあるか否かを検査する。ECC回路29は、ビット反転エラーが所定の数以内であれば、データ・セットを正しい値に訂正してバッファ・コントローラ15に送る。リード・チャネル19は、磁気ディスク25から読み出したユーザ・データを処理して、チャネル・インターフェース回路17に送る。リード・チャネル19は、磁気ディスク25から読み出したサーボ・データを処理してサーボ・コントローラ35に送る。   The ECC circuit 29 calculates an error syndrome from the data set and ECC sent from the read channel 19 to the channel interface circuit 17 in the reproduction operation, and checks whether or not there is a bit inversion error in the data set. To do. If the bit inversion error is within a predetermined number, the ECC circuit 29 corrects the data set to a correct value and sends it to the buffer controller 15. The read channel 19 processes user data read from the magnetic disk 25 and sends it to the channel interface circuit 17. The read channel 19 processes servo data read from the magnetic disk 25 and sends it to the servo controller 35.

ライト・チャネル21はチャネル・インターフェース回路17から受け取った記録にかかるデータ・セクタ情報を処理してヘッド機構23に送る。データ・セクタ情報はデータ・セットとECCに加えて、周知の方法で生成および付加されたプリアンブル、ポストアンブル、アドレス情報などを含む。ヘッド機構23は、磁気ヘッドと磁気ヘッドを磁気ディスク23の所定の位置に位置付けるキャリッジ機構で構成される。磁気ディスク25はデータ・セクタ単位でユーザ・データを記録する。各データ・セクタは再生データの同期をとるためのプリアンブル、512バイトのデータ・ブロック、CRCC、ECCなどで構成されている。磁気ディスク上に定義されたすべてのデータ・セクタに対しては順番にLBAが割り当てられている。   The write channel 21 processes data sector information relating to recording received from the channel interface circuit 17 and sends it to the head mechanism 23. In addition to the data set and ECC, the data sector information includes a preamble, a postamble, address information and the like generated and added by a known method. The head mechanism 23 includes a magnetic head and a carriage mechanism that positions the magnetic head at a predetermined position on the magnetic disk 23. The magnetic disk 25 records user data in units of data sectors. Each data sector is composed of a preamble for synchronizing reproduction data, a 512-byte data block, CRCC, ECC, and the like. LBAs are assigned in order to all data sectors defined on the magnetic disk.

MPUユニット33は、プロセッサ、RAM、EEPROM、およびファームウエアを格納するROMなどで構成され、ファームウエアを実行して磁気ディスク装置10の動作全体を制御する。MPUユニット33は、ホスト装置11からホスト・インターフェース回路13のATAレジスタに書き込まれたコマンドを解釈して磁気ディスク装置10の動作を制御する。MPU33は、ホスト装置11から送られたコマンドを実行する際に、エラーが発生した場合には、ホスト・インターフェース回路13のステータス・レジスタにエラー・ビットを設定してホスト装置11に報告する。さらにMPU33は、セクタ・バッファ31に記憶されているデータを検索したり、セクタ・バッファからデータを読み出したりしてホスト装置との間で行うデータの転送動作を制御する。本実施の形態にかかるデータ転送方式はファームエアで実現される。   The MPU unit 33 includes a processor, a RAM, an EEPROM, a ROM that stores firmware, and the like, and executes the firmware to control the entire operation of the magnetic disk device 10. The MPU unit 33 interprets a command written from the host device 11 to the ATA register of the host interface circuit 13 and controls the operation of the magnetic disk device 10. When an error occurs when executing a command sent from the host apparatus 11, the MPU 33 sets an error bit in the status register of the host interface circuit 13 and reports it to the host apparatus 11. Furthermore, the MPU 33 searches for data stored in the sector buffer 31 and reads data from the sector buffer to control data transfer operations with the host device. The data transfer method according to the present embodiment is realized by firm air.

サーボ・コントローラ35は、リード・チャネル19から受け取ったサーボ情報を処理してMPUユニット33に磁気ヘッドの位置情報を送る。MPU33はサーボ・コントローラ35から送られた位置情報に基づいて、ヘッド機構23の制御情報を生成し、ドライバ37に送る。ドライバ37は、MPUユニット33から指示された位置にヘッド機構23を位置付けるための制御電流を生成して、ヘッド機構23に送る。磁気ディスク装置10を構成するには、これら以外にも多くの周知の要素が必要であるが、本発明には特に関係がないので説明を省略する。また、図1に示した機能ブロックは例示として示したものであり、これらのいくつかの機能を1つの半導体装置に統合したり分割したりすることは当業者が自由になし得ることである。   The servo controller 35 processes the servo information received from the read channel 19 and sends the magnetic head position information to the MPU unit 33. Based on the position information sent from the servo controller 35, the MPU 33 generates control information for the head mechanism 23 and sends it to the driver 37. The driver 37 generates a control current for positioning the head mechanism 23 at the position instructed by the MPU unit 33 and sends the control current to the head mechanism 23. In order to configure the magnetic disk device 10, many other well-known elements are necessary. However, the description is omitted because it is not particularly relevant to the present invention. Further, the functional blocks shown in FIG. 1 are shown as examples, and those skilled in the art can freely integrate or divide these functions into one semiconductor device.

[セクタ・バッファとバッファ管理テーブル]
図2は、セクタ・バッファとバッファ管理テーブルのデータ構造を説明する図である。図2(A)に示すように、セクタ・バッファ31はリード・バッファ101とライト・バッファ103で構成され、それぞれリング・バッファ方式でデータが記憶される。セクタ・バッファ31は、図2(B)に示すように512バイトのユーザ・データと4バイトのCRCCからなるデータ・セットを516バイトのページ105の単位で記憶する。図2(A)に示すように、本実施の形態では、リード・バッファ101は0000hから3FFFhまでの連続する16384個のページ・アドレスを有し、ライト・バッファ103は4000hから7FFFhまでの連続する同じ数のページ・アドレスを有する。
[Sector buffer and buffer management table]
FIG. 2 is a diagram for explaining the data structures of the sector buffer and the buffer management table. As shown in FIG. 2A, the sector buffer 31 includes a read buffer 101 and a write buffer 103, and each stores data in a ring buffer system. As shown in FIG. 2B, the sector buffer 31 stores a data set composed of 512-byte user data and 4-byte CRCC in units of 516-byte pages 105. As shown in FIG. 2A, in the present embodiment, the read buffer 101 has 16384 continuous page addresses from 0000h to 3FFFh, and the write buffer 103 is continuous from 4000h to 7FFFh. Have the same number of page addresses.

リング・バッファ方式では、ページ・アドレス0000hから順番に連続するLBAのデータ・セットを記憶してゆく。そして最後に記憶されたページのつぎのページから新しい連続するLBAのデータ・セットを記憶してゆく。そして、ページ・アドレス3FFFh以降はページ・アドレス0000hに戻ってすでに記憶されていたデータ・セットを上書きしてゆく。ライト・バッファ103においても同様に記憶してゆく。   In the ring buffer method, a continuous LBA data set is sequentially stored from page address 0000h. Then, a new continuous LBA data set is stored from the next page of the last stored page. Then, after page address 3FFFh, it returns to page address 0000h and overwrites the already stored data set. The same is stored in the write buffer 103 as well.

LBAの連続するデータ・セットが記憶されているページ・アドレスが連続する記憶領域の単位をセグメントという。図2(B)の例では、ページ・アドレス0005hから000Chまでの8個のページがLBA11からLBA18までのデータ・セットを記憶して1つのセグメントを形成している。また、ページ・アドレス000Dhから0012hまでの7個のページがLBA35からLBA41までのデータ・セットを記憶して他の1つのセグメントを形成している。ホスト装置11からリード・バッファ101に記憶されていないデータ・セットに対するアドレスが指定されたリード・コマンドを受け取ったときは、MPU33は、アドレスが指定されたLBAの連続するデータ・セットを磁気ディスク25から読み出すとともにリード・バッファ101に記憶する。このときリード・バッファ101に記憶されたデータ・セットが1つのセグメントを形成する。   A unit of a storage area in which page addresses in which consecutive LBA data sets are stored is called a segment. In the example of FIG. 2B, eight pages from page addresses 0005h to 000Ch store data sets from LBA11 to LBA18 to form one segment. Seven pages from page addresses 000Dh to 0012h store the data set from LBA35 to LBA41 to form another segment. When the MPU 33 receives a read command in which an address for a data set that is not stored in the read buffer 101 is received from the host device 11, the MPU 33 stores consecutive data sets in the LBA for which the address is specified on the magnetic disk 25. Is read out and stored in the read buffer 101. At this time, the data set stored in the read buffer 101 forms one segment.

図2(C)は、バッファ・コントローラ15がセクタ・バッファ31のアドレスを管理するためのバッファ管理テーブル107の構成を示している。バッファ管理テーブル107は、セグメントごとにエントリが形成されている。一つのエントリは、ページ・アドレスと当該ページ・アドレスに記憶されているデータ・セットの最終LBAと、当該ページのページ数(レングス)で構成されている。図2(B)の例では、000Chには、LBA18のデータ・セットを最終アドレスとする8個のLBAが連続するデータ・セットで形成されたセグメントがエントリとして登録されている。ページ・アドレス0012hにも同様にセグメント情報が登録されている。   FIG. 2C shows the configuration of the buffer management table 107 for the buffer controller 15 to manage the address of the sector buffer 31. In the buffer management table 107, an entry is formed for each segment. One entry includes a page address, the last LBA of the data set stored at the page address, and the page number (length) of the page. In the example of FIG. 2B, in 000Ch, a segment formed by a data set in which eight LBAs having the LBA 18 data set as the final address is registered is registered as an entry. Similarly, segment information is registered in the page address 0012h.

[セグメントの断片化]
図3は、セクタ・バッファ31においてセグメントに断片化が発生した状態を説明する図である。図3(A)では、セクタ・バッファ31のページ・アドレス1000hから2FFFhまでに記憶されたLBA2000hからLBA3FFFhまでのデータ・セットが一つのセグメントを形成し、バッファ管理テーブル107にセグメントのエントリが登録されている。その後、ホスト装置11が磁気ディスク装置10に書き込みデータの先頭アドレスであるLBA3000hとそれにつづく511個のデータ・ブロックをライト・コマンドとともに送る。磁気ディスク装置10は、磁気ディスク25のデータ・セクタに実際にデータを書き込む前に、図3(B)に示すように、ライト・バッファ103にデータ・セットを記憶し、ステータス・レジスタに書き込み処理完了の状態を設定してホスト装置に通知する。
[Segment fragmentation]
FIG. 3 is a diagram for explaining a state in which fragmentation has occurred in the segment in the sector buffer 31. In FIG. 3A, the data set from LBA2000h to LBA3FFFh stored from the page address 1000h to 2FFFh of the sector buffer 31 forms one segment, and the segment entry is registered in the buffer management table 107. ing. Thereafter, the host device 11 sends the LBA 3000h, which is the start address of the write data, and 511 data blocks following it to the magnetic disk device 10 together with the write command. Before actually writing data to the data sector of the magnetic disk 25, the magnetic disk device 10 stores the data set in the write buffer 103 and writes to the status register as shown in FIG. 3B. Set the completion status and notify the host device.

磁気ディスク装置10が磁気ディスク25にデータを書き込むまでには多少の時間を費やすので、ライト・バッファ103に書き込みデータを記憶した時点でホスト装置に対して書き込み処理完了の状態を通知することで、ホスト装置11を早期に書き込み動作から解放することができる。バッファ・コントローラ15は、ライト・バッファ103の所定のページにホスト装置から転送されたデータ・ブロックとCRCCからなるデータ・セットを記憶する。そして、データ・セットが記憶されたページ・アドレス、最終LBA、およびページ数がバッファ管理テーブル107に記憶される。図3(B)では、MPU33が、ページ・アドレスが5000hから51FFhまでのライト・バッファ103のページにLBA3000hからLBA31FFhまでのデータ・ブロックを書き込んだときの状態を示している。したがって、セクタ・バッファ31のページ・アドレス2000hから21FFhに記憶されていたLBA3000hからLBA31FFhまでのデータ・ブロックは更新されたことになるので、バッファ管理テーブル107において無効になるように処理される。   Since it takes some time for the magnetic disk device 10 to write data to the magnetic disk 25, the write processing completion status is notified to the host device when the write data is stored in the write buffer 103. The host device 11 can be released from the write operation at an early stage. The buffer controller 15 stores a data set composed of a data block and CRCC transferred from the host device in a predetermined page of the write buffer 103. Then, the page address where the data set is stored, the final LBA, and the number of pages are stored in the buffer management table 107. FIG. 3B shows a state where the MPU 33 has written data blocks from LBA 3000h to LBA 31FFh to pages of the write buffer 103 having page addresses from 5000h to 51FFh. Accordingly, since the data blocks from LBA 3000h to LBA 31FFh stored in the page addresses 2000h to 21FFh of the sector buffer 31 have been updated, the data is processed to be invalid in the buffer management table 107.

図3(B)のバッファ管理テーブル107では、ページ・アドレス1000hから2FFFhまでのページに記憶されていたデータ・セットのセグメントは、更新によりページ・アドレス1000hから1FFFhまでのセグメントとページ・アドレス2200hから2FFFhまでのセグメントの2つに分割されている。セグメントが分割されていることの認識は、バッファ管理テーブル107に基づいて、バッファ・コントローラ15が行う。よって、つぎにホスト装置11から、LBA3000hからLBA31FFhまでのデータ・ブロックに対してリード・コマンドが送られてきたときは、バッファ・コントローラ15は、ページ・アドレス5000hから51FFhに記憶されているデータが有効なデータであると判断して、ホスト装置11に送るようにセクタ・バッファ31のアドレスを指定する。   In the buffer management table 107 in FIG. 3B, the segments of the data set stored in the pages from the page addresses 1000h to 2FFFh are updated from the segments from the page addresses 1000h to 1FFFh and the page address 2200h. It is divided into two segments up to 2FFFh. The buffer controller 15 recognizes that the segment is divided based on the buffer management table 107. Therefore, when a read command is next sent from the host apparatus 11 to the data blocks from LBA 3000h to LBA 31FFh, the buffer controller 15 stores the data stored in the page addresses 5000h to 51FFh. It is determined that the data is valid, and the address of the sector buffer 31 is designated to be sent to the host device 11.

よって、ページ・アドレスが2000hから21FFhに記憶されていたデータ・セットは無効になる。このようにセグメントは、最初に形成されるときの大きさがホスト装置から指令されるLBAの数に応じて可変サイズとなり、かつ、ユーザ・データの更新により分割されて個数が増大してゆく。ページ・アドレスが2000hから21FFhまでの記憶領域に記憶されたデータ・ブロックは、リング・バッファ方式による順番でつぎに新しいデータ・セットが記憶されるまで読み出されることはない。本実施の形態では、リード・バッファ101は128個のセグメントを保有することができ、ライト・バッファ103は64個のセグメントを保有することができる。   Therefore, the data set stored in the page address from 2000h to 21FFh becomes invalid. As described above, the size of the segment when it is first formed becomes a variable size according to the number of LBAs commanded from the host device, and the number of segments is increased by being divided by updating user data. Data blocks stored in the storage area with page addresses 2000h to 21FFh are not read out until the next new data set is stored in the order of the ring buffer method. In this embodiment, the read buffer 101 can hold 128 segments, and the write buffer 103 can hold 64 segments.

図3(B)では、LBA2000hからLBA3FFFhまでの連続するLBAのデータ・セットが、セクタ・バッファ31上においてページ・アドレスが不連続な記憶領域に記憶され、セグメントが断片化された状態になっている。従来は、このように断片化されたセグメントに対応するデータに対してリード・コマンドが送られてくると、MPUユニット33は、セクタ・バッファ31上にリード・コマンドで指定された先頭LBAのデータ・セットを含むセグメントが存在するか否かを検索し、存在する場合は、当該セグメントの最終LBAまでのデータ・ブロックを一旦ホスト装置11に転送し、残りのデータ・ブロックは磁気ディスク25から再生して送っていた。あるいは、検索と転送をセグメントごとに繰り返していた。なお、セグメントの断片化は、リード・バッファ101とライト・バッファ103との間だけで発生するものではなく、リード・バッファ101内だけでも発生する。   In FIG. 3B, the continuous LBA data set from LBA2000h to LBA3FFFh is stored in the storage area where the page address is discontinuous on the sector buffer 31, and the segment is in a fragmented state. Yes. Conventionally, when a read command is sent for data corresponding to a segment fragmented in this way, the MPU unit 33 causes the data of the head LBA specified by the read command on the sector buffer 31. A search is made as to whether or not there is a segment including the set. If there is a segment, the data blocks up to the last LBA of the segment are once transferred to the host device 11 and the remaining data blocks are reproduced from the magnetic disk 25. And sent. Alternatively, search and transfer were repeated for each segment. Note that segment fragmentation does not occur only between the read buffer 101 and the write buffer 103 but also occurs only within the read buffer 101.

[データ転送の手順]
図4は、図3(B)のように断片化したセグメントに含まれるLBAのデータ・ブロックに対するリード・コマンドが送られてきたときの、転送の手順を示すフローチャートである。転送の手順を記述したプログラムはMPUユニット33のファームウエアに組み込まれている。ブロック201では、ホスト装置11が、ホスト・インターフェース回路13のATAレジスタに、磁気ディスク25に記憶されている読み取りにかかる先頭データ・ブロックのLBA2000hと、読み取るデータ・ブロックの数8192を指定してリード・コマンドを送る。ブロック203ではMPUユニット33はリード・コマンドを解釈し、先頭LBAとデータ・ブロックの数をバッファ・コントローラ15に送る。バッファ・コントローラ15は、バッファ管理テーブル107のエントリを検索してリード・コマンドで指定されたLBAの先頭データ・セットがセクタ・バッファ31に存在するか否かを検索する。
[Data transfer procedure]
FIG. 4 is a flowchart showing a transfer procedure when a read command for an LBA data block included in a segment segmented as shown in FIG. 3B is sent. A program describing the transfer procedure is incorporated in the firmware of the MPU unit 33. In block 201, the host device 11 reads the ATA register of the host interface circuit 13 by designating the LBA2000h of the first data block to be read stored in the magnetic disk 25 and the number of data blocks to be read 8192.・ Send a command. In block 203, the MPU unit 33 interprets the read command and sends the head LBA and the number of data blocks to the buffer controller 15. The buffer controller 15 searches the entry of the buffer management table 107 to search whether the first data set of the LBA specified by the read command exists in the sector buffer 31.

ブロック203で先頭データ・ブロックがセクタ・バッファ31に存在しない場合は、MPUユニット33は、通常の再生動作で磁気ディスク25からデータを再生して(ブロック205)、リード・バッファ101に記憶したあとに(ブロック207)、ホスト装置に転送する(ブロック209)。次回からホスト装置11が同一LBAのデータを要求したときは、MPUユニット33は、リード・バッファ101から読み出して転送する。この手順は従来の転送手順と同じである。   When the first data block does not exist in the sector buffer 31 in block 203, the MPU unit 33 reproduces data from the magnetic disk 25 by a normal reproduction operation (block 205) and stores it in the read buffer 101. (Block 207), the data is transferred to the host device (block 209). When the host device 11 requests data of the same LBA from the next time, the MPU unit 33 reads from the read buffer 101 and transfers it. This procedure is the same as the conventional transfer procedure.

ブロック203で、先頭データ・ブロックがセクタ・バッファ31に存在する場合は、ブロック211でMPUユニット33は、指定されたLBAを記憶するセグメントについて断片化が生じているか否かを検査する。図3(A)に示すように、指定されたLBAのデータ・ブロック全体が一つのセグメントの中に記憶されて断片化が生じていない場合は、MPUユニット33は本実施の形態にかかる転送情報を生成しないでリード・バッファ101からデータを読み出してホスト装置11に転送する。ブロック211で断片化が生じていると判断した場合は、MPUユニット33はブロック213で本実施の形態にかかる転送情報を生成する。   If the first data block is present in the sector buffer 31 in block 203, the MPU unit 33 checks in block 211 whether fragmentation has occurred for the segment storing the designated LBA. As shown in FIG. 3A, when the entire data block of the designated LBA is stored in one segment and no fragmentation occurs, the MPU unit 33 transfers the transfer information according to this embodiment. The data is read from the read buffer 101 without being generated and transferred to the host device 11. If it is determined in the block 211 that fragmentation has occurred, the MPU unit 33 generates transfer information according to the present embodiment in the block 213.

転送情報は、MPUユニット33が一度のデータ転送手順で断片化したセグメントに記憶されているデータ・ブロックを転送するためのセクタ・バッファ31のアドレス情報である。図5は、転送情報のデータ構造を示す図である。転送情報は、MPUユニット33がホスト装置11から1つのリード・コマンドを受け取ったときに、対応するデータ・ブロックがセクタ・バッファ31に断片化した状態で存在すると判断した場合に、ホスト装置11に転送する都度MPUユニット31がファームウエアを実行して生成するテーブルである。MPUユニット31は、転送情報を利用して断片化したセグメントのデータを、一度の転送動作でホスト装置11に転送することができる。   The transfer information is address information of the sector buffer 31 for transferring the data block stored in the segment fragmented by the MPU unit 33 in one data transfer procedure. FIG. 5 is a diagram illustrating a data structure of transfer information. When the MPU unit 33 receives one read command from the host device 11, the transfer information is stored in the host device 11 when it is determined that the corresponding data block is fragmented in the sector buffer 31. This is a table generated by the MPU unit 31 executing firmware every time data is transferred. The MPU unit 31 can transfer the segment data segmented using the transfer information to the host device 11 by a single transfer operation.

転送情報は図5(A)に示すように、セクタ・バッファのページ・アドレスとページ数で構成されている。図3(B)に示した断片化したセグメントに含まれるLBAのデータ・ブロックは、図5(A)において、各セグメントの最終LBAのページ・アドレスが1FFFh、51FFh、2FFFhの順番に並ぶように配列される。各最終LBAには、対応するセグメントのページ数が関連づけられている。そして、ブロック215では、MPUユニット33が、転送情報に基づいてセクタ・バッファのページ・アドレスを、1000h−1FFFh、5000h−51FFh、2200h−2FFFhの順番に読み出して指定されたデータ・ブロックを一度にホスト装置に転送する。   As shown in FIG. 5A, the transfer information is composed of the page address of the sector buffer and the number of pages. The LBA data blocks included in the fragmented segment shown in FIG. 3B are arranged so that the page address of the last LBA of each segment is arranged in the order of 1FFFh, 51FFh, and 2FFFh in FIG. 5A. Arranged. Each final LBA is associated with the number of pages of the corresponding segment. Then, in block 215, the MPU unit 33 reads out the sector block page address in the order of 1000h-1FFFh, 5000h-51FFh, 2200h-2FFFh based on the transfer information at a time. Transfer to host device.

リード・コマンドで指定されたデータ・ブロックの最後のLBAが、セグメントの最終LBA(3FFFh)ではなく、たとえば3FF5hである場合の転送情報は図5(B)のようになる。この場合、LBA3FF5hのデータ・ブロックはセクタ・バッファの2FF5hのページ・アドレスに記憶されている。よって、図5(B)のように転送情報が生成され、MPUユニット33によりセクタ・バッファが転送情報に基づいて、1000h−1FFFh、5000h−51FFh、2200h−2FF5hのページ・アドレスの順番に転送される。   The transfer information in the case where the last LBA of the data block specified by the read command is not the last LBA (3FFFh) of the segment, for example, 3FF5h, is as shown in FIG. In this case, the data block of LBA3FF5h is stored at the page address of 2FF5h of the sector buffer. Therefore, transfer information is generated as shown in FIG. 5B, and the sector buffer is transferred by the MPU unit 33 in the order of the page addresses of 1000h-1FFFh, 5000h-51FFh, 2200h-2FF5h based on the transfer information. The

本実施の形態では、リード・コマンドを処理する都度、MPUユニット33がバッファ管理テーブル107のアドレス情報に基づいて転送情報を生成している。転送情報はたとえばバッファ管理テーブル107に転送の順序を示す情報を加えるようにして生成することも可能である。断片化を生じさせるような読み取りまたは書き込み動作が行われる都度バッファ管理テーブル107の状態を計算して更新することはMPUユニット33における負担が大きくなる。また、断片化が発生したときにセクタ・バッファのデータ配列自体を実際に変更して断片化を除去することも可能であるが、これもデータの移動に対するMPUユニット33の負担が大きくなるので、転送情報は本実施の形態に基づくようにデータ転送の都度生成する方が優れている。   In this embodiment, every time a read command is processed, the MPU unit 33 generates transfer information based on the address information in the buffer management table 107. The transfer information can be generated, for example, by adding information indicating the transfer order to the buffer management table 107. It is burdensome on the MPU unit 33 to calculate and update the state of the buffer management table 107 every time a read or write operation that causes fragmentation is performed. Further, when fragmentation occurs, it is possible to actually change the data arrangement itself of the sector buffer to remove the fragmentation, but this also increases the burden on the MPU unit 33 for data movement. It is better to generate the transfer information every time the data is transferred as in the present embodiment.

本実施の形態では、セクタ・バッファがリング・バッファ方式でデータの記憶をする方法を例示して説明したが、本発明はこれに限定されるものではなく、LRU(Least Recently Used)アルゴリズムやFIFO(First-In First-Out ) アルゴリズムで記憶する場合でも、断片化が生ずる場合には適用することができる。   In the present embodiment, the method in which the sector buffer stores data by the ring buffer method has been described as an example. However, the present invention is not limited to this, and an LRU (Least Recently Used) algorithm or FIFO is used. (First-In First-Out) Even when storing by the algorithm, it can be applied when fragmentation occurs.

これまで本発明について図面に示した特定の実施の形態をもって説明してきたが、本発明は図面に示した実施の形態に限定されるものではなく、本発明の効果を奏する限り、これまで知られたいかなる構成であっても採用することができることはいうまでもないことである。   Although the present invention has been described with the specific embodiments shown in the drawings, the present invention is not limited to the embodiments shown in the drawings, and is known so far as long as the effects of the present invention are achieved. It goes without saying that any configuration can be adopted.

本発明の実施の形態にかかる磁気ディスク装置の構成を示すブロック図である。1 is a block diagram showing a configuration of a magnetic disk device according to an embodiment of the present invention. セクタ・バッファとバッファ管理テーブルのデータ構造を示す図である。It is a figure which shows the data structure of a sector buffer and a buffer management table. セクタ・バッファで断片化したセグメントの状態を示す図である。It is a figure which shows the state of the segment fragmented by the sector buffer. 断片化したセグメントのデータを転送する手順を示すフローチャートである。It is a flowchart which shows the procedure which transfers the data of the fragmented segment. 転送情報のデータ構造を示す図である。It is a figure which shows the data structure of transfer information. セクタ・バッファにおいて発生する断片化の課題を説明する図である。It is a figure explaining the subject of the fragmentation which generate | occur | produces in a sector buffer.

符号の説明Explanation of symbols

101…リード・バッファ
103…ライト・バッファ
105…ページ
107…バッファ管理テーブル
101 ... Read buffer 103 ... Write buffer 105 ... Page 107 ... Buffer management table

Claims (13)

不揮発性記録媒体とセクタ・バッファを搭載する補助記憶装置からホスト装置にデータを転送する方法であって、
前記ホスト装置から読み取りにかかる複数のデータ・ブロックのアドレスを指定したリード・コマンドを受け取るステップと、
前記複数のデータ・ブロックのうち先頭に配置された先頭データ・ブロックが前記セクタ・バッファに存在するか否かを検索するステップと、
前記先頭データ・ブロックと少なくとも前記先頭データ・ブロック以外のいずれかのデータ・ブロックとが前記セクタ・バッファの異なるセグメントに存在する場合に、前記複数のデータ・ブロック全体のページ・アドレスを連続させる転送情報を生成するステップと、
前記転送情報に基づいて前記複数のデータ・ブロックを前記セクタ・バッファから読み出して前記ホスト装置に転送するステップと
を有する転送方法。
A method of transferring data from an auxiliary storage device equipped with a nonvolatile recording medium and a sector buffer to a host device,
Receiving a read command specifying addresses of a plurality of data blocks to be read from the host device;
Searching for a head data block arranged at the head of the plurality of data blocks in the sector buffer; and
When the first data block and at least one data block other than the first data block are present in different segments of the sector buffer, the page addresses of the plurality of data blocks are continuously transferred. Generating information;
And a step of reading the plurality of data blocks from the sector buffer based on the transfer information and transferring them to the host device.
前記転送情報は、前記リード・コマンドの処理ごとに生成される請求項1記載の転送方法。   The transfer method according to claim 1, wherein the transfer information is generated for each processing of the read command. 前記転送情報は、前記セクタ・バッファのページ・アドレスとページ数で構成される請求項1記載の転送方法。   2. The transfer method according to claim 1, wherein the transfer information includes a page address of the sector buffer and the number of pages. 前記複数のデータ・ブロックの全体が前記セクタ・バッファの一つのセグメントに存在する場合は、前記アドレス情報を生成しないで前記セクタ・バッファから前記複数のデータ・ブロックを読み出して前記ホスト装置に転送するステップを有する請求項1記載の転送方法。   If the entire plurality of data blocks are present in one segment of the sector buffer, the plurality of data blocks are read from the sector buffer and transferred to the host device without generating the address information. The transfer method according to claim 1, further comprising steps. 前記複数のデータ・ブロックの一部が前記セクタ・バッファに存在しない場合は、前記先頭ページから連続して前記セクタ・バッファに存在するデータ・ブロックを前記ホスト装置に転送し、続いて、前記不揮発性記録媒体から残りのデータ・ブロックを前記ホスト装置に転送する請求項1記載の転送方法。   If some of the plurality of data blocks do not exist in the sector buffer, the data blocks existing in the sector buffer are transferred to the host device continuously from the first page, and then the nonvolatile device The transfer method according to claim 1, wherein the remaining data blocks are transferred from the recording medium to the host device. 前記先頭データ・ブロックが前記セクタ・バッファに存在しない場合は、前記データ・ブロック全体を前記不揮発性記録媒体から読みとるステップを有する請求項1記載の転送方法。   2. The transfer method according to claim 1, further comprising a step of reading the entire data block from the nonvolatile recording medium when the head data block does not exist in the sector buffer. 補助記憶装置であって、
不揮発性記録媒体と、
ホスト装置とのデータ転送を制御するインターフェース回路と、
書き込みにかかるデータ・ブロックと読み取りにかかるデータ・ブロックを記憶するセクタ・バッファと、
前記ホスト装置と前記インターフェース回路との間で行われるデータ転送を制御する制御部とを有し、
前記制御部は、前記ホスト装置から、読み取りにかかる複数のデータ・ブロックのアドレスを指定したリード・コマンドを受け取り、前記複数のデータ・ブロックのうち先頭に配置された先頭データ・ブロックが前記セクタ・バッファに存在するか否かを検索し、前記先頭データ・ブロックと少なくとも前記先頭データ・ブロック以外のいずれかのデータ・ブロックが前記セクタ・バッファの異なるセグメントに存在する場合に、前記複数のデータ・ブロック全体のページ・アドレスを連続させる転送情報を生成し、前記転送情報に基づいて前記複数のデータ・ブロックを前記セクタ・バッファから読み出して前記ホスト装置に転送する補助記憶装置。
An auxiliary storage device,
A non-volatile recording medium;
An interface circuit for controlling data transfer with the host device;
A sector buffer for storing data blocks for writing and data blocks for reading;
A control unit for controlling data transfer performed between the host device and the interface circuit;
The control unit receives a read command specifying addresses of a plurality of data blocks to be read from the host device, and a head data block arranged at the head of the plurality of data blocks is the sector data block. Whether the first data block and at least one data block other than the first data block exist in different segments of the sector buffer. An auxiliary storage device that generates transfer information that makes page addresses of the entire block continuous, reads the plurality of data blocks from the sector buffer based on the transfer information, and transfers them to the host device.
前記セクタ・バッファがリード・バッファとライト・バッファで構成され、前記リード・バッファおよび前記ライト・バッファがリング・バッファである請求項7記載の補助記憶装置。   8. The auxiliary storage device according to claim 7, wherein the sector buffer includes a read buffer and a write buffer, and the read buffer and the write buffer are ring buffers. 前記読み取りにかかるデータ・ブロックが前記ライト・バッファに存在するセグメントと前記リード・バッファに存在するセグメントに含まれる請求項8記載の補助記憶装置。   9. The auxiliary storage device according to claim 8, wherein the data block to be read is included in a segment existing in the write buffer and a segment existing in the read buffer. 前記読み取りにかかるデータ・ブロックが前記リード・バッファに存在する異なるセグメントに含まれる請求項8記載の補助記憶装置。   9. The auxiliary storage device according to claim 8, wherein the data block to be read is included in a different segment existing in the read buffer. 前記制御部は、前記転送情報を前記セクタ・バッファのページ・アドレスを管理するバッファ管理テーブルのアドレス情報に基づいて生成する請求項7記載の補助記憶装置。   8. The auxiliary storage device according to claim 7, wherein the control unit generates the transfer information based on address information of a buffer management table that manages a page address of the sector buffer. 前記補助記憶装置が磁気ディスク装置である請求項7記載の補助記憶装置。   The auxiliary storage device according to claim 7, wherein the auxiliary storage device is a magnetic disk device. 磁気ディスク装置であって、
磁気ディスクと、
ホスト装置とのデータ転送を制御するインターフェース回路と、
書き込にかかるデータ・ブロックと読み取りにかかるデータ・ブロックを記憶するセクタ・バッファと、
前記磁気ディスク装置を制御するプロセッサと、
前記プロセッサに、前記ホスト装置から読み取りにかかる複数のデータ・ブロックのアドレスを指定したリード・コマンドを受け取るステップと、前記複数のデータ・ブロックのうち先頭に配置された先頭データ・ブロックが前記セクタ・バッファに存在するか否かを検索するステップと、前記先頭データ・ブロックと少なくとも前記先頭データ・ブロック以外のいずれかのデータ・ブロックが前記セクタ・バッファの異なるセグメントに存在する場合に、前記複数のデータ・ブロック全体のページ・アドレスを連続させる転送情報を生成するステップと、前記転送情報に基づいて前記複数のデータ・ブロックを前記セクタ・バッファから読み出して前記ホスト装置に転送するステップとを実行させるファームウエアと
を有する磁気ディスク装置。




A magnetic disk drive,
A magnetic disk;
An interface circuit for controlling data transfer with the host device;
A sector buffer for storing data blocks for writing and data blocks for reading;
A processor for controlling the magnetic disk device;
Receiving a read command designating addresses of a plurality of data blocks to be read from the host device from the host device; and a head data block arranged at the head of the plurality of data blocks is the sector data A step of searching whether or not the buffer is present in the buffer, and when the first data block and at least one data block other than the first data block exist in different segments of the sector buffer, Generating transfer information for contiguous page addresses of the entire data block; and reading the plurality of data blocks from the sector buffer based on the transfer information and transferring them to the host device. Magnetic disk having firmware Location.




JP2006163006A 2006-06-13 2006-06-13 Auxiliary storage device and data transferring method Withdrawn JP2007334463A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006163006A JP2007334463A (en) 2006-06-13 2006-06-13 Auxiliary storage device and data transferring method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006163006A JP2007334463A (en) 2006-06-13 2006-06-13 Auxiliary storage device and data transferring method

Publications (1)

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

Family

ID=38933911

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006163006A Withdrawn JP2007334463A (en) 2006-06-13 2006-06-13 Auxiliary storage device and data transferring method

Country Status (1)

Country Link
JP (1) JP2007334463A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100399012C (en) * 2000-05-22 2008-07-02 上村工业株式会社 Automatic analyzing/controlling device for electroless composite plating solution

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100399012C (en) * 2000-05-22 2008-07-02 上村工业株式会社 Automatic analyzing/controlling device for electroless composite plating solution

Similar Documents

Publication Publication Date Title
US7080200B2 (en) System and method for handling writes in HDD using 4K block sizes
US8285923B2 (en) Disk drive and method using native command queuing tags to identify logical block size and implement protection information
JP4634157B2 (en) Storage system
JP4372134B2 (en) Storage system with data comparison function
JP4469906B2 (en) Magnetic disk device and data refresh method in the same
JP4922433B2 (en) Magnetic disk apparatus and data block rewriting method
JP6089844B2 (en) Control device, storage device, and control program
JP2016149051A (en) Storage control device, storage control program, and storage control method
US20130304972A1 (en) Control device, storage device, and storage control method
US20100232048A1 (en) Disk storage device
US20110167203A1 (en) Method and apparatus for cache control in a data storage device
JP4922442B2 (en) Buffer management device, storage device including the same, and buffer management method
US20070189137A1 (en) Rotating disk storage device and recording method
JP2008077458A (en) Storage data processor, storage device, and storage data processing program
JP7131053B2 (en) Storage device, information processing program and information processing system
US20110022793A1 (en) Systems And Methods For Accessing Hard Disk Drives
US9146858B2 (en) Control device, storage device, and storage control method
JP2007334463A (en) Auxiliary storage device and data transferring method
JP4869416B2 (en) Magnetic disk device and data refresh method in the same
US20100064198A1 (en) Stored data processing apparatus, storage apparatus, medium storing stored data processing program, and stored data processing method
US20070174739A1 (en) Disk device, method of writing data in disk device, and computer product
JP2010218485A (en) Storage unit, data write method and data write program
US7941574B2 (en) CKD partial record handling
JP2008117491A (en) Recording device, recording method and program
JP2007179084A (en) Disk device, and method of transferring data written in disk

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