[go: up one dir, main page]

JPH07121308A - Disk device write-back control method - Google Patents

Disk device write-back control method

Info

Publication number
JPH07121308A
JPH07121308A JP5266918A JP26691893A JPH07121308A JP H07121308 A JPH07121308 A JP H07121308A JP 5266918 A JP5266918 A JP 5266918A JP 26691893 A JP26691893 A JP 26691893A JP H07121308 A JPH07121308 A JP H07121308A
Authority
JP
Japan
Prior art keywords
write
data
command
control unit
host
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.)
Granted
Application number
JP5266918A
Other languages
Japanese (ja)
Other versions
JP3122702B2 (en
Inventor
Toshimitsu Kume
俊光 久米
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP05266918A priority Critical patent/JP3122702B2/en
Publication of JPH07121308A publication Critical patent/JPH07121308A/en
Application granted granted Critical
Publication of JP3122702B2 publication Critical patent/JP3122702B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

(57)【要約】 【目的】 本発明は、ディスク装置のライトバック制御
方法に関し、ライトバック処理時に生じていたディスク
媒体の回転待ち時間を無くし、高速、かつ効率の良いラ
イトバック制御ができるようにすることを目的とする。 【構成】 命令を受領した際、シーケンシャルライトか
否かを判断し、シーケンシャルライトであれば、そのデ
ータをデータバッファ7に先取りすると共に、新たな命
令で指定された書き込み処理を、前命令で行っている書
き込み処理に引き続き行うように制御する。また、連続
発行した複数の書き込み命令を受領した際、その命令を
受領した順に先取りした後、これらの命令をリオーダリ
ングし、その命令がシーケンシャルライト命令か否かを
判断し、シーケンシャルライト命令であれば、前記のよ
うにディスク媒体への書き込み処理を、前命令で行って
いる書き込み処理に引き続き行うように制御する。
(57) [Summary] [Object] The present invention relates to a write-back control method for a disk device, which eliminates the rotation waiting time of the disk medium that occurs during write-back processing, and enables high-speed and efficient write-back control. The purpose is to [Structure] When an instruction is received, it is determined whether or not it is a sequential write, and if it is a sequential write, the data is prefetched to the data buffer 7, and the write processing specified by the new instruction is performed by the previous instruction. The writing process is controlled to be continued. In addition, when multiple write commands that are issued consecutively are received, the commands are pre-ordered in the order in which they were received, and then these commands are reordered to determine whether the commands are sequential write commands. For example, as described above, the writing process to the disk medium is controlled to be continued from the writing process performed by the previous command.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、ディスク装置のライト
バック制御方法に関する。近年、磁気ディスク装置等の
アクセス速度向上のために、ディスク回転の高速度化、
トラック容量の増加等、様々な物理手法が用いられてい
るが、その最も基本的なものとして、シーク時間、回転
待ち時間の短縮化が挙げられる。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a write back control method for a disk device. In recent years, in order to increase the access speed of magnetic disk devices, etc., the speed of disk rotation has increased,
Various physical methods such as increasing track capacity are used, but the most basic ones are shortening of seek time and rotation waiting time.

【0002】これら2つの時間短縮方法は、既存のハー
ドウェアで、その制御方法を改良することにより、ある
程度の実現が可能である。ところで、磁気ディスク装置
において、ライトキャッシュ機構の装備が極当然となっ
てきた近年、ライトバック制御方法がライトキャッシュ
機構、ひいては磁気ディスク装置そのものの性能に大き
く影響することは明らかである。
These two time reduction methods can be realized to some extent by improving the control method of existing hardware. By the way, in recent years, when a write cache mechanism has become quite natural in a magnetic disk device, it is clear that the write-back control method has a great influence on the performance of the write cache mechanism, and by extension, the performance of the magnetic disk device itself.

【0003】そのため、ライトバック動作を如何に効率
良く行うかが課題となり、それらをハードウェアで実現
するために、シーク時間、回転待ち時間の短縮によるラ
イトバック動作の高速化がその一手段となっている。
Therefore, how to efficiently perform the write-back operation becomes a problem, and in order to realize them by hardware, speeding up the write-back operation by shortening the seek time and the rotation waiting time is one of the means. ing.

【0004】[0004]

【従来の技術】図22は従来の磁気ディスク装置ブロッ
ク図であり、図22中、1は磁気ディスク装置、2はホ
スト(ホストコンピュータ)、3はインターフェース制
御部、5は入出力制御部、6はデータバッファ制御部、
7はデータバッファ、8はリード/ライト制御部、9は
ディスク媒体を示す。
FIG. 22 is a block diagram of a conventional magnetic disk device. In FIG. 22, 1 is a magnetic disk device, 2 is a host (host computer), 3 is an interface control unit, 5 is an input / output control unit, and 6 Is the data buffer controller,
Reference numeral 7 is a data buffer, 8 is a read / write control unit, and 9 is a disk medium.

【0005】§1:磁気ディスク装置の説明・・・図2
2参照 図示の磁気ディスク装置は、ライトキャッシュ機構を装
備した装置であり、該磁気ディスク装置1には、インタ
ーフェース制御部3、リード/ライト制御部8、ディス
ク媒体9等(説明上必要なもののみ図示してある)が設
けてある。
§1: Description of magnetic disk device--FIG. 2
See FIG. 2. The illustrated magnetic disk device is a device equipped with a write cache mechanism, and the magnetic disk device 1 includes an interface control unit 3, a read / write control unit 8, a disk medium 9, etc. (only those necessary for explanation). (Shown).

【0006】また、前記インターフェース制御部3に
は、入出力制御部5、データバッファ制御部6、データ
バッファ7等が設けてある。前記磁気ディスク装置の運
用時には、この磁気ディスク装置1をホスト2に接続し
て運用する。前記各部の機能等は次の通りである。
Further, the interface control section 3 is provided with an input / output control section 5, a data buffer control section 6, a data buffer 7 and the like. When operating the magnetic disk device, the magnetic disk device 1 is connected to the host 2 for operation. Functions and the like of the above-mentioned respective parts are as follows.

【0007】:入出力制御部5は、ホスト2との間の
各種インターフェース制御を行うものである。 :データバッファ制御部6は、データバッファ7に対
するデータのリード/ライト制御を行うものである。
The input / output control unit 5 controls various interfaces with the host 2. The data buffer control unit 6 controls data read / write with respect to the data buffer 7.

【0008】:データバッファ7は、ホスト2から転
送されたライトデータを一時格納しておくものであり、
データバッファ制御部6によって、データのリード/ラ
イトが行われる。
The data buffer 7 temporarily stores the write data transferred from the host 2.
Data read / write is performed by the data buffer control unit 6.

【0009】:リード/ライト制御部8は、ディスク
媒体9に対し、データのリード/ラトの制御を行うもの
である。 §2:磁気ディスク装置におけるライトバック制御の概
要説明 ライトキャッシュ機構を装備した磁気ディスク装置で
は、次のように制御を行う。
The read / write controller 8 controls data read / rat to the disk medium 9. §2: Outline of write-back control in magnetic disk device In a magnetic disk device equipped with a write cache mechanism, control is performed as follows.

【0010】ホスト2がデータの書き込みコマンド(ラ
イトコマンド)を発行すると、そのコマンドは、入出力
制御部5が受領する。そして、入出力制御部5では、受
領したコマンドを解析し、書き込みコマンドであること
を認識すると、データバッファ制御部6に指示を出し
て、ホスト2から転送されたライトデータを一時、デー
タバッファ7に格納する(データキューイング)。
When the host 2 issues a data write command (write command), the input / output control unit 5 receives the command. Then, when the input / output control unit 5 analyzes the received command and recognizes that it is a write command, it issues an instruction to the data buffer control unit 6 to temporarily write data transferred from the host 2 to the data buffer 7 Stored in (data queuing).

【0011】その後、データバッファ7が一杯になった
り、或いはホスト2からコマンドが発行された場合等に
は、前記データバッファ7のデータを、ディスク媒体9
に書き込む(ライトバック)。
After that, when the data buffer 7 is full or a command is issued from the host 2, the data in the data buffer 7 is transferred to the disk medium 9
Write to (write back).

【0012】この場合、データバッファ7にキューイン
グしたデータのライトバックは、書き込みコマンドで指
定されたブロック単位で行っていた。そのライトバック
制御方法としては、次のような方法がある。
In this case, the write back of the data queued in the data buffer 7 is performed in the block unit designated by the write command. The write back control method is as follows.

【0013】:1コマンド分のデータキューイングが
終了しても、そのデータのライトバックが終了するま
で、次の書き込みコマンドのデータキューイングを行わ
ず、前コマンドのライトバック動作が終了した時点で、
次の書き込みコマンドのデータキューイングを開始する
方法(ライトバック制御方法1)。
Even if the data queuing for one command is completed, the data queuing for the next write command is not performed until the write back for the data is completed, and the write back operation for the previous command is completed. ,
A method of starting data queuing of the next write command (write back control method 1).

【0014】:複数の書き込みコマンドのデータのキ
ューイングが可能な装置であっても、1コマンド分のラ
イトバックが終了したら、一旦、書き込み処理を停止
し、その時点で、まだデータバッファ7内に、別の書き
込みコマンドで転送されたデータが残っていれば、次の
1コマンド分のライトバックを新たに開始する方法(ラ
イトバック制御方法2)。
Even if the device is capable of queuing the data of a plurality of write commands, once the write back for one command is completed, the write processing is temporarily stopped, and at that point, the data buffer 7 still remains. If the data transferred by another write command remains, write back for the next one command is newly started (write back control method 2).

【0015】[0015]

【発明が解決しようとする課題】上記のような従来のも
のにおいては、次のような課題があった。 :1回の書き込み命令でホストから転送されるデータ
量に対して、磁気ディスク装置の装備するデータバッフ
ァの容量が十分でない装置においては、1回の書き込み
命令毎に行われるライトバックの度に、ディスク媒体の
回転待ちが生じていた。
SUMMARY OF THE INVENTION The above-mentioned conventional devices have the following problems. In a device in which the capacity of the data buffer equipped in the magnetic disk device is not sufficient for the amount of data transferred from the host in one write command, each time write back is performed for each write command, Waiting for the disk medium to rotate has occurred.

【0016】このライトバック動作の遅延のため、ホス
トは、磁気ディスク装置に書き込みデータを送出するこ
とができず、ライトバック動作終了まで待たされるとい
った不具合が生じていた。
Due to the delay of the write-back operation, the host cannot send the write data to the magnetic disk device and waits until the end of the write-back operation.

【0017】:シーケンシャルライトの場合であって
も、1コマンド毎に書き込み処理(ライトバック)を中
断してしまうため、回転待ちが発生する。従って、ライ
トバックに要する時間が長くなる。
Even in the case of sequential write, the writing process (write back) is interrupted for each command, so that rotation waiting occurs. Therefore, the time required for write back becomes long.

【0018】:前記ライトバック制御方法1では、ホ
ストが書き込みデータの転送を長時間待たされる。 :前記ライトバック制御方法2では、次々に書き込み
データをキューイングするような場合には、直ぐにデー
タバッファが書き込みデータで満たされてしまい、結果
的にデータキューイングが出来なくなる。従って、ホス
トが書き込みデータの転送を長時間待たされる。
In the write back control method 1, the host waits for the transfer of write data for a long time. In the write back control method 2, when the write data is queued one after another, the data buffer is immediately filled with the write data, and as a result, the data queuing cannot be performed. Therefore, the host has to wait for the transfer of the write data for a long time.

【0019】本発明は、このような従来の課題を解決
し、ホストがシーケンシャルライトを行う場合のライト
バック動作時に生じていたディスク媒体の回転待ち時間
を無くし、高速、かつ効率の良いライトバック制御がで
きるようにすることを目的とする。
The present invention solves such a conventional problem and eliminates the rotation waiting time of the disk medium which occurs during the write-back operation when the host performs the sequential write, and the write-back control is fast and efficient. The purpose is to be able to.

【0020】[0020]

【課題を解決するための手段】図1は本発明の原理説明
図であり、図1中、図22と同じものは、同一符号で示
してある。また、12はコマンドキュー、14はリオー
ダリング実行部、20、21はホスト(ホストコンピュ
ータ)を示す。本発明は上記の課題を解決するため、次
のように構成した。
FIG. 1 is a diagram for explaining the principle of the present invention. In FIG. 1, the same parts as those in FIG. 22 are designated by the same reference numerals. Further, 12 is a command queue, 14 is a reordering execution unit, and 20 and 21 are hosts (host computers). The present invention has the following configuration to solve the above problems.

【0021】:ホスト2から転送されたデータを一時
データバッファ7に格納し、その後、前記データバッフ
ァのデータをディスク媒体9に書き込む制御を行うライ
トキャッシュ機構を備えたディスク装置において、ホス
トの発行した命令を受領した際、シーケンシャルライト
(ディスク媒体上の連続したデータブロック群を、複数
回の命令にわたって順番に書き込む)命令であるか否か
を判断し、シーケンシャルライト命令であると判断した
場合、ディスク媒体9に書き込むべきデータを、データ
バッファ7に先取り(データキューイング)すると共
に、新たな命令で指定されたディスク媒体への書き込み
処理(ライトバック)を、前命令で行っている書き込み
処理に引き続き行うように制御するディスク装置のライ
トバック制御方法。
In a disk device equipped with a write cache mechanism for storing the data transferred from the host 2 in the temporary data buffer 7 and then writing the data in the data buffer to the disk medium 9, the host issues it. When an instruction is received, it is determined whether the instruction is a sequential write (a continuous data block group on the disk medium is sequentially written over a plurality of instructions), and if the instruction is a sequential write instruction, the disc is The data to be written to the medium 9 is prefetched (data queuing) to the data buffer 7, and the write processing (write back) to the disk medium specified by the new instruction is continued from the write processing performed by the previous instruction. A write-back control method for a disk device that controls to perform.

【0022】:ホスト2から転送されたデータを一時
データバッファ7に格納し、その後、前記データバッフ
ァのデータをディスク媒体9に書き込む制御を行うライ
トキャッシュ機構を備えたディスク装置において、ホス
ト2が連続発行した複数の書き込み命令を受領した際、
その命令を受領した順に先取り(コマンドキューイン
グ)した後、これらの命令を、最も短時間に書き込み処
理が終了する順番に最適化(リオーダリング)し、前記
最適化した命令を順次取り出して、シーケンシャルライ
ト(ディスク媒体上の連続したデータブロック群を、複
数回の命令にわたって順番に書き込む)命令か否かを判
断し、シーケンシャルライト命令であれば、ディスク媒
体9に書き込むべきデータを、データバッファ7に先取
り(データキューイング)すると共に、新たな命令で指
定されたディスク媒体への書き込み処理(ライトバッ
ク)を、前命令で行っている書き込み処理に引き続き行
うように制御するディスク装置のライトバック制御方
法。
In the disk device having a write cache mechanism for storing the data transferred from the host 2 in the temporary data buffer 7 and then writing the data in the data buffer to the disk medium 9, the host 2 continuously operates. When receiving multiple write commands issued,
After prefetching (command queuing) the commands in the order in which they were received, these commands are optimized (reordering) in the order in which the writing process is completed in the shortest time, and the optimized commands are sequentially fetched and sequentially. It is determined whether or not it is a write (a continuous data block group on the disk medium is sequentially written over a plurality of instructions) command, and if it is a sequential write command, the data to be written to the disk medium 9 is stored in the data buffer 7. A write-back control method for a disk device that performs pre-fetching (data queuing) and controls write processing (write-back) to a disk medium specified by a new instruction so as to follow the write processing performed by the previous instruction .

【0023】:ホストから転送されたデータを一時デ
ータバッファ7に格納し、その後、前記データバッファ
のデータをディスク媒体9に書き込む制御を行うライト
キャッシュ機構を備えたディスク装置において、複数の
ホスト20、21の発行した命令を受領した際、シーケ
ンシャルライト(ディスク媒体上の連続したデータブロ
ック群を、複数回の命令にわたって順番に書き込む)命
令であるか否かを判断し、シーケンシャルライト命令で
あると判断した場合、ディスク媒体9に書き込むべきデ
ータを、データバッファ7に先取り(データキューイン
グ)すると共に、新たな命令で指定されたディスク媒体
への書き込み処理(ライトバック)を、前命令で行って
いる書き込み処理に引き続き行うように制御するディス
ク装置のライトバック制御方法。
A plurality of hosts 20 in a disk device having a write cache mechanism for storing data transferred from the host in the temporary data buffer 7 and then writing the data in the data buffer to the disk medium 9. When the command issued by 21 is received, it is judged whether it is a sequential write command (a continuous data block group on the disk medium is sequentially written over a plurality of commands), and it is judged as a sequential write command. In this case, the data to be written to the disk medium 9 is prefetched (data queuing) in the data buffer 7, and the writing process (write back) to the disk medium designated by the new command is performed by the previous command. The write-back of the disk unit that controls the writing process to continue. Control method.

【0024】:ホストから転送されたデータを一時デ
ータバッファ7に格納し、その後、前記データバッファ
のデータをディスク媒体9に書き込む制御を行うライト
キャッシュ機構を備えたディスク装置において、複数の
ホスト20、21が連続発行した複数の書き込み命令を
受領した際、その命令を受領した順に先取り(コマンド
キューイング)した後、これらの命令を、最も短時間に
書き込み処理が終了する順番に最適化(リオーダリン
グ)し、前記最適化した命令を順次取り出して、シーケ
ンシャルライト(ディスク媒体上の連続したデータブロ
ック群を、複数回の命令にわたって順番に書き込む)命
令か否かを判断し、シーケンシャルライト命令であれ
ば、ディスク媒体9に書き込むべきデータを、データバ
ッファ7に先取り(データキューイング)すると共に、
新たな命令で指定されたディスク媒体への書き込み処理
(ライトバック)を、前命令で行っている書き込み処理
に引き続き行うように制御するディスク装置のライトバ
ック制御方法。
A plurality of hosts 20 in a disk device having a write cache mechanism for storing the data transferred from the host in the temporary data buffer 7 and then writing the data in the data buffer to the disk medium 9. When 21 receives a plurality of write commands issued continuously, after prefetching (command queuing) in the order in which the commands are received, these commands are optimized in the order in which the write process is completed in the shortest time (reordering). ), The optimized instructions are sequentially fetched, and it is judged whether or not the sequential write (a continuous data block group on the disk medium is sequentially written over a plurality of instructions) is instructed. , The data to be written to the disk medium 9 is prefetched to the data buffer 7 (data Together with queuing) to,
A write-back control method for a disk device, which controls a write process (write-back) to a disk medium designated by a new command so as to continue the write process performed by a previous command.

【0025】[0025]

【作用】上記構成に基づく本発明の作用を、図1に基づ
いて説明する。 :ライトキャッシュ機構を装備した磁気ディスク装置
において、ホスト(1機または複数機)がシーケンシャ
ルライトを行う場合、入出力制御部5がこれを検出し、
データバッファ7に書き込みデータ(ライトデータ)を
キューイングすると共に、リード/ライト制御部8に対
して、現行の命令の書き込み(ライトバック)処理終了
に引き続き、次の命令の書き込み処理を行うように指示
する。
The operation of the present invention based on the above configuration will be described with reference to FIG. : In the magnetic disk device equipped with the write cache mechanism, when the host (one or more devices) performs sequential write, the input / output control unit 5 detects this,
The write data (write data) is queued in the data buffer 7, and the read / write control unit 8 performs the write processing of the next instruction subsequent to the end of the write (write back) processing of the current instruction. Give instructions.

【0026】:また、コマンドキュー12を装備した
磁気ディスク装置の場合、ホスト(1機または複数機)
が連続発行した複数の命令を受領すると、入出力制御部
5が、これらの命令をコマンドキュー12にスタック
(コマンドキューイング)し、その後、リオーダリング
実行部14がリオーダリングを行う。
In the case of a magnetic disk device equipped with the command queue 12, the host (one or more machines)
When the I / O controller 5 receives a plurality of commands issued continuously, the I / O controller 5 stacks these commands in the command queue 12 (command queuing), and then the reordering execution unit 14 performs reordering.

【0027】そして、このリオーダリングした命令がシ
ーケンシャルライトとなった場合は、前記のシーケン
シャルライトの場合と同様にして、ライトバック処理を
連続して行う。
When the reordered instruction is a sequential write, the write back process is continuously performed in the same manner as the case of the sequential write.

【0028】:このようにして、ホストがシーケンシ
ャルライトを行う場合、磁気ディスク装置1がこれを検
出し、複数命令の書き込み処理を連続して行うことによ
り、ライトバック処理時のディスク媒体の回転待ち時間
を無くすことができる。
In this way, when the host performs sequential write, the magnetic disk device 1 detects this and continuously executes the write processing of a plurality of instructions, thereby waiting for the rotation of the disk medium during the write back processing. You can save time.

【0029】その結果、ライトバック処理の実時間を短
縮できると同時に、データバッファ7の出力を活性化す
ることで、より多くのデータをキューイングすることが
可能となる。
As a result, the real time of the write back process can be shortened, and at the same time, by activating the output of the data buffer 7, more data can be queued.

【0030】[0030]

【実施例】以下、本発明の実施例を図面に基づいて説明
する。図2〜図21は、本発明の実施例を示した図であ
り、図2〜図21中、図1、図22と同じものは、同一
符号で示してある。また、11はコマンド情報退避用メ
モリを示す。
Embodiments of the present invention will be described below with reference to the drawings. 2 to 21 are views showing an embodiment of the present invention. In FIGS. 2 to 21, the same parts as those in FIGS. 1 and 22 are designated by the same reference numerals. Reference numeral 11 denotes a command information saving memory.

【0031】(実施例1の説明) §1:実施例1の概要説明 実施例1では、ライトキャッシュ機構を有する磁気ディ
スク装置において、ホストがディスク媒体上の連続した
データブロック群を複数回に渡って順番に書き込みを行
う場合(以下、「シーケンシャルライト」という)、磁
気ディスク装置がシーケンシャルライトであることを検
出し、ディスク媒体に書き込むべきデータ(ライトデー
タ)をデータバッファに先取りする(以下「データキュ
ーイング」という)。
(Description of First Embodiment) §1: Outline Description of First Embodiment In the first embodiment, in a magnetic disk device having a write cache mechanism, a host extends a continuous data block group on a disk medium a plurality of times. When writing sequentially in sequence (hereinafter referred to as “sequential write”), it is detected that the magnetic disk device is sequential write, and the data (write data) to be written to the disk medium is prefetched in the data buffer (hereinafter “data”). Queuing ").

【0032】そして、新たなコマンドで指定された書き
込み処理を、前コマンドで行っている書き込み処理に引
き続き行うことで、ディスク媒体の回転待ち時間を無く
し、アクセス速度の向上を達成する。
By performing the writing process designated by the new command subsequently to the writing process performed by the previous command, the rotation waiting time of the disk medium is eliminated and the access speed is improved.

【0033】§2:磁気ディスク装置の説明・・・図2
参照 図2は実施例1の磁気ディスク装置ブロック図である。
実施例1では、ホスト(ホストコンピュータ)2と磁気
ディスク装置1のインターフェースとして、SCSI
(Small Computer System Interface )を採用し、磁気
ディスク装置は、コマンドキューイング、及びライトキ
ャッシュ機構を装備した装置とする。
§2: Description of magnetic disk device--FIG. 2
Reference FIG. 2 is a block diagram of the magnetic disk device of the first embodiment.
In the first embodiment, SCSI is used as an interface between the host (host computer) 2 and the magnetic disk device 1.
(Small Computer System Interface) is adopted, and the magnetic disk device is a device equipped with command queuing and write cache mechanism.

【0034】図示のように、磁気ディスク装置1には、
インターフェース制御部3、リード/ライト制御部8、
ディスク媒体9等(説明上必要なもののみ図示してあ
る)が設けてある。
As shown in the figure, the magnetic disk device 1 includes
Interface controller 3, read / write controller 8,
A disk medium 9 and the like (only those necessary for explanation are shown) are provided.

【0035】また、前記インターフェース制御部3に
は、入出力制御部5、データバッファ制御部6、データ
バッファ7、コマンド情報退避用メモリ11、コマンド
キュー12等が設けてある。
Further, the interface control section 3 is provided with an input / output control section 5, a data buffer control section 6, a data buffer 7, a command information saving memory 11, a command queue 12 and the like.

【0036】前記磁気ディスク装置の運用時には、この
磁気ディスク装置1(1機)をホスト2(1機)に接続
して運用する。前記各部の機能等は次の通りである。 :入出力制御部5は、ホスト2との間の各種インター
フェース制御を行うものである。この入出力制御部5が
ホスト2からの書き込みコマンドを受領した場合には、
そのコマンドを解析し、解析結果をコマンド情報退避用
メモリ11に格納しておく。
When operating the magnetic disk device, the magnetic disk device 1 (1 machine) is connected to the host 2 (1 machine) for operation. Functions and the like of the above-mentioned respective parts are as follows. The input / output controller 5 controls various interfaces with the host 2. When the input / output control unit 5 receives a write command from the host 2,
The command is analyzed and the analysis result is stored in the command information saving memory 11.

【0037】また、書き込みコマンド実行中に、新たに
別の書き込みコマンドを受領した場合には、そのコマン
ドをコマンドキュー12に格納し、実行中の書き込みコ
マンドが終了したら、再びコマンドキュー12から次に
処理すべきコマンドを取り出す。
When another write command is newly received during execution of the write command, the command is stored in the command queue 12, and when the write command being executed is completed, the command queue 12 is restarted. Get the command to be processed.

【0038】ホスト2から受領した書き込みデータは、
データバッファ制御部6によりデータバッファ7に格納
する。リード/ライト制御部8に対しては、ライトバッ
ク動作の起動を指示する。
The write data received from the host 2 is
The data buffer controller 6 stores the data in the data buffer 7. The read / write control unit 8 is instructed to start the write back operation.

【0039】:データバッファ制御部6は、データバ
ッファ7に対するデータのリード/ライト制御を行うも
のである。このデータバッファ制御部6は、データバッ
ファ7への書き込み用と、読み込み用の2つのポインタ
を持ち、このポインタを使用してデータバッファ7でア
ンダーラン、及びオーバランが起こらないように、入出
力制御部5、及びリード/ライト制御部8とデータバッ
ファ7間のデータ転送の調整を行う。
The data buffer control section 6 controls data read / write with respect to the data buffer 7. The data buffer control unit 6 has two pointers for writing and reading to the data buffer 7, and using these pointers, input / output control is performed so that underrun and overrun do not occur in the data buffer 7. The data transfer between the unit 5 and the read / write control unit 8 and the data buffer 7 is adjusted.

【0040】:データバッファ7は、リードポートと
ライトポートの2つのポートを持ち、キューイングされ
た書き込みデータを退避しておくためのバッファであ
り、データバッファ制御部6によって、データのライト
/リードが行われる。
The data buffer 7 has two ports, a read port and a write port, and is a buffer for saving the queued write data. The data buffer control unit 6 writes / reads the data. Is done.

【0041】実施例1では、データバッファ7は32[K
Byte] の容量を持つRAMで構成されたリングバッファ
構造のデータバッファとする。 :コマンド情報退避用メモリ11は、入出力制御部5
が解析した書き込みコマンド(ホストの発行したライト
コマンド)の解析結果を格納する(コマンド情報を一時
的に退避しておく)メモリである。
In the first embodiment, the data buffer 7 is 32 [K
The data buffer has a ring buffer structure composed of RAM having a capacity of [Byte]. : The command information saving memory 11 includes the input / output control unit 5
Is a memory for storing the analysis result of the write command (write command issued by the host) analyzed by (host information is temporarily saved).

【0042】:コマンドキュー12は、書き込みコマ
ンド実行中に、新たに受領したコマンドを退避しておく
メモリである。実施例1の場合、コマンドキュー12は
4[KByte] の容量を持つRAMで構成されたリングバッ
ファ構造のコマンドキューとする。
The command queue 12 is a memory for saving a newly received command during execution of a write command. In the case of the first embodiment, the command queue 12 is a command queue having a ring buffer structure composed of RAM having a capacity of 4 [KByte].

【0043】:リード/ライト制御部8は、入出力制
御部5の指示を受けて、データバッファ7内のデータの
ライトバックを行うものである。リード/ライト制御部
8は、ディスク媒体をアクセスするためのハードウェア
と、それを制御するためのファームウェアで構成されて
いる。
The read / write controller 8 receives an instruction from the input / output controller 5 and writes back the data in the data buffer 7. The read / write controller 8 is composed of hardware for accessing the disk medium and firmware for controlling the hardware.

【0044】:ディスク媒体9は、データの記録媒体
であり、実施例1では、データバイト長が4096バイ
トにフォーマットされたLBA(Logical Block Addres
s)(論理ブロックアドレス)の「000000」hから「「00F00
0」hを持つ媒体とする。
The disk medium 9 is a data recording medium. In the first embodiment, the data byte length is LBA (Logical Block Addres) formatted to 4096 bytes.
s) (logical block address) from “000000” h to ““ 00F00
A medium having 0 "h.

【0045】§3:磁気ディスク装置の動作概要 前記磁気ディスク装置の動作概要は次の通りである。ホ
スト2がコマンドを発行すると、このコマンドは、入出
力制御部5が受領して解析する。そして、入出力制御部
5は、前記コマンドがライトコマンドであることを認識
すると、データバッファ制御部6にデータの格納を指示
する。この指示によりデータバッファ制御部6は、ホス
ト2から転送されたデータをデータバッファ7に格納
(データキューイング)する。
§3: Outline of operation of magnetic disk device The outline of operation of the magnetic disk device is as follows. When the host 2 issues a command, the input / output control unit 5 receives and analyzes this command. When the input / output control unit 5 recognizes that the command is a write command, it instructs the data buffer control unit 6 to store data. In response to this instruction, the data buffer control unit 6 stores the data transferred from the host 2 in the data buffer 7 (data queuing).

【0046】この時同時に、入出力制御部5はリード/
ライト制御部8に対し、LBA(=「000000」h)と転送
ブロック数を通知し、書き込み処理開始の指示をする。
リード/ライト制御部8は、前記指示を受けて、目的の
データブロックを検索し、そのブロックを検出した時点
で、データバッファ7に格納されているデータの書き込
み(ライトバック)を開始する。
At this time, at the same time, the input / output control section 5 reads / reads.
The write control unit 8 is notified of the LBA (= “000000” h) and the number of transfer blocks, and is instructed to start the writing process.
In response to the instruction, the read / write control unit 8 searches for a target data block, and when the block is detected, starts writing (write-back) the data stored in the data buffer 7.

【0047】一方、入出力制御部5は、ホスト2から、
書き込みデータを全て受領した時点で、ホスト2に対
し、「GOOD」ステータスを報告(ライトコマンドの
データを正常に受領した旨の報告)して次のコマンド待
ち状態となる。
On the other hand, the input / output control unit 5 receives from the host 2
When all the write data are received, the host 2 is informed of the “GOOD” status (report that the write command data is normally received), and the next command waiting state is entered.

【0048】また、リード/ライト制御部8は、入出力
制御部5で指示された書き込み処理が終了した時点で停
止する。 §4:ライトコマンドの説明・・・図3参照 図3は実施例1の説明図(ライトコマンドの例)であ
る。以下、図3に基づいて、ホストの発行するライトコ
マンドの例を説明する。
Further, the read / write control unit 8 stops when the writing process instructed by the input / output control unit 5 is completed. §4: Description of write command--see FIG. 3 FIG. 3 is an explanatory diagram of the first embodiment (an example of a write command). An example of the write command issued by the host will be described below with reference to FIG.

【0049】図3では、実施例1で説明するライトコマ
ンドの例を(a)〜(h)の符号で示してある。この
(a)〜(h)の符号で示した各ライトコマンドについ
て、それぞれ、CDB(Command Description Block :
コマンド記述ブロック)[hex]、書き込み先頭LBA
(論理ブロックアドレス)、転送ブロック数、転送バイ
ト数が示してある。
In FIG. 3, examples of the write command described in the first embodiment are indicated by the reference signs (a) to (h). For each write command indicated by the symbols (a) to (h), a CDB (Command Description Block:
Command description block) [hex], write start LBA
(Logical block address), the number of transfer blocks, and the number of transfer bytes are shown.

【0050】例えば、符号(a)で示したライトコマン
ドは、CDBが「0A 00 00 00 01 00」 、書き込み先頭ア
ドレスが「000000」h、転送ブロック数が「01」h、転送バ
イト数が4[KByte] である。
For example, in the write command shown by the code (a), the CDB is "0A 00 00 00 01 00", the write start address is "000000" h, the transfer block number is "01" h, and the transfer byte number is 4 It is [KByte].

【0051】符号(b)で示したライトコマンドは、C
DBが「0A 00 80 00 05 00」 、書き込み先頭アドレスが
「008000」h、転送ブロック数が「05」h、転送バイト数が
20[KByte] である。
The write command indicated by the symbol (b) is C
The DB is “0A 00 80 00 05 00”, the write start address is “008000” h, the transfer block number is “05” h, and the transfer byte number is 20 [KByte].

【0052】符号(c)で示したライトコマンドは、C
DBが「0A 00 80 05 05 00」 、書き込み先頭アドレスが
「008005」h、転送ブロック数が「05」h、転送バイト数が
20[KByte] である。
The write command indicated by the code (c) is C
The DB is “0A 00 80 05 05 00”, the write start address is “008005” h, the transfer block number is “05” h, and the transfer byte number is 20 [KByte].

【0053】符号(d)で示したライトコマンドは、C
DBが「0A 00 80 0A 05 00」 、書き込み先頭アドレスが
「00800A 」 h、転送ブロック数が「05」h、転送バイト数
が20[KByte] である。以下、他のコマンドについても
図示の通りである。
The write command indicated by the symbol (d) is C
The DB is “0A 00 80 0A 05 00”, the write start address is “00800A” h, the transfer block number is “05” h, and the transfer byte number is 20 [KByte]. The other commands are also shown below.

【0054】§5:フローチャートによる実施例1の処
理説明・・・図4、図5参照 図4は実施例1の処理フローチャート1、図5は実施例
1の処理フローチャート2である。以下、図4、図5に
基づいて、実施例1の処理を説明する。なお、S1〜S
17は処理ステップを示す。
§5: Explanation of processing of the first embodiment by a flow chart--See FIGS. 4 and 5. FIG. 4 is a processing flowchart 1 of the first embodiment, and FIG. 5 is a processing flowchart 2 of the first embodiment. The process of the first embodiment will be described below with reference to FIGS. 4 and 5. Note that S1 to S
Reference numeral 17 indicates a processing step.

【0055】この処理は、ホスト2が、図3に示したラ
イトコマンド(b)、(c)、(d)を順次発行する場
合の処理例である。最初に、ホスト2がライトコマンド
(b)を発行したとする。この時、入出力制御部5は、
前記コマンドを受領し(S1)、その内容を解析する
(S2)。解析の結果、LBA「008000」hから「05」hブ
ロック分のライトコマンドであることを確認すると(S
3)、その情報(CDB解析結果)をコマンド情報退避
用メモリ11に格納して退避する(S4)。なお、ライ
トコマンド以外のコマンドを受領した場合には、他の処
理を行う。
This processing is an example of processing when the host 2 sequentially issues the write commands (b), (c) and (d) shown in FIG. First, it is assumed that the host 2 issues the write command (b). At this time, the input / output control unit 5
The command is received (S1) and its contents are analyzed (S2). As a result of the analysis, if it is confirmed that the write command is for blocks of LBA "008000" h to "05" h (S
3) The information (CDB analysis result) is stored in the command information saving memory 11 and saved (S4). When a command other than the write command is received, other processing is performed.

【0056】この時、入出力制御部5は、前記解析結果
の情報をリード/ライト制御部8に通知し、書き込みの
動作開始を指示すると同時に、ホスト2からの書き込み
データの受領を開始(書き込みデータの転送を開始)す
る。
At this time, the input / output control unit 5 notifies the read / write control unit 8 of the information of the analysis result, instructs the start of the write operation, and at the same time starts receiving the write data from the host 2 (write operation). Start data transfer).

【0057】このようにして、入出力制御部5がデータ
転送を実行している間、ディスク媒体9上のLBA「008
000」hのブロックの存在するトラックにシークを行い、
目的のデータブロックを検索する(S5)。
In this way, while the I / O controller 5 is executing data transfer, the LBA "008" on the disk medium 9 is
Seek to a track with 000 ”h blocks,
A target data block is searched (S5).

【0058】そして、リード/ライト制御部8では、目
的のデータブロックを検出した時点で、データバッファ
7にキューイングされているデータをディスク媒体9に
書き込み始める。すなわち、リード/ライト制御部8
は、目的のデータブロックを検出した時点でディスク媒
体9へのライトバックを開始する。
Then, the read / write controller 8 starts writing the data queued in the data buffer 7 to the disk medium 9 when the target data block is detected. That is, the read / write controller 8
Starts writing back to the disk medium 9 when the target data block is detected.

【0059】一方、入出力制御部5では、データバッフ
ァ制御部6に指示を出して、前記書き込みデータをデー
タバッファ7に格納する処理(データキューイング)を
開始する(S6)。すなわち、データバッファ7へのデ
ータキューイングと、データバッファ7からディスク媒
体9へのライトバックを、独立して別々に行う。
On the other hand, the input / output control unit 5 gives an instruction to the data buffer control unit 6 to start the process of storing the write data in the data buffer 7 (data queuing) (S6). That is, data queuing to the data buffer 7 and write back from the data buffer 7 to the disk medium 9 are independently and separately performed.

【0060】その後、入出力制御部5は、前記コマンド
(b)のデータキューイングが正常に終了したことを確
認すると(S7)、該入出力制御部5はホスト2に対
し、前記処理が終了した旨の「GOOD」ステータスを
報告する(S8)。
After that, when the input / output control unit 5 confirms that the data queuing of the command (b) is normally completed (S7), the input / output control unit 5 instructs the host 2 to complete the processing. The “GOOD” status to the effect is reported (S8).

【0061】この報告により、ホスト2に、次のコマン
ドが実行可能であることを知らせる(通常、この時点で
は、まだリード/ライト制御部8は、シーク、目的デー
タブロックの検出、或いは書き込み動作実行中であ
る)。
By this report, the host 2 is informed that the next command can be executed (usually, at this point, the read / write controller 8 still seeks, detects the target data block, or executes the write operation). Inside).

【0062】続いて、ホスト2がライトコマンド(c)
を発行したとする。この時入出力制御部5は、前記コマ
ンドを受領し(S9)、その内容を解析する(S1
0)。その結果、LBA「008005」hから「05」h ブロック
分のライトコマンドであることを確認した場合には(S
11)、その情報(CDB解析結果)をコマンド情報退
避用メモリ11に格納して退避する(S12)。なお、
ライトコマンド以外のコマンドを受領した場合には、ラ
イトコマンド(b)のライトバック処理が終了したら、
他の処理を行う。
Then, the host 2 sends a write command (c).
Is issued. At this time, the input / output control unit 5 receives the command (S9) and analyzes the content thereof (S1).
0). As a result, if it is confirmed that the write command is for LBA “008005” h to “05” h blocks (S
11), the information (CDB analysis result) is stored in the command information saving memory 11 and saved (S12). In addition,
When a command other than the write command is received, when the write-back processing of the write command (b) is completed,
Perform other processing.

【0063】また、入出力制御部5では、前回実行した
ライトコマンド(b)の書き込み最終LBAと、今回受
領したライトコマンド(c)の書き込みLBAとを比較
し、それらのLBAが連続であるか否か、すなわち、シ
ーケンシャルライトであるか否かを判断する(S1
3)。
The input / output control unit 5 compares the last write LBA of the write command (b) executed last time with the last write LBA of the write command (c) received this time, and confirms whether these LBAs are continuous. It is determined whether or not it is a sequential write (S1).
3).

【0064】その結果、LBAが連続でなければ(シー
ケンシャルライトでない場合)、ライトコマンド(b)
のライトバック処理が終了したら、他の処理を行う。し
かし、この例では、ライトコマンド(b)の最終LBA
が「008004」hであり、ライトコマンド(c)の書き込み
先頭LBAが「008005」であるため、入出力制御部5は、
シーケンシャルライトであると判断する。
As a result, if the LBAs are not continuous (not sequential write), the write command (b)
When the write-back process is completed, another process is performed. However, in this example, the last LBA of the write command (b)
Is “008004” h and the write start LBA of the write command (c) is “008005”, the input / output control unit 5
Judge as a sequential write.

【0065】前記ライトコマンドがシーケンシャルライ
トであると判断した場合(S13)、入出力制御部5
は、ライトコマンド(c)の書き込みデータを、データ
バッファ7の空き領域にキューイングする(S14)。
When it is determined that the write command is sequential write (S13), the input / output control unit 5
Queues the write data of the write command (c) in the empty area of the data buffer 7 (S14).

【0066】ここで、データキューイング中に、データ
バッファ7に空き領域が無くなった場合には、ディスク
媒体9への書き込みが終了したデータの上に上書きす
る。この制御は入出力制御部5の指示により、データバ
ッファ制御部6が行う。
Here, when the data buffer 7 runs out of free space during data queuing, the data which has been written to the disk medium 9 is overwritten. This control is performed by the data buffer control unit 6 according to an instruction from the input / output control unit 5.

【0067】また、入出力制御部5は、この時点でリー
ド/ライト制御部8が動作中であれば、現在実行してい
るライトコマンド(b)の書き込み処理に引き続き、今
回受領したライトコマンド(c)のライトバックを行う
ように、リード/ライト制御部8に指示する(S1
5)。
Further, if the read / write control unit 8 is in operation at this time, the input / output control unit 5 continues the write process of the write command (b) currently being executed, and subsequently receives the write command ( The read / write control unit 8 is instructed to perform the write back of (c) (S1).
5).

【0068】リード/ライト制御部8は、入出力制御部
5の指示を受けてライトコマンド(b)の書き込み処理
(ライトバック処理)が終了しても、停止することな
く、引き続きライトコマンド(c)の書き込み処理(ラ
イトバック処理)を行うように制御する。
Even if the read / write control unit 8 receives the instruction of the input / output control unit 5 and the write process (write back process) of the write command (b) ends, the read / write control unit 8 does not stop and continues to write command (c). ) The writing process (write back process) is performed.

【0069】一方、ライトコマンド(c)のデータキュ
ーイングが終了すると(S16)、入出力制御部5は、
ホスト2に対し、「GOOD」ステータスを報告する
(S17)。
On the other hand, when the data queuing of the write command (c) is completed (S16), the input / output control unit 5
The "GOOD" status is reported to the host 2 (S17).

【0070】前記「GOOD」ステータスを受領したホ
スト2は、続いて、ライトコマンド(d)を発行する。
この例では、ライトコマンド(d)もシーケンシャルラ
イトの対象であるため、前記処理S9〜S17と同じよ
うにして処理を行う。以下、更に別のコマンドを発行し
た場合にも、同様に処理を行う。
The host 2, which has received the "GOOD" status, subsequently issues a write command (d).
In this example, since the write command (d) is also the target of sequential writing, the processing is performed in the same manner as the processing S9 to S17. After that, even when another command is issued, the same processing is performed.

【0071】なお、ホスト2が前記コマンドを発行後、
磁気ディスク装置にアクセスしない場合には、該磁気デ
ィスク装置においては、入出力制御部5が、本コマンド
に対する「GOOD」ステータスをホスト2に報告後、
次のコマンド待ちとなり、リード/ライト制御部8は、
全てのライトバック処理が終了した時点で処理を停止す
る。
After the host 2 issues the above command,
When the magnetic disk device is not accessed, in the magnetic disk device, the I / O controller 5 reports the “GOOD” status for this command to the host 2,
Waiting for the next command, the read / write controller 8
The process is stopped when all the write-back processes are completed.

【0072】§6:タイムチャートによる実施例1の処
理説明・・・図6参照 図6は実施例1のタイムチャートである。以下、図6の
タイムチャートに基づいて、前記実施例1の処理を説明
する。なお、処理内容は前記の説明と同じである。
§6: Description of processing of the first embodiment based on a time chart--see FIG. 6 FIG. 6 is a time chart of the first embodiment. Hereinafter, the processing of the first embodiment will be described based on the time chart of FIG. The processing content is the same as that described above.

【0073】図6において、(A)はホスト2、(B)
は入出力制御部5、(C)はリード/ライト制御部8の
各処理時のタイムチャートを示す。また、[1]〜[1
7]は各処理のタイミングであり、その内容は次の通り
である。
In FIG. 6, (A) is host 2, (B)
Shows a time chart of each processing of the input / output control unit 5 and (C) of the read / write control unit 8. Also, [1] to [1
7] is the timing of each process, and the contents are as follows.

【0074】[1]ではホスト2がライトコマンド
(b)を発行する。[2]ではそのコマンドを入出力制
御部5が受領する。[3]では、入出力制御部5がリー
ド/ライト制御部8にライトコマンド(b)のライトバ
ックを指示する。[4]ではディスク媒体上の目的のブ
ロックへシークを行う。[5]では入出力制御部5がラ
イトコマンド(b)のデータキューイングを開始する。
In [1], the host 2 issues the write command (b). In [2], the input / output control unit 5 receives the command. In [3], the input / output control unit 5 instructs the read / write control unit 8 to write back the write command (b). In [4], seek is performed to the target block on the disk medium. In [5], the input / output control unit 5 starts data queuing of the write command (b).

【0075】[6]ではホスト2から入出力制御部5へ
ライトコマンド(b)のデータ転送を行う。[7]では
入出力制御部5がホスト2へライトコマンド(b)の
「GOOD」ステータスを報告する。[8]ではホスト
2が前記「GOOD」ステータスを受領する。[9]で
はホスト2がライトコマンド(c)を発行する。[1
0]ではそのコマンドを入出力制御部5が受領する。
At [6], data transfer of the write command (b) is performed from the host 2 to the input / output control unit 5. In [7], the input / output control unit 5 reports the “GOOD” status of the write command (b) to the host 2. In [8], the host 2 receives the "GOOD" status. In [9], the host 2 issues the write command (c). [1
0], the input / output control unit 5 receives the command.

【0076】[11]では入出力制御部5が、リード/
ライト制御部8に対し、ライトコマンド(b)に引き続
き、ライトコマンド(c)のライトバックを行うことを
指示する。[12]ではリード/ライト制御部8がライ
トコマンド(b)のデータの書き込み(ディスク媒体へ
のライトバック)を行う。
In [11], the input / output control unit 5 causes the read / write
The write controller 8 is instructed to write back the write command (c) subsequent to the write command (b). In [12], the read / write control unit 8 writes the data of the write command (b) (write back to the disk medium).

【0077】[13]では入出力制御部5がライトコマ
ンド(c)のデータキューイングを開始する。[14]
ではホスト2から入出力制御部5へライトコマンド
(c)のデータ転送を開始する。[15]ではリード/
ライト制御部8がライトコマンド(c)のデータの書き
込み(ディスク媒体へのライトバック)を行う。
At [13], the input / output control unit 5 starts the data queuing of the write command (c). [14]
Then, the data transfer of the write command (c) from the host 2 to the input / output control unit 5 is started. In [15], read /
The write controller 8 writes the data of the write command (c) (writes back to the disk medium).

【0078】[16]では入出力制御部5がホスト2に
「GOOD」ステータスを報告する。[17]ではホス
ト2が前記「GOOD」ステータスを受領する。 (実施例2の説明) §1:実施例2の概要説明 実施例2では、磁気ディスク装置に、ホストからのコマ
ンドの先取り機構(以下「コマンドキューイング機能」
という)を装備し、またそのために必要なコマンドキュ
ーを有する。
In [16], the input / output control unit 5 reports the “GOOD” status to the host 2. In [17], the host 2 receives the "GOOD" status. (Explanation of Second Embodiment) §1: Outline of Second Embodiment In the second embodiment, a mechanism for prefetching commands from the host to the magnetic disk device (hereinafter referred to as “command queuing function”)
It has a command queue necessary for that purpose.

【0079】そして磁気ディスク装置が、複数の書き込
み命令を先取りした場合、これらの命令を最も短時間に
書き込み処理が終了するような順番に最適化し(以下
「リオーダリング」という)、その結果がシーケンシャ
ルライトと同様なものであれば、それらの命令の書き込
みは連続して行う。その結果、アクセス速度を向上する
ことができる。
When the magnetic disk device prefetches a plurality of write commands, these commands are optimized in such an order that the write processing is completed in the shortest time (hereinafter referred to as "reordering"), and the result is sequential. If it is the same as the write, those commands are continuously written. As a result, the access speed can be improved.

【0080】なお、図3に示した実施例1のライトコマ
ンド例は、実施例2でも同じなので、図3も援用して説
明する。 §2:磁気ディスク装置の構成の説明・・・図7参照 図7は実施例2の磁気ディスク装置ブロック図である。
実施例2の磁気ディスク装置は、前記実施例1の磁気デ
ィスク装置(図2参照)に、更にリオーダリング実行部
14を付加した装置であり、他の構成は、実施例1と同
じである。
Since the write command example of the first embodiment shown in FIG. 3 is the same as that of the second embodiment, it will be described with reference to FIG. §2: Description of configuration of magnetic disk device--see FIG. 7 FIG. 7 is a magnetic disk device block diagram of the second embodiment.
The magnetic disk device of the second embodiment is a device in which a reordering execution unit 14 is further added to the magnetic disk device of the first embodiment (see FIG. 2), and other configurations are the same as those of the first embodiment.

【0081】前記リオーダリング実行部14は、コマン
ドキュー12内のコマンド(ホストの発行したライトコ
マンドをキューイングしたもの)をリオーダリング(順
番を並べ換える処理)するものである。なお、他の構成
は実施例1と同じなので、説明は省略する。
The reordering executing section 14 reorders the commands in the command queue 12 (which are queued write commands issued by the host) (process for rearranging the order). The rest of the configuration is the same as that of the first embodiment, so the description is omitted.

【0082】§3:リオーダリングの処理説明・・・図
8参照 図8は実施例2のリオーダリング説明図であり、図8A
は例1、図8Bは例2を示す。なお、各図共、左側がリ
オーダリング前、右側がリオーダリング後を示してい
る。
§3: Description of reordering process ... See FIG. 8. FIG. 8 is an explanatory diagram of reordering according to the second embodiment.
Shows Example 1 and FIG. 8B shows Example 2. In each figure, the left side shows before reordering and the right side shows after reordering.

【0083】入出力制御部5は、ホスト2の発行したラ
イトコマンドを受領した際、そのコマンドを一時コマン
ドキュー12に受領した順序で格納しておく。その後、
リオーダリング実行部14によりリオーダリングを行
う。
When the input / output control unit 5 receives the write command issued by the host 2, it stores the command in the temporary command queue 12 in the order of reception. afterwards,
The reordering execution unit 14 performs reordering.

【0084】このリオーダリングでは、コマンドの受領
した順序ではなく、LBAの連続性等を調べ、最も短時
間で処理ができるように、コマンドの順序を入れ換え
る。例えば、ホスト2がライトコマンドを(d)→
(c)→(b)の順に連続的に発行したとすると、入出
力制御部5では、受領したコマンドを、例1のように、
一旦、この順序でコマンドキュー12に格納する。その
後、リオーダリングを行い、コマンドキュー12内のコ
マンドを(b)→(c)→(d)の順に入れ換える。
In this reordering, not the order in which the commands are received, but the continuity of the LBA is checked, and the order of the commands is exchanged so that the commands can be processed in the shortest time. For example, the host 2 sends a write command (d) →
Assuming that the commands are sequentially issued in the order of (c) → (b), the input / output control unit 5 outputs the received command as in Example 1.
Once stored in the command queue 12 in this order. After that, reordering is performed and the commands in the command queue 12 are exchanged in the order of (b) → (c) → (d).

【0085】また、ホスト2がライトコマンドを(h)
→(g)→(f)の順に連続的に発行したとすると、入
出力制御部5では、受領したコマンドを、例2のよう
に、一旦、この順序でコマンドキュー12に格納する。
その後、リオーダリングを行い、(f)→(g)→
(h)の順に入れ換える。
Also, the host 2 sends a write command (h)
Assuming that the commands are sequentially issued in the order of → (g) → (f), the input / output control unit 5 temporarily stores the received commands in the command queue 12 in this order as in Example 2.
After that, reordering is performed, and (f) → (g) →
Replace in the order of (h).

【0086】§4:フローチャートによる実施例2の処
理説明・・・図9、図10参照 図9は実施例2の処理フローチャート1、図10は実施
例2の処理フローチャート2である。以下、図9、図1
0に基づいて、実施例2の処理を説明する。なお、S2
1〜S41は処理ステップを示す。
§4: Description of processing of the second embodiment by flowchart ... See FIGS. 9 and 10. FIG. 9 is a processing flowchart 1 of the second embodiment, and FIG. 10 is a processing flowchart 2 of the second embodiment. Hereinafter, FIG. 9 and FIG.
The processing of the second embodiment will be described based on 0. Note that S2
1 to S41 indicate processing steps.

【0087】この処理は、ホスト2が、磁気ディスク装
置からの「GOOD」ステータス報告を待たずに、図3
に示したライトコマンド(d)、(c)、(b)を、
(d)→(c)→(b)の順に連続的に発行する場合の
処理例である。
This processing is performed by the host 2 without waiting for the "GOOD" status report from the magnetic disk device.
Write commands (d), (c), and (b) shown in
It is an example of processing in the case of continuously issuing in the order of (d) → (c) → (b).

【0088】入出力制御部5は、ホスト2から(d)→
(c)→(b)の順で連続発行されたライトコマンドの
CDBを受領し(S21)、これらのライトコマンド
を、一時コマンドキュー12に(d)→(c)→(b)
の順(受領した順)に格納(図8Aのリオーダリング前
参照)しておく(S22)。
The input / output control unit 5 receives from the host 2 (d) →
The CDBs of the write commands continuously issued in the order of (c) → (b) are received (S21), and these write commands are sent to the temporary command queue 12 as (d) → (c) → (b).
Are stored in the order of (reception order) (see before reordering in FIG. 8A) (S22).

【0089】その後、リオーダリング実行部14がリオ
ーダリングを実施する(S23)。リオーダリング実行
部14では、このリオーダリングにより、これらのコマ
ンドの処理を最も短時間で終了するであろう順序に入れ
換える(図8Aのリオーダリング後参照)(S24)。
After that, the reordering execution section 14 carries out reordering (S23). By this reordering, the reordering execution unit 14 switches the processing of these commands to the order in which it will be completed in the shortest time (see after reordering in FIG. 8A) (S24).

【0090】次に、入出力制御部5は、コマンドキュー
12より、最初に処理すべきコマンドのCDBを取り出
し(S25)、これを解析する(S26)。この例では
最初にライトコマンド(b)を取り出して解析する。
Next, the input / output control unit 5 takes out the CDB of the command to be processed first from the command queue 12 (S25) and analyzes it (S26). In this example, the write command (b) is first taken out and analyzed.

【0091】解析の結果、LBA「008000」hから「05」h
ブロック分のライトコマンドであることを認識すると、
その情報(CDB解析結果)をコマンド情報退避用メモ
リ11に格納して退避する(S28)。なお、ライトコ
マンド以外のコマンドを受領した場合には、他の処理を
行う。
As a result of the analysis, LBA "008000" h to "05" h
When it recognizes that it is a write command for blocks,
The information (CDB analysis result) is stored in the command information saving memory 11 and saved (S28). When a command other than the write command is received, other processing is performed.

【0092】この時、入出力制御部5は、前記解析結果
の情報をリード/ライト制御部8に通知し、書き込みの
動作開始を指示すると同時に、ホスト2からの書き込み
データの受領を開始(書き込みデータの転送を開始)す
る。
At this time, the input / output control unit 5 notifies the read / write control unit 8 of the information on the analysis result, instructs the start of the write operation, and at the same time starts receiving the write data from the host 2 (write Start data transfer).

【0093】このようにして、入出力制御部5がデータ
転送を実行している間、ディスク媒体9上のLBA「008
000」hのブロックの存在するトラックにシークを行い、
目的のデータブロックを検索する(S29)。
In this way, while the I / O controller 5 is executing data transfer, the LBA "008" on the disk medium 9 is
Seek to a track with 000 ”h blocks,
A target data block is searched (S29).

【0094】そして、リード/ライト制御部8では、目
的のデータブロックを検出した時点で、データバッファ
7にキューイングされているデータをディスク媒体9に
書き込み始める。すなわち、リード/ライト制御部8
は、目的のデータブロックを検出した時点でディスク媒
体9へのライトバックを開始する。
Then, the read / write controller 8 starts writing the data queued in the data buffer 7 to the disk medium 9 when the target data block is detected. That is, the read / write controller 8
Starts writing back to the disk medium 9 when the target data block is detected.

【0095】一方、入出力制御部5では、データバッフ
ァ制御部6に指示を出して、前記書き込みデータをデー
タバッファ7に格納する処理(データキューイング)を
開始する(S30)。
On the other hand, the input / output control unit 5 gives an instruction to the data buffer control unit 6 to start the process of storing the write data in the data buffer 7 (data queuing) (S30).

【0096】その後、入出力制御部5は、前記コマンド
(b)のデータキューイングが正常に終了したことを確
認すると(S31)、該入出力制御部5はホスト2に対
し、前記処理が終了した旨の「GOOD」ステータスを
報告する(S32)。
After that, when the input / output control unit 5 confirms that the data queuing of the command (b) has been normally completed (S31), the input / output control unit 5 instructs the host 2 to complete the processing. The "GOOD" status to the effect is reported (S32).

【0097】この報告により、ホスト2に、次のコマン
ドが実行可能であることを知らせる(通常、この時点で
は、まだリード/ライト制御部8は、シーク、目的デー
タブロックの検出、或いは書き込み動作実行中であ
る)。
With this report, the host 2 is informed that the next command can be executed (usually, at this point, the read / write controller 8 still seeks, detects the target data block, or executes the write operation). Inside).

【0098】次に入出力制御部5は、次に処理すべきコ
マンド、すなわち、この例ではライトコマンド(c)の
CDBをコマンドキュー12から取り出し(S33)、
このコマンドを解析する(S34)。
Next, the input / output control unit 5 takes out the command to be processed next, that is, the CDB of the write command (c) in this example from the command queue 12 (S33),
This command is analyzed (S34).

【0099】解析の結果、LBA「008005」hから「05」h
ブロック分のライトコマンドであることを認識すると
(S35)、その情報(CDB解析結果)をコマンド情
報退避用メモリ11に格納して退避する(S36)。な
お、ライトコマンド以外のコマンドを受領した場合に
は、他の処理を行う。
As a result of the analysis, LBAs "008005" h to "05" h
When the write command is recognized for the block (S35), the information (CDB analysis result) is stored in the command information save memory 11 and saved (S36). When a command other than the write command is received, other processing is performed.

【0100】また、入出力制御部5では、前回実行した
ライトコマンド(b)の書き込み最終LBAが現在処理
しているライトコマンド(c)の書き込み開始LBAに
連続しているか否か、すなわち、シーケンシャルライト
であるか否かを判断する(S37)。
In the input / output control unit 5, whether the last write LBA of the write command (b) executed last time is continuous with the write start LBA of the write command (c) currently being processed, that is, the sequential It is determined whether or not it is a light (S37).

【0101】その結果、LBAが連続でなければ(シー
ケンシャルライトでない場合)、ライトコマンド(b)
のライトバック処理が終了したら、他の処理を行う。し
かし、この例では、ライトコマンド(b)の最終LBA
が「008004」hであり、ライトコマンド(c)の書き込み
先頭LBAが「008005」であるため、入出力制御部5は、
シーケンシャルライトであると判断する。
As a result, if the LBAs are not continuous (not sequential write), the write command (b)
When the write-back process is completed, another process is performed. However, in this example, the last LBA of the write command (b)
Is “008004” h and the write start LBA of the write command (c) is “008005”, the input / output control unit 5
Judge as a sequential write.

【0102】前記ライトコマンドがシーケンシャルライ
トであると判断した場合(S37)、入出力制御部5
は、ライトコマンド(c)の書き込みデータを、データ
バッファ7の空き領域にキューイングする(S38)。
When it is determined that the write command is sequential write (S37), the input / output control unit 5
Queues the write data of the write command (c) in the empty area of the data buffer 7 (S38).

【0103】ここで、データキューイング中に、データ
バッファ7に空き領域が無くなった場合には、ディスク
媒体9への書き込みが終了したデータの上に上書きす
る。この制御はデータバッファ制御部6が行う。
Here, when the data buffer 7 runs out of free space during data queuing, the data overwritten on the disk medium 9 is overwritten. This control is performed by the data buffer control unit 6.

【0104】また、入出力制御部5は、この時点で、リ
ード/ライト制御部8が動作中であれば、現在実行して
いるライトコマンド(b)の書き込み処理に引き続き、
ライトコマンド(c)のライトバックを行うように、リ
ード/ライト制御部8に指示する(S39)。
Further, if the read / write control unit 8 is in operation at this time, the input / output control unit 5 continues the writing process of the write command (b) currently being executed,
The read / write controller 8 is instructed to write back the write command (c) (S39).

【0105】リード/ライト制御部8は、入出力制御部
5の指示を受けて、ライトコマンド(b)の書き込み処
理(ライトバック処理)が終了しても、停止することな
く、引き続きライトコマンド(c)の書き込み処理(ラ
イトバック処理)を行うように制御する。
When the read / write control unit 8 receives an instruction from the input / output control unit 5 and the write process (write back process) of the write command (b) ends, the read / write control unit 8 does not stop and continues to write ( Control is performed so as to perform the writing process (write back process) of c).

【0106】一方、ライトコマンド(c)のデータキュ
ーイングが終了すると(S40)、入出力制御部5は、
ホスト2に対し、「GOOD」ステータスを報告する
(S41)。
On the other hand, when the data queuing of the write command (c) is completed (S40), the input / output control unit 5
The "GOOD" status is reported to the host 2 (S41).

【0107】前記「GOOD」ステータスを報告した入
出力制御部5では、続いて次に処理すべきコマンド、す
なわち、この例では、ライトコマンド(d)のCDBを
コマンドキュー12から取り出す。
In the input / output control unit 5 which has reported the "GOOD" status, the command to be processed next, that is, the CDB of the write command (d) in this example, is taken out from the command queue 12.

【0108】この例では、ライトコマンド(d)もシー
ケンシャルライトの対象であるため、前記処理と同じよ
うに処理を行う。従って、ホスト2が、ライトコマンド
(d)、(c)、(b)のコマンドを連続発行後、磁気
ディスク装置にアクセスしない場合には、磁気ディスク
装置においては、入出力制御部5は、本コマンドに対す
る「GOOD」ステータスをホストに報告後は、次のコ
マンド待ちの状態となる。このため、リード/ライト制
御部8は、全てのライトバック動作が終了した時点で停
止する。
In this example, since the write command (d) is also the target of sequential writing, the same processing as the above processing is performed. Therefore, when the host 2 does not access the magnetic disk device after continuously issuing the write commands (d), (c), and (b), in the magnetic disk device, the input / output control unit 5 is After the "GOOD" status for the command is reported to the host, it waits for the next command. Therefore, the read / write control unit 8 stops at the time when all the write back operations are completed.

【0109】§5:タイムチャートによる実施例2の処
理説明・・・図11参照 図11は実施例2のタイムチャートである。以下、図1
1のタイムチャートに基づいて、前記実施例2の処理を
説明する。なお、処理内容は前記の説明と同じである。
§5: Description of processing of the second embodiment based on a time chart--see FIG. 11 FIG. 11 is a time chart of the second embodiment. Below, Figure 1
The process of the second embodiment will be described based on the time chart of No. 1. The processing content is the same as that described above.

【0110】図11において、(A)はホスト2、
(B)は入出力制御部5、(C)はリオーダリング実行
部14、(D)はリード/ライト制御部8の各処理時の
タイムチャートを示す。また、[1]〜[21]は各処
理のタイミングであり、その内容は次の通りである。
In FIG. 11, (A) is the host 2,
7B is a time chart of each processing of the input / output control unit 5, FIG. 9C is the reordering execution unit 14, and FIG. Further, [1] to [21] are timings of each processing, and the contents thereof are as follows.

【0111】[1]ではホスト2がライトコマンド
(d)を発行する。[2]ではそのコマンドを入出力制
御部5が受領し、コマンドキュー12に格納する。
[3]ではホスト2がライトコマンド(c)を発行す
る。[4]ではそのコマンドを入出力制御部5が受領
し、コマンドキュー12に格納する。[5]ではホスト
2がライトコマンド(b)を発行する。[6]ではその
コマンドを入出力制御部5が受領し、コマンドキュー1
2に格納する。
In [1], the host 2 issues the write command (d). In [2], the input / output control unit 5 receives the command and stores it in the command queue 12.
In [3], the host 2 issues a write command (c). In [4], the input / output control unit 5 receives the command and stores it in the command queue 12. In [5], the host 2 issues the write command (b). In [6], the input / output control unit 5 receives the command, and the command queue 1
Store in 2.

【0112】[7]ではリオーダリング実行部14がリ
オーダリングを実行し、ライトコマンドを、(b)→
(c)→(d)の順に決定する。[8]では入出力制御
部5がリード/ライト制御部8にライトコマンド(b)
のライトバックを指示する。[9]ではディスク媒体上
の目的のブロックへシークを行う。[10]では入出力
制御部5がライトコマンド(b)のデータキューイング
を開始する。
In [7], the reordering execution unit 14 executes reordering, and the write command is (b) →
It is determined in the order of (c) → (d). In [8], the input / output control unit 5 sends a write command (b) to the read / write control unit 8.
Write back. In [9], seek is performed to the target block on the disk medium. In [10], the input / output control unit 5 starts data queuing of the write command (b).

【0113】[11]ではホスト2から入出力制御部5
へライトコマンド(b)のデータ転送を行う。[12]
では入出力制御部5がホスト2へ、ライトコマンド
(b)の「GOOD」ステータスを報告する。[13]
ではホスト2が前記「GOOD」ステータスを受領す
る。[14]では入出力制御部5がコマンドキュー12
からライトコマンド(c)を取り出す。
In [11], the input / output control unit 5 from the host 2
Data transfer of write command (b) is performed. [12]
Then, the input / output control unit 5 reports the “GOOD” status of the write command (b) to the host 2. [13]
Then, the host 2 receives the "GOOD" status. In [14], the input / output control unit 5 causes the command queue 12
The write command (c) is taken out from.

【0114】[15]では入出力制御部5がリード/ラ
イト制御部8にライトコマンド(b)のライトバックに
引き続き、ライトコマンド(c)のライトバックを行う
ことを指示する。[16]ではリード/ライト制御部8
がコマンド(b)のデータの書き込み(ディスク媒体9
へのライトバック)を行う。
In [15], the input / output control unit 5 instructs the read / write control unit 8 to write back the write command (c) subsequent to the write back of the write command (b). In [16], the read / write controller 8
Write data of command (b) (disk medium 9
Write back to).

【0115】[17]では入出力制御部5がライトコマ
ンド(c)のデータキューイングを開始する。[18]
ではホスト2から入出力制御部5へライトコマンド
(c)のデータ転送を行う。[19]では入出力制御部
5がホスト2へ、ライトコマンド(c)の「GOOD」
ステータスを報告する。[20]ではホスト2が前記
「GOOD」ステータスを受領する。
At [17], the input / output control unit 5 starts the data queuing of the write command (c). [18]
Then, data transfer of the write command (c) is performed from the host 2 to the input / output control unit 5. In [19], the input / output control unit 5 sends the write command (c) “GOOD” to the host 2.
Report status. In [20], the host 2 receives the "GOOD" status.

【0116】[21]ではリード/ライト制御部8がラ
イトコマンド(c)のデータの書き込み(ディスク媒体
9へのライトバック)を行う。なお、ライトコマンド
(d)の処理は、前記ライトコマンド(c)の処理と同
じである。
At [21], the read / write controller 8 writes the data of the write command (c) (writes back to the disk medium 9). The processing of the write command (d) is the same as the processing of the write command (c).

【0117】(実施例3の説明) §1:実施例3の一般的な説明 実施例3は、前記実施例2と同様な構成の磁気ディスク
装置1機に対して、複数機のホスト(この例では2機)
が接続されている環境において、磁気ディスク装置が、
複数機のホストから書き込み命令を受領し、それらの命
令がシーケンシャルライトとなった場合、それらの命令
の書き込みを連続して行う。
(Explanation of Third Embodiment) §1: General Description of Third Embodiment In the third embodiment, one magnetic disk device having the same configuration as that of the second embodiment is replaced by a plurality of hosts (this (2 in the example)
In the environment where is connected,
When write commands are received from a plurality of hosts and the commands become sequential writes, those commands are continuously written.

【0118】その結果、ディスク媒体の回転待ち時間を
無くし、アクセス速度を向上させる。なお、図3に示し
たライトコマンド例は、実施例3でも同じなので、図3
も援用して説明する。
As a result, the rotation waiting time of the disk medium is eliminated and the access speed is improved. Since the write command example shown in FIG. 3 is the same in the third embodiment,
The explanation will be made with the aid of the above.

【0119】§2:磁気ディスク装置の構成の説明・・
・図12参照 図12は実施例3の磁気ディスク装置ブロック図であ
る。図示のように、磁気ディスク装置1には、インター
フェース制御部3、リード/ライト制御部8、ディスク
媒体9等が設けてある。
§2: Description of configuration of magnetic disk device
-Refer to FIG. 12 FIG. 12 is a magnetic disk device block diagram of the third embodiment. As shown in the figure, the magnetic disk device 1 is provided with an interface controller 3, a read / write controller 8, a disk medium 9, and the like.

【0120】また、前記インターフェース制御部3に
は、入出力制御部5、データバッファ制御部6、データ
バッファ7、コマンド情報退避用メモリ11、コマンド
キュー12等が設けてある。
Further, the interface control section 3 is provided with an input / output control section 5, a data buffer control section 6, a data buffer 7, a command information saving memory 11, a command queue 12 and the like.

【0121】そして、運用時には、前記磁気ディスク装
置1に、2機のホスト20、21を接続する。なお、磁
気ディスク装置1の構成は実施例1と同じなので、詳細
な説明は省略する。
At the time of operation, two hosts 20, 21 are connected to the magnetic disk device 1. Since the configuration of the magnetic disk device 1 is the same as that of the first embodiment, detailed description will be omitted.

【0122】§3:フローチャートによる実施例3の処
理説明・・・図13〜図15参照 図13は実施例3の処理フローチャート1、図14は実
施例3の処理フローチャート2、図15は実施例3の処
理フローチャート3である。以下、図13〜図15に基
づいて、実施例3の処理を説明する。なお、S51〜S
74は処理ステップを示す。
§3: Processing explanation of Embodiment 3 by flow chart ... See FIGS. 13 to 15. FIG. 13 is a processing flowchart 1 of Embodiment 3, FIG. 14 is a processing flowchart 2 of Embodiment 3, and FIG. 15 is an embodiment. It is a processing flowchart 3 of 3. Hereinafter, the process of the third embodiment will be described with reference to FIGS. Note that S51 to S
74 indicates a processing step.

【0123】この実施例は、一方のホスト20が、図3
に示したライトコマンド(e)を発行し、そのコマンド
のデータキューイングが終了する以前に、他方のホスト
21がライトコマンド(f)を発行する場合の例であ
る。
In this embodiment, one host 20
In this example, the other host 21 issues the write command (f) before the data queuing of the write command (e) is issued.

【0124】例えば、ホスト20がライトコマンド
(e)を発行したとする。この時、入出力制御部5は、
前記コマンドを受領し(S51)、その内容を解析する
(S52)。解析の結果、LBA「008000」hから「10」h
ブロック分のライトコマンドであることを確認すると
(S53)、その情報(CDB解析結果)をコマンド情
報退避用メモリ11に格納して退避する(S54)。な
お、ライトコマンド以外のコマンドを受領した場合に
は、他の処理を行う。
For example, assume that the host 20 issues a write command (e). At this time, the input / output control unit 5
The command is received (S51), and its contents are analyzed (S52). As a result of the analysis, LBA "008000" h to "10" h
When it is confirmed that the write command is for a block (S53), the information (CDB analysis result) is stored in the command information saving memory 11 and saved (S54). When a command other than the write command is received, other processing is performed.

【0125】この時、入出力制御部5は、前記解析結果
の情報をリード/ライト制御部8に通知し、書き込みの
動作開始を指示すると同時に、ホスト21からの書き込
みデータの受領を開始(書き込みデータの転送を開始)
する。
At this time, the input / output control unit 5 notifies the read / write control unit 8 of the information of the analysis result, instructs the start of the write operation, and at the same time starts receiving the write data from the host 21 (write operation). (Start data transfer)
To do.

【0126】このようにして、入出力制御部5がデータ
転送を実行している間、ディスク媒体9上のLBA「008
000」hのブロックの存在するトラックにシークを行い、
目的のデータブロックを検索する(S55)。
In this way, while the I / O controller 5 is executing data transfer, the LBA "008" on the disk medium 9 is
Seek to a track with 000 ”h blocks,
A target data block is searched (S55).

【0127】そして、リード/ライト制御部8では、目
的のデータブロックを検出した時点で、データバッファ
7にキューイングされているデータをディスク媒体9に
書き込み始める。すなわち、リード/ライト制御部8
は、目的のデータブロックを検出した時点でディスク媒
体9へのライトバックを開始する。
Then, the read / write control unit 8 starts writing the data queued in the data buffer 7 to the disk medium 9 when the target data block is detected. That is, the read / write controller 8
Starts writing back to the disk medium 9 when the target data block is detected.

【0128】一方、入出力制御部5では、データバッフ
ァ制御部6に指示を出して、前記書き込みデータをデー
タバッファ7に格納する処理(データキューイング)を
開始する(S56)。すなわち、データバッファ7への
データキューイングと、データバッファ7からディスク
媒体9へのライトバックを、独立して別々に行う。
On the other hand, the input / output control unit 5 gives an instruction to the data buffer control unit 6 to start the process of storing the write data in the data buffer 7 (data queuing) (S56). That is, data queuing to the data buffer 7 and write back from the data buffer 7 to the disk medium 9 are independently and separately performed.

【0129】前記データキューイングを行う際、入出力
制御部5は、データバッファ7に空き領域があるか否か
を判断する(S57)。そして、空き領域が有れば、デ
ータキューイングを続けて行う。
When performing the data queuing, the input / output control unit 5 determines whether or not there is a free area in the data buffer 7 (S57). Then, if there is a free area, data queuing is continued.

【0130】その後、入出力制御部5は、前記コマンド
(e)のデータキューイングが正常に終了したことを確
認すると(S58)、該入出力制御部5はホスト20に
対し、前記処理が終了した旨の「GOOD」ステータス
を報告する(S59)。
After that, when the input / output control unit 5 confirms that the data queuing of the command (e) has been normally completed (S58), the input / output control unit 5 instructs the host 20 to end the processing. The “GOOD” status to the effect is reported (S59).

【0131】しかし、ライトコマンド(e)のデータキ
ューイングで、データバッファ7に空き領域が無くなっ
た場合(S57)、入出力制御部5はデータキューイン
グを一時停止する(S70)。
However, when there is no free area in the data buffer 7 due to the data queuing of the write command (e) (S57), the input / output control unit 5 suspends the data queuing (S70).

【0132】そして、入出力制御部5は、ライトコマン
ド(f)をホスト21から受領し(S71)、これをコ
マンドキュー12へ格納する(S72)。また、ライト
コマンド(e)のデータキューイングは、ライトバック
によってデータバッファ7に空き領域が出来次第(S7
3)処理を再開する(S74)。この場合、書き込みが
終了したデータブロックのデータに上書きする。
Then, the input / output control unit 5 receives the write command (f) from the host 21 (S71) and stores it in the command queue 12 (S72). Data queuing of the write command (e) is performed as soon as an empty area is created in the data buffer 7 by write back (S7).
3) The process is restarted (S74). In this case, the data of the data block for which writing has been completed is overwritten.

【0133】前記処理(S59)で「GOOD」ステー
タスを報告後、入出力制御部5は、次に処理すべきライ
トコマンド(f)のCDBをコマンドキュー12から取
り出し(S60)、これを解析する(S61)。
After reporting the "GOOD" status in the processing (S59), the input / output control unit 5 takes out the CDB of the write command (f) to be processed next from the command queue 12 (S60) and analyzes it. (S61).

【0134】その結果、LBA「008010」hから「01」h ブ
ロック分のライトコマンドであることを確認した場合に
は(S62)、その情報(CDB解析結果)をコマンド
情報退避用メモリ11に格納して退避する(S63)。
なお、ライトコマンド以外のコマンドを受領した場合に
は、ライトコマンド(b)のライトバック処理が終了し
たら、他の処理を行う。
As a result, when it is confirmed that the write command is for LBA "008010" h to "01" h blocks (S62), the information (CDB analysis result) is stored in the command information saving memory 11. And save (S63).
When a command other than the write command is received, another process is performed after the write back process of the write command (b) is completed.

【0135】また、入出力制御部5では、前回実行した
ライトコマンド(e)の書き込み最終LBAと、現在処
理しているライトコマンド(f)の書き込みLBAとを
比較し、それらのLBAが連続であるか否か、すなわ
ち、シーケンシャルライトであるか否かを判断する(S
64)。
Further, the input / output control unit 5 compares the last write LBA of the write command (e) executed last time with the write LBA of the write command (f) currently being processed, and these LBAs are consecutive. It is determined whether or not there is, that is, whether or not it is a sequential write (S
64).

【0136】その結果、LBAが連続でなければ(シー
ケンシャルライトでない場合)、ライトコマンド(e)
のライトバック処理が終了したら、他の処理を行う。し
かし、この例では、ライトコマンド(e)と(f)はシ
ーケンシャルライトであると判断する。
As a result, if the LBAs are not continuous (not sequential write), the write command (e)
When the write-back process is completed, another process is performed. However, in this example, it is determined that the write commands (e) and (f) are sequential writes.

【0137】そして、入出力制御部5は、ライトコマン
ド(f)の書き込みデータを、データバッファ7の空き
領域(書き込みが終了したデータブロックのデータを格
納していた領域)にキューイングする(S65)。
Then, the input / output control unit 5 queues the write data of the write command (f) in the empty area of the data buffer 7 (the area in which the data of the data block for which the writing is completed is stored) (S65). ).

【0138】また、入出力制御部5は、この時点で、リ
ード/ライト制御部8が動作中であれば、現在実行して
いるライトコマンド(e)の書き込み処理に引き続き、
今回受領したライトコマンド(f)のライトバックを行
うように、リード/ライト制御部8に指示する(S6
6)。
Further, if the read / write control unit 8 is in operation at this time, the input / output control unit 5 continues the write process of the write command (e) currently being executed,
The read / write control unit 8 is instructed to write back the write command (f) received this time (S6).
6).

【0139】リード/ライト制御部8は、入出力制御部
5の指示を受けて、ライトコマンド(e)の書き込み処
理(ライトバック処理)が終了しても、停止することな
く、引き続きライトコマンド(f)の書き込み処理(ラ
イトバック処理)を行うように制御する。
When the read / write control unit 8 receives an instruction from the input / output control unit 5, even if the write process (write back process) of the write command (e) is completed, the read / write control unit 8 does not stop and continues to write ( The writing process (write back process) of f) is controlled.

【0140】一方、ライトコマンド(e)のデータキュ
ーイングが終了すると(S67)、入出力制御部5は、
ホスト2に対し、「GOOD」ステータスを報告する
(S68)。
On the other hand, when the data queuing of the write command (e) is completed (S67), the input / output control section 5
The "GOOD" status is reported to the host 2 (S68).

【0141】その後、どちらのホストも磁気ディスク装
置にアクセスしない場合には、該磁気ディスク装置にお
いては、入出力制御部5が、次のコマンドの待ち状態と
なり、リード/ライト制御部8は、全てのライトバック
処理が終了した時点で処理を停止する。
After that, when neither host accesses the magnetic disk device, in the magnetic disk device, the input / output control unit 5 waits for the next command, and the read / write control unit 8 completely The process is stopped when the write back process is completed.

【0142】§4:タイムチャートによる実施例3の処
理説明・・・図16参照 図16は実施例3のタイムチャートである。以下、図1
6のタイムチャートに基づいて、前記実施例3の処理を
説明する。なお、処理内容は前記の説明と同じである。
§4: Description of Processing of Third Embodiment by Time Chart ... See FIG. 16 FIG. 16 is a time chart of the third embodiment. Below, Figure 1
The processing of the third embodiment will be described based on the time chart of No. 6. The processing content is the same as that described above.

【0143】図16において、(A)はホスト20、
(B)はホスト21、(C)は入出力制御部5、(D)
はデータバッファ制御部6、(E)はリード/ライト制
御部8の各処理時のタイムチャートを示す。また、
[1]〜[21]は各処理のタイミングであり、その内
容は次の通りである。
In FIG. 16, (A) is the host 20,
(B) is the host 21, (C) is the input / output control unit 5, (D)
Is a data buffer control unit 6, and (E) is a time chart of each process of the read / write control unit 8. Also,
[1] to [21] are timings of each processing, and the contents thereof are as follows.

【0144】[1]ではホスト20がライトコマンド
(e)を発行する。[2]ではそのコマンドを入出力制
御部5が受領する。[3]では、入出力制御部5がリー
ド/ライト制御部8にライトコマンド(e)のライトバ
ックを指示する。[4]ではディスク媒体上の目的のブ
ロックへシークを行う。[5]では入出力制御部5がラ
イトコマンド(e)のデータキューイングを開始する。
In [1], the host 20 issues the write command (e). In [2], the input / output control unit 5 receives the command. In [3], the input / output control unit 5 instructs the read / write control unit 8 to write back the write command (e). In [4], seek is performed to the target block on the disk medium. In [5], the input / output control unit 5 starts data queuing of the write command (e).

【0145】[6]ではホスト20から入出力制御部5
へライトコマンド(e)のデータ転送を行う。[7]で
はデータバッファ7に空き領域が無くなり、ライトコマ
ンド(e)のデータバッファ7へのデータ転送を一時停
止する。
In [6], the input / output control unit 5 is transferred from the host 20.
Data transfer of the write command (e) is performed. In [7], there is no free area in the data buffer 7, and the data transfer of the write command (e) to the data buffer 7 is temporarily stopped.

【0146】[8]ではホスト21がライトコマンド
(f)を発行する。[9]ではそのコマンドを入出力制
御部5が受領し、コマンドキュー12へ格納する。[1
0]ではデータバッファ制御部6が、データバッファ7
へのライトコマンド(e)のデータ転送を再開する。
[11]ではホスト20から入出力制御部5へライトコ
マンド(e)のデータ転送(続き)を行う。
At [8], the host 21 issues a write command (f). In [9], the input / output control unit 5 receives the command and stores it in the command queue 12. [1
0], the data buffer control unit 6 causes the data buffer 7
The data transfer of the write command (e) to is resumed.
In [11], data transfer (continuation) of the write command (e) is performed from the host 20 to the input / output control unit 5.

【0147】[12]では入出力制御部5がホスト20
へライトコマンド(e)の「GOOD」ステータスを報
告する。[13]ではホスト20が前記「GOOD」ス
テータスを受領する。[14]では入出力制御部5がコ
マンドキュー12からライトコマンド(f)を取り出
す。
In [12], the input / output control unit 5 sets the host 20
Report the "GOOD" status of the write command (e). In [13], the host 20 receives the "GOOD" status. In [14], the input / output control unit 5 takes out the write command (f) from the command queue 12.

【0148】[15]では入出力制御部5がリード/ラ
イト制御部8に対し、ライトコマンド(e)のライトバ
ックに引き続き、ライトコマンド(f)のライトバック
を行うように指示をする。[16]ではリード/ライト
制御部8がライトコマンド(e)のデータの書き込み
(ディスク媒体9へのライトバック)を行う。
In [15], the input / output control unit 5 instructs the read / write control unit 8 to perform write back of the write command (f) subsequent to write back of the write command (e). In [16], the read / write controller 8 writes the data of the write command (e) (writes back to the disk medium 9).

【0149】[17]では入出力制御部5がライトコマ
ンド(f)のデータキューイングを開始する。[18]
ではホスト21から入出力制御部5へライトコマンド
(f)のデータ転送を行う。[19]では入出力制御部
5がホスト21へライトコマンド(f)の「GOOD」
ステータスを報告する。[20]ではホスト21が前記
「GOOD」ステータスを受領する。[21]ではリー
ド/ライト制御部8がライトコマンド(f)のデータの
書き込み(ディスク媒体9へのライトバック)を行う。
At [17], the input / output control unit 5 starts the data queuing of the write command (f). [18]
Then, the write command (f) is transferred from the host 21 to the input / output control unit 5. In [19], the input / output control unit 5 sends the write command (f) “GOOD” to the host 21.
Report status. In [20], the host 21 receives the “GOOD” status. In [21], the read / write controller 8 writes the data of the write command (f) (writes back to the disk medium 9).

【0150】(実施例4の説明) §1:実施例4の一般的な説明 実施例4では、実施例3と同様な環境において、磁気デ
ィスク装置が複数機のホストからの複数の書き込み命令
を先取りした場合、これらの命令のリオーダリングを行
い、その結果がシーケンシャルライトと同様なものであ
れば、それらの命令の書き込みは連続して行う。その結
果、アクセス速度の向上を達成することができる。
(Explanation of Fourth Embodiment) §1: General Description of Fourth Embodiment In the fourth embodiment, in the environment similar to that of the third embodiment, the magnetic disk device executes a plurality of write commands from a plurality of hosts. When prefetched, these instructions are reordered, and if the result is similar to sequential write, writing of these instructions is performed continuously. As a result, improvement in access speed can be achieved.

【0151】§2:磁気ディスク装置の構成の説明・・
・図17参照 図17は実施例4の磁気ディスク装置ブロック図であ
る。実施例4の磁気ディスク装置は、前記実施例2の磁
気ディスク装置(図7参照)と同じなので、説明は省略
する。但し、運用時には、この磁気ディスク装置に2機
のホスト20、21を接続する。
§2: Description of configuration of magnetic disk device
-Refer to FIG. 17 FIG. 17 is a block diagram of a magnetic disk device according to the fourth embodiment. Since the magnetic disk device of the fourth embodiment is the same as the magnetic disk device of the second embodiment (see FIG. 7), the description thereof will be omitted. However, during operation, two hosts 20, 21 are connected to this magnetic disk device.

【0152】§3:フローチャートによる実施例4の処
理説明・・・図18〜図20参照 図18は実施例4の処理フローチャート1、図19は実
施例4の処理フローチャート2、図20は実施例4の処
理フローチャート3である。以下、図18〜図20に基
づいて、実施例4の処理を説明する。なお、S81〜S
105は処理ステップを示す。
§3: Description of the process of the fourth embodiment by a flow chart ... See FIGS. 18 to 20. FIG. 18 is a process flow chart 1 of the fourth embodiment, FIG. 19 is a process flow chart 2 of the fourth embodiment, and FIG. It is the processing flowchart 3 of 4. Hereinafter, the processing of the fourth embodiment will be described with reference to FIGS. Note that S81 to S
Reference numeral 105 denotes a processing step.

【0153】この例は、一方のホスト20がライトコマ
ンド(e)を発行し、そのコマンドのデータキューイン
グが終了する以前に(磁気ディスク装置からの「GOO
D」ステータスを待たずに)、他方のホスト21が、ラ
イトコマンド(h)→(g)→(f)の順で発行する場
合の例である。
In this example, before one host 20 issues a write command (e) and the data queuing of the command is completed (“GOO from the magnetic disk device”).
This is an example in which the other host 21 issues write commands (h) → (g) → (f) in this order (without waiting for the “D” status).

【0154】例えば、ホスト20がライトコマンド
(e)を発行したとする。この時、入出力制御部5は、
前記コマンドを受領し(S81)、その内容を解析する
(S82)。解析の結果、LBA「008000」hから「10」h
ブロック分のライトコマンドであることを確認すると
(S83)、その情報(CDB解析結果)をコマンド情
報退避用メモリ11に格納して退避する(S84)。な
お、ライトコマンド以外のコマンドを受領した場合に
は、他の処理を行う。
For example, assume that the host 20 issues a write command (e). At this time, the input / output control unit 5
The command is received (S81), and its contents are analyzed (S82). As a result of the analysis, LBA "008000" h to "10" h
When it is confirmed that the write command is for a block (S83), the information (CDB analysis result) is stored in the command information saving memory 11 and saved (S84). When a command other than the write command is received, other processing is performed.

【0155】この時、入出力制御部5は、前記解析結果
の情報をリード/ライト制御部8に通知し、書き込みの
動作開始を指示すると同時に、ホスト20からの書き込
みデータの受領を開始(書き込みデータの転送を開始)
する。
At this time, the input / output control unit 5 notifies the read / write control unit 8 of the information of the analysis result, instructs the start of the write operation, and at the same time starts receiving the write data from the host 20 (write operation). (Start data transfer)
To do.

【0156】このようにして、入出力制御部5がデータ
転送を実行している間、ディスク媒体9上のLBA「008
000」hのブロックの存在するトラックにシークを行い、
目的のデータブロックを検索する(S85)。
In this way, while the input / output control unit 5 is executing data transfer, the LBA "008" on the disk medium 9 is
Seek to a track with 000 ”h blocks,
A target data block is searched (S85).

【0157】そして、目的のデータブロックを検出した
時点で、リード/ライト制御部8では、データバッファ
7にキューイングされているデータのディスク媒体9へ
の書き込み(ライトバック)を開始する。
Then, when the target data block is detected, the read / write controller 8 starts writing (write back) the data queued in the data buffer 7 to the disk medium 9.

【0158】一方、入出力制御部5では、データバッフ
ァ制御部6に指示を出して、前記書き込みデータをデー
タバッファ7に格納する処理(データキューイング)を
開始する(S86)。
On the other hand, the input / output control unit 5 gives an instruction to the data buffer control unit 6 to start the process of storing the write data in the data buffer 7 (data queuing) (S86).

【0159】前記データキューイングを行う際、入出力
制御部5は、データバッファ7に空き領域があるか否か
を判断する(S87)。そして、空き領域が有れば、デ
ータキューイングを続けて行う。
When performing the data queuing, the input / output control unit 5 determines whether or not there is a free area in the data buffer 7 (S87). Then, if there is a free area, data queuing is continued.

【0160】その後、入出力制御部5は、前記コマンド
(e)のデータキューイングが正常に終了したことを確
認すると(S88)、該入出力制御部5はホスト20に
対し、前記処理が終了した旨の「GOOD」ステータス
を報告する(S89)。
After that, when the input / output control unit 5 confirms that the data queuing of the command (e) has been normally completed (S88), the input / output control unit 5 instructs the host 20 to complete the processing. The “GOOD” status indicating that it has been reported is reported (S89).

【0161】しかし、ライトコマンド(e)のデータキ
ューイングで、データバッファ7に空き領域が無くなっ
た場合(S87)、入出力制御部5はデータキューイン
グを一時停止する(S99)。
However, when there is no free area in the data buffer 7 due to the data queuing of the write command (e) (S87), the input / output control unit 5 suspends the data queuing (S99).

【0162】そして、入出力制御部5は、ホスト21が
(h)→(g)→(f)の順で連続発行したライトコマ
ンド(h)、(g)、(f)を受領し(S100)、こ
れを(h)→(g)→(f)の順でコマンドキュー12
へ格納する(S101)。
Then, the input / output control unit 5 receives the write commands (h), (g), and (f) continuously issued by the host 21 in the order of (h) → (g) → (f) (S100). ), And the command queue 12 in the order of (h) → (g) → (f).
(S101).

【0163】その後、リオーダリング実行部14は、リ
オーダリングを実施する(S102)。この結果、ライ
トコマンドを(f)→(g)→(h)の順に入れ換え、
コマンドキュー12に格納する(S103)。
Thereafter, the reordering executing section 14 carries out reordering (S102). As a result, the write commands are exchanged in the order of (f) → (g) → (h),
It is stored in the command queue 12 (S103).

【0164】また、ライトコマンド(e)のデータキュ
ーイングは、ライトバックによってデータバッファ7に
空き領域が出来次第(S104)処理を再開する(S1
05)。この場合、書き込みが終了したデータブロック
のデータに上書きする。
In the data queuing of the write command (e), the processing is restarted as soon as a free area is created in the data buffer 7 by the write back (S104) (S1).
05). In this case, the data of the data block for which writing has been completed is overwritten.

【0165】前記処理(S89)で「GOOD」ステー
タスを報告後、入出力制御部5は、次に処理すべきライ
トコマンド(f)のCDBをコマンドキュー12から取
り出し(S90)、これを解析する(S91)。
After reporting the "GOOD" status in the processing (S89), the input / output control unit 5 takes out the CDB of the write command (f) to be processed next from the command queue 12 (S90) and analyzes it. (S91).

【0166】その結果、LBA「008010」hから「01」h ブ
ロック分のライトコマンドであることを確認した場合に
は(S92)、その情報(CDB解析結果)をコマンド
情報退避用メモリ11に格納して退避する(S93)。
なお、ライトコマンド以外のコマンドを受領した場合に
は、ライトコマンド(e)のライトバック処理が終了し
たら、他の処理を行う。
As a result, when it is confirmed that the write command is for LBA "008010" h to "01" h blocks (S92), the information (CDB analysis result) is stored in the command information saving memory 11. And save (S93).
When a command other than the write command is received, another process is performed after the write back process of the write command (e) is completed.

【0167】また、入出力制御部5では、前回実行した
ライトコマンド(e)の書き込み最終LBAと、現在処
理しているライトコマンド(f)の書き込みLBAとを
比較し、それらのLBAが連続であるか否か、すなわ
ち、シーケンシャルライトであるか否かを判断する(S
94)。
Further, the input / output control section 5 compares the last write LBA of the write command (e) executed last time with the write LBA of the write command (f) currently being processed, and these LBAs are consecutive. It is determined whether or not there is, that is, whether or not it is a sequential write (S
94).

【0168】その結果、LBAが連続でなければ(シー
ケンシャルライトでない場合)、ライトコマンド(e)
のライトバック処理が終了したら、他の処理を行う。し
かし、この例では、ライトコマンド(e)と(f)はシ
ーケンシャルライトであると判断する。
As a result, if the LBAs are not continuous (not sequential write), the write command (e)
When the write-back process is completed, another process is performed. However, in this example, it is determined that the write commands (e) and (f) are sequential writes.

【0169】そして、入出力制御部5は、ライトコマン
ド(f)の書き込みデータを、データバッファ7の空き
領域(書き込みが終了したデータブロックのデータを格
納していた領域)にキューイングする(S95)。
Then, the input / output control unit 5 queues the write data of the write command (f) in the empty area of the data buffer 7 (the area in which the data of the data block for which writing has been completed was stored) (S95). ).

【0170】また、入出力制御部5は、この時点で、リ
ード/ライト制御部8が動作中であれば、現在実行して
いるライトコマンド(e)の書き込み処理に引き続き、
今回受領したライトコマンド(f)のライトバックを行
うように、リード/ライト制御部8に指示する(S9
6)。
Further, if the read / write control unit 8 is in operation at this time, the input / output control unit 5 continues the write process of the write command (e) currently being executed,
The read / write controller 8 is instructed to write back the write command (f) received this time (S9).
6).

【0171】リード/ライト制御部8は、入出力制御部
5の指示を受けて、ライトコマンド(e)の書き込み処
理(ライトバック処理)が終了しても、停止することな
く、引き続きライトコマンド(f)の書き込み処理(ラ
イトバック処理)を行うように制御する。
When the read / write control unit 8 receives an instruction from the input / output control unit 5, even if the write process (write back process) of the write command (e) is completed, the read / write control unit 8 does not stop and continues to write ( The writing process (write back process) of f) is controlled.

【0172】一方、ライトコマンド(f)のデータキュ
ーイングが終了すると(S97)、入出力制御部5は、
ホスト21に対し、「GOOD」ステータスを報告する
(S98)。以後、ライトコマンド(g)、(h)につ
いても同様に処理を行う。
On the other hand, when the data queuing of the write command (f) is completed (S97), the input / output control section 5
The "GOOD" status is reported to the host 21 (S98). Thereafter, the write commands (g) and (h) are similarly processed.

【0173】その後、どちらのホストも磁気ディスク装
置にアクセスしない場合には、該磁気ディスク装置にお
いては、入出力制御部5が、次のコマンドの待ち状態と
なり、リード/ライト制御部8は、全てのライトバック
処理が終了した時点で処理を停止する。
After that, when neither host accesses the magnetic disk device, in the magnetic disk device, the input / output control unit 5 waits for the next command and all the read / write control units 8 The process is stopped when the write back process is completed.

【0174】§4:タイムチャートによる実施例4の処
理説明・・・図21参照 図21は実施例4のタイムチャートである。以下、図2
1のタイムチャートに基づいて、前記実施例4の処理を
説明する。なお、処理内容は前記の説明と同じである。
§4: Description of processing of the fourth embodiment by a time chart--see FIG. 21 FIG. 21 is a time chart of the fourth embodiment. Below, FIG.
The process of the fourth embodiment will be described based on the time chart of No. 1. The processing content is the same as that described above.

【0175】図21において、(A)はホスト20、
(B)はホスト21、(C)は入出力制御部5、(D)
はデータバッファ制御部6、(E)はリオーダリング実
行部14、(F)はリード/ライト制御部8の各処理時
のタイムチャートを示す。また、[1]〜[26]は各
処理のタイミングであり、その内容は次の通りである。
In FIG. 21, (A) is the host 20,
(B) is the host 21, (C) is the input / output control unit 5, (D)
Shows a time chart during each processing of the data buffer control unit 6, (E) the reordering execution unit 14, and (F) a read / write control unit 8. Further, [1] to [26] are timings of each processing, and the contents thereof are as follows.

【0176】[1]ではホスト20がライトコマンド
(e)を発行する。[2]ではそのコマンドを入出力制
御部5が受領する。[3]では、入出力制御部5がリー
ド/ライト制御部8にライトコマンド(e)のライトバ
ックを指示する。[4]ではディスク媒体上の目的のブ
ロックへシークを行う。[5]では入出力制御部5がラ
イトコマンド(e)のデータキューイングを開始する。
At [1], the host 20 issues the write command (e). In [2], the input / output control unit 5 receives the command. In [3], the input / output control unit 5 instructs the read / write control unit 8 to write back the write command (e). In [4], seek is performed to the target block on the disk medium. In [5], the input / output control unit 5 starts data queuing of the write command (e).

【0177】[6]ではホスト20から入出力制御部5
へライトコマンド(e)のデータ転送を行う。[7]で
はデータバッファ7に空き領域が無くなり、ライトコマ
ンド(e)のデータバッファ7へのデータ転送を一時停
止する。
In [6], the input / output control unit 5 is transferred from the host 20.
Data transfer of the write command (e) is performed. In [7], there is no free area in the data buffer 7, and the data transfer of the write command (e) to the data buffer 7 is temporarily stopped.

【0178】[8]ではホスト21がライトコマンド
(h)を発行する。[9]ではそのコマンドを入出力制
御部5が受領し、コマンドキュー12へ格納する。[1
0]ではホスト21がライトコマンド(g)を発行す
る。[11]ではそのコマンドを入出力制御部5が受領
し、コマンドキュー12へ格納する。
At [8], the host 21 issues a write command (h). In [9], the input / output control unit 5 receives the command and stores it in the command queue 12. [1
0], the host 21 issues a write command (g). In [11], the input / output control unit 5 receives the command and stores it in the command queue 12.

【0179】[12]ではホスト21がライトコマンド
(f)を発行する。[13]ではそのコマンドを入出力
制御部5が受領し、コマンドキュー12へ格納する。
[14]ではリオーダリング実行部14がリオーダリン
グを実施し、コマンド実行順序を(f)→(g)→
(h)の順に決定する。
At [12], the host 21 issues the write command (f). In [13], the input / output control unit 5 receives the command and stores it in the command queue 12.
In [14], the reordering execution unit 14 performs reordering, and the command execution order is (f) → (g) →
It is decided in the order of (h).

【0180】[15]ではリード/ライト制御部8がラ
イトコマンド(e)のデータの書き込み(ディスク媒体
9へのライトバック)を行う。[16]ではデータバッ
ファ制御部6が、データバッファ7へのライトコマンド
(e)のデータ転送を再開する。[17]ではホスト2
0から入出力制御部5へライトコマンド(e)のデータ
転送(続き)を行う。
In [15], the read / write controller 8 writes the data of the write command (e) (writes back to the disk medium 9). In [16], the data buffer control unit 6 restarts the data transfer of the write command (e) to the data buffer 7. In [17], host 2
Data transfer of the write command (e) from 0 to the input / output control unit 5 (continuation) is performed.

【0181】[18]では入出力制御部5がホスト20
へライトコマンド(e)の「GOOD」ステータスを報
告する。[19]ではホスト20が前記「GOOD」ス
テータスを受領する。[20]では入出力制御部5がコ
マンドキュー12からライトコマンド(f)を取り出
す。
In [18], the input / output control unit 5 causes the host 20
Report the "GOOD" status of the write command (e). In [19], the host 20 receives the “GOOD” status. In [20], the input / output control unit 5 takes out the write command (f) from the command queue 12.

【0182】[21]では入出力制御部5がリード/ラ
イト制御部8に対し、ライトコマンド(e)のライトバ
ックに引き続き、ライトコマンド(f)のライトバック
を行うように指示をする。[22]では入出力制御部5
がライトコマンド(f)のデータキューイングを開始す
る。
At [21], the input / output control unit 5 instructs the read / write control unit 8 to write back the write command (f) subsequent to the write back of the write command (e). In [22], the input / output control unit 5
Starts the data queuing of the write command (f).

【0183】[23]ではホスト21から入出力制御部
5へライトコマンド(f)のデータ転送を行う。[2
4]では入出力制御部5がホスト21へライトコマンド
(f)の「GOOD」ステータスを報告する。[25]
ではホスト21が前記「GOOD」ステータスを受領す
る。
At [23], the write command (f) is transferred from the host 21 to the input / output control section 5. [2
4], the input / output control unit 5 reports the “GOOD” status of the write command (f) to the host 21. [25]
Then, the host 21 receives the "GOOD" status.

【0184】[26]ではリード/ライト制御部8がラ
イトコマンド(f)のデータの書き込み(ディスク媒体
9へのライトバック)を行う。なお、ライトコマンド
(g)(h)の処理は前記ライトコマンド(f)の処理
と同様に行う。
At [26], the read / write controller 8 writes the data of the write command (f) (writes back to the disk medium 9). The write commands (g) and (h) are processed in the same manner as the write command (f).

【0185】(他の実施例)以上実施例について説明し
たが、本発明は次のようにしても実施可能である。 :実施例3、4において、ホストの数は、3機以上の
任意の数でも適用可能である。
(Other Embodiments) The embodiments have been described above, but the present invention can also be implemented as follows. In the third and fourth embodiments, the number of hosts can be any number of three or more.

【0186】:磁気ディスク装置に限らず、例えば、
光磁気ディスク装置等にも同様に適用可能である。
Not limited to the magnetic disk device, for example,
It is also applicable to a magneto-optical disk device and the like.

【0187】[0187]

【発明の効果】以上説明したように、本発明によれば次
のような効果がある。 :シーケンシャルライトに対しては、磁気ディスク装
置自らこれを認識するため、ディスクの回転待ち無く、
ライトバックを行うことができる。従って、ライトバッ
ク処理を高速化することができる。
As described above, the present invention has the following effects. : For sequential write, the magnetic disk device recognizes this by itself, so without waiting for disk rotation,
You can write back. Therefore, the write back process can be speeded up.

【0188】:ホストがシーケンシャルライトを行う
場合、ライトバック処理時に生じていたディスク媒体の
回転待ち時間を無くし、高速、かつ効率の良いライトバ
ック制御ができる。また、アクセス速度が向上する。
When the host performs the sequential write, the rotation waiting time of the disk medium which has been generated during the write back processing is eliminated, and the write back control can be performed at high speed and with high efficiency. Also, the access speed is improved.

【0189】:ホストが連続発行したライトコマンド
を受領してコマンドキューイングした後、リオーダリン
グしているので、処理時間を短縮することができる。
[0189] Since the host receives the write commands continuously issued and queues them for command reordering, the processing time can be shortened.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明の原理説明図である。FIG. 1 is a diagram illustrating the principle of the present invention.

【図2】実施例1の磁気ディスク装置ブロック図であ
る。
FIG. 2 is a block diagram of a magnetic disk device according to a first embodiment.

【図3】実施例1の説明図(ライトコマンドの例)であ
る。
FIG. 3 is an explanatory diagram of Example 1 (an example of a write command).

【図4】実施例1の処理フローチャート1であるFIG. 4 is a processing flowchart 1 of the first embodiment.

【図5】実施例1の処理フローチャート2である。FIG. 5 is a processing flowchart 2 of the first embodiment.

【図6】実施例1のタイムチャートである。FIG. 6 is a time chart of the first embodiment.

【図7】実施例2の磁気ディスク装置ブロック図であ
る。
FIG. 7 is a block diagram of a magnetic disk device according to a second embodiment.

【図8】実施例2のリオーダリング説明図である。FIG. 8 is an explanatory diagram of reordering according to the second embodiment.

【図9】実施例2の処理フローチャート1である。FIG. 9 is a processing flowchart 1 of the second embodiment.

【図10】実施例2の処理フローチャート2である。FIG. 10 is a processing flowchart 2 of the second embodiment.

【図11】実施例2のタイムチャートである。FIG. 11 is a time chart of the second embodiment.

【図12】実施例3の磁気ディスク装置ブロック図であ
る。
FIG. 12 is a block diagram of a magnetic disk device according to a third embodiment.

【図13】実施例3の処理フローチャート1である。FIG. 13 is a processing flowchart 1 of the third embodiment.

【図14】実施例3の処理フローチャート2である。FIG. 14 is a processing flowchart 2 of the third embodiment.

【図15】実施例3の処理フローチャート3である。FIG. 15 is a processing flowchart 3 of the third embodiment.

【図16】実施例3のタイムチャートである。16 is a time chart of Example 3. FIG.

【図17】実施例4の磁気ディスク装置ブロック図であ
る。
FIG. 17 is a block diagram of a magnetic disk device according to a fourth embodiment.

【図18】実施例4の処理フローチャート1である。FIG. 18 is a processing flowchart 1 of the fourth embodiment.

【図19】実施例4の処理フローチャート2である。FIG. 19 is a processing flowchart 2 of the fourth embodiment.

【図20】実施例4の処理フローチャート3である。FIG. 20 is a processing flowchart 3 of the fourth embodiment.

【図21】実施例4のタイムチャートである。FIG. 21 is a time chart of Example 4.

【図22】従来の磁気ディスク装置ブロック図である。FIG. 22 is a block diagram of a conventional magnetic disk device.

【符号の説明】[Explanation of symbols]

1 磁気ディスク装置 2、20、21 ホスト(ホストコンピュータ) 3 インターフェース制御部 5 入出力制御部 6 データバッファ制御部 7 データバッファ 8 リード/ライト制御部 9 ディスク媒体 12 コマンドキュー 14 リオーダリング実行部 1 magnetic disk device 2, 20, 21 host (host computer) 3 interface control unit 5 input / output control unit 6 data buffer control unit 7 data buffer 8 read / write control unit 9 disk medium 12 command queue 14 reordering execution unit

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 ホストから転送されたデータを一時デー
タバッファ(7)に格納し、その後、前記データバッフ
ァのデータをディスク媒体(9)に書き込む制御を行う
ライトキャッシュ機構を備えたディスク装置において、 ホスト(2)が発行した命令を受領した際、シーケンシ
ャルライト(ディスク媒体上の連続したデータブロック
群を、複数回の命令にわたって順番に書き込む)命令で
あるか否かを判断し、 シーケンシャルライト命令であると判断した場合、ディ
スク媒体(9)に書き込むべきデータを、データバッフ
ァ(7)に先取り(データキューイング)すると共に、 新たな命令で指定されたディスク媒体への書き込み処理
(ライトバック)を、前命令で行っている書き込み処理
に引き続き行うように制御することを特徴としたディス
ク装置のライトバック制御方法。
1. A disk device provided with a write cache mechanism for storing data transferred from a host in a temporary data buffer (7) and then writing the data in the data buffer to a disk medium (9), When the command issued by the host (2) is received, it is determined whether the command is a sequential write (a continuous data block group on the disk medium is sequentially written over a plurality of commands), and the sequential write command is used. If it is determined that there is data, the data to be written to the disk medium (9) is prefetched (data queuing) to the data buffer (7), and the writing process (write back) to the disk medium specified by the new command is performed. , A feature that controls to continue the writing process performed by the previous instruction. Write-back control method for disk device.
【請求項2】 ホストから転送されたデータを一時デー
タバッファ(7)に格納し、その後、前記データバッフ
ァのデータをディスク媒体(9)に書き込む制御を行う
ライトキャッシュ機構を備えたディスク装置において、 ホスト(2)が連続発行した複数の書き込み命令を受領
した際、その命令を受領した順に先取り(コマンドキュ
ーイング)した後、これらの命令を、最も短時間に書き
込み処理が終了する順番に最適化(リオーダリング)
し、 前記最適化した命令を順次取り出して、シーケンシャル
ライト(ディスク媒体上の連続したデータブロック群
を、複数回の命令にわたって順番に書き込む)命令か否
かを判断し、 シーケンシャルライト命令であれば、ディスク媒体
(9)に書き込むべきデータを、データバッファ(7)
に先取り(データキューイング)すると共に、 新たな命令で指定されたディスク媒体への書き込み処理
(ライトバック)を、前命令で行っている書き込み処理
に引き続き行うように制御することを特徴としたディス
ク装置のライトバック制御方法。
2. A disk device comprising a write cache mechanism for storing data transferred from a host in a temporary data buffer (7) and thereafter writing the data in the data buffer to a disk medium (9), When the host (2) receives multiple write commands that are issued consecutively, it prefetches (command queuing) the commands in the order in which they were received, and then optimizes these commands in the order in which the write process ends in the shortest time. (Reordering)
Then, the optimized instructions are sequentially taken out, and it is determined whether or not the sequential write (a continuous data block group on the disk medium is sequentially written over a plurality of times of instructions) is instructed. The data buffer (7) stores the data to be written in the disk medium (9).
A disk characterized by pre-emption (data queuing) and control so that the write processing (write back) to the disk medium specified by the new instruction is performed after the write processing performed by the previous instruction. Device write back control method.
【請求項3】 ホストから転送されたデータを一時デー
タバッファ(7)に格納し、その後、前記データバッフ
ァのデータをディスク媒体(9)に書き込む制御を行う
ライトキャッシュ機構を備えたディスク装置において、 複数のホスト(20、21)が発行した命令を受領した
際、シーケンシャルライト(ディスク媒体上の連続した
データブロック群を、複数回の命令にわたって順番に書
き込む)命令であるか否かを判断し、 シーケンシャルライト命令であると判断した場合、ディ
スク媒体(9)に書き込むべきデータを、データバッフ
ァ(7)に先取り(データキューイング)すると共に、 新たな命令で指定されたディスク媒体への書き込み処理
(ライトバック)を、前命令で行っている書き込み処理
に引き続き行うように制御することを特徴としたディス
ク装置のライトバック制御方法。
3. A disk device comprising a write cache mechanism for storing data transferred from a host in a temporary data buffer (7) and thereafter writing the data in the data buffer to a disk medium (9), When receiving an instruction issued by a plurality of hosts (20, 21), it is judged whether or not the instruction is a sequential write (a continuous data block group on the disk medium is sequentially written over a plurality of instructions). When it is determined that the command is a sequential write command, the data to be written to the disk medium (9) is prefetched (data queuing) in the data buffer (7) and the writing process to the disk medium specified by the new command ( Write back) so that it continues from the write processing performed by the previous instruction. And a write-back control method for a disk device.
【請求項4】 ホストから転送されたデータを一時デー
タバッファ(7)に格納し、その後、前記データバッフ
ァのデータをディスク媒体(9)に書き込む制御を行う
ライトキャッシュ機構を備えたディスク装置において、 複数のホスト(20、21)が連続発行した複数の書き
込み命令を受領した際、その命令を受領した順に先取り
(コマンドキューイング)した後、これらの命令を、最
も短時間に書き込み処理が終了する順番に最適化(リオ
ーダリング)し、 前記最適化した命令を順次取り出して、シーケンシャル
ライト(ディスク媒体上の連続したデータブロック群
を、複数回の命令にわたって順番に書き込む)命令か否
かを判断し、 シーケンシャルライト命令であれば、ディスク媒体
(9)に書き込むべきデータを、データバッファ(7)
に先取り(データキューイング)すると共に、 新たな命令で指定されたディスク媒体への書き込み処理
(ライトバック)を、前命令で行っている書き込み処理
に引き続き行うように制御することを特徴としたディス
ク装置のライトバック制御方法。
4. A disk device provided with a write cache mechanism for storing data transferred from a host in a temporary data buffer (7) and then writing the data in the data buffer to a disk medium (9), When a plurality of write commands issued continuously by a plurality of hosts (20, 21) are received, the commands are prefetched (command queuing) in the order in which the commands are received, and then these commands are written in the shortest time. Optimization (reordering) is performed in order, the optimized instructions are sequentially taken out, and it is determined whether or not they are sequential write (sequential data block groups on the disk medium are sequentially written over a plurality of instructions) instructions. , If it is a sequential write command, the data to be written to the disk medium (9) (7)
A disk characterized by pre-emption (data queuing) and control so that the write processing (write back) to the disk medium specified by the new instruction is performed after the write processing performed by the previous instruction. Device write back control method.
JP05266918A 1993-10-26 1993-10-26 Disk device write-back control method Expired - Fee Related JP3122702B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP05266918A JP3122702B2 (en) 1993-10-26 1993-10-26 Disk device write-back control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP05266918A JP3122702B2 (en) 1993-10-26 1993-10-26 Disk device write-back control method

Publications (2)

Publication Number Publication Date
JPH07121308A true JPH07121308A (en) 1995-05-12
JP3122702B2 JP3122702B2 (en) 2001-01-09

Family

ID=17437488

Family Applications (1)

Application Number Title Priority Date Filing Date
JP05266918A Expired - Fee Related JP3122702B2 (en) 1993-10-26 1993-10-26 Disk device write-back control method

Country Status (1)

Country Link
JP (1) JP3122702B2 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009093423A (en) * 2007-10-09 2009-04-30 Delta Electronics Inc Programmable logic control device with queue function and its method
JP2012532397A (en) * 2009-07-02 2012-12-13 サンドフォース インク. Ordering multiple write commands associated with a storage device
US8769195B2 (en) 2010-02-05 2014-07-01 Fujitsu Limited Storage apparatus and storage apparatus control method
US9003119B2 (en) 2011-03-18 2015-04-07 Fujitsu Limited Control apparatus and method, and storage apparatus
US11762774B2 (en) 2021-07-12 2023-09-19 Fujitsu Limited Arithmetic processor and method for operating arithmetic processor
CN119718215A (en) * 2025-02-27 2025-03-28 苏州元脑智能科技有限公司 Data processing method, storage system, device, storage medium, and program product

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009093423A (en) * 2007-10-09 2009-04-30 Delta Electronics Inc Programmable logic control device with queue function and its method
JP2012532397A (en) * 2009-07-02 2012-12-13 サンドフォース インク. Ordering multiple write commands associated with a storage device
US8769195B2 (en) 2010-02-05 2014-07-01 Fujitsu Limited Storage apparatus and storage apparatus control method
US9003119B2 (en) 2011-03-18 2015-04-07 Fujitsu Limited Control apparatus and method, and storage apparatus
US11762774B2 (en) 2021-07-12 2023-09-19 Fujitsu Limited Arithmetic processor and method for operating arithmetic processor
CN119718215A (en) * 2025-02-27 2025-03-28 苏州元脑智能科技有限公司 Data processing method, storage system, device, storage medium, and program product

Also Published As

Publication number Publication date
JP3122702B2 (en) 2001-01-09

Similar Documents

Publication Publication Date Title
US6374327B2 (en) Method of data migration
US6381677B1 (en) Method and system for staging data into cache
EP0354579B1 (en) A controller with a cache memory and control method of the cache memory
JP3254429B2 (en) Data transfer / management system and method
US5548788A (en) Disk controller having host processor controls the time for transferring data to disk drive by modifying contents of the memory to indicate data is stored in the memory
JPH05307440A (en) Data storage format conversion system and its conversion method, access controller and data access method
JPH06289999A (en) Disk control system
US5426761A (en) Cache DASD sequential staging and method
KR19980029917A (en) How to improve read cache performance on magnetic disk drives
JP2001125829A (en) Controller device, disk controller, auxiliary storage device, computer system and auxiliary storage device control method
JP3122702B2 (en) Disk device write-back control method
US7376786B2 (en) Command stack management in a disk drive
JP3566319B2 (en) Information storage device
JPH11212728A (en) External storage subsystem
JP4461089B2 (en) Storage control apparatus and storage control method
JP2774728B2 (en) Disk array control method
JP2003241904A (en) Disk array device and control method therefor
US6957300B2 (en) Reducing delay of command completion due to overlap condition
JP3517417B2 (en) Data transfer device
JP3428551B2 (en) A disk control device for performing a partial write process, a disk subsystem, a control method for the disk control device, and a recording medium on which a program is recorded.
JP2561394B2 (en) Input/Output Control Method
EP0278471B1 (en) Data processing method and system for accessing rotating storage means
WO1994022134A1 (en) Buffer control for data transfer within hard disk during idle periods
JPH07295916A (en) Disk control system
JPH0432944A (en) Magnetic disk control system

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20001010

LAPS Cancellation because of no payment of annual fees