Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP4859658B2 - Block data partial update device, block data partial update method, and block data partial update program - Google Patents
[go: Go Back, main page]

JP4859658B2 - Block data partial update device, block data partial update method, and block data partial update program - Google Patents

Block data partial update device, block data partial update method, and block data partial update program Download PDF

Info

Publication number
JP4859658B2
JP4859658B2 JP2006347230A JP2006347230A JP4859658B2 JP 4859658 B2 JP4859658 B2 JP 4859658B2 JP 2006347230 A JP2006347230 A JP 2006347230A JP 2006347230 A JP2006347230 A JP 2006347230A JP 4859658 B2 JP4859658 B2 JP 4859658B2
Authority
JP
Japan
Prior art keywords
data
updated
update
check code
crc
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.)
Expired - Fee Related
Application number
JP2006347230A
Other languages
Japanese (ja)
Other versions
JP2008158832A (en
Inventor
貞之 大山
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 JP2006347230A priority Critical patent/JP4859658B2/en
Publication of JP2008158832A publication Critical patent/JP2008158832A/en
Application granted granted Critical
Publication of JP4859658B2 publication Critical patent/JP4859658B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、ブロックデータの部分更新技術に関し、特に、ブロックデータを部分更新する際のチェックコードを生成するブロックデータの部分更新装置、ブロックデータの部分更新方法、およびブロックデータの部分更新プログラムに関する。   The present invention relates to a block data partial update technique, and more particularly to a block data partial update apparatus, a block data partial update method, and a block data partial update program that generate a check code for partial update of block data.

RAID装置は、LBA単位(512バイト(byte))のブロックデータで、ユーザデータを管理し、HDD(Hard Disk Drive)にRead(読み込み)/Write(書き込み)を行っている。
図12は、RAID装置が管理するユーザデータのフォーマット例を示す図である。RAID装置内部では、ユーザデータの信頼性を高めるために、図12(A)に示すように、512バイトのユーザデータに8バイトのBCC(Block Check Code)を付加しており、該BCCに基づいて、装置内部やHDD内部でのデータ化けが容易に検出できるようになっている。
上記8バイトのBCCは、6バイトのBID(Block ID)と、2バイトのブロックチェックコードであるCRCとから構成される。BIDは、ブロックを一意に識別する識別子である。
The RAID device manages user data in block data in units of LBA (512 bytes (bytes)), and performs read (read) / write (write) to an HDD (Hard Disk Drive).
FIG. 12 is a diagram illustrating a format example of user data managed by the RAID device. In the RAID device, in order to improve the reliability of the user data, as shown in FIG. 12A, an 8-byte BCC (Block Check Code) is added to the 512-byte user data. Thus, garbled data inside the apparatus or HDD can be easily detected.
The 8-byte BCC is composed of a 6-byte BID (Block ID) and a CRC that is a 2-byte block check code. BID is an identifier that uniquely identifies a block.

Mainframe系のシステムの場合は、可変長なCKDフォーマットで構成されているため、図12(B)、図12(C)に示すように、512バイトのLBAの中にCount,Key,Dataの3つの可変長フィールドを64バイトの境界で敷き詰めている。このため、Cout,Key,Dataの一部のフィールド(Field)を更新する場合、更新したLBAのBCC(BID+CRC)を更新する必要がある。
MainFrame系のデータを更新する場合、データの信頼性を持たせるため、更新対象となる元データだけでなく、更新ブロックデータ(更新データ)についてもCRCを付加している。更新データの形式の例を以下に示す。
Since the mainframe system is configured in a variable-length CKD format, as shown in FIGS. 12 (B) and 12 (C), 3 bytes of Count, Key, and Data are included in the 512-byte LBA. Two variable length fields are spread on a 64-byte boundary. For this reason, when updating some fields (Field) of Cout, Key, and Data, it is necessary to update the BCC (BID + CRC) of the updated LBA.
When updating MainFrame data, CRC is added not only to the original data to be updated but also to the updated block data (update data) in order to provide data reliability. An example of the update data format is shown below.

1.ブロックデータ全体を更新対象とする更新データの形式
512バイトのブロックデータ全体を更新対象とする場合、BCCも含めたLBA単位で更新データを書き込むことによって、データ更新を行う。
2.ブロックデータを部分更新する場合の更新データの形式
(1)更新データが右詰めされた形式
更新データが右詰めされた形式とは、図13(A)に示すように、更新データを右詰めして、非更新部分を0詰めしたフォーマットである。元データを更新する場合には、更新対象となる元データ上に、更新データを所定の位置まで左シフトして書き込む。この時、元データのBCC(BID+CRC)を更新する必要がある。
(2)更新データがデータ更新位置(元データに対する書き込み位置)に書き込まれた形式
更新データがデータ更新位置に書き込まれた形式とは、図13(B)に示すように、更新データがデータ更新位置に書き込まれ、非更新部分を0詰めしたフォーマットである。元データを更新する場合には、元データ上に該データ更新位置にある更新データをそのまま書き込む。この時、元データのBCC(BID+CRC)を更新する必要がある。
1. Update Data Format for Updating Block Data Entirely When updating the entire 512-byte block data to be updated, data is updated by writing update data in units of LBA including BCC.
2. Update data format for partial update of block data (1) Update data right-justified format Update data right-justified format means that update data is right-justified as shown in FIG. Thus, the non-updated part is padded with zeros. In the case of updating the original data, the update data is written by shifting left to a predetermined position on the original data to be updated. At this time, it is necessary to update the BCC (BID + CRC) of the original data.
(2) Format in which update data is written at data update position (write position with respect to original data) The format in which update data is written at the data update position is as shown in FIG. The format is written at the location and padded with non-updated parts. When the original data is updated, the update data at the data update position is directly written on the original data. At this time, it is necessary to update the BCC (BID + CRC) of the original data.

従来、図14に示すような部分データ更新回路によってブロックデータを部分更新していた。図14に示す部分データ更新回路は、ユーザデータを格納するキャッシュメモリ21と、キャッシュメモリ21に対するデータの読込み/書き込みを媒介するキャッシュメモリインタフェース22と、キャッシュメモリ21から元データと更新データとを読み込むRead DMA23と、元データおよび更新データのBCCのチェックを行うBCCチェッカー24と、元データの上に更新データを書き込んで更新済みデータに更新し、該更新済みデータを更新用データバッファ26に格納するバッファコントローラ25と、更新済みデータが格納される更新用データバッファ26と、更新用データバッファ26に格納された更新済みデータのBCCを生成して該更新済みデータに付加するBCC演算部27と、BCCが付加された更新済みデータをキャッシュメモリに書き込むWrite DMA28とを備える。
図14に示す部分データ更新回路は、例えば以下の[1]〜[8]までの手順に従ってブロックデータの部分更新処理を行う。なお、Mainframe系のシステムに対応するユーザデータのフォーマットに従うと、64バイト単位でデータ更新がされるため、この例では、更新ブロック位置を指定しやすいように、図15に示すように、各々が64バイトのBLK0〜BLK7までの8個のサブブロック(Sub−block)でユーザデータを表記する。
Conventionally, block data is partially updated by a partial data update circuit as shown in FIG. The partial data update circuit shown in FIG. 14 reads a cache memory 21 that stores user data, a cache memory interface 22 that mediates reading / writing of data to / from the cache memory 21, and reads original data and update data from the cache memory 21. Read DMA 23, BCC checker 24 for checking the BCC of the original data and update data, update data is written on the original data to update it, and the updated data is stored in the update data buffer 26. A buffer controller 25; an update data buffer 26 in which updated data is stored; a BCC operation unit 27 that generates a BCC of the updated data stored in the update data buffer 26 and adds the BCC to the updated data; Updated data with BCC added Write DMA 28 for writing data to the cache memory.
The partial data update circuit shown in FIG. 14 performs partial update processing of block data according to the following procedures [1] to [8], for example. According to the format of user data corresponding to the mainframe system, data is updated in units of 64 bytes. Therefore, in this example, as shown in FIG. User data is represented by 8 sub-blocks (Sub-block) from BLK0 to BLK7 of 64 bytes.

例えば、更新対象となる元データのBLK4,3,2を更新データで更新する場合、図14に示す部分データ更新回路は、以下の手順で該更新処理を行う。
[1]Read DMA23が、キャッシュメモリ21に格納されている元データを520バイト(512バイトのユーザデータ+8バイトのBCC)読み込む。
[2]BCCチェッカー24が、読み込まれたユーザデータのCRCおよびBIDのチェックを行ない、正当であれば、該ユーザデータのBCCを削除する。
[3]バッファコントローラ25が、更新用データバッファ26内に用意された空のユーザデータのBLK7,6,5,1,0に、元データのBLK7,6,5,1,0のデータを格納する。
[4]Read DMA23が、キャッシュメモリ21に格納されている更新データを520バイト(512バイトのユーザデータ+8バイトのBCC)読み込む。
[5]BCCチェッカー24が、上記手順[4]で読み込まれたユーザデータのCRCおよびBIDのチェックを行ない、正当であれば、該ユーザデータのBCCを削除する。
[6]バッファコントローラ25が、更新データを更新データバッファ26に格納する。該手順[6]においては、更新データが右詰めされた形式か、更新データがデータ更新位置に書き込まれた形式かによって、更新データの格納処理が異なる。
図15中に示すBLK2,1,0のデータが更新データである場合のように、更新データが右詰めされた形式のとき、バッファコントローラ25は、更新用データバッファ26に用意され、上記手順[3]においてBLK7,6,5,1,0に元データが格納されたユーザデータのBLK4,3,2に更新データ(BLK2,1,0のデータ)を格納する。
図15中に示すBLK4,3,2が更新データである場合のように、更新データがデータ更新位置に書き込まれた形式であるとき、バッファコントローラ25は、更新用データバッファ26に用意され、上記手順[3]においてBLK7,6,5,1,0に元データが格納されたユーザデータのBLK4,3,2に更新データ(BLK4,3,2のデータ)を格納する。
For example, when updating the original data BLK4, 3, 2 to be updated with the update data, the partial data update circuit shown in FIG. 14 performs the update process according to the following procedure.
[1] The Read DMA 23 reads 520 bytes (512 bytes of user data + 8 bytes of BCC) of the original data stored in the cache memory 21.
[2] The BCC checker 24 checks the CRC and BID of the read user data, and if it is valid, deletes the BCC of the user data.
[3] The buffer controller 25 stores the original data BLK7,6,5,1,0 in the empty userdata BLK7,6,5,0 prepared in the update data buffer 26. To do.
[4] The Read DMA 23 reads the update data stored in the cache memory 21 by 520 bytes (512 bytes of user data + 8 bytes of BCC).
[5] The BCC checker 24 checks the CRC and BID of the user data read in the procedure [4]. If it is valid, the BCC of the user data is deleted.
[6] The buffer controller 25 stores the update data in the update data buffer 26. In the procedure [6], update data storage processing differs depending on whether the update data is right-justified or whether the update data is written in the data update position.
When the update data is in the right-justified format as in the case where the data of BLK2, 1, 0 shown in FIG. 15 is update data, the buffer controller 25 is prepared in the update data buffer 26 and the above procedure [ 3], update data (data of BLK2, 1, 0) is stored in BLK4, 3, 2 of the user data whose original data is stored in BLK7, 6, 5, 1, 0.
When the update data is written in the data update position as in the case where the BLKs 4, 3, and 2 shown in FIG. 15 are update data, the buffer controller 25 is prepared in the update data buffer 26, and In step [3], update data (data of BLK4, 3, 2) is stored in BLK4, 3, 2 of the user data in which the original data is stored in BLK7, 6, 5, 1, 0.

[7]BCC演算部27が、更新用データバッファ26に格納されたユーザデータ(更新済みデータ)に基づいてBCC(CRC+BID)を生成し、生成されたBCCを更新済みデータに付加する。
[8]Write DMA28が、上記手順[7]においてBCCが付加された更新済みデータをキャッシュメモリ21に書き込む。
なお、従来のデータ更新に関する具体的技術として、下記の特許文献1に、書き込みデータ中の更新データからチェックコードを生成し、生成されたチェックコードと書き込みデータ中のチェックコードとの比較結果に基づいて、書き込みデータをディスク部に書き込むディスクアレイ装置に関して記載されている。
特開2000−105675号公報
[7] The BCC computing unit 27 generates BCC (CRC + BID) based on the user data (updated data) stored in the update data buffer 26, and adds the generated BCC to the updated data.
[8] The Write DMA 28 writes the updated data to which the BCC is added in the procedure [7] to the cache memory 21.
In addition, as a specific technique related to conventional data update, Japanese Patent Application Laid-Open No. 2004-228561 generates a check code from update data in write data and based on a comparison result between the generated check code and the check code in the write data. The disk array device for writing write data to the disk unit is described.
JP 2000-105675 A

上述した図14に示す従来の部分データ更新回路では、BCCチェッカー24によって元データおよび更新データのBCCを削除し、該BCCが削除された元データを更新データで更新した上で、更新済みデータについてのBCCをBCC演算部27によって生成する。すなわち、従来の部分データ更新回路では、データの更新回路とBCCの演算回路とが分離されていない。
従って、BCCチェッカー24によってユーザデータのBCCが削除されてからBCC演算部27によって更新済みデータについてのBCCが生成されるまでの間の処理(元データの更新用データバッファ26への格納処理および更新データの元データ上への書き込み処理)におけるデータ化けを検出することが困難である。
該データ化けを検出するために、例えばBCCチェッカー24とバッファコントローラ25との間のデータパス、バッファコントローラ25と更新用データバッファ26との間のデータパスにパリティ(Parity)を付加することが考えられる。しかし、更新用データバッファ26のアドレス化け等により、更新用データバッファ26に対して誤ったデータが書き込まれた場合、BCC演算部27は、誤ったデータに対して正当なBCCを付加してしまい、RAID装置の信頼性が低下しまう恐れがある。
In the conventional partial data update circuit shown in FIG. 14 described above, the BCC checker 24 deletes the original data and the BCC of the update data, updates the original data from which the BCC has been deleted with the update data, and then updates the updated data. Are generated by the BCC calculation unit 27. That is, in the conventional partial data update circuit, the data update circuit and the BCC arithmetic circuit are not separated.
Accordingly, the process from when the BCC of the user data is deleted by the BCC checker 24 until the BCC of the updated data is generated by the BCC calculation unit 27 (storage processing and update of the original data in the update data buffer 26) It is difficult to detect data corruption in the process of writing data onto the original data.
In order to detect the garbled data, for example, a parity may be added to the data path between the BCC checker 24 and the buffer controller 25 and the data path between the buffer controller 25 and the update data buffer 26. It is done. However, when incorrect data is written to the update data buffer 26 due to an address change of the update data buffer 26, the BCC operation unit 27 adds a valid BCC to the incorrect data. The reliability of the RAID device may be reduced.

本発明は上記問題点を解決するためになされたものであって、誤った更新済みデータに正しいBCCを付加することを防止するブロックデータの部分更新装置、ブロックデータの部分更新方法、およびブロックデータの部分更新プログラムの提供を目的とする。   The present invention has been made to solve the above-described problem, and is a block data partial update device, a block data partial update method, and block data, which prevent adding correct BCC to erroneous updated data. The purpose is to provide a partial update program.

上記課題を解決するため、本発明においては、データの更新回路とBCCの演算回路とが分離されたブロックデータの部分更新装置を設ける。   In order to solve the above-described problems, the present invention provides a block data partial update device in which a data update circuit and a BCC arithmetic circuit are separated.

すなわち、本発明は、次のようにして前記課題を解決する。
(1)チェックコードで保護されたブロックデータの部分更新装置を設ける。上記ブロックデータの部分更新装置が、チェックコードを生成するチェックコード生成手段と、更新対象となる元データD1の更新される部分のブロックデータBD1上に更新ブロックデータBD2を書き込んで、更新済みデータD2に更新し、該更新済みデータD2に上記チェックコード生成手段で生成されたチェックコードを付加するデータ更新手段とを備える。 また、上記チェックコード生成手段は、更新対象となる元データD1とそのチェックコードBCC1を格納した領域から、更新される部分のブロックデータBD1と、更新対象となる元データD1のチェックコードBCC1を読み取る手段と、上記更新される部分のブロックデータBD1のチェックコードBCCD1を生成する手段と、上記更新対象となる元データD1を更新する更新ブロックデータBD2と、そのチェックコードBCCD2を読み込む手段と、上記更新ブロックデータBD2のチェックコードBCCD2と、上記元データD1のチェックコードBCC1と、更新される部分のブロックデータBD1のチェックコードBCCD1とから、更新済みデータD2のチェックコードBCC2を生成する手段とを備える。
(2)上記更新済みデータD2のチェックコードBCC2を生成する手段が、上記元データD1のチェックコードBCC1と、更新される部分のブロックデータBD1のチェックコードBCCD1と、更新ブロックデータBD2が上記元データD1に対する書き込み位置にあるか否かに応じて決まる更新ブロックデータBD2のチェックコードBCCD2とに基づいて、上記更新済みデータD2のチェックコードBCC2を生成する。
(3)チェックコードで保護されたブロックデータの部分更新方法を実行する。上記ブロックデータの部分更新方法が、更新対象となる元データD1とそのチェックコードBCC1を格納した領域から、更新される部分のブロックデータBD1と、更新対象となる元データD1のチェックコードBCC1を読み取るステップと、上記更新される部分のブロックデータBD1のチェックコードBCCD1を生成するステップと、上記更新対象となる元データD1を更新する更新ブロックデータBD2と、そのチェックコードBCCD2を読み込むステップと、上記更新ブロックデータBD2のチェックコードBCCD2と、上記元データD1のチェックコードBCC1と、更新される部分のブロックデータBD1のチェックコードBCCD1とから、更新済みデータD2のチェックコードBCC2を生成するステップと、上記元データD1の更新される部分のブロックデータBD1上に上記更新ブロックデータBD2を書き込んで、更新済みデータD2に更新し、該更新済みデータD2に上記チェックコードBCC2を付加するステップとからなる。
(4)上記更新済みデータD2のチェックコードBCC2を生成するステップが、上記元データD1のチェックコードBCC1と、更新される部分のブロックデータBD1のチェックコードBCCD1と、更新ブロックデータBD2が上記元データD1に対する書き込み位置にあるか否かに応じて決まる更新ブロックデータBD2のチェックコードBCCD2とに基づいて、上記更新済みデータD2のチェックコードBCC2を生成する。
(5)チェックコードで保護されたブロックデータの部分更新プログラムを設ける。上記ブロックデータの部分更新プログラムが、コンピュータに、更新対象となる元データD1とそのチェックコードBCC1を格納した領域から、更新される部分のブロックデータBD1と、更新対象となる元データD1のチェックコードBCC1を読み取る処理と、上記更新される部分のブロックデータBD1のチェックコードBCCD1を生成する処理と、上記更新対象となる元データD1を更新する更新ブロックデータBD2と、そのチェックコードBCCD2を読み込む処理と、上記更新ブロックデータBD2のチェックコードBCCD2と、上記元データD1のチェックコードBCC1と、更新される部分のブロックデータBD1のチェックコードBCCD1とから、更新済みデータD2のチェックコードBCC2を生成する処理と、上記元データD1の更新される部分のブロックデータBD1上に上記更新ブロックデータBD2を書き込んで、更新済みデータD2に更新し、該更新済みデータD2に上記チェックコードBCC2を付加する処理とを実行させる。
(6)上記更新済みデータD2のチェックコードBCC2を生成する処理が、上記元データD1のチェックコードBCC1と、更新される部分のブロックデータBD1のチェックコードBCCD1と、更新ブロックデータBD2が上記元データD1に対する書き込み位置にあるか否かに応じて決まる更新ブロックデータBD2のチェックコードBCCD2とに基づいて、上記更新済みデータD2のチェックコードBCC2を生成する。
That is, this invention solves the said subject as follows.
(1) A partial update device for block data protected by a check code is provided. The block data partial updating apparatus writes check block generation means BD2 on the block data BD1 of the updated part of the original data D1 to be updated, and the updated data D2 And data updating means for adding the check code generated by the check code generating means to the updated data D2. The check code generation means reads the block data BD1 to be updated and the check code BCC1 of the original data D1 to be updated from the area in which the original data D1 to be updated and the check code BCC1 are stored. Means for generating a check code BCCD1 of the block data BD1 to be updated, updating block data BD2 for updating the original data D1 to be updated, means for reading the check code BCCD2, and the updating Means for generating a check code BCC2 for updated data D2 from the check code BCC2 for block data BD2, the check code BCC1 for the original data D1, and the check code BCCD1 for the block data BD1 to be updated.
(2) The means for generating the check code BCC2 of the updated data D2 includes the check code BCC1 of the original data D1, the check code BCCD1 of the updated block data BD1, and the updated block data BD2 as the original data. The check code BCC2 of the updated data D2 is generated based on the check code BCCD2 of the updated block data BD2 that is determined depending on whether or not it is at the write position for D1.
(3) A partial update method for block data protected by a check code is executed. The partial update method of the block data reads the block data BD1 of the updated portion and the check code BCC1 of the original data D1 to be updated from the area storing the original data D1 to be updated and its check code BCC1. A step of generating a check code BCCD1 of the block data BD1 to be updated, an update block data BD2 for updating the original data D1 to be updated, a step of reading the check code BCCD2, and the update Generating a check code BCC2 of updated data D2 from the check code BCC2 of block data BD2, the check code BCC1 of the original data D1, and the check code BCCD1 of the block data BD1 to be updated; It writes the updated block data BD2 on the block data BD1 of the portion to be updated in the original data D1, and updates the updated data D2, comprising a step of adding the check code BCC2 to the updated data D2.
(4) The step of generating the check code BCC2 of the updated data D2 includes the check code BCC1 of the original data D1, the check code BCCD1 of the updated block data BD1, and the updated block data BD2 The check code BCC2 of the updated data D2 is generated based on the check code BCCD2 of the updated block data BD2 that is determined depending on whether or not it is at the write position for D1.
(5) A partial update program for block data protected by a check code is provided. The block data partial update program stores the original data D1 to be updated and the check code BCC1 in the computer from the area where the block data BD1 to be updated and the check code for the original data D1 to be updated are stored. A process of reading BCC1, a process of generating a check code BCCD1 of the block data BD1 to be updated, an update block data BD2 of updating the original data D1 to be updated, and a process of reading the check code BCCD2 The process of generating the check code BCC2 of the updated data D2 from the check code BCCD2 of the updated block data BD2, the check code BCC1 of the original data D1, and the check code BCCD1 of the block data BD1 to be updated The update block data BD2 is written on the updated block data BD1 of the original data D1, updated to the updated data D2, and the check code BCC2 is added to the updated data D2. Let
(6) The process of generating the check code BCC2 of the updated data D2 is performed by the check code BCC1 of the original data D1, the check code BCCD1 of the updated block data BD1, and the updated block data BD2 The check code BCC2 of the updated data D2 is generated based on the check code BCCD2 of the updated block data BD2 that is determined depending on whether or not it is at the write position for D1.

本発明のブロックデータの部分更新装置においては、更新済みデータのチェックコードを演算する回路と、データの更新回路とが分離されている。従って、本発明によれば、誤った更新済みデータに正しいBCCを付加することを防止することが可能となる。
また、本発明によれば、元データに誤った更新データを上書きしてしまっても、本発明によって生成された正しい更新済みデータのチェックコードに基づいて、該更新済みデータが誤ったデータであることを検出することができる。
また、本発明によれば、正しい更新済みデータに誤ったチェックコードが付加された場合であっても、該チェックコードの正当性のチェックを通じて、正しい更新済みデータに誤ったチェックコードが付加されたことを検出することができる。
In the block data partial update device of the present invention, the circuit for calculating the check code of the updated data and the data update circuit are separated. Therefore, according to the present invention, it is possible to prevent the correct BCC from being added to erroneous updated data.
In addition, according to the present invention, even if erroneous update data is overwritten on the original data, the updated data is incorrect data based on the check code of the correct updated data generated by the present invention. Can be detected.
Further, according to the present invention, even when an incorrect check code is added to correct updated data, an incorrect check code is added to correct updated data through checking the validity of the check code. Can be detected.

図1は、本発明のブロックデータの部分更新装置の構成の一例を示す図である。ブロックデータの部分更新装置1は、ブロックデータを部分更新する処理装置である。ブロックデータの部分更新とは、ブロックデータの一部を更新することをいう。例えば、ブロックデータの部分更新装置1は、ホストコンピュータ(図示を省略)からのブロックデータの部分更新要求を受けて、該ブロックデータの部分更新を行う。
ブロックデータの部分更新装置1は、キャッシュメモリ11、キャッシュメモリインタフェース12、Read DMA13、BIDチェッカー14、元データCRC格納部15、更新部分CRC演算部16、更新データCRC格納部17、BCC演算部18、Write DMA19、CRCチェッカー20、更新データパス30を備える。
FIG. 1 is a diagram showing an example of a configuration of a block data partial updating apparatus according to the present invention. The block data partial update device 1 is a processing device that partially updates block data. The partial update of block data means updating a part of block data. For example, the block data partial update device 1 receives a block data partial update request from a host computer (not shown) and performs partial update of the block data.
The block data partial update device 1 includes a cache memory 11, a cache memory interface 12, a Read DMA 13, a BID checker 14, an original data CRC storage unit 15, an update partial CRC calculation unit 16, an update data CRC storage unit 17, and a BCC calculation unit 18. , Write DMA 19, CRC checker 20, and update data path 30.

図1の点線で囲った部分に示すように、BIDチェッカー14、元データCRC格納部15、更新部分CRC演算部16、更新データCRC格納部17、BCC演算部18が、BCCの演算回路を構成し、Read DMA13、更新データパス30、Write DMA19が、データの更新回路を構成する。
キャッシュメモリ11にはユーザデータが格納される。キャッシュメモリインタフェース12は、キャッシュメモリ11に対するデータの読込み/書き込みを媒介する。Read DMA13は、キャッシュメモリ11から元データと更新データとを読み込む。また、Read DMA13は、読み込んだ更新データを更新データパス30を通じてWrite DMA19に送信する。
BIDチェッカー14は、元データおよび更新データのBCC内部のBIDの正当性のチェックを行う。
1, the BID checker 14, the original data CRC storage unit 15, the update partial CRC calculation unit 16, the update data CRC storage unit 17, and the BCC calculation unit 18 constitute a BCC calculation circuit. The Read DMA 13, the update data path 30, and the Write DMA 19 constitute a data update circuit.
User data is stored in the cache memory 11. The cache memory interface 12 mediates data reading / writing to the cache memory 11. The Read DMA 13 reads original data and update data from the cache memory 11. The Read DMA 13 transmits the read update data to the Write DMA 19 through the update data path 30.
The BID checker 14 checks the validity of the BID inside the BCC of the original data and the update data.

元データCRC格納部15には、元データのCRC(元データCRC)が格納される。更新元部分CRC演算部16は、元データのうち更新される部分のブロックデータに基づいて、更新元部分CRCを演算して生成する。更新元部分CRCとは、元データのうち更新される部分のブロックデータのCRCである。更新データCRC17には、更新データのCRC(更新データCRC)が格納される。
BCC演算部18は、元データCRC格納部15に格納された元データCRCと、更新元部分CRC演算部16によって生成された更新元部分CRCと、更新データCRC格納部17に格納された更新データCRCとに基づいて、更新済みデータのCRC(更新済みデータCRC)を演算して生成する。更新済みデータとは、元データの更新される部分が更新データによって上書きされた結果得られるデータである。また、BCC演算部18は、生成されたCRCにBIDを付加して更新済みデータのBCCを生成する。
The original data CRC storage unit 15 stores the CRC of the original data (original data CRC). The update source partial CRC calculation unit 16 calculates and generates the update source partial CRC based on the block data of the updated part of the original data. The update source partial CRC is the CRC of the block data of the updated part of the original data. The update data CRC 17 stores the CRC (update data CRC) of the update data.
The BCC calculation unit 18 includes the original data CRC stored in the original data CRC storage unit 15, the update source partial CRC generated by the update source partial CRC calculation unit 16, and the update data stored in the update data CRC storage unit 17. Based on the CRC, the CRC of the updated data (updated data CRC) is calculated and generated. The updated data is data obtained as a result of the updated portion of the original data being overwritten by the updated data. Further, the BCC calculation unit 18 generates a BCC of updated data by adding a BID to the generated CRC.

Write DMA19は、Read DMA13から受信した更新データとBCC演算部18によって生成された更新済みデータのBCCとをキャッシュメモリ11に格納されている元データに上書きする。
CRCチェッカー20は、キャッシュメモリ11に格納されているユーザデータのCRCの正当性をチェックする。本発明の一実施例によれば、ブロックデータの部分更新装置1が、ブロックデータの部分更新の結果をホストコンピュータ(図示を省略)に返す際に用いるインタフェースカード(図示を省略)に、ユーザデータのCRCの正当性をチェックする機能を備えたチップを備えるようにしてもよい。
なお、上述したブロックデータの部分更新装置1及びその各部の機能は、CPUとその上で実行されるプログラムにより実現される。本発明を実現するプログラムは、コンピュータが読み取り可能な記録媒体、例えば半導体メモリ、ハードディスク、CD−ROM、DVD等に格納することができ、これらの記録媒体に記録して提供され、又は、通信インタフェースを介してネットワークを利用した送受信により提供される。
The Write DMA 19 overwrites the original data stored in the cache memory 11 with the update data received from the Read DMA 13 and the BCC of the updated data generated by the BCC calculation unit 18.
The CRC checker 20 checks the validity of the CRC of the user data stored in the cache memory 11. According to one embodiment of the present invention, user data is transferred to an interface card (not shown) used when the block data partial update device 1 returns the result of partial block data update to a host computer (not shown). A chip having a function of checking the validity of the CRC may be provided.
Note that the functions of the block data partial updating apparatus 1 and the respective units described above are realized by a CPU and a program executed thereon. The program for realizing the present invention can be stored in a computer-readable recording medium such as a semiconductor memory, a hard disk, a CD-ROM, a DVD, or the like, provided by being recorded on these recording media, or a communication interface. It is provided by transmission / reception using a network.

図2は、本発明のブロックデータの部分更新処理フローの一例を示す図である。この例では、ユーザデータを、前述した図15に示すようなBLK0〜BLK7までの8個のサブブロックで表記する。また、図2に示す処理フローでは、元データのBLK4,3,2を、データ更新位置(BLK4,3,2)に書き込まれた形式の更新データで更新する処理を例にとって説明する。   FIG. 2 is a diagram showing an example of a partial update processing flow of block data according to the present invention. In this example, user data is represented by eight sub-blocks from BLK0 to BLK7 as shown in FIG. The processing flow shown in FIG. 2 will be described by taking as an example processing for updating the original data BLK4, 3, 2 with the update data in the format written in the data update positions (BLK4, 3, 2).

まず、Read DMA13が、キャッシュメモリ11から、元データのBLK4、3、2とBCCとを読み込む(ステップS1)。次に、BIDチェッカー14が、ステップS1において読み込まれたBCCの内部のBIDの正当性をチェックする(ステップS2)。
更新元部分CRC演算部16が、ステップS1において読み込まれた元データのBLK4,3,2のデータに基づいて、更新元部分CRCを生成する(ステップS3)。Read DMA13が、ステップS1において読み込まれたBCCの内部のCRCを元データCRCとして元データCRC格納部15に格納する(ステップS4)。
First, the Read DMA 13 reads the original data BLK4, 3, 2 and BCC from the cache memory 11 (step S1). Next, the BID checker 14 checks the validity of the BID inside the BCC read in step S1 (step S2).
The update source partial CRC calculation unit 16 generates the update source partial CRC based on the data of BLK 4, 3, and 2 of the original data read in step S1 (step S3). The Read DMA 13 stores the CRC in the BCC read in step S1 in the original data CRC storage unit 15 as the original data CRC (step S4).

次に、Read DMA13が、キャッシュメモリ11から更新データのBLK4,3,2とBCCとを読み込み、更新データのBLK4,3,2をWrite DMA19に送信する(ステップS5)。そして、BIDチェッカー14が、上記ステップS5において読み込まれたBCCの内部のBIDの正当性をチェックする(ステップS6)。また、Read DMA13が、上記ステップS5において読み込まれたBCCの内部のCRCを更新データCRCとして更新データCRC格納部17に格納する(ステップS7)。 BCC演算部18が、元データCRC格納部15に格納された元データCRCと、更新元部分CRC演算部16によって生成された更新元部分CRCと、更新データCRC格納部17に格納された更新データCRCとに基づいて、更新済みデータCRCを演算して生成し、生成された更新済みデータCRCにBIDを付加して、更新済みデータのBCCを生成する(ステップS8)。
そして、Write DMA19が、Read DMA13から送信された更新データのBLK4,3,2をキャッシュメモリ11に格納されている元データのBLK4,3,2に上書きするとともに、該更新データの上書き後の更新済みデータに上記ステップS8において生成された更新済みデータのBCCを付加して(ステップS9)、処理を終了する。
Next, the Read DMA 13 reads the update data BLK4, 3, 2 and the BCC from the cache memory 11, and transmits the update data BLK4, 3, 2 to the Write DMA 19 (step S5). Then, the BID checker 14 checks the validity of the BID inside the BCC read in step S5 (step S6). Further, the Read DMA 13 stores the CRC in the BCC read in step S5 in the update data CRC storage unit 17 as the update data CRC (step S7). The BCC calculation unit 18 includes the original data CRC stored in the original data CRC storage unit 15, the update source partial CRC generated by the update source partial CRC calculation unit 16, and the update data stored in the update data CRC storage unit 17. Based on the CRC, the updated data CRC is calculated and generated, and a BID is added to the generated updated data CRC to generate a BCC of the updated data (step S8).
Then, the Write DMA 19 overwrites the BLK 4, 3, 2 of the update data transmitted from the Read DMA 13 with the BLK 4, 3, 2 of the original data stored in the cache memory 11, and the update after the update data is overwritten The BCC of the updated data generated in step S8 is added to the completed data (step S9), and the process ends.

図3は、本発明のブロックデータの部分更新処理フローの他の例を示す図である。図2に示す処理フローでは、図15に示すフォーマットを有する元データのBLK4,3,2を、右詰めされた形式の更新データ(BLK2,1,0の更新データ)で更新する処理を例にとって説明する。
まず、Read DMA13が、キャッシュメモリ11から、元データのBLK4,3,2とBCCとを読み込む(ステップS11)。次に、BIDチェッカー14が、ステップS1において読み込まれたBCCの内部のBIDの正当性をチェックする(ステップS12)。
FIG. 3 is a diagram showing another example of the block data partial update processing flow of the present invention. In the processing flow shown in FIG. 2, the process of updating the original data BLK4, 3, 2 having the format shown in FIG. 15 with update data in the right-justified format (update data of BLK2, 1, 0) is taken as an example. explain.
First, the Read DMA 13 reads the original data BLK 4, 3, 2 and BCC from the cache memory 11 (step S11). Next, the BID checker 14 checks the validity of the BID inside the BCC read in step S1 (step S12).

更新元部分CRC演算部16が、ステップS11において読み込まれた元データのBLK4,3,2のデータに基づいて、更新元部分CRCを生成する(ステップS13)。Read DMA13が、ステップS11において読み込まれたBCCの内部のCRCを元データCRCとして元データCRC格納部15に格納する(ステップS14)。
次に、Read DMA13が、キャッシュメモリ11から更新データのBLK2,1,0とBCCとを読み込み、更新データのBLK2,1,0をWrite DMA19に送信する(ステップS15)。そして、BIDチェッカー24が、上記ステップS15において読み込まれたBCCの内部のBIDの正当性をチェックする(ステップS16)。また、Read DMA13が、上記ステップS15において読み込まれたBCCの内部のCRCを更新データCRCとして更新データCRC格納部17に格納する(ステップS17)。
The update source partial CRC calculation unit 16 generates an update source partial CRC based on the data of the BLKs 4, 3, and 2 of the original data read in step S11 (step S13). The Read DMA 13 stores the CRC in the BCC read in Step S11 as the original data CRC in the original data CRC storage unit 15 (Step S14).
Next, the Read DMA 13 reads the update data BLK2, 1, 0 and the BCC from the cache memory 11, and transmits the update data BLK2, 1, 0 to the write DMA 19 (step S15). Then, the BID checker 24 checks the validity of the BID inside the BCC read in step S15 (step S16). Further, the Read DMA 13 stores the CRC in the BCC read in step S15 in the update data CRC storage unit 17 as update data CRC (step S17).

BCC演算部18が、元データCRC格納部15に格納された元データCRCと、更新元部分CRC演算部16によって生成された更新元部分CRCと、更新データCRC格納部17に格納された更新データCRCとに基づいて、更新済みデータCRCを演算して生成し、生成された更新済みデータCRCにBIDを付加して、更新済みデータのBCCを生成する(ステップS18)。
そして、Write DMA19が、Read DMA13から送信された更新データのBLK2,1,0をキャッシュメモリ11に格納されている元データのBLK4,3,2に上書きするとともに、該更新データの上書き後の更新済みデータに上記ステップS18において生成された更新済みデータのBCCを付加して(ステップS19)、処理を終了する。
The BCC calculation unit 18 includes the original data CRC stored in the original data CRC storage unit 15, the update source partial CRC generated by the update source partial CRC calculation unit 16, and the update data stored in the update data CRC storage unit 17. Based on the CRC, the updated data CRC is calculated and generated, and a BID is added to the generated updated data CRC to generate a BCC of the updated data (step S18).
Then, the Write DMA 19 overwrites the BLK 2, 1, 0 of the update data transmitted from the Read DMA 13 with the BLK 4, 3, 2 of the original data stored in the cache memory 11, and the update after the update data is overwritten The BCC of the updated data generated in step S18 is added to the completed data (step S19), and the process ends.

前述した図1に示す本発明のブロックデータの部分更新装置1では、データの更新回路と、BCCの計算回路とが分離されている。従って、図1に示す本発明のブロックデータの部分更新装置1が、上記図2または図3に示す処理フローに従ってブロックデータの部分更新処理を行うことにより、データ信頼性に対して以下のような効果がある。
(1)Write DMA19がキャッシュメモリ11に対して誤った更新データを書き込んでしまうような場合でも、誤った更新済みデータにはBCC演算部18によって生成された正しい更新済みデータのBCCが付加されている。従って、例えばCRCチェッカー20が、誤った更新済みデータについてのCRCチェックを行うことによって、CRCエラーとなり、該更新済みデータが誤ったデータであることを検出することができる。(2)BCC演算部18が誤ったBCCを生成し、Write DMA19がキャッシュメモリ11に対して正しい更新データと上記誤ったBCCとを書き込んだ場合、更新済みデータについてのCRCチェックの結果、CRCエラーとなるため、該更新済みデータに誤ったBCCが付加されたことを検出することができる。
(3)ブロックデータの部分更新装置が、データの部分更新を行うには、元データのBCCと、更新データのBCCと、更新部分のブロックデータを読込み/書き込みすればよい。従って、キャッシュメモリ11とデータ更新回路との間のデータ転送量を少なくすることができる。
(4)前述した図14に示す従来の部分データ更新回路において必要であった更新用データバッファ26が不要となる。
In the block data partial update apparatus 1 of the present invention shown in FIG. 1 described above, the data update circuit and the BCC calculation circuit are separated. Accordingly, the block data partial update apparatus 1 of the present invention shown in FIG. 1 performs the block data partial update processing according to the processing flow shown in FIG. 2 or FIG. effective.
(1) Even when the Write DMA 19 writes erroneous update data to the cache memory 11, the correct updated data BCC generated by the BCC calculation unit 18 is added to the erroneous updated data. Yes. Therefore, for example, when the CRC checker 20 performs a CRC check on erroneously updated data, it is possible to detect that a CRC error has occurred and the updated data is incorrect data. (2) When the BCC calculation unit 18 generates an incorrect BCC and the Write DMA 19 writes the correct update data and the incorrect BCC to the cache memory 11, the CRC check result for the updated data results in a CRC error. Therefore, it can be detected that an incorrect BCC is added to the updated data.
(3) The partial update device for block data may read / write the BCC of the original data, the BCC of the update data, and the block data of the update portion in order to perform partial update of the data. Therefore, the amount of data transferred between the cache memory 11 and the data update circuit can be reduced.
(4) The update data buffer 26 required in the conventional partial data update circuit shown in FIG.

(実施例)
以下に、本発明の実施例について説明する。図4は、本発明の実施例に係るブロックデータの部分更新装置の構成の一例を示す図である。ブロックデータの部分更新装置3は、キャッシュメモリ11、キャッシュメモリインタフェース12、Read DMA13、BIDチェッカー14、元データCRC格納部15、更新部分CRC演算部16、更新データCRC格納部17、BCC演算部18、Write DMA19、更新データパス30を備える。図4に示すブロックデータの部分更新装置3が備える構成要素のうち、図1に示すブロックデータの部分更新装置1が備える構成要素と同符号のものは、該ブロックデータの部分更新装置1が備える構成要素と同様の機能を有するので、ここでの詳細な説明は省略する。
(Example)
Examples of the present invention will be described below. FIG. 4 is a diagram illustrating an example of the configuration of the block data partial updating apparatus according to the embodiment of the present invention. The block data partial update device 3 includes a cache memory 11, a cache memory interface 12, a Read DMA 13, a BID checker 14, an original data CRC storage unit 15, an update partial CRC calculation unit 16, an update data CRC storage unit 17, and a BCC calculation unit 18. , Write DMA 19 and update data path 30. Among the constituent elements of the block data partial update device 3 shown in FIG. 4, those having the same reference numerals as those of the block data partial update device 1 shown in FIG. 1 are provided in the block data partial update device 1. Since it has the same function as a component, detailed description here is abbreviate | omitted.

更新元部分CRC演算部16は、元データのうち更新される部分のデータと、更新位置パラメータ格納部182に格納された更新位置パラメータ(F(m))とに基づいて、後述する式(10)に従って、更新元部分CRC(以下、「CRCpart」と記述)を算出する。算出されたCRCpartは、更新元部分CRC演算部16内のCRCpartレジスタ(図示を省略)に格納される。上記更新位置パラメータ(F(m))は、上記更新される部分の先頭のブロック位置(更新開始ブロック位置)であるmに対応するパラメータである。更新位置パラメータ(F(m))を示す式については、後述する。 The update source partial CRC calculation unit 16 calculates a formula (10) to be described later on the basis of the data of the part to be updated in the original data and the update position parameter (F (m)) stored in the update position parameter storage unit 182. ) To calculate the update source part CRC (hereinafter referred to as “CRC part ”). The calculated CRC part is stored in a CRC part register (not shown) in the update source partial CRC calculation unit 16. The update position parameter (F (m)) is a parameter corresponding to m which is the first block position (update start block position) of the part to be updated. An expression indicating the update position parameter (F (m)) will be described later.

BCC演算部18は、Seedパラメータ格納部181、更新位置パラメータ格納部182、加算回路183、186、マスク回路184、乗算回路185、BID付加部187を備える。Seedパラメータ格納部181には、Seedパラメータ(SEED)が予め格納されている。SEEDとは、後述するSeed値で決まる定数である。SEEDを示す式については後述する。更新位置パラメータ格納部182には、更新位置パラメータ(F(m))が予め格納されている。
加算回路183は、更新データCRC格納部17に格納されている更新データCRC(以下、「CRCmod 」と記述)と、Seedパラメータ格納部181に格納されているSeedパラメータとを加算(XOR演算)する。
The BCC calculation unit 18 includes a seed parameter storage unit 181, an update position parameter storage unit 182, addition circuits 183 and 186, a mask circuit 184, a multiplication circuit 185, and a BID addition unit 187. The seed parameter storage unit 181 stores a seed parameter (SEED) in advance. SEED is a constant determined by a Seed value to be described later. An expression indicating SEED will be described later. The update position parameter storage unit 182 stores an update position parameter (F (m)) in advance.
The adder circuit 183 adds the update data CRC (hereinafter referred to as “CRC mod ”) stored in the update data CRC storage unit 17 and the Seed parameter stored in the Seed parameter storage unit 181 (XOR operation). To do.

マスク回路184は、更新位置パラメータ格納部182から更新位置パラメータを読み出して出力する。更新データが右詰めされた形式である場合、マスク回路184は、更新位置パラメータ格納部182から読み出した更新位置パラメータをそのまま出力する。更新データがデータ更新位置に書き込まれた形式である場合、マスク回路184は、値「1」を出力する。
乗算回路185は、後述するCRC生成多項式G(X)を原始多項式とした乗算回路である。乗算回路185は、加算回路183による加算結果とマスク回路184の出力とを乗算する。
加算回路186は、乗算回路185による乗算結果と更新元部分CRC演算部16によって演算された更新元部分CRCと元データCRC格納部15に格納されている元データCRC(以下、「CRCpre 」と記述)とを加算(XOR演算)して、更新済みデータCRC(以下、「CRCpost」と記述)を生成する。BID付加部187は、CRCpostに更新済みデータに対するBIDを付加する。
The mask circuit 184 reads the update position parameter from the update position parameter storage unit 182 and outputs it. When the update data is in a format right-justified, the mask circuit 184 outputs the update position parameter read from the update position parameter storage unit 182 as it is. When the update data is written in the data update position, the mask circuit 184 outputs the value “1”.
The multiplication circuit 185 is a multiplication circuit in which a CRC generation polynomial G (X) described later is a primitive polynomial. The multiplication circuit 185 multiplies the addition result by the addition circuit 183 and the output of the mask circuit 184.
The addition circuit 186 includes the multiplication result obtained by the multiplication circuit 185, the update source partial CRC calculated by the update source partial CRC calculation unit 16, and the original data CRC (hereinafter referred to as “CRC pre ”) stored in the original data CRC storage unit 15. Description) is added (XOR operation) to generate updated data CRC (hereinafter referred to as “CRC post ”). The BID adding unit 187 adds a BID for the updated data to the CRC post .

本発明の実施例における、CRCpostの生成処理の例について、以下に説明する。この例では、ユーザデータは、前述した図15に示すような、各々が64バイトのBLK0〜BLK7までの8個のサブブロックで表記されるものとする。また、ブロックデータの部分更新装置3は、図5(A)に示す元データの更新される部分のデータであるP2 を、図5(B)または図5(C)に示す更新データであるQ2 で更新するものとする。図5(A)において、P2 は、更新される部分であるBLKmからBLKn−1までのサブブロックに格納されている。また、P1 およびP3 は、元データにおける更新されない部分のデータである。
なお、図5(B)中のQ2 は、右詰めされた形式の更新データを示し、図5(C)中のQ2 は、データ更新位置に書き込まれた形式の更新データを示している。
An example of CRC post generation processing in the embodiment of the present invention will be described below. In this example, it is assumed that the user data is represented by 8 sub-blocks of BLK0 to BLK7 each having 64 bytes as shown in FIG. Further, the block data partial update device 3 is the update data shown in FIG. 5 (B) or FIG. 5 (C), with P 2 being the data of the updated part of the original data shown in FIG. 5 (A). It shall be updated in Q 2. In FIG. 5A, P 2 is stored in the sub-blocks from BLKm to BLKn−1 that are the parts to be updated. P 1 and P 3 are data in the original data that is not updated.
Note that Q 2 in FIG. 5B indicates update data in a right-justified format, and Q 2 in FIG. 5C indicates update data in a format written at a data update position. .

以下、ブロックデータの部分更新装置3が処理する各データを多項式表記で表示する。本発明の実施例においては、以下のように定義される、ANSI T10のCRC演算の生成多項式G(X)を用いる。
G(X)=X16+X15+X11+X9 +X8 +X7 +X5 +X4 +X2 +X1 +1
ここで、一般に、CRCを生成する回路のSeed値(初期値)として、以下の式(1)のように表記されるS(X)を定義する。
Hereinafter, each piece of data processed by the block data partial update device 3 is displayed in polynomial notation. In the embodiment of the present invention, a generator polynomial G (X) of the CRC calculation of ANSI T10 defined as follows is used.
G (X) = X 16 + X 15 + X 11 + X 9 + X 8 + X 7 + X 5 + X 4 + X 2 + X 1 +1
Here, generally, S (X) expressed as the following expression (1) is defined as a seed value (initial value) of a circuit that generates a CRC.

Figure 0004859658
Figure 0004859658

ユーザデータP(X)を、上記式(2)と表記すると、CRCを生成する回路によって生成されるCRCは、以下の(3)式のように表現することができる。
CRC=(S(X)×X4096+P(X)×X16)modG(X)・・・式(3)
When the user data P (X) is expressed as the above equation (2), the CRC generated by the circuit that generates the CRC can be expressed as the following equation (3).
CRC = (S (X) × X 4096 + P (X) × X 16 ) mod G (X) (3)

図6は、上記式(3)に従うCRCの算出処理を説明する図である。一般に、CRCを生成する回路は、図6(A)に示すユーザデータP(X)に16ビット(2バイト)の空の領域を付加するとともに、S(X)を512バイトのデータの先頭にシフトする。そして、CRCを生成する回路は、図6(B)に示すように、P(X)に16ビットの空の領域が付加されたデータとS(X)が512バイトの先頭にシフトされたデータとを加算して、図6(C)に示すような、S(X)とP(X)とが512バイトの領域に格納され、該512バイトの領域に16ビットの空の領域が付加されたデータを生成する。そして、CRCを生成する回路は、図6(D)に示すように、図6(C)に示すデータをG(X)で割って、その余りをCRCとして算出する。算出されたCRCは、図6(E)に示すように、P(X)に付加されていた16ビットの空の領域に格納される。   FIG. 6 is a diagram illustrating CRC calculation processing according to the above equation (3). In general, the CRC generation circuit adds an empty area of 16 bits (2 bytes) to the user data P (X) shown in FIG. 6A, and sets S (X) at the beginning of the 512-byte data. shift. Then, as shown in FIG. 6 (B), the CRC generation circuit has data in which an empty area of 16 bits is added to P (X) and data in which S (X) is shifted to the beginning of 512 bytes. 6 (C), S (X) and P (X) are stored in a 512-byte area, and a 16-bit empty area is added to the 512-byte area. Generated data. Then, as shown in FIG. 6D, the circuit that generates the CRC divides the data shown in FIG. 6C by G (X) and calculates the remainder as CRC. The calculated CRC is stored in a 16-bit empty area added to P (X) as shown in FIG. 6 (E).

本発明の実施例において、前述した図5(A)に示す元データのP1 ,P2 ,P3 と、図5(B)または図5(C)に示す更新データQ2 をそれぞれP1 (X),P2 (X),P3 (X),Q2 (X)と関数表現すると、元データCRC格納部15に格納される元データCRC(CRCpre )は、以下の式(4)のように表現される。 In an embodiment of the present invention, FIG. 5 and P 1, P 2, P 3 of the original data (A), the 5 (B) or FIG update data Q 2 to which is shown in (C), respectively P 1 described above When expressed as functions (X), P 2 (X), P 3 (X), and Q 2 (X), the original data CRC (CRC pre ) stored in the original data CRC storage unit 15 is expressed by the following equation (4) ).

Figure 0004859658
Figure 0004859658

図7は、上記式(4)に従うCRCpre の算出処理を説明する図である。まず、図7(A)に示すような、元データのうち更新される部分のデータP2 、更新されない部分のデータP1 、P3 からなるユーザデータに16ビット(2バイト)の空の領域を付加するとともに、S(X)を512バイトのデータの先頭にシフトする。そして、図7(B)に示すように、ユーザデータに16ビットの空の領域が付加されたデータとS(X)が512バイトの先頭にシフトされたデータとを加算して、図7(C)に示すような、S(X)とP1 、P2 、P3 とが512バイトの領域に格納され、該512バイトの領域に16ビットの空の領域が付加されたデータを生成する。そして、図7(D)に示すように、図7(C)に示すデータをG(X)で割って、その余りをCRCpre として算出する。
また、更新データは、図5(B)または図5(C)に示すQ2 であることから、式(4)中のP2 (X)をQ2 (X)で置き換えることによって、更新済みデータCRC(CRCpost)は、以下の式(5)のように表現される。
FIG. 7 is a diagram for explaining CRC pre calculation processing according to the above equation (4). First, as shown in FIG. 7A, a 16-bit (2-byte) empty area is added to the user data composed of the updated data P 2 and the non-updated data P 1 and P 3 of the original data. Is added, and S (X) is shifted to the beginning of the 512-byte data. Then, as shown in FIG. 7B, the data in which the 16-bit empty area is added to the user data and the data in which S (X) is shifted to the head of 512 bytes are added, and FIG. As shown in C), S (X) and P 1 , P 2 , and P 3 are stored in a 512-byte area, and data in which a 16-bit empty area is added to the 512-byte area is generated. . Then, as shown in FIG. 7D, the data shown in FIG. 7C is divided by G (X), and the remainder is calculated as CRC pre .
Since the update data is Q 2 shown in FIG. 5B or FIG. 5C, it has been updated by replacing P 2 (X) in formula (4) with Q 2 (X). The data CRC (CRC post ) is expressed as the following equation (5).

Figure 0004859658
Figure 0004859658

次に、更新データCRC格納部17に格納されている更新データCRC(CRCmod )について説明する。CRCmod を表現する式は、更新データが右詰めされた形式であるか、更新データがデータ更新位置に書き込まれた形式であるかによって異なる。
図5(B)に示すように、更新データQ2 が右詰めされた形式である場合、CRCmod は、以下のように表現される。
CRCmod =(S(X)×X4096+Q2 (X)×X16)modG(X)・・・式(6)
Next, the update data CRC (CRC mod ) stored in the update data CRC storage unit 17 will be described. The expression expressing CRC mod differs depending on whether update data is in a right-justified format or update data is written in a data update position.
As shown in FIG. 5 (B), when the update data Q 2 is a right-justified format, CRC mod is expressed as follows.
CRC mod = (S (X) × X 4096 + Q 2 (X) × X 16 ) mod G (X) (6)

図8は、上記式(6)に従うCRCmod の算出処理を説明する図である。まず、図8(A)に示す更新データQ2 に16ビット(2バイト)の空の領域を付加するとともに、S(X)を512バイトのデータの先頭にシフトする。そして、図8(B)に示すように、Q2 に16ビットの空の領域が付加されたデータとS(X)が512バイトの先頭にシフトされたデータとを加算して、図8(C)に示すような、S(X)とQ2 とが512バイトの領域に格納され、該512バイトの領域に16ビットの空の領域が付加されたデータを生成する。そして、図8(D)に示すように、図8(C)に示すデータをG(X)で割って、その余りをCRCmod として算出する。
上記式(4)と式(6)とを用いて、式(5)に示すCRCpostを以下の式(8)に書き換えることができる。下記の式(8)において、+、−はXOR演算を示している。
ここで、前述したSeedパラメータ(SEED)は、以下の式で定義される。
SEED=(S(X)×X4096)modG(X) …式(7)
また、前述した更新位置パラメータF(m)は、以下の式(9)で定義される。
FIG. 8 is a diagram for explaining CRC mod calculation processing according to the above equation (6). First, the addition of an empty area in FIG. 8 update data Q 2 to 16 bits shown in (A) (2 bytes), is shifted to the head of data of 512 bytes S (X). Then, as shown in FIG. 8B, the data in which a 16-bit empty area is added to Q 2 and the data in which S (X) is shifted to the head of 512 bytes are added, and FIG. As shown in C), S (X) and Q 2 are stored in a 512-byte area, and data in which a 16-bit empty area is added to the 512-byte area is generated. Then, as shown in FIG. 8D, the data shown in FIG. 8C is divided by G (X), and the remainder is calculated as CRC mod .
Using the above formula (4) and formula (6), the CRC post shown in formula (5) can be rewritten into the following formula (8). In the following formula (8), + and-indicate XOR operations.
Here, the aforementioned seed parameter (SEED) is defined by the following equation.
SEED = (S (X) × X 4096 ) mod G (X) (7)
Further, the update position parameter F (m) described above is defined by the following equation (9).

Figure 0004859658
Figure 0004859658

本発明の実施例においては、ユーザデータが、BLK0〜BLK7までの8個のサブブロックで表記されることから、更新開始ブロック位置mは、0〜7までの値をとり、F(m)は、該更新開始ブロック位置mに対応するパラメータとなる。
また、更新元部分CRC演算部16が算出するCRCpartは、以下のように表現することができる。
CRCpart=(P2 (X)×X16×F(m))modG(X)・・・式(10)
式(10)は、前述した式(3)においてSeed値=0として、P2 (X)についてCRC生成の演算を行い、F(m)で乗算することによってCRCpartが算出されることを示している。
In the embodiment of the present invention, since the user data is represented by 8 sub-blocks from BLK0 to BLK7, the update start block position m takes a value from 0 to 7, and F (m) is , A parameter corresponding to the update start block position m.
Further, the CRC part calculated by the update source part CRC calculation unit 16 can be expressed as follows.
CRC part = (P 2 (X) × X 16 × F (m)) mod G (X) (10)
Equation (10) indicates that CRC part is calculated by performing CRC generation calculation for P 2 (X) and multiplying by F (m) with the seed value = 0 in the above-described equation (3). ing.

従って、前述した式(8)で表現されるCRCpostは、式(9)で定義されるF(m)と、式(10)に示されるCRCpartと、式(7)で定義されるSEEDとを用いて、以下の式(11)に書き換えることができる。
CRCpost=CRCpre +CRCpart+((CRCmod +SEED)×F(m))modG(X)・・・式(11)
図5(C)に示すように、更新データQ2 がデータ更新位置に書き込まれた形式である場合、CRCmod は、以下のように表現される。
Therefore, the CRC post expressed by the above-described equation (8) is F (m) defined by the equation (9), the CRC part expressed by the equation (10), and the SEED defined by the equation (7). And can be rewritten into the following formula (11).
CRC post = CRC pre + CRC part + ((CRC mod + SEED) × F (m)) mod G (X) (11)
As shown in FIG. 5 (C), the update data Q 2 may be in a format written in the data update position, CRC mod is expressed as follows.

Figure 0004859658
Figure 0004859658

図9は、上記式(12)に従うCRCmod の算出処理を説明する図である。まず、図9(A)に示す、データ更新位置(BLKm〜BLKn−1)にある更新データQ2 に16ビット(2バイト)の空の領域を付加するとともに、S(X)を512バイトのデータの先頭にシフトする。そして、図9(B)に示すように、Q2 に16ビットの空の領域が付加されたデータとS(X)が512バイトの先頭にシフトされたデータとを加算して、図9(C)に示すような、S(X)とQ2 とが512バイトの領域に格納され、該512バイトの領域に16ビットの空の領域が付加されたデータを生成する。そして、図9(D)に示すように、図9(C)に示すデータをG(X)で割って、その余りをCRCmod として算出する。
前述した式(4)、式(7)、式(9)、式(10)、式(12)を用いて、式(5)に示すCRCpostを以下の式(13)に書き換えることができる。
FIG. 9 is a diagram for explaining CRC mod calculation processing according to the above equation (12). First, in FIG. 9 (A), with the addition of an empty area of the data update position (BLKm~BLKn-1) in the update data Q 2 to 16 bits (2 bytes), S of 512 bytes (X) Shift to the beginning of the data. Then, as shown in FIG. 9B, the data in which a 16-bit empty area is added to Q 2 and the data in which S (X) is shifted to the head of 512 bytes are added, and FIG. As shown in C), S (X) and Q 2 are stored in a 512-byte area, and data in which a 16-bit empty area is added to the 512-byte area is generated. Then, as shown in FIG. 9D, the data shown in FIG. 9C is divided by G (X), and the remainder is calculated as CRC mod .
The CRC post shown in the equation (5) can be rewritten into the following equation (13) by using the above-described equations (4), (7), (9), (10), and (12). .

Figure 0004859658
Figure 0004859658

上記式(13)は、式(11)の右辺の第3項におけるF(m)をF(0)=1としたときの計算と同値である。従って、式(11)で示される、更新データQ2 が右詰めされた形式である場合のCRCpostと、式(13)で示される、更新データQ2 がデータ更新位置に書き込まれた形式である場合のCRCpostは、マスク回路184の出力する値を「1」とすれば、一つのBCCの演算回路で算出することができる。 The above equation (13) is equivalent to the calculation when F (m) in the third term on the right side of equation (11) is F (0) = 1. Therefore, the formula (11), and CRC post when the update data Q 2 is a right-justified format, represented by the formula (13), the update data Q 2 is written into the data update position format The CRC post in a certain case can be calculated by one BCC arithmetic circuit if the value output from the mask circuit 184 is “1”.

図10は、更新データが右詰めされた形式である場合の、ブロックデータの部分更新処理フローの例を示す図である。図10に示す処理フローでは、図15に示すようなフォーマットを有する元データのBLK4,3,2を、BLK2,1,0に書き込まれた形式の更新データで更新する処理を例にとって説明する。
まず、Read DMA13が、キャッシュメモリ11から、元データのBLK4,3,2とBCCとを読み込む(ステップS21)。次に、BIDチェッカー14が、ステップS21において読み込まれたBCCの内部のBIDの正当性をチェックする(ステップS22)。
更新元部分CRC演算部16が、ステップS21において読み込まれた元データのBLK4,3,2のデータに基づいて、CRCpartを算出し、算出したCRCpartをCRCpartレジスタに格納する(ステップS23)。ステップS23において、更新元部分CRC演算部16は、前述した式(3)に従って、Seed値=0としてBLK4,3,2のデータについてCRC生成の演算を行い、更新位置パラメータF(2)で乗算する演算を行う。より具体的には、更新元部分CRC演算部16は、P2 (X)をBLK4,3,2のデータの関数表現、F(m)をF(2)として、式(10)に従ってCRCpartを算出する。
FIG. 10 is a diagram illustrating an example of a partial update processing flow of block data in a case where the update data has a right-padded format. The processing flow shown in FIG. 10 will be described by taking as an example processing for updating BLK4, 3, 2 of the original data having the format shown in FIG. 15 with the update data in the format written in BLK2, 1, 0.
First, the Read DMA 13 reads the original data BLK4, 3, 2 and BCC from the cache memory 11 (step S21). Next, the BID checker 14 checks the validity of the BID inside the BCC read in step S21 (step S22).
The update source part CRC calculation unit 16 calculates a CRC part based on the BLK4, 3, and 2 data of the original data read in step S21, and stores the calculated CRC part in the CRC part register (step S23). . In step S23, the update source partial CRC calculation unit 16 performs CRC generation calculation on the data of BLK4, 3, and 2 with the Seed value = 0 according to the above-described equation (3), and multiplies by the update position parameter F (2). Perform the operation. More specifically, the update source part CRC calculation unit 16 sets the CRC part according to equation (10), where P 2 (X) is a function representation of the data of BLK4, 3, 2 and F (m) is F (2). Is calculated.

次に、Read DMA13が、ステップS21において読み込まれたBCCの内部のCRCをCRCpre として元データCRC格納部15に格納する(ステップS24)。 次に、Read DMA13が、キャッシュメモリ11から更新データのBLK2,1,0とBCCとを読み込み、更新データのBLK2,1,0をWrite DMA19に送信する(ステップS25)。そして、BIDチェッカー14が、上記ステップS25において読み込まれたBCCの内部のBIDの正当性をチェックする(ステップS26)。また、Read DMA13が、上記ステップS25において読み込まれたBCCの内部のCRCをCRCmod として更新データCRC格納部17に格納する(ステップS27)。 BCC演算部18が、更新データCRC格納部17に格納されたCRCmod にSEEDを加算(XOR)した後、マスク回路184から出力される更新位置パラメータF(2)を乗算する(ステップS28)。 Next, the Read DMA 13 stores the CRC in the BCC read in step S21 in the original data CRC storage unit 15 as CRC pre (step S24). Next, the Read DMA 13 reads the update data BLK2, 1, 0 and the BCC from the cache memory 11, and transmits the update data BLK2, 1, 0 to the Write DMA 19 (step S25). Then, the BID checker 14 checks the validity of the BID inside the BCC read in step S25 (step S26). Further, the Read DMA 13 stores the CRC in the BCC read in step S25 in the update data CRC storage unit 17 as CRC mod (step S27). The BCC calculation unit 18 adds (XOR) SEED to CRC mod stored in the update data CRC storage unit 17, and then multiplies the update position parameter F (2) output from the mask circuit 184 (step S28).

BCC演算部18が、ステップS28における乗算結果と、ステップS23においてCRCpartレジスタに格納されたCRCpartと、ステップS24において元データCRC格納部15に格納されたCRCpre とを加算して、CRCpostを算出する(ステップS29)。すなわち、BCC演算部18は、前述した式(11)に従って、CRCpostを算出する。
BCC演算部18のBID付加部187が、ステップS29において算出されたCRCpostにBIDを付加して、更新済みデータのBCCを生成する(ステップS30)。Write DMA19が、Read DMA13から送信された更新データのBLK2,1,0をキャッシュメモリ11に格納されている元データのBLK4,3,2に上書きするとともに、更新済みデータに上記ステップS30において生成された更新済みデータのBCCを付加して(ステップS31)、処理を終了する。
BCC calculation unit 18, the multiplication result in the step S28, and adds the CRC part stored in CRC part register in step S23, the CRC pre stored in the original data CRC storage unit 15 in step S24, CRC post Is calculated (step S29). That is, the BCC calculation unit 18 calculates CRC post according to the above-described equation (11).
The BID adding unit 187 of the BCC calculating unit 18 adds a BID to the CRC post calculated in step S29 to generate a BCC of updated data (step S30). The Write DMA 19 overwrites the BLK 2, 1, 0 of the update data transmitted from the Read DMA 13 with the BLK 4, 3, 2 of the original data stored in the cache memory 11, and the updated data is generated in the above step S30. The updated data BCC is added (step S31), and the process is terminated.

図11は、更新データがデータ更新位置に書き込まれた形式である場合の、ブロックデータの部分更新処理フローの例を示す図である。図11に示す処理フローでは、元データのBLK4,3,2を、データ更新位置(BLK4,3,2)に書き込まれた形式の更新データで更新する処理を例にとって説明する。   FIG. 11 is a diagram illustrating an example of a partial update processing flow of block data when the update data is written in the data update position. The processing flow shown in FIG. 11 will be described by taking as an example a process of updating the original data BLK4, 3, 2 with the update data in the format written in the data update position (BLK4, 3, 2).

まず、Read DMA13が、キャッシュメモリ11から、元データのBLK4,3,2とBCCとを読み込む(ステップS41)。次に、BIDチェッカー14が、ステップS41において読み込まれたBCCの内部のBIDの正当性をチェックする(ステップS42)。
更新元部分CRC演算部16が、ステップS41において読み込まれた元データのBLK4,3,2のデータに基づいて、CRCpartを算出し、算出したCRCpartをCRCpart レジスタに格納する(ステップS43)。ステップS43において、更新元部分CRC演算部16は、前述した式(3)に従って、Seed値=0としてBLK4,3,2のデータについてCRC生成の演算を行い、更新位置パラメータF(2)で乗算する演算を行う。より具体的には、更新元部分CRC演算部16は、P2 (X)をBLK4,3,2のデータの関数表現、F(m)をF(2)として、式(10)に従ってCRCpartを算出する。
First, the Read DMA 13 reads the original data BLK 4, 3, 2 and BCC from the cache memory 11 (step S41). Next, the BID checker 14 checks the validity of the BID inside the BCC read in step S41 (step S42).
The update source part CRC calculation unit 16 calculates a CRC part based on the BLK4, 3 and 2 data of the original data read in step S41, and stores the calculated CRC part in the CRC part register (step S43). . In step S43, the update source partial CRC calculation unit 16 performs CRC generation calculation on the data of BLK4, 3, and 2 with the Seed value = 0 according to the above-described equation (3), and multiplies by the update position parameter F (2). Perform the operation. More specifically, the update source part CRC calculation unit 16 sets the CRC part according to equation (10), where P 2 (X) is a function representation of the data of BLK4, 3, 2 and F (m) is F (2). Is calculated.

Read DMA13が、ステップS41において読み込まれたBCCの内部のCRCをCRCpre として元データCRC格納部15に格納する(ステップS44)。そして、Read DMA13が、キャッシュメモリ11から更新データのBLK4,3,2とBCCとを読み込み、更新データのBLK4,3,2をWrite DMA19に送信する(ステップS45)。そして、BIDチェッカー14が、上記ステップS45において読み込まれたBCCの内部のBIDの正当性をチェックする(ステップS46)。また、Read DMA13が、上記ステップS45において読み込まれたBCCの内部のCRCをCRCmod として更新データCRC格納部17に格納する(ステップS47)。 The Read DMA 13 stores the CRC in the BCC read in step S41 in the original data CRC storage unit 15 as CRC pre (step S44). Then, the Read DMA 13 reads the update data BLK4, 3, 2 and the BCC from the cache memory 11, and transmits the update data BLK4, 3, 2 to the Write DMA 19 (step S45). Then, the BID checker 14 checks the validity of the BID inside the BCC read in step S45 (step S46). The Read DMA 13 stores the CRC in the BCC read in step S45 in the update data CRC storage unit 17 as CRC mod (step S47).

BCC演算部18が、更新データCRC格納部17に格納されたCRCmod にSEEDを加算(XOR)した後、マスク回路184から出力される値「1」を乗算する(ステップS48)。
BCC演算部18が、ステップS48における乗算結果と、ステップS43においてCRCpartレジスタに格納されたCRCpartと、ステップS44において元データCRC格納部15に格納されたCRCpre とを加算して、CRCpostを算出する(ステップS49)。すなわち、BCC演算部18は、前述した式(13)に従って、CRCpostを算出する。
BCC演算部18のBID付加部187が、ステップS49において算出されたCRCpostにBIDを付加して、更新済みデータのBCCを生成する(ステップS50)。Write DMA19が、Read DMA13から送信された更新データのBLK4,3,2をキャッシュメモリ11に格納されている元データのBLK4,3,2に上書きするとともに、更新済みデータに上記ステップS50において生成された更新済みデータのBCCを付加して(ステップS51)、処理を終了する。
The BCC calculation unit 18 adds (XOR) SEED to CRC mod stored in the update data CRC storage unit 17, and then multiplies the value “1” output from the mask circuit 184 (step S48).
BCC calculation unit 18, the multiplication result in the step S48, the adds and CRC part stored in CRC part register at step S43, the CRC pre stored in the original data CRC storage unit 15 in step S44, CRC post Is calculated (step S49). That is, the BCC calculation unit 18 calculates CRC post according to the above-described equation (13).
The BID adding unit 187 of the BCC calculating unit 18 adds a BID to the CRC post calculated in step S49 to generate a BCC of updated data (step S50). The Write DMA 19 overwrites the BLK 4, 3 and 2 of the update data transmitted from the Read DMA 13 with the BLK 4, 3 and 2 of the original data stored in the cache memory 11, and the updated data is generated in the above step S50. The updated data BCC is added (step S51), and the process is terminated.

以上、説明したように、本発明によれば、誤った更新済みデータに正しいBCCを付加することを防止することが可能となる。
また、本発明によれば、元データに誤った更新データを上書きしてしまっても、本発明によって生成された正しい更新済みデータのチェックコードに基づいて、該更新済みデータが誤ったデータであることを検出することができる。
また、本発明によれば、正しい更新済みデータに誤ったチェックコードが付加された場合であっても、該チェックコードの正当性のチェックを通じて、更新済みデータに誤ったチェックコードが付加されたことを検出することができる。
As described above, according to the present invention, it is possible to prevent a correct BCC from being added to erroneous updated data.
In addition, according to the present invention, even if erroneous update data is overwritten on the original data, the updated data is incorrect data based on the check code of the correct updated data generated by the present invention. Can be detected.
In addition, according to the present invention, even when an incorrect check code is added to correct updated data, an incorrect check code is added to the updated data through checking the validity of the check code. Can be detected.

本発明のブロックデータの部分更新装置の構成の一例を示す図である。It is a figure which shows an example of a structure of the partial update apparatus of the block data of this invention. 本発明のブロックデータの部分更新処理フローの一例を示す図である。It is a figure which shows an example of the partial update process flow of the block data of this invention. 本発明のブロックデータの部分更新処理フローの他の例を示す図である。It is a figure which shows the other example of the partial update process flow of the block data of this invention. 本発明の実施例に係るブロックデータの部分更新装置の構成の一例を示す図である。It is a figure which shows an example of a structure of the partial update apparatus of the block data which concerns on the Example of this invention. 元データおよび更新データを示す図である。It is a figure which shows original data and update data. 式(3)に従うCRCの算出処理を説明する図である。It is a figure explaining the calculation process of CRC according to Formula (3). 式(4)に従うCRCpre の算出処理を説明する図である。It is a figure explaining the calculation process of CRC pre according to Formula (4). 式(6)に従うCRCmod の算出処理を説明する図である。It is a figure explaining the calculation process of CRC mod according to Formula (6). 式(12)に従うCRCmod の算出処理を説明する図である。It is a figure explaining the calculation process of CRC mod according to a formula (12). 更新データが右詰めされた形式である場合の、ブロックデータの部分更新処理フローの例を示す図である。It is a figure which shows the example of the partial update process flow of block data in case the update data is the format right-justified. 更新データがデータ更新位置に書き込まれた形式である場合の、ブロックデータの部分更新処理フローの例を示す図である。It is a figure which shows the example of the partial update process flow of block data when update data is the format written in the data update position. RAID装置が管理するユーザデータのフォーマット例を示す図である。It is a figure which shows the example of a format of the user data which a RAID apparatus manages. 更新データの形式の例を示す図である。It is a figure which shows the example of the format of update data. 従来の部分データ更新回路を示す図である。It is a figure which shows the conventional partial data update circuit. ユーザデータのサブブロックを示す図である。It is a figure which shows the subblock of user data.

符号の説明Explanation of symbols

1 ブロックデータの部分更新装置
11、21 キャッシュメモリ
12、22 キャッシュメモリインタフェース
13、23 Read DMA
14 BIDチェッカー
15 元データCRC格納部
16 更新部分CRC演算部
17 更新データCRC格納部
18、27 BCC演算部
19、28 Write DMA
20 CRCチェッカー
24 BCCチェッカー
25 バッファコントローラ
26 更新用データバッファ
30 更新データパス
181 Seedパラメータ格納部
182 更新位置パラメータ格納部
183、186 加算回路
184 マスク回路
185 乗算回路
187 BID付加部
1 Block data partial update device 11, 21 Cache memory 12, 22 Cache memory interface 13, 23 Read DMA
14 BID checker 15 Original data CRC storage unit 16 Update partial CRC calculation unit 17 Update data CRC storage unit 18, 27 BCC calculation unit 19, 28 Write DMA
20 CRC checker 24 BCC checker 25 Buffer controller 26 Update data buffer 30 Update data path 181 Seed parameter storage unit 182 Update position parameter storage unit 183, 186 Addition circuit 184 Mask circuit 185 Multiplication circuit 187 BID addition unit

Claims (6)

チェックコードで保護されたブロックデータの部分更新装置であって、
チェックコードを生成するチェックコード生成手段と、
更新対象となる元データD1の更新される部分のブロックデータBD1上に更新ブロックデータBD2を書き込んで、更新済みデータD2に更新し、該更新済みデータD2に上記チェックコード生成手段で生成されたチェックコードを付加するデータ更新手段とを備え、
上記チェックコード生成手段は、
更新対象となる元データD1とそのチェックコードBCC1を格納した領域から、更新される部分のブロックデータBD1と、更新対象となる元データD1のチェックコードBCC1を読み取る手段と、
上記更新される部分のブロックデータBD1のチェックコードBCCD1を生成する手段と、
上記更新対象となる元データD1を更新する更新ブロックデータBD2と、そのチェックコードBCCD2を読み込む手段と、
上記更新ブロックデータBD2のチェックコードBCCD2と、上記元データD1のチェックコードBCC1と、更新される部分のブロックデータBD1のチェックコードBCCD1とから、更新済みデータD2のチェックコードBCC2を生成する手段とを備えることを特徴とするブロックデータの部分更新装置。
A partial update device for block data protected by a check code,
Check code generation means for generating a check code;
The updated block data BD2 is written on the updated part of the block data BD1 of the original data D1 to be updated, updated to the updated data D2, and the check data generated by the check code generation means is updated to the updated data D2. Data updating means for adding a code,
The check code generation means is
Means for reading the block data BD1 of the part to be updated and the check code BCC1 of the original data D1 to be updated from the area storing the original data D1 to be updated and the check code BCC1;
Means for generating a check code BCCD1 of the block data BD1 of the part to be updated;
Update block data BD2 for updating the original data D1 to be updated, means for reading the check code BCCD2, and
Means for generating a check code BCC2 of the updated data D2 from the check code BCCD2 of the updated block data BD2, the check code BCC1 of the original data D1, and the check code BCCD1 of the updated block data BD1; A partial update apparatus for block data, comprising:
上記更新済みデータD2のチェックコードBCC2を生成する手段が、上記元データD1のチェックコードBCC1と、更新される部分のブロックデータBD1のチェックコードBCCD1と、更新ブロックデータBD2が上記元データD1に対する書き込み位置にあるか否かに応じて決まる更新ブロックデータBD2のチェックコードBCCD2とに基づいて、上記更新済みデータD2のチェックコードBCC2を生成する
ことを特徴とする請求項1に記載のブロックデータの部分更新装置。
The means for generating the check code BCC2 of the updated data D2 writes the check code BCC1 of the original data D1, the check code BCCD1 of the updated block data BD1, and the updated block data BD2 to the original data D1. 2. The block data portion according to claim 1, wherein the check code BCC2 of the updated data D2 is generated on the basis of the check code BCCD2 of the updated block data BD2 determined depending on whether or not it is in a position. Update device.
チェックコードで保護されたブロックデータの部分更新方法であって、
更新対象となる元データD1とそのチェックコードBCC1を格納した領域から、更新される部分のブロックデータBD1と、更新対象となる元データD1のチェックコードBCC1を読み取るステップと、
上記更新される部分のブロックデータBD1のチェックコードBCCD1を生成するステップと、
上記更新対象となる元データD1を更新する更新ブロックデータBD2と、そのチェックコードBCCD2を読み込むステップと、
上記更新ブロックデータBD2のチェックコードBCCD2と、上記元データD1のチェックコードBCC1と、更新される部分のブロックデータBD1のチェックコードBCCD1とから、更新済みデータD2のチェックコードBCC2を生成するステップと、
上記元データD1の更新される部分のブロックデータBD1上に上記更新ブロックデータBD2を書き込んで、更新済みデータD2に更新し、該更新済みデータD2に上記チェックコードBCC2を付加するステップとからなる
ことを特徴とするブロックデータの部分更新方法。
A partial update method of block data protected by a check code,
Reading the block data BD1 of the part to be updated and the check code BCC1 of the original data D1 to be updated from the area storing the original data D1 to be updated and the check code BCC1;
Generating a check code BCCD1 of the updated block data BD1;
An update block data BD2 for updating the original data D1 to be updated, and a step of reading the check code BCCD2;
Generating a check code BCC2 of updated data D2 from the check code BCCD2 of the updated block data BD2, the check code BCC1 of the original data D1, and the check code BCCD1 of the updated block data BD1;
The update block data BD2 is written onto the updated block data BD1 of the original data D1, updated to updated data D2, and the check code BCC2 is added to the updated data D2. A partial update method of block data characterized by the above.
上記更新済みデータD2のチェックコードBCC2を生成するステップが、上記元データD1のチェックコードBCC1と、更新される部分のブロックデータBD1のチェックコードBCCD1と、更新ブロックデータBD2が上記元データD1に対する書き込み位置にあるか否かに応じて決まる更新ブロックデータBD2のチェックコードBCCD2とに基づいて、上記更新済みデータD2のチェックコードBCC2を生成する
ことを特徴とする請求項3に記載のブロックデータの部分更新方法。
The step of generating the check code BCC2 of the updated data D2 includes writing the check code BCC1 of the original data D1, the check code BCCD1 of the updated block data BD1, and the updated block data BD2 into the original data D1. 4. The block data portion according to claim 3, wherein the check code BCC2 of the updated data D2 is generated on the basis of the check code BCCD2 of the updated block data BD2 determined depending on whether or not it is in a position. Update method.
チェックコードで保護されたブロックデータの部分更新プログラムであって、
コンピュータに、
更新対象となる元データD1とそのチェックコードBCC1を格納した領域から、更新される部分のブロックデータBD1と、更新対象となる元データD1のチェックコードBCC1を読み取る処理と、
上記更新される部分のブロックデータBD1のチェックコードBCCD1を生成する処理と、
上記更新対象となる元データD1を更新する更新ブロックデータBD2と、そのチェックコードBCCD2を読み込む処理と、
上記更新ブロックデータBD2のチェックコードBCCD2と、上記元データD1のチェックコードBCC1と、更新される部分のブロックデータBD1のチェックコードBCCD1とから、更新済みデータD2のチェックコードBCC2を生成する処理と、
上記元データD1の更新される部分のブロックデータBD1上に上記更新ブロックデータBD2を書き込んで、更新済みデータD2に更新し、該更新済みデータD2に上記チェックコードBCC2を付加する処理とを実行させる
ことを特徴とするブロックデータの部分更新プログラム。
A partial update program for block data protected by a check code,
On the computer,
A process of reading the updated block data BD1 and the check code BCC1 of the original data D1 to be updated from the area storing the original data D1 to be updated and the check code BCC1;
Processing for generating the check code BCCD1 of the block data BD1 of the part to be updated;
Update block data BD2 for updating the original data D1 to be updated, and processing for reading the check code BCCD2;
A process of generating a check code BCC2 of updated data D2 from the check code BCCD2 of the updated block data BD2, the check code BCC1 of the original data D1, and the check code BCCD1 of the updated block data BD1;
The updated block data BD2 is written on the updated block data BD1 of the original data D1, updated to the updated data D2, and the check code BCC2 is added to the updated data D2. A partial update program for block data.
上記更新済みデータD2のチェックコードBCC2を生成する処理が、上記元データD1のチェックコードBCC1と、更新される部分のブロックデータBD1のチェックコードBCCD1と、更新ブロックデータBD2が上記元データD1に対する書き込み位置にあるか否かに応じて決まる更新ブロックデータBD2のチェックコードBCCD2とに基づいて、上記更新済みデータD2のチェックコードBCC2を生成する
ことを特徴とする請求項5に記載のブロックデータの部分更新プログラム。
The process of generating the check code BCC2 of the updated data D2 includes writing the check code BCC1 of the original data D1, the check code BCCD1 of the updated block data BD1, and the updated block data BD2 into the original data D1. 6. The block data portion according to claim 5, wherein the check code BCC2 of the updated data D2 is generated on the basis of the check code BCCD2 of the updated block data BD2 determined depending on whether or not it is in a position. Update program.
JP2006347230A 2006-12-25 2006-12-25 Block data partial update device, block data partial update method, and block data partial update program Expired - Fee Related JP4859658B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006347230A JP4859658B2 (en) 2006-12-25 2006-12-25 Block data partial update device, block data partial update method, and block data partial update program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006347230A JP4859658B2 (en) 2006-12-25 2006-12-25 Block data partial update device, block data partial update method, and block data partial update program

Publications (2)

Publication Number Publication Date
JP2008158832A JP2008158832A (en) 2008-07-10
JP4859658B2 true JP4859658B2 (en) 2012-01-25

Family

ID=39659664

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006347230A Expired - Fee Related JP4859658B2 (en) 2006-12-25 2006-12-25 Block data partial update device, block data partial update method, and block data partial update program

Country Status (1)

Country Link
JP (1) JP4859658B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102653845B1 (en) * 2018-12-03 2024-04-02 에스케이하이닉스 주식회사 Data Storage Device and Operation Method Thereof, Storage System Having the Same

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04311217A (en) * 1991-04-09 1992-11-04 Toshiba Corp External storage controller
JPH04311218A (en) * 1991-04-09 1992-11-04 Toshiba Corp External storage controller
JPH06202967A (en) * 1993-01-06 1994-07-22 Nec Corp Input/output controller
JP2000105675A (en) * 1998-09-29 2000-04-11 Nec Corp Disk array device

Also Published As

Publication number Publication date
JP2008158832A (en) 2008-07-10

Similar Documents

Publication Publication Date Title
CN103164298B (en) Produce the data storage device of the redundancy protected for the data path of even-odd check sector
KR101730510B1 (en) Non-regular parity distribution detection via metadata tag
KR101905280B1 (en) High performance system providing selective merging of dataframe segments in hardware
US6651212B1 (en) Recording/reproduction device, semiconductor memory, and memory card using the semiconductor memory
US9377960B2 (en) System and method of using stripes for recovering data in a flash storage system
US20140068208A1 (en) Separately stored redundancy
KR20090028507A (en) Nonvolatile Memory Error Correction System and Method
CN101868830A (en) Fault Tolerant Non-Volatile Integrated Circuit Memory
CN101512491A (en) Electrically secure disk storage device, system and method
US7418645B2 (en) Error correction/detection code adjustment for known data pattern substitution
CN101388256B (en) Controller and method for generating a low-level error correction code for a memory element
CN101256803B (en) Error correction device and recording and reproducing device
WO2024098885A1 (en) Disk array write processing method and apparatus, device, and medium
JP4859658B2 (en) Block data partial update device, block data partial update method, and block data partial update program
CN114625563B (en) Data protection method and device of SSD, readable storage medium and electronic equipment
CN104021806A (en) Data processing method and data processing equipment
CN101273573B (en) Data descramble apparatus and data descramble method
CN104681095A (en) Storage device and method of operation thereof
WO2007088597A1 (en) Error correction code generation method and memory management device
TWI575529B (en) Method of enhancing error correction in data storage system and data storage system thereof
CN119440901B (en) Data management method, electronic device, and storage medium
TW200832367A (en) Decoding apparatus and method
JP2010140261A (en) Information processor, error correction method and program
TWI273775B (en) Method for generating syndrome value and related syndrome generator
CN120526833A (en) Memory encoding and decoding method, device, electronic device and storage medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090907

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20111101

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20111101

R150 Certificate of patent or registration of utility model

Ref document number: 4859658

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20141111

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees