JPS6041125A - Control device of storage device - Google Patents

Control device of storage device

Info

Publication number
JPS6041125A
JPS6041125A JP58149868A JP14986883A JPS6041125A JP S6041125 A JPS6041125 A JP S6041125A JP 58149868 A JP58149868 A JP 58149868A JP 14986883 A JP14986883 A JP 14986883A JP S6041125 A JPS6041125 A JP S6041125A
Authority
JP
Japan
Prior art keywords
buffer
data
record
fixed
length
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP58149868A
Other languages
Japanese (ja)
Inventor
Yutaka Hiyoshi
豊 日吉
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 JP58149868A priority Critical patent/JPS6041125A/en
Publication of JPS6041125A publication Critical patent/JPS6041125A/en
Pending legal-status Critical Current

Links

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

PURPOSE:To prevent data from being lost due to a data buffer error at the rewriting time by connecting an intermediate buffer having capacity corresponding to a fixed length record between a buffer and a fixed length record file device. CONSTITUTION:One fixed length record out of data divided into plural fixed length records stored in a track buffer 16 is transferred to the intermediate buffer 18 and then written in a magnetic disc 12. In case of partial updating of a file, only the corresponding fixed length record is rewritten, and when two files are to be updated, the corresponding fixed length records are written through the buffer 18 twice. If an error is detected at the writing from the buffer 18 to the magnetic disc 12, data left in the buffer 16 are transferred to the buffer 18 and the transferred data are rewritten from the buffer 18 to the disc 12. If an error is detected during transfer from the buffer 16 to the buffer 18, the data are transferred from the disc 12 to the buffer 16 and the writing command is retried.

Description

【発明の詳細な説明】 発明の技術分野 本発明は、磁気ディスクなどの固定長ファイル装置に対
しバッファエミュレーション制御を行なう制御装置に関
する。
DETAILED DESCRIPTION OF THE INVENTION Technical Field of the Invention The present invention relates to a control device that performs buffer emulation control for a fixed-length file device such as a magnetic disk.

従来技術と問題点 磁気ディスク装置は中央処理装置(CPU)の外部記憶
装置に用いられ、固定長レコードファイル装置を構成す
る。即ちディスクは多数の同心円(トラック又はシリン
ダと呼ぶ)に区分され、各トランクに基準点が設けられ
、各トランクは該基準点より複数個の所定長の小区分(
セクタと呼ぶ)に分けられ、アクセスはセクタ単位で行
なわれる。
Prior Art and Problems Magnetic disk drives are used as external storage devices for central processing units (CPUs), and constitute fixed-length record file devices. That is, the disk is divided into a number of concentric circles (referred to as tracks or cylinders), each trunk is provided with a reference point, and each trunk is divided into a plurality of subsections (referred to as tracks or cylinders) of a predetermined length from the reference point.
(called sectors), and access is performed in units of sectors.

CPUの入出力データは可変長であるので、CPU出力
データをディスクへ書込む場合は該出力データをセクタ
(固定長レコード)単位に区切る必要がある。
Since CPU input/output data has a variable length, when writing CPU output data to a disk, it is necessary to divide the output data into sectors (fixed length records).

このように、あるファイル形式のものを異なるファイル
形式のものに見えるようにする、上記の例で言えば固定
長レコードファイル装置を等測的に可変長レコードファ
イル装置にするには、制御装置内にデータを一時貯える
バッファを設け、そのバッファ上でデータの読み、書き
をすることが行なわれている。これをバッファエミュレ
ーションという。
In this way, to make one file format appear to be a different file format, or to make a fixed-length record file device isometrically variable-length record file device in the example above, A buffer is provided to temporarily store data, and data is read and written on the buffer. This is called buffer emulation.

ところで従来は、バッファ上で更新されたデータを固定
長レコードファイル装置へ書き戻す場合、バッファデー
タをそのま\該ファイル装置へ送り出すようにしている
。しかしこの方式では書き戻しの際にバッファでエラー
が発生すると、書込みが開始されているので該ファイル
装置のデータも失なわれることになる。即ち、該バッフ
ァとしてはディスクの1トラック分のデータを収容でき
る容量のものが用いられ、該トラック上のレコードを更
新する場合は、ディスクをアクセスして当該トランク上
の全データを読出して該バッファに格納し、CPUから
送られた更新データで該バッファ上の該当部分を書換え
、然るのち該バッファのデータを当該トラックへ書き戻
すという処理をするが、ディスクは固定長レコードファ
イルであるからこの書き戻しにはバッファ上の1トラッ
ク分データをセクタ(固定長レコード)毎に区切る必要
があり、そしである固定長レコードはディスクから読出
したデータと更新データで構成され(区切った結果、こ
のようになった)、リード・アフター・ライトのチェッ
ク結果、該レコードにエラーが発見されると、該レコー
ドのデータ即ちディスクから読出したデータの一部とC
PUから送られたデータの一部が失なわれる(信用でき
なくなる)。
Conventionally, when data updated on a buffer is written back to a fixed-length record file device, the buffer data is sent as is to the file device. However, in this method, if an error occurs in the buffer during write-back, data in the file device will also be lost since writing has already started. That is, the buffer used has a capacity that can accommodate data for one track on the disk, and when updating records on the track, access the disk, read all data on the trunk, and fill the buffer. The relevant part of the buffer is rewritten with update data sent from the CPU, and the data in the buffer is then written back to the track. However, since the disk is a fixed-length record file, this To write back, it is necessary to separate one track's worth of data on the buffer into sectors (fixed-length records), and fixed-length records consist of the data read from the disk and the updated data (as a result of partitioning, ), if an error is found in the record as a result of the read-after-write check, the data of the record, that is, part of the data read from the disk and the C
Part of the data sent from the PU is lost (becomes unreliable).

発明の目的 本発明はバッファと固定長レコードファイル装置との間
に固定長レコード相当分の容量を持つ中間バッファを持
つことにより、書き戻し時のデータバッファエラーでデ
ータが失なわれるの防止しようとするものである。
Purpose of the Invention The present invention attempts to prevent data from being lost due to a data buffer error during write-back by providing an intermediate buffer with a capacity equivalent to a fixed-length record between a buffer and a fixed-length record file device. It is something to do.

発明の構成 本発明は固定長レコードの記憶装置から読出した固定長
レコード複数個からなる単位データを一時蓄積するバッ
ファを備える、固定長レコード記憶装置を可変長レコー
ド記憶装置として制御する制御装置において、前記バッ
ファから固定長レコードを転送される中間バッファを設
け、書込みに際して前記バッファから中間バッファへ固
定長レコードを転送し、該中間バッファより固定長レコ
ード記憶装置へ該固定長レコードを書込むようにしてな
ることを特徴とするが次に実施例を参照しながらこれを
説明する。
Structure of the Invention The present invention provides a control device for controlling a fixed-length record storage device as a variable-length record storage device, which includes a buffer for temporarily storing unit data consisting of a plurality of fixed-length records read from a fixed-length record storage device. An intermediate buffer is provided to which a fixed length record is transferred from the buffer, and upon writing, the fixed length record is transferred from the buffer to the intermediate buffer, and the fixed length record is written from the intermediate buffer to a fixed length record storage device. Next, this will be explained with reference to examples.

発明の実施例 第1図は本発明の実施例を示し、10はホストCPU(
中央処理装置)、12は固定長レコードの外部記憶装置
具体的には磁気ディスク記憶装置、14はディスク制御
装置でトラックバッファ16を備え、バッファエミュレ
ーションによる制御を行なう。この制御装置14はホス
トインタフェイス回路20、デバイスインタフ六イス回
路22、データ転送回路24などを備え、そして本発明
では更に中間バッファ18を追加する。前述のようにト
ラックバッファ16は磁気ディスク12の1トランク分
のデータを格納できる記憶容量を持ち、そして中間バッ
ファ18は1セクタ分(1固定長レコ一ド分)の記憶容
量を持つ。磁気ディスク12は図面では1つのみ示すが
実際には複数個設けられるのが普通である。
Embodiment of the Invention FIG. 1 shows an embodiment of the invention, in which reference numeral 10 denotes a host CPU (
12 is an external storage device for fixed-length records, specifically a magnetic disk storage device; 14 is a disk control device equipped with a track buffer 16 and controlled by buffer emulation. The control device 14 includes a host interface circuit 20, a device interface circuit 22, a data transfer circuit 24, and the like, and further includes an intermediate buffer 18 in the present invention. As mentioned above, the track buffer 16 has a storage capacity that can store data for one trunk of the magnetic disk 12, and the intermediate buffer 18 has a storage capacity for one sector (one fixed length record). Although only one magnetic disk 12 is shown in the drawing, in reality, a plurality of magnetic disks 12 are usually provided.

第2図は固定長レコードと可変長レコードとトランクバ
ッファの関係を示す。fa)は可変長レコードの形式を
、(blはトラックバッファの内容を、(C)は固定長
レコードの形式を示す。HAはホームアドレス領域、R
oはレコードゼロ領域、R1−Rnは一部レコード領域
である。印はトランク基準点を示す。
FIG. 2 shows the relationship between fixed-length records, variable-length records, and trunk buffers. fa) indicates the variable length record format, (bl indicates the contents of the track buffer, and (C) indicates the fixed length record format. HA is the home address area, R
o is a record zero area, and R1-Rn are partial record areas. The mark indicates the trunk reference point.

ホストCPUl0より制御装置14にトラック番号及び
トラック内レコード位置を指定して読取り指示がなされ
ると、該制御装置は該トランク番号で磁気ディスク12
をアクセスし、当該トランクを読出しその1トラック分
データをバッファ16へ取込む。そして該当するレコー
ドをバッファ16より取出してホストCPU1’0へ送
る。またホストcpuioより制御装置14に書込みが
指示されると、該制御装置はホス)CPUよりデータを
受取ってバッファ16へ書込み、その書込みが終了した
時点で固定長レコードに分割し、それらを磁気ディスク
の一部トランクへ書込む。第2図で説明すると同図(a
lがホストCPUからの可変長データとすると、トラン
クバッファ16は同図+blの如くこれを連続させた状
態で取込み(最初より順次詰めて可変長データを取込ん
でゆく)、これを同図(C)の如く固定長レコードに細
分して各レコードを該当トランクへ逐次書込む。この固
定長レコードへの分割でボストCPUがらの可変長レコ
−1’Ro、R+〜Rnは図示の如く2つのセクタに跨
ったりする。
When the host CPU 10 instructs the control device 14 to read by specifying a track number and a record position within the track, the control device reads the magnetic disk 12 using the trunk number.
is accessed, the relevant trunk is read, and the data for one track is taken into the buffer 16. Then, the corresponding record is taken out from the buffer 16 and sent to the host CPU 1'0. When the host cpuio instructs the control unit 14 to write, the control unit receives data from the host CPU, writes it to the buffer 16, and when the writing is completed, divides it into fixed-length records and stores them on the magnetic disk. Write to some trunk. To explain using Figure 2, the same figure (a
If l is variable length data from the host CPU, the trunk buffer 16 takes in the variable length data in a continuous state as shown in +bl in the same figure (the variable length data is taken in sequentially from the beginning), and this is shown in the figure ( As shown in C), each record is subdivided into fixed-length records and sequentially written to the corresponding trunk. Due to this division into fixed length records, the variable length records 1'Ro, R+ to Rn from the boss CPU span two sectors as shown in the figure.

ファイルの部分更新を行なう場合は磁気ディスクに記憶
しているレコード群の一部を修正することになるが、こ
の場合は更新すべきレコードのみホストCPUから送ら
れ、該当トランクのデータを読出してそのうちの該当レ
コードをホストcPUから送られて来た新レコードに置
き換えることになる。今ホストから新レコードRiが送
られ、該当トランクを読出してレコードRi相当部分を
上記新レコードで置き換え、固定長レコードに区分した
ところレコードRiは2つの固定長レコードに分割され
、従って該2つの固定長レコードの前半又は後半は磁気
ディスクから読出したデータであったとする。が−るレ
コードを書込み、リードアフターライトのチェックの結
果エラーが発生すると、該レコード全体が信用できない
ものとなり、ディスクからの1トラツクデータの読出し
、ホストCPUからの新レコードの送出など全て最初か
らやり直さねばならなくなる。そこで本発明では中間バ
ッファ18を設け、書込み(更新)を次の如く行なう。
When performing a partial update of a file, a part of the record group stored on the magnetic disk will be modified, but in this case, only the record to be updated is sent from the host CPU, and the data of the corresponding trunk is read and The corresponding record will be replaced with the new record sent from the host cPU. Now, a new record Ri is sent from the host, the corresponding trunk is read, the part corresponding to record Ri is replaced with the above new record, and the record Ri is divided into fixed length records. It is assumed that the first half or the second half of the long record is data read from a magnetic disk. If a record is written and an error occurs as a result of the read-after-write check, the entire record becomes unreliable, and everything including reading one track of data from the disk and sending a new record from the host CPU must be restarted from the beginning. It becomes necessary. Therefore, in the present invention, an intermediate buffer 18 is provided, and writing (updating) is performed as follows.

固定長レコードに細分したトラックバッファ16のデー
タはその1固定長レコ一ド分が中間バッファ18に移さ
れ、然るのち磁気ディスク4に書込まれる。ファイルの
部分更新の場合は該当する固定長レコード(書換えられ
たレコードが存在する固定長レコード)のみ書換えを行
ない、前述のようにそれが2つに跨る場合は上記中間バ
ッファ18経由の書込みを2回行なう。書込みが多数回
に亘る場合は1固定長レコードの容量の中間バッファ3
を2組設け、これを交互に使用する(一方が書込みのと
き他方は読取りとしこれを交互に繰り返す)ことにより
、書込みを連続化することができる。中間へソファ18
から磁気ディスク12への書込みでエラーが発見された
場合は、トランクバッファ16にデータが残っているか
ら当該データを中間バッファ18へ移し、該バッファか
ら磁気ディスク12へ再書込みすればよい。トラックバ
ッファ16から中間バ・ノファ18へのデータ転送でエ
ラーが発見された場合は磁気ディスク12からトラック
バッファ16へデータを移し、書込み(更新)コマンド
の再試行を行なう。
The data in the track buffer 16 that has been subdivided into fixed-length records is transferred to the intermediate buffer 18 for one fixed-length record, and then written to the magnetic disk 4. In the case of a partial update of a file, only the corresponding fixed-length record (the fixed-length record in which the rewritten record exists) is rewritten, and as mentioned above, if it spans two records, writing via the intermediate buffer 18 is performed twice. Let's go around. If writing occurs multiple times, use 3 intermediate buffers with the capacity of 1 fixed-length record.
Writing can be made continuous by providing two sets and using them alternately (when one is writing, the other is reading, and this is repeated alternately). Sofa 18 to the middle
If an error is found in writing to the magnetic disk 12, the data remains in the trunk buffer 16, so the data can be moved to the intermediate buffer 18 and rewritten from the buffer to the magnetic disk 12. If an error is found in data transfer from the track buffer 16 to the intermediate buffer 18, the data is transferred from the magnetic disk 12 to the track buffer 16, and the write (update) command is retried.

第3図はホストCPUからのコマンドの処理を示すフロ
ーチャートである。図示のようにホストCPUl0より
コマンドを受取ると制御装置1′4はコマンドはライト
(書込み)か否かをチェックし、ライトなら(Y)トラ
・ツクバッファ1Gにデータが格納されているか否かを
チェックし、格納されていなければ外部記憶装置12よ
り該当トラックデータを読出してへソファ16へ格納し
、該バッファにトラックデータがある状態でボストCP
Uより書込みレコードデータを受取り、固定長レコード
に区分する。次いで書込むべきブロック(固定長レコー
ド)を捜し、それを中間バッファ18へ移し、こ−でパ
リティチェックする。エラーが発見され−ば再試行し、
エラーがなげれば中間バッファ18より磁気ディスク1
2へ書込みを行なう。こ−でリードアフターライトのエ
ラーチェックをし、エラーが発見され\ばトラックバッ
ファ16から中間バッファ18へデータを取込む上記操
作から繰り返し、エラーが発見されなければ次の固定長
レコードの書込みに移り、書込むべき固定長レコードが
なくなれば書込み処理終了となる。
FIG. 3 is a flowchart showing the processing of commands from the host CPU. As shown in the figure, upon receiving a command from the host CPU 10, the control device 1'4 checks whether the command is a write (write), and if it is a write (Y), checks whether data is stored in the track buffer 1G. If the track data is not stored, the relevant track data is read from the external storage device 12 and stored in the hesophagus 16, and with the track data in the buffer, the boss CP is
Receives write record data from U and divides it into fixed length records. Next, a block (fixed length record) to be written is searched for and transferred to the intermediate buffer 18, where parity is checked. If an error is found, try again,
If there is no error, the magnetic disk 1 is transferred from the intermediate buffer 18.
Write to 2. In this way, read-after-write errors are checked, and if an error is found, the above operation of fetching data from the track buffer 16 to the intermediate buffer 18 is repeated, and if no error is found, the process moves on to writing the next fixed-length record. When there are no fixed-length records to write, the write process ends.

コマンドがライトでない場合(N)は、これはリード(
読取り)コマンドであるが、トラックバッファ16に該
当トランクのレコードがあるか否かをチェックし、あれ
ばそれをトラックバッファよりホストCP Uへ送り、
なければ磁気ディスクの該当トラックを読出してそのト
ラックデータをバッファ16へ取込み、該当レコードを
ホストCPUへ送る。
If the command is not a write (N), this is a read (
This command checks whether there is a record of the corresponding trunk in the track buffer 16, and if so, sends it from the track buffer to the host CPU.
If not, the corresponding track on the magnetic disk is read, the track data is taken into the buffer 16, and the corresponding record is sent to the host CPU.

発明の詳細 な説明したように本発明によれば、バッファでエラーが
発生してもデータが失なわれることがないのでデータの
信頼度が向上でき、制御装置で再試行が可能なのでO3
(オペレーティングシステム)下での再試行の必要がな
くなり、O8の負荷を軽減できる。
DETAILED DESCRIPTION OF THE INVENTION According to the present invention, even if an error occurs in the buffer, data is not lost, so data reliability can be improved, and the control device can retry, so O3
There is no need for retries under (operating system), and the load on O8 can be reduced.

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

第1図は本発明の実施例を示すブロック図、第2図は固
定長、可変長各レコードの説明図、第3図は処理要領を
示すブロック図である。 図面で14は制御装置、12は固定長レコードファイル
装置、16はバッファ1.18は中間バッファである。 出願人 富士通株式会社 代理人弁理士 青 柳 稔 第1図 第2図 (リ 、前た国コ」T丁丑コz←…f===L工[ヨ第
3図
FIG. 1 is a block diagram showing an embodiment of the present invention, FIG. 2 is an explanatory diagram of fixed length and variable length records, and FIG. 3 is a block diagram showing a processing procedure. In the drawing, 14 is a control device, 12 is a fixed-length record file device, 16 is a buffer 1, and 18 is an intermediate buffer. Applicant Fujitsu Ltd. Representative Patent Attorney Minoru Aoyagi Figure 1 Figure 2

Claims (1)

【特許請求の範囲】 固定長レコードの記憶装置から読出した複数個の固定長
レコードからなる単位データを一時蓄積するバッファを
備える、固定長レコード記憶装置を可変長レコード記憶
装置として制御する制御装置において、 前記バッファから固定長レコードを転送される中間バッ
ファを設け、書込みに胤して前記バッファから中間バッ
ファへ固定長レコードを転送し、該中間バッファより固
定長レコード記憶装置へ該固定長レコードを書込むよう
にしてなることを特徴とする記憶装置の制御装置。
[Scope of Claims] A control device for controlling a fixed-length record storage device as a variable-length record storage device, including a buffer for temporarily storing unit data consisting of a plurality of fixed-length records read from a fixed-length record storage device. , providing an intermediate buffer to which fixed-length records are transferred from the buffer, transferring fixed-length records from the buffer to the intermediate buffer upon writing, and writing the fixed-length records from the intermediate buffer to a fixed-length record storage device; 1. A control device for a storage device, characterized in that the control device
JP58149868A 1983-08-17 1983-08-17 Control device of storage device Pending JPS6041125A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP58149868A JPS6041125A (en) 1983-08-17 1983-08-17 Control device of storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP58149868A JPS6041125A (en) 1983-08-17 1983-08-17 Control device of storage device

Publications (1)

Publication Number Publication Date
JPS6041125A true JPS6041125A (en) 1985-03-04

Family

ID=15484405

Family Applications (1)

Application Number Title Priority Date Filing Date
JP58149868A Pending JPS6041125A (en) 1983-08-17 1983-08-17 Control device of storage device

Country Status (1)

Country Link
JP (1) JPS6041125A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5263232A (en) * 1991-10-17 1993-11-23 Yoshida Kogyo K.K. Cord stopper
JPH06222890A (en) * 1993-01-22 1994-08-12 Nec Corp Data update control system for virtual disk device in extended storage mechanism

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5263232A (en) * 1991-10-17 1993-11-23 Yoshida Kogyo K.K. Cord stopper
JPH06222890A (en) * 1993-01-22 1994-08-12 Nec Corp Data update control system for virtual disk device in extended storage mechanism

Similar Documents

Publication Publication Date Title
US5584008A (en) External storage unit comprising active and inactive storage wherein data is stored in an active storage if in use and archived to an inactive storage when not accessed in predetermined time by the host processor
US5764880A (en) Method and system for rebuilding log-structured arrays
US5301304A (en) Emulating records in one record format in another record format
JPS605023B2 (en) memory system
JPH05224822A (en) Collective storage device
EP0701208A2 (en) Disk array subsystem and data generation method therefor
JP3032321B2 (en) Access control method for optical disk device
KR20030009047A (en) Magnetic disc drive, method for recording data, and method for reproducing data
JP2968181B2 (en) Disk device and data writing / reading method
EP0347032A2 (en) Record format emulation
JP2761289B2 (en) Disk track emulation method
JPH10240453A (en) Disk array device
JP3030949B2 (en) Digital data recording / reproducing device
JP2733189B2 (en) Disk array device input / output control method
JPH06274282A (en) Magnetic recording device
JPH08147111A (en) Expansion configuration method for disk array device
JPH08161123A (en) Disk array device
JPS63224487A (en) Digital data recorder controller
JPH0950353A (en) Library type storage device
JPH0736633A (en) Magnetic disk array
JPH08221216A (en) Storage system
JPS59197947A (en) System for updating information of doubled file
JP3226047B2 (en) Input/Output Devices
JPH04341977A (en) Data playback control method
JPH04111030A (en) Information recorder