JP2015158797A - Storage device and data management method - Google Patents

Storage device and data management method Download PDF

Info

Publication number
JP2015158797A
JP2015158797A JP2014033162A JP2014033162A JP2015158797A JP 2015158797 A JP2015158797 A JP 2015158797A JP 2014033162 A JP2014033162 A JP 2014033162A JP 2014033162 A JP2014033162 A JP 2014033162A JP 2015158797 A JP2015158797 A JP 2015158797A
Authority
JP
Japan
Prior art keywords
data
version
logical
physical
physical address
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2014033162A
Other languages
Japanese (ja)
Other versions
JP6242711B2 (en
Inventor
義永 佐藤
Yoshiei Sato
義永 佐藤
高橋 健治
Kenji Takahashi
健治 高橋
基孝 金松
Mototaka Kanematsu
基孝 金松
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.)
Toshiba Corp
Original Assignee
Toshiba Corp
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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP2014033162A priority Critical patent/JP6242711B2/en
Publication of JP2015158797A publication Critical patent/JP2015158797A/en
Application granted granted Critical
Publication of JP6242711B2 publication Critical patent/JP6242711B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide a storage device capable of erasing unnecessary data without performing vacuum processing.SOLUTION: A storage device of an embodiment is provided with a controller including data update means, registration means, table update means, and erasure means. The data update means writes second data at a second physical address if a data update request for updating first data to the second data is input. The registration means registers a specified logical address and a first physical address in a logical-physical conversion table which corresponds to the logical address in an update history list so as to associate them with each other. The table update means updates the first physical address in the logical-physical conversion table to the second physical address. The erasure means erases first data that is stored at the first physical address registered in the update history list, on the basis of version information.

Description

本発明の実施形態は、ストレージ装置及びデータ管理方法に関する。   Embodiments described herein relate generally to a storage apparatus and a data management method.

近年では、例えばNAND型フラッシュメモリのような不揮発性の半導体記憶装置を備えたストレージ装置(NAND型フラッシュメモリストレージ)が知られている。このストレージ装置には、例えばNAND型フラッシュメモリを使用したデータベースへのアクセスを制御するデータベースシステムが実装される。   In recent years, a storage device (NAND flash memory storage) including a nonvolatile semiconductor memory device such as a NAND flash memory is known. In this storage apparatus, for example, a database system for controlling access to a database using a NAND flash memory is mounted.

ところで、このようなストレージ装置に実装されるデータベースシステムにおいては、マルチユーザ環境におけるデータベースの性能を向上させるために、多版同時実行制御(MVCC:MultiVersion Concurrency Control)が実行される。このMVCCによれば、例えばデータベースに格納される任意のデータにおける変更状態を複数保持しておくことで、データアクセスの依存関係を解決することができる。   By the way, in a database system implemented in such a storage apparatus, multi-version concurrent control (MVCC) is executed in order to improve the performance of the database in a multi-user environment. According to this MVCC, for example, by retaining a plurality of change states in arbitrary data stored in a database, it is possible to solve data access dependency relationships.

しかしながら、上記したMVCCを実行するデータベースシステムでは、データが更新される度に、当該更新前後の複数のデータを格納しておく必要がある。このため、データベース内では、不要なデータが大量に発生する。これは、データベースの性能の低下を招く。   However, in the database system that executes the above-described MVCC, each time data is updated, it is necessary to store a plurality of data before and after the update. For this reason, a large amount of unnecessary data is generated in the database. This leads to a decrease in database performance.

そこで、データベースシステムにおいては、データベース動作の効率性を上げるための不要データ領域の回収やデータ再編成のためにバキューム処理が実行される。このバキューム処理によれば、データベース内の不要データの消去等が行われる。   Therefore, in the database system, a vacuum process is performed for collecting unnecessary data areas and improving data reorganization in order to increase the efficiency of database operations. According to the vacuum process, unnecessary data in the database is erased.

特開2011−180831号公報JP 2011-180831 A

上記したようにMVCCを実行するデータベースシステムにおいてはバキューム処理が必須であるが、当該バキューム処理が実行されている間はデータベースをロックする必要がある。   As described above, in the database system that executes MVCC, vacuum processing is essential, but the database must be locked while the vacuum processing is being executed.

この場合、バキューム処理中はデータベースへのアクセスができないため、データベースの運用上好ましくない。   In this case, the database cannot be accessed during the vacuum process, which is not preferable for database operation.

したがって、バキューム処理を実行することなく不要データの消去等を行う仕組みが望まれている。   Therefore, a mechanism for erasing unnecessary data without executing vacuum processing is desired.

そこで、本発明が解決しようとする課題は、バキューム処理を実行することなく不要データの消去を行うことが可能なストレージ装置及びデータ管理方法を提供することにある。   Therefore, the problem to be solved by the present invention is to provide a storage device and a data management method capable of erasing unnecessary data without executing a vacuum process.

実施形態によれば、各種データを記憶する不揮発性の半導体記憶装置を備え、当該半導体記憶装置を使用したデータベースへのアクセスを制御するデータベースシステムが実装されるストレージ装置が提供される。実施形態に係るストレージ装置は、前記半導体記憶装置に記憶されているデータを管理するコントローラと、前記データベースにおいて用いられる論理アドレスの各々に対応づけて当該論理アドレスに対応するデータの物理アドレスを保持する論物変換テーブル及び更新履歴リストを記憶するメモリとを具備する。前記コントローラは、データ更新手段と、登録手段と、テーブル更新手段と、消去手段とを含む。前記データ更新手段は、ユーザによって指定された論理アドレスに対応する第1のデータを第2のデータに更新するためのデータ更新要求が前記データベースシステムから入力された場合、当該第2のデータを当該第1のデータの第1の物理アドレスとは異なる第2の物理アドレスに書き込む。前記登録手段は、前記ユーザによって指定された論理アドレス及び当該論理アドレスに対応づけて前記論物変換テーブルに保持されている第1の物理アドレスを、前記第1のデータに割り当てられたバージョンを示すバージョン情報に対応づけて前記更新履歴リストに登録する。前記テーブル更新手段は、前記ユーザによって指定された論理アドレスに対応づけて前記論物変換テーブルに保持されている第1の物理アドレスを前記第2の物理アドレスに更新する。前記消去手段は、前記更新履歴リストに登録されたバージョン情報に基づいて、当該バージョン情報に対応づけて前記更新履歴リストに登録された第1の物理アドレスに記憶されている第1のデータを消去する。   According to the embodiment, a storage device is provided that includes a non-volatile semiconductor storage device that stores various data and in which a database system that controls access to a database using the semiconductor storage device is mounted. The storage device according to the embodiment holds a physical address of data corresponding to the logical address in association with each of the logical addresses used in the database and a controller that manages data stored in the semiconductor storage device And a memory for storing a logical-physical conversion table and an update history list. The controller includes data updating means, registration means, table updating means, and erasing means. When the data update request for updating the first data corresponding to the logical address designated by the user to the second data is input from the database system, the data update means stores the second data Write to a second physical address different from the first physical address of the first data. The registration means indicates a version assigned to the first data, a logical address designated by the user and a first physical address held in the logical-physical conversion table in association with the logical address. It is registered in the update history list in association with version information. The table updating means updates the first physical address held in the logical-physical conversion table in association with the logical address designated by the user to the second physical address. The erasure unit erases the first data stored in the first physical address registered in the update history list in association with the version information based on the version information registered in the update history list. To do.

実施形態に係るストレージ装置のハードウェア構成を示すブロック図。FIG. 2 is a block diagram showing a hardware configuration of the storage apparatus according to the embodiment. 図1に示す論物変換テーブル141のデータ構造の一例を示す図。The figure which shows an example of the data structure of the logical-physical conversion table 141 shown in FIG. 図1に示すページ状態テーブル142のデータ構造の一例を示す図。The figure which shows an example of the data structure of the page state table 142 shown in FIG. 図1に示す更新履歴リスト144のデータ構造の一例を示す図。The figure which shows an example of the data structure of the update history list 144 shown in FIG. ストレージ装置10において実行されるデータ更新処理の処理手順を示すフローチャート。5 is a flowchart showing a processing procedure of data update processing executed in the storage apparatus 10; データ更新処理が実行された場合における論物変換テーブル141及び更新履歴リスト144の遷移について説明するための図。The figure for demonstrating the transition of the logical-physical conversion table 141 and the update history list 144 when a data update process is performed. ストレージ装置10において実行される保存バージョン設定処理の処理手順を示すフローチャート。5 is a flowchart showing a processing procedure of a saved version setting process executed in the storage apparatus. 保存バージョン設定処理が実行される前の論物変換テーブル141、ページ状態テーブル142及び更新履歴リスト144のデータ構造の一例を示す。An example of the data structure of the logical-physical conversion table 141, the page state table 142, and the update history list 144 before the saved version setting process is executed is shown. 保存バージョン設定処理が実行された後の論物変換テーブル141、ページ状態テーブル142及び更新履歴リスト144のデータ構造の一例を示す。An example of the data structure of the logical-physical conversion table 141, the page state table 142, and the update history list 144 after the saved version setting process is executed is shown. ストレージ装置10において実行されるバージョン確定処理の処理手順を示すフローチャート。5 is a flowchart showing a processing procedure for version confirmation processing executed in the storage apparatus 10; ストレージ装置10において実行されるバージョン復元処理の処理手順を示すフローチャート。5 is a flowchart showing a processing procedure of version restoration processing executed in the storage apparatus 10; バージョン復元処理が実行された場合における論物変換テーブル141及び更新履歴リスト144の遷移について説明するための図。The figure for demonstrating the transition of the logical-physical conversion table 141 and the update history list 144 when a version restoration process is performed. データ消去部135によって実行されるガベージコレクションの処理手順を示すフローチャート。The flowchart which shows the process sequence of the garbage collection performed by the data deletion part 135. FIG.

以下、図面を参照して、実施形態について説明する。   Hereinafter, embodiments will be described with reference to the drawings.

図1は、本実施形態に係るストレージ装置のハードウェア構成を示すブロック図である。ストレージ装置10は、各種データを記憶する不揮発性の半導体記憶装置を備えている。図1においては、不揮発性の半導体記憶装置の一例としてNAND型フラッシュメモリ11が示されている。   FIG. 1 is a block diagram showing the hardware configuration of the storage apparatus according to this embodiment. The storage device 10 includes a nonvolatile semiconductor storage device that stores various data. In FIG. 1, a NAND flash memory 11 is shown as an example of a nonvolatile semiconductor memory device.

このNAND型フラッシュメモリ11に対しては、ページと称される単位でデータの書き込み及び読み出しが行われる。また、NAND型フラッシュメモリ11に記憶されたデータの消去は、ブロックと称される単位で行われる。このブロックは、複数のページから構成されるものとする。   Data is written to and read from the NAND flash memory 11 in units called pages. In addition, the data stored in the NAND flash memory 11 is erased in units called blocks. This block is composed of a plurality of pages.

また、NAND型フラッシュメモリ11においては、データを上書きすることはできない。このため、NAND型フラッシュメモリ11に記憶されているデータが更新される場合には、常に別のページ(物理アドレス)にデータが書き込まれる。また、データの更新によって不要となったデータの領域(ページ)に対する他のデータの書き込みを可能とするためには、当該ページ(のデータ)を一旦消去する必要がある。上記したようにNAND型フラッシュメモリ11におけるデータ消去は、複数のページから構成されるブロック単位で行われる。   In the NAND flash memory 11, data cannot be overwritten. For this reason, when the data stored in the NAND flash memory 11 is updated, the data is always written to another page (physical address). Further, in order to enable writing of other data to a data area (page) that has become unnecessary due to data update, it is necessary to erase the page (data) once. As described above, data erasure in the NAND flash memory 11 is performed in units of blocks composed of a plurality of pages.

なお、本実施形態に係るストレージ装置10には、NAND型フラッシュメモリ11を使用したデータベースへのアクセスを制御するデータベースシステムが実装されているものとする。このデータベースシステム上では、データベースに格納される各データは、例えばLBA(Logical Block Address)のような論理アドレスを用いて管理される。なお、データベースにおけるデータ登録はレコードと称されるが、本実施形態においては、便宜的に、レコードと上記したページのサイズは同一であるものとする。また、データベースシステムにおいては、マルチユーザ環境におけるデータベースの性能向上のために、多版同時実行制御(MVCC)が実行される。   It is assumed that the storage system 10 according to the present embodiment is equipped with a database system that controls access to a database using the NAND flash memory 11. In this database system, each data stored in the database is managed using a logical address such as an LBA (Logical Block Address). Data registration in the database is referred to as a record, but in the present embodiment, for convenience, it is assumed that the size of the record and the page is the same. In the database system, multi-version concurrent execution control (MVCC) is executed to improve database performance in a multi-user environment.

更に、ストレージ装置10は、図1に示すように、入出力部12、コントローラ13及びメモリ14を備える。   Furthermore, the storage device 10 includes an input / output unit 12, a controller 13, and a memory 14, as shown in FIG.

入出力部12は、ストレージ装置10に実装されているデータベースシステムとの入出力処理を行う。   The input / output unit 12 performs input / output processing with a database system mounted on the storage apparatus 10.

コントローラ(NANDコントローラ)13は、メモリ14に記憶されている各種情報に基づいて、NAND型フラッシュメモリ11に記憶されているデータを管理し、当該NAND型フラッシュメモリ11へのデータの書き込み及び読み込みを制御する。   The controller (NAND controller) 13 manages data stored in the NAND flash memory 11 on the basis of various information stored in the memory 14, and writes and reads data to and from the NAND flash memory 11. Control.

コントローラ13は、データ更新部131、保存バージョン設定部132、バージョン確定部133、バージョン復元部134及びデータ消去部135を含む。また、メモリ14には、論物変換テーブル141、ページ状態テーブル142、消去済みページリスト143、更新履歴リスト144及び設定テーブル145が記憶される。   The controller 13 includes a data update unit 131, a saved version setting unit 132, a version determination unit 133, a version restoration unit 134 and a data erasure unit 135. The memory 14 also stores a logical / physical conversion table 141, a page state table 142, an erased page list 143, an update history list 144, and a setting table 145.

なお、メモリ14は揮発性メモリであり、例えばストレージ装置10の起動時等に他の不揮発性メモリ領域に記憶されていた論物変換テーブル141、ページ状態テーブル142、消去済みページリスト143、更新履歴リスト144及び設定テーブル145がメモリ14に記憶されるものとする。   Note that the memory 14 is a volatile memory. For example, the logical-physical conversion table 141, the page state table 142, the erased page list 143, and the update history stored in another nonvolatile memory area when the storage device 10 is started up. Assume that a list 144 and a setting table 145 are stored in the memory 14.

論物変換テーブル141には、データベースシステムにおいて用いられる論理アドレスの各々に対応づけて当該論理アドレスに対応するデータの物理アドレス(当該データが記憶されているNAND型フラッシュメモリ11上の位置)が保持される。なお、物理アドレスは、NAND型フラッシュメモリ11におけるブロックに割り当てられた番号(以下、ブロック番号と表記)及び当該ブロックを構成するページに割り当てられた番号(以下、ページ番号と表記)を含む。このブロック番号及びページ番号により、NAND型フラッシュメモリ11上の一意の位置(特定のブロックを構成する特定のページ)を特定することができる。   The logical-physical conversion table 141 holds physical addresses of data corresponding to the logical addresses (positions on the NAND flash memory 11 where the data is stored) in association with the logical addresses used in the database system. Is done. The physical address includes a number assigned to a block in the NAND flash memory 11 (hereinafter referred to as a block number) and a number assigned to a page constituting the block (hereinafter referred to as a page number). A unique position (a specific page constituting a specific block) on the NAND flash memory 11 can be specified by the block number and the page number.

ページ状態テーブル142は、NAND型フラッシュメモリ11における各ブロックを構成するページの状態を管理するためのテーブルである。   The page status table 142 is a table for managing the status of pages constituting each block in the NAND flash memory 11.

消去済みページリスト143は、NAND型フラッシュメモリ11における各ページのうち、データを消去済みのページ(つまり、データを書き込み可能なページ)のリストである。   The erased page list 143 is a list of pages in which data has been erased (that is, pages into which data can be written) among the pages in the NAND flash memory 11.

データ更新部131は、入出力部12を介して入力されたデータ更新要求(書き込み要求)に基づいて、NAND型フラッシュメモリ11に記憶されているデータを更新する。なお、データ更新要求は、例えばユーザによって指定された論理アドレスに対応するデータ(第1のデータ)を他のデータ(第2のデータ)に更新する際にデータベースシステムから入力される。以下の説明では、便宜的に、ユーザによって指定された論理アドレスに対応するデータを更新前データと称し、当該更新前データを更新するための他のデータを更新後データと称する。データ更新要求には、ユーザによって指定された論理アドレス及び更新後データが含まれる。   The data update unit 131 updates data stored in the NAND flash memory 11 based on a data update request (write request) input via the input / output unit 12. The data update request is input from the database system when, for example, data (first data) corresponding to a logical address designated by the user is updated to other data (second data). In the following description, for convenience, data corresponding to the logical address designated by the user is referred to as pre-update data, and other data for updating the pre-update data is referred to as post-update data. The data update request includes a logical address designated by the user and post-update data.

データ更新部131は、データ更新要求が入力された場合、NAND型フラッシュメモリ11の更新前データの物理アドレス(第1の物理アドレス)とは異なる物理アドレス(第2の物理アドレス)に更新後データを書き込む。この場合、データ更新部131は、上記した消去済みページリストからページ(書き込み可能なページ)を取得し、当該ページに対して書き込み処理を実行する。   When a data update request is input, the data update unit 131 updates the post-update data to a physical address (second physical address) different from the physical address (first physical address) of the pre-update data in the NAND flash memory 11. Write. In this case, the data update unit 131 acquires a page (a writable page) from the above-described erased page list, and executes a writing process on the page.

更新後データがNAND型フラッシュメモリ11に書き込まれると、データ更新部131は、データ更新要求に含まれる論理アドレス及び当該論理アドレスに対応づけて論物変換テーブル141に保持されている物理アドレス(つまり、更新前データの物理アドレス)を取得する。データ更新部131は、取得された論理アドレス及び物理アドレスを、更新前データに割り当てられたバージョンを示すバージョン情報(例えば、当該バージョンを表すバージョン番号)に対応づけて更新履歴リスト144に登録する。   When the updated data is written in the NAND flash memory 11, the data update unit 131 associates the logical address included in the data update request and the physical address (that is, the logical address stored in the logical-physical conversion table 141 in association with the logical address). , Physical address of pre-update data). The data updating unit 131 registers the acquired logical address and physical address in the update history list 144 in association with version information (for example, a version number representing the version) indicating the version assigned to the pre-update data.

また、データ更新部131は、データ更新要求に含まれる論理アドレスに対応づけて論物変換テーブル141に保持されている物理アドレス(ブロック番号及びページ番号)を、更新後データが書き込まれた物理アドレスに更新する。   In addition, the data update unit 131 uses the physical address (block number and page number) held in the logical-physical conversion table 141 in association with the logical address included in the data update request as the physical address where the updated data is written. Update to

このようにデータ更新部131によってデータの更新が行われると、論物変換テーブル141には最新のデータに関する論理アドレスと物理アドレスとの対応関係が保持される。一方、更新履歴リスト144には、古いバージョンの論理アドレスと物理アドレスとの対応関係が登録される。すなわち、更新履歴リスト144によれば、各バージョンのデータを管理することができる。   When data is updated by the data updating unit 131 in this way, the logical-physical conversion table 141 holds the correspondence between the logical address and the physical address related to the latest data. On the other hand, in the update history list 144, the correspondence between the old version of the logical address and the physical address is registered. That is, according to the update history list 144, the data of each version can be managed.

なお、データ更新部131は、データの更新処理に応じて、上記したページ状態テーブル及び消去済みページリストを更新する。   The data updating unit 131 updates the page state table and the erased page list described above in accordance with the data update process.

保存バージョン設定部132は、データを保存すべきバージョンを設定テーブル145に設定する。データを保存すべきバージョンが設定テーブル145に設定された場合、保存バージョン設定部132は、当該バージョンより過去の(古い)バージョンを示すバージョン情報に対応づけて更新履歴リスト144に登録された物理アドレスによって特定されるページ(の状態)を無効とする。このページの無効は、ページ状態テーブル142に登録される。   The saved version setting unit 132 sets the version in which the data is to be saved in the setting table 145. When the version in which the data is to be stored is set in the setting table 145, the storage version setting unit 132 registers the physical address registered in the update history list 144 in association with version information indicating a version older than the version. The page specified by is invalidated. The invalidity of this page is registered in the page state table 142.

バージョン確定部133は、更新履歴リスト144において同一のバージョンとして管理される範囲を確定(設定)する。具体的には、バージョン確定部133は、入出力部12を介してユーザの指示に基づくバージョン確定要求が入力された場合、当該バージョン確定要求が入力されるまでに更新履歴リスト144に登録された論理アドレス及び物理アドレスを同一のバージョンとして確定する。   The version determination unit 133 determines (sets) a range managed as the same version in the update history list 144. Specifically, when a version confirmation request based on a user instruction is input via the input / output unit 12, the version determination unit 133 is registered in the update history list 144 until the version determination request is input. The logical address and the physical address are determined as the same version.

バージョン復元部134は、入出力部12を介して入力されたバージョン復元要求に基づいて、更新履歴リスト144に登録された論理アドレスと物理アドレスを論物変換テーブル141に復元する。なお、バージョン復元要求は、ユーザによって指定されたバージョンを示すバージョン情報を含む。   The version restoration unit 134 restores the logical address and the physical address registered in the update history list 144 to the logical-physical conversion table 141 based on the version restoration request input via the input / output unit 12. The version restoration request includes version information indicating the version designated by the user.

具体的には、バージョン復元部134は、バージョン復元要求に含まれるバージョン情報に対応づけて更新履歴リスト144に登録された論理アドレスを取得する。バージョン復元部134は、取得された論理アドレス及び当該論理アドレスに対応づけて論物変換テーブル141に登録された物理アドレスを、当該物理アドレスに記録されているデータに割り当てられたバージョンを示すバージョン情報に対応づけて更新履歴リストに登録する。また、バージョン復元部134は、バージョン復元要求に含まれるバージョン情報に対応づけて更新履歴リスト144に登録された論理アドレス及び物理アドレスを、論物変換テーブル141に復元する。   Specifically, the version restoration unit 134 acquires the logical address registered in the update history list 144 in association with the version information included in the version restoration request. The version restoration unit 134 uses the acquired logical address and the physical address registered in the logical-physical conversion table 141 in association with the logical address to indicate the version assigned to the data recorded in the physical address. Register in the update history list in association with. Further, the version restoration unit 134 restores the logical address and the physical address registered in the update history list 144 in association with the version information included in the version restoration request in the logical-physical conversion table 141.

データ消去部135は、例えば上記したように保存バージョン設定部132によって設定テーブル145に設定されたバージョンに基づいて無効にされたページから構成されるブロック(のデータ)を消去する。この場合、データ消去部135は、NAND型フラッシュメモリ11における書き込み領域の確保処理であるガベージコレクション(GC)を実行する。なお、ガベージコレクションの詳細については後述する。   For example, as described above, the data erasure unit 135 erases a block (data) composed of pages invalidated based on the version set in the setting table 145 by the saved version setting unit 132. In this case, the data erasure unit 135 executes garbage collection (GC), which is a process for securing a write area in the NAND flash memory 11. Details of the garbage collection will be described later.

図2は、図1に示す論物変換テーブル141のデータ構造の一例である。図2に示すように、論物変換テーブル141には、論理アドレス及び物理アドレスが対応づけて保持される。なお、論理アドレスは、データベースシステムにおいて用いられるアドレスである。一方、物理アドレスは、当該物理アドレスに対応づけられている論理アドレスに対応するデータが記憶されているNAND型フラッシュメモリ11上のアドレスである。物理アドレスは、NAND型フラッシュメモリ11におけるブロックに割り当てられたブロック番号及び当該ブロックを構成するページに割り当てられたページ番号を含む。   FIG. 2 shows an example of the data structure of the logical-physical conversion table 141 shown in FIG. As shown in FIG. 2, the logical-physical conversion table 141 holds logical addresses and physical addresses in association with each other. The logical address is an address used in the database system. On the other hand, the physical address is an address on the NAND flash memory 11 in which data corresponding to the logical address associated with the physical address is stored. The physical address includes a block number assigned to a block in the NAND flash memory 11 and a page number assigned to a page constituting the block.

図2に示す例では、論物変換テーブル141には、論理アドレス「1」とブロック番号「1」及びページ番号「4」を含む物理アドレスとが対応づけて保持されている。これによれば、論理アドレス「1」に対応するデータが、ブロック番号「1」が割り当てられたブロックを構成する複数のページのうちページ番号「4」が割り当てられたページ(の領域)に記憶されていることが示されている。   In the example illustrated in FIG. 2, the logical-physical conversion table 141 holds a logical address “1” and a physical address including a block number “1” and a page number “4” in association with each other. According to this, the data corresponding to the logical address “1” is stored in the page (area) to which the page number “4” is assigned among the plurality of pages constituting the block to which the block number “1” is assigned. It has been shown that.

同様に、論物変換テーブル141には、論理アドレス「2」とブロック番号「1」及びページ番号「5」を含む物理アドレスとが対応づけて保持されている。これによれば、論理アドレス「2」に対応するデータが、ブロック番号「1」が割り当てられたブロックを構成する複数のページのうちページ番号「5」が割り当てられたページ(の領域)に記憶されていることが示されている。   Similarly, the logical-physical conversion table 141 holds a logical address “2” and a physical address including a block number “1” and a page number “5” in association with each other. According to this, the data corresponding to the logical address “2” is stored in the page (area) to which the page number “5” is assigned among the plurality of pages constituting the block to which the block number “1” is assigned. It has been shown that.

ここでは論理アドレス「1」及び「2」についてのみ説明したが、他の論理アドレスについても同様であるため、その詳しい説明を省略する。   Although only the logical addresses “1” and “2” have been described here, the same applies to other logical addresses, and thus detailed description thereof is omitted.

図3は、図1に示すページ状態テーブル142のデータ構造の一例を示す。ページ状態テーブル142はNAND型フラッシュメモリ11におけるブロック毎に用意されているが、図3においてはブロック番号「1」が割り当てられたブロックのページ状態テーブル142が示されている。   FIG. 3 shows an example of the data structure of the page state table 142 shown in FIG. The page state table 142 is prepared for each block in the NAND flash memory 11, but FIG. 3 shows the page state table 142 of the block to which the block number “1” is assigned.

図3に示すように、ページ状態テーブル142には、ブロックを構成するページ毎に、当該ページに割り当てられたページ番号及び当該ページの状態が対応づけて保持される。なお、ページの状態には、当該ページのデータが有効であることを示す「00」、当該ページのデータが無効であることを示す「01」及び当該ページのデータが消去済みであることを示す「10」が含まれる。   As shown in FIG. 3, the page state table 142 stores the page number assigned to the page and the state of the page in association with each page constituting the block. The page status includes “00” indicating that the data on the page is valid, “01” indicating that the data on the page is invalid, and that the data on the page has been erased. “10” is included.

図3に示すページ状態テーブル142の例では、ブロック番号「1」が割り当てられたブロックがページ番号「1」〜「8」の各々が割り当てられた複数のページから構成されていることが示されている。また、この複数のページのうち、ページ番号「1」〜「5」が割り当てられたページの状態が有効(つまり、「00」)であり、ページ番号「6」〜「8」が割り当てられたページの状態が消去済み(つまり、「10」)であることが示されている。   The example of the page state table 142 shown in FIG. 3 indicates that the block to which the block number “1” is assigned is composed of a plurality of pages to which the page numbers “1” to “8” are assigned. ing. Further, among the plurality of pages, the state of the page assigned with the page numbers “1” to “5” is valid (that is, “00”), and the page numbers “6” to “8” are assigned. It is indicated that the state of the page is erased (that is, “10”).

ここではブロック番号「1」が割り当てられたブロックのページ状態テーブル142についてのみ説明したが、他のブロックのページ状態テーブル142についても同様であるため、その詳しい説明を省略する。   Although only the page state table 142 of the block to which the block number “1” is assigned has been described here, the same applies to the page state table 142 of other blocks, and detailed description thereof is omitted.

なお、上述した消去済みページリスト143には、NAND型フラッシュメモリ11におけるブロック毎に、ページ状態テーブル142において状態「10」に対応づけられているページ番号が登録(追加)される。図3に示すページ状態テーブル142の場合には、ページ番号「1」〜「8」のうち、ページ番号「6」〜「8」が消去済みページリスト143に登録される。なお、消去済みページリスト143へのページ番号の登録処理は、ページ状態テーブル142の更新に伴って実行される。   In the erased page list 143 described above, the page number associated with the state “10” in the page state table 142 is registered (added) for each block in the NAND flash memory 11. In the case of the page state table 142 shown in FIG. 3, the page numbers “6” to “8” among the page numbers “1” to “8” are registered in the erased page list 143. Note that the process of registering the page number in the erased page list 143 is executed as the page state table 142 is updated.

図4は、図1に示す更新履歴リスト144のデータ構造の一例を示す。図4に示すように、更新履歴リスト144には、バージョン情報に対応づけて、論理アドレス及び物理アドレスが登録される。バージョン情報は、当該バージョン情報に対応づけられている物理アドレスに記憶されているデータ(つまり、更新前データ)に割り当てられたバージョンを表す例えばバージョン番号を含む。なお、バージョン番号は、例えば値が大きいほど新しいバージョンであることを示すものとする。   FIG. 4 shows an example of the data structure of the update history list 144 shown in FIG. As shown in FIG. 4, in the update history list 144, logical addresses and physical addresses are registered in association with version information. The version information includes, for example, a version number representing a version assigned to data stored in a physical address associated with the version information (that is, pre-update data). Note that the version number indicates, for example, a newer version as the value increases.

図4に示す例では、更新履歴リスト144には、バージョン番号「2」に対応づけて、論理アドレス「2」とブロック番号「1」及びページ番号「3」を含む物理アドレスとが登録されている。これによれば、論理アドレス「2」に対応するバージョンが2であるデータが、ブロック番号「1」が割り当てられたブロックを構成するページ番号「3」が割り当てられたページ(の領域)に格納されていることが示されている。   In the example shown in FIG. 4, the update history list 144 is registered with a logical address “2” and a physical address including a block number “1” and a page number “3” in association with the version number “2”. Yes. According to this, data whose version corresponding to the logical address “2” is 2 is stored in the page (area) to which the page number “3” constituting the block to which the block number “1” is assigned is assigned. It has been shown that.

また、更新履歴リスト144には、バージョン番号「2」に対応づけて、論理アドレス「1」とブロック番号「1」及びページ番号「1」を含む物理アドレスとが登録されている。これによれば、論理アドレス「1」に対応するバージョンが2であるデータが、ブロック番号「1」が割り当てられたブロックを構成するページ番号「1」が割り当てられたページ(の領域)に格納されていることが示されている。   In the update history list 144, a logical address “1”, a physical address including a block number “1” and a page number “1” are registered in association with the version number “2”. According to this, the data whose version corresponding to the logical address “1” is 2 is stored in the page (area) to which the page number “1” constituting the block to which the block number “1” is assigned is assigned. It has been shown that.

このように同一のバージョン(番号)に対して異なる複数の論理アドレス(及び物理アドレス)が登録されても構わない。   In this way, a plurality of different logical addresses (and physical addresses) may be registered for the same version (number).

また、図4に示す例では、更新履歴リスト144には、バージョン番号「1」に対応づけて、論理アドレス「2」とブロック番号「1」及びページ番号「2」を含む物理アドレスとが登録されている。これによれば、論理アドレス「2」に対応するバージョンが1であるデータが、ブロック番号「1」が割り当てられたブロックを構成するページ番号「2」が割り当てられたページ(の領域)に格納されていることが示されている。   In the example illustrated in FIG. 4, the logical address “2”, the physical address including the block number “1” and the page number “2” are registered in the update history list 144 in association with the version number “1”. Has been. According to this, data whose version corresponding to the logical address “2” is 1 is stored in the page (area) to which the page number “2” constituting the block to which the block number “1” is assigned is assigned. It has been shown that.

なお、ブロック番号「1」が割り当てられたブロックを構成するページ番号「2」が割り当てられたページに格納されているデータ(つまり、論理アドレス「2」に対応するバージョンが1であるデータ)は、上記したブロック番号「1」が割り当てられたブロックを構成するページ番号「3」が割り当てられたページに格納されているデータ(つまり論理アドレス「2」に対応するバージョンが2であるデータ)より古いバージョンのデータである。   Note that the data stored in the page to which the page number “2” constituting the block to which the block number “1” is assigned is stored (that is, data whose version corresponding to the logical address “2” is 1). From the data stored in the page to which the page number “3” constituting the block to which the block number “1” is assigned is stored (that is, the version corresponding to the logical address “2” is 2). Old version of data.

次に、図5のフローチャートを参照して、本実施形態に係るストレージ装置10において実行されるデータ更新処理の処理手順について説明する。このデータ更新処理は、ユーザによって指定された論理アドレスに対応するデータを更新する際の処理であり、データベースシステムからデータ更新要求が入力された場合に実行される。なお、データ更新要求には、ユーザによって指定された論理アドレス(更新前データに対応する論理アドレス)及び更新後データが含まれる。   Next, with reference to a flowchart of FIG. 5, a processing procedure of data update processing executed in the storage apparatus 10 according to the present embodiment will be described. This data update process is a process for updating data corresponding to a logical address designated by the user, and is executed when a data update request is input from the database system. The data update request includes a logical address designated by the user (logical address corresponding to pre-update data) and post-update data.

まず、データ更新部131は、入出力部12を介して入力されたデータ更新要求を取得する(ステップS1)。   First, the data update unit 131 acquires a data update request input via the input / output unit 12 (step S1).

データ更新要求が取得されると、データ更新部131は、消去済みページリスト143から更新後データを書き込み可能なページ(の物理アドレス)を取得する(ステップS2)。以下の説明では、ステップS2において取得されたページを便宜的に書き込み先物理ページと称する。   When the data update request is acquired, the data update unit 131 acquires a page (physical address) in which updated data can be written from the erased page list 143 (step S2). In the following description, the page acquired in step S2 is referred to as a write destination physical page for convenience.

データ更新部131は、NAND型フラッシュメモリ11にアクセスし、更新後データを書き込み先物理ページに書き込む(ステップS3)。   The data update unit 131 accesses the NAND flash memory 11 and writes the updated data to the write destination physical page (step S3).

次に、データ更新部131は、データ更新要求に含まれる論理アドレス(以下、対象論理アドレスと表記)及び当該対象論理アドレスに対応づけて論物変換テーブル141に保持されている物理アドレス(つまり、更新前データの物理アドレス)を更新履歴リスト144に追加(登録)する(ステップS4)。この場合における対象論理アドレス及び更新前データの物理アドレスは、当該更新前データに割り当てられたバージョンを表すバージョン番号に対応づけて登録される。これにより、更新履歴リスト144において、更新前データのバージョンが管理される。   Next, the data updating unit 131 includes a logical address (hereinafter referred to as a target logical address) included in the data update request and a physical address (that is, the logical address stored in the logical-physical conversion table 141 in association with the target logical address). The physical address of the pre-update data) is added (registered) to the update history list 144 (step S4). In this case, the target logical address and the physical address of the pre-update data are registered in association with the version number representing the version assigned to the pre-update data. Thereby, the version of the pre-update data is managed in the update history list 144.

データ更新部131は、対象論理アドレスに対応づけて論物変換テーブル141に保持されている物理アドレスを更新後データが書き込まれたページ(つまり、書き込み先物理ページ)の物理アドレス(ブロック番号及びページ番号)に更新することによって、当該論物変換テーブル141を更新する(ステップS5)。   The data update unit 131 associates the physical address held in the logical-physical conversion table 141 with the target logical address, and the physical address (block number and page) of the page where the updated data is written (that is, the write destination physical page). The logical-physical conversion table 141 is updated by updating to (number) (step S5).

また、データ更新部131は、ページ状態テーブル142に保持されている書き込み先物理ページの状態を消去済みから有効に変更することによって、ページ状態テーブル142を更新する(ステップS6)。具体的には、データ更新部131は、更新後データが書き込まれたページの物理アドレスに含まれるブロック番号が割り当てられたブロックのページ状態テーブル142において、当該物理アドレスに含まれるページ番号に対応づけられている状態を「10」から「00」に変更する。なお、書き込み先物理ページ(に割り当てられたページ番号)は、消去済みページリスト143から削除される。   The data update unit 131 updates the page state table 142 by changing the state of the write destination physical page held in the page state table 142 from erased to valid (step S6). Specifically, the data updating unit 131 associates the page number included in the physical address with the page number in the block status table 142 to which the block number included in the physical address of the page where the updated data is written is assigned. The status being changed is changed from “10” to “00”. Note that the write destination physical page (the page number assigned to it) is deleted from the erased page list 143.

ここで、図6を参照して、上記したデータ更新処理が実行された場合における論物変換テーブル141及び更新履歴リスト144の遷移について具体的に説明する。   Here, with reference to FIG. 6, the transition of the logical-physical conversion table 141 and the update history list 144 when the above-described data update process is executed will be specifically described.

図6に示すように、データ更新処理が実行される前の論物変換テーブル141xには、論理アドレス「1」とブロック番号「1」及びページ番号「4」を含む物理アドレスとが対応づけて保持されているものとする。同様に、論物変換テーブル141xには、論理アドレス「2」とブロック番号「1」及びページ番号「3」を含む物理アドレスとが対応づけて保持されているものとする。   As shown in FIG. 6, in the logical-physical conversion table 141x before the data update process is executed, the logical address “1” is associated with the physical address including the block number “1” and the page number “4”. It shall be retained. Similarly, in the logical-physical conversion table 141x, it is assumed that the logical address “2” and the physical address including the block number “1” and the page number “3” are held in association with each other.

また、データ更新処理が実行される前の更新履歴リスト144xには、バージョン番号「1」に対応づけて、論理アドレス「2」とブロック番号「1」及びページ番号「2」を含む物理アドレスとが登録されているものとする。   In addition, in the update history list 144x before the data update process is executed, the physical address including the logical address “2”, the block number “1”, and the page number “2” is associated with the version number “1”. Is registered.

この場合において、論理アドレス「2」を含むデータ更新要求が入出力部12を介して入力された場合を想定する。このとき、消去済みページリスト143から取得された書き込み先物理ページの物理アドレスにはブロック番号「1」及びページ番号「5」が含まれているものとする。   In this case, it is assumed that a data update request including the logical address “2” is input via the input / output unit 12. At this time, it is assumed that the physical address of the write destination physical page acquired from the erased page list 143 includes the block number “1” and the page number “5”.

データ更新要求に含まれる更新後データが書き込み先物理ページに書き込まれると、更新履歴リスト144xには、論物変換テーブル141xに保持されている論理アドレス「2」及び物理アドレス(ブロック番号「1」及びページ番号「3」)がバージョン番号「2」に対応づけて登録される。これによれば、更新履歴リスト144xは、更新履歴リスト144yに遷移する。   When the updated data included in the data update request is written to the write destination physical page, the update history list 144x includes the logical address “2” and the physical address (block number “1”) held in the logical-physical conversion table 141x. And page number “3”) are registered in association with version number “2”. According to this, the update history list 144x transitions to the update history list 144y.

一方、論物変換テーブル141xに保持されている論理アドレス「2」に対応づけられている物理アドレス(ブロック番号「1」及びページ番号「3」)は、書き込み物理ページの物理アドレス(ブロック番号「1」及びページ番号「5」)に更新される。これによれば、論物変換テーブル141xは、論物変換テーブル141yに遷移する。   On the other hand, the physical address (block number “1” and page number “3”) associated with the logical address “2” held in the logical-physical conversion table 141 x is the physical address (block number “ 1 ”and page number“ 5 ”). According to this, the logical-physical conversion table 141x transitions to the logical-physical conversion table 141y.

上記したようなデータ更新処理によれば、データの更新時に、更新前データが記憶されている物理アドレスを当該データが更新された論理アドレスとともに更新履歴リスト144に登録することができる。   According to the data update process as described above, when updating data, the physical address where the pre-update data is stored can be registered in the update history list 144 together with the logical address where the data is updated.

次に、図7のフローチャートを参照して、本実施形態に係るストレージ装置10において実行される保存バージョン設定処理の処理手順について説明する。この保存バージョン設定処理は、データを保存すべきバージョンを設定する際の処理であり、保存バージョン設定要求が入力された場合に実行される。なお、保存バージョン設定要求(Version_set(int ver_num))には、データを保存すべきバージョンを示す値(以下、保存バージョン数と表記)が含まれる。この保存バージョン数は、ユーザによって指定される。   Next, with reference to the flowchart of FIG. 7, the processing procedure of the saved version setting process executed in the storage apparatus 10 according to the present embodiment will be described. This saved version setting process is a process for setting a version in which data is to be saved, and is executed when a saved version setting request is input. Note that the saved version setting request (Version_set (int ver_num)) includes a value indicating the version in which the data is to be saved (hereinafter referred to as the number of saved versions). The number of saved versions is designated by the user.

ここでは、上述したデータ更新処理が実行されることによって、更新履歴リスト144には各バージョン番号に対応づけて論理アドレス及び物理アドレスが登録されているものとする。   Here, it is assumed that the logical address and the physical address are registered in the update history list 144 in association with each version number by executing the data update process described above.

まず、保存バージョン設定部132は、入出力部12を介して入力された保存バージョン設定要求を取得する(ステップS11)。   First, the saved version setting unit 132 acquires a saved version setting request input via the input / output unit 12 (step S11).

次に、保存バージョン設定部132は、保存バージョン設定要求に含まれる保存バージョン数を設定テーブル145に設定する(ステップS12)。   Next, the saved version setting unit 132 sets the number of saved versions included in the saved version setting request in the setting table 145 (step S12).

保存バージョン設定部132は、設定テーブル145に設定された保存バージョン数に基づいてページ状態テーブル142を更新する(ステップS13)。この場合、保存バージョン設定部132は、バージョン番号の大きい順に保存バージョン数分のバージョンを残し、当該バージョンより過去のバージョンの物理アドレスによって特定されるページの状態を無効とするようにページ状態テーブル142を更新する。これにより、保存バージョン数分のバージョン以外のバージョンのデータが無効とされる。   The saved version setting unit 132 updates the page state table 142 based on the number of saved versions set in the setting table 145 (step S13). In this case, the saved version setting unit 132 leaves the version for the number of saved versions in descending order of the version number, and invalidates the page status specified by the physical address of the version earlier than the version. Update. As a result, version data other than the number of saved versions is invalidated.

ここで、図8及び図9を参照して、ステップS13におけるページ状態テーブル142の更新処理について具体的に説明する。   Here, with reference to FIG. 8 and FIG. 9, the update process of the page state table 142 in step S13 will be specifically described.

まず、図8は、保存バージョン設定処理が実行される前の論物変換テーブル141、ページ状態テーブル142及び更新履歴リスト144のデータ構造の一例を示す。   First, FIG. 8 shows an example of the data structure of the logical-physical conversion table 141, the page state table 142, and the update history list 144 before the saved version setting process is executed.

図8に示すように、履歴更新リスト144には、バージョン番号「1」及び「2」に対応づけて、論理アドレス及び物理アドレスが登録されているものとする。また、論物変換テーブル141に保持されている物理アドレスによって特定されるページ及び更新履歴リスト144に登録されている物理アドレスによって特定されるページの状態は、ページ状態テーブル142において全て「00」(つまり、有効)であるものとする。   As illustrated in FIG. 8, it is assumed that the logical address and the physical address are registered in the history update list 144 in association with the version numbers “1” and “2”. The page status specified by the physical address held in the logical-physical conversion table 141 and the status of the page specified by the physical address registered in the update history list 144 are all “00” ( That is, it is effective).

ここで、保存バージョン数「1」を含む保存バージョン設定要求が入出力部12を介して入力された場合を想定する。この場合には、バージョン番号が最も大きい1つのバージョン以外のバージョンの物理アドレスによって特定されるページの状態は無効とする。   Here, it is assumed that a stored version setting request including the stored version number “1” is input via the input / output unit 12. In this case, the state of the page specified by the physical address of a version other than the one version having the largest version number is invalid.

具体的には、図9に示すように、バージョン番号「1」に対応づけて履歴更新リスト144に登録されている物理アドレス(ブロック番号「1」及びページ番号「2」)によって特定されるページの状態は「01」(つまり、無効)に変更される。   Specifically, as shown in FIG. 9, the page specified by the physical address (block number “1” and page number “2”) registered in the history update list 144 in association with the version number “1”. Is changed to “01” (that is, invalid).

なお、論物変換テーブル141に保持されている物理アドレスによって特定されるページ及びバージョン番号「2」に対応づけて履歴更新リスト144に登録されている物理アドレスによって特定されるページの状態は「00」(つまり、有効)のままとする。   Note that the page specified by the physical address stored in the logical-physical conversion table 141 and the state of the page specified by the physical address registered in the history update list 144 in association with the version number “2” are “00”. "(Ie valid).

上記したような保存バージョン設定処理によれば、ユーザによって指定されたバージョン(つまり、保存バージョン数分のバージョン)のデータを残し、当該バージョンより過去のバージョンのデータについては無効とすることができる。このように過去のバージョンのデータが無効とされたことは、例えば入出力部12を介してデータベースシステムに通知されることにより、当該データベースシステム側で認識することができる。   According to the saved version setting process as described above, the data of the version designated by the user (that is, the version corresponding to the number of saved versions) is left, and the data of the version earlier than the version can be invalidated. The fact that the past version of the data is invalidated in this way can be recognized on the database system side by notifying the database system via the input / output unit 12, for example.

なお、上記した保存バージョン数としては0を指定することも可能である。この場合には、更新履歴リスト144に登録されている物理アドレスによって特定されるページの全ての状態が無効とされる(つまり、論物変換テーブル141に保持されている物理アドレスに対応するページのみが有効とされる)。   Note that it is possible to specify 0 as the number of stored versions. In this case, all the states of the page specified by the physical address registered in the update history list 144 are invalidated (that is, only the page corresponding to the physical address held in the logical-physical conversion table 141). Is considered valid).

本実施形態においては保存バージョン数がユーザによって指定されるものとして説明したが、データを保存すべきバージョンまたはデータを保存すべきでない(つまり、データを無効とすべき)バージョンを表すバージョン番号がユーザによって直接指定されても構わない。   In this embodiment, the number of stored versions is described as being specified by the user. However, a version number indicating a version in which data is to be stored or a version in which data is not to be stored (that is, data should be invalidated) It may be specified directly by.

次に、図10のフローチャートを参照して、本実施形態に係るストレージ装置10において実行されるバージョン確定処理の処理手順について説明する。このバージョン確定処理は、同一のバージョンとして管理される範囲を確定させる際の処理であり、バージョン確定要求が入力された場合に実行される。なお、バージョン確定要求(version_commit())はユーザの指示に応じて入力される。   Next, with reference to a flowchart of FIG. 10, a processing procedure of version confirmation processing executed in the storage apparatus 10 according to the present embodiment will be described. This version confirmation process is a process for confirming a range managed as the same version, and is executed when a version confirmation request is input. Note that the version confirmation request (version_commit ()) is input in response to a user instruction.

なお、以下の説明においては、更新履歴リスト144に対応づけて登録されている論理アドレス及び物理アドレスの組を便宜的に論物アドレスと称する。   In the following description, a set of logical addresses and physical addresses registered in association with the update history list 144 is referred to as a logical address for convenience.

まず、バージョン確定部133は、入出力部12を介して入力されたバージョン確定要求を取得する(ステップS21)。   First, the version confirmation unit 133 acquires a version confirmation request input via the input / output unit 12 (step S21).

バージョン確定要求が取得されると、バージョン確定部133は、バージョンが確定されていない論物アドレスが更新履歴リスト144に存在する(つまり、バージョン未確定の論物アドレスがある)か否かを判定する(ステップS22)。   When the version determination request is acquired, the version determination unit 133 determines whether or not a logical / physical address whose version is not fixed exists in the update history list 144 (that is, there is a logical / unfixed logical address). (Step S22).

バージョン未確定の論物アドレスがあると判定された場合(ステップS22のYES)、バージョン確定部133は、更新履歴リスト144に登録されている当該論物アドレスを同一のバージョンとして確定する(ステップS23)。つまり、複数のバージョン未確定の論物アドレス(論理アドレス及び物理アドレスの組)が更新履歴リスト144に登録されている場合には、当該論物アドレスの全てが同一のバージョンとして確定される。   If it is determined that there is a version-unconfirmed logical / physical address (YES in step S22), the version determination unit 133 determines the logical / physical address registered in the update history list 144 as the same version (step S23). ). That is, when a plurality of logical addresses whose versions are unconfirmed (a set of logical addresses and physical addresses) are registered in the update history list 144, all the logical addresses are determined as the same version.

上記したようにデータ更新処理が実行されることによって更新履歴リスト144には、バージョン番号に対応づけて論理アドレス及び物理アドレスが登録されるが、当該データ更新処理(更新履歴リスト144への登録処理)の後にバージョン確定部133によってバージョンが確定されることによって、当該バージョンの論物アドレスが有効なものとなる。なお、バージョン確定処理によって確定されたバージョンを表すバージョン番号は、入出力部12を介して出力され、ユーザに対して通知される。これにより、ユーザは、更新履歴リスト144に登録されているバージョンについて把握することができる。   By executing the data update process as described above, the logical address and the physical address are registered in the update history list 144 in association with the version number, but the data update process (registration process to the update history list 144) is performed. ), The version is confirmed by the version confirming unit 133, so that the logical address of the version becomes valid. Note that the version number representing the version confirmed by the version confirmation process is output via the input / output unit 12 and notified to the user. Thereby, the user can grasp the version registered in the update history list 144.

上記したステップS23の処理によれば、更新履歴リスト144において新たなバージョンが追加されることになる(つまり、バージョンが増える)。このため、バージョン確定部133は、上記したように設定テーブル145に設定された保存バージョン数に基づいてページ状態テーブル142を更新する(ステップS24)。なお、このステップS24の処理は、上述した図7に示すステップS13の処理と同様であるため、その詳しい説明を省略する。   According to the processing in step S23 described above, a new version is added to the update history list 144 (that is, the version increases). For this reason, the version determination unit 133 updates the page state table 142 based on the number of stored versions set in the setting table 145 as described above (step S24). Note that the process of step S24 is the same as the process of step S13 shown in FIG.

上記したようなバージョン確定処理によれば、バージョン確定要求が入力されるまでに更新履歴リスト144に登録される論物アドレスを同一のバージョンとして管理することができる(つまり、同一のバージョン番号に対応づけられる)。なお、バージョン確定処理が実行された後にデータ更新処理が実行された場合には、次のバージョンを示すバージョン情報に対応づけて論物アドレスが更新履歴リストに登録されることになる。   According to the version determination process as described above, the logical and physical addresses registered in the update history list 144 before the version determination request is input can be managed as the same version (that is, corresponding to the same version number). Attached). If the data update process is executed after the version confirmation process is executed, the logical / physical address is registered in the update history list in association with the version information indicating the next version.

また、バージョン確定要求が入力されるまでに論理アドレスが共通する複数の論物アドレスが更新履歴リスト144に登録される場合には、後に実行されるデータ更新処理による論物アドレスのみが登録される。   In addition, when a plurality of logical / physical addresses having a common logical address are registered in the update history list 144 before the version confirmation request is input, only the logical / physical addresses by the data update process executed later are registered. .

また、上記したバージョン確定処理(つまり、バージョン確定要求の入力)は、例えば一連の処理(トランザクション)単位で行われるものとする。   Further, it is assumed that the above-described version confirmation process (that is, input of a version confirmation request) is performed in a series of processes (transactions), for example.

次に、図11のフローチャートを参照して、本実施形態に係るストレージ装置10において実行されるバージョン復元処理の処理手順について説明する。このバージョン復元処理は、特定のバージョンの状態に論物変換テーブル141を復元する際の処理であり、バージョン復元要求が入力された場合に実行される。なお、バージョン復元要求(version_restore(int ver_num))には、復元の対象となるバージョンを表すバージョン番号が含まれる。このバージョン番号は、ユーザによって指定される。   Next, with reference to the flowchart of FIG. 11, a processing procedure of version restoration processing executed in the storage apparatus 10 according to the present embodiment will be described. This version restoration process is a process for restoring the logical-physical conversion table 141 to a specific version state, and is executed when a version restoration request is input. The version restoration request (version_restore (int ver_num)) includes a version number indicating the version to be restored. This version number is specified by the user.

ここでは、上述したデータ更新処理及びバージョン確定処理が実行されることによって、更新履歴リスト144には各バージョン情報に対応づけて論物アドレス(論理アドレス及び物理アドレス)が登録されているものとする。   Here, it is assumed that the logical address (logical address and physical address) is registered in the update history list 144 in association with each version information by executing the above-described data update process and version confirmation process. .

まず、バージョン復元部134は、入出力部12を介して入力されたバージョン復元要求を取得する(ステップS31)。   First, the version restoration unit 134 acquires a version restoration request input via the input / output unit 12 (step S31).

次に、バージョン復元部134は、バージョン復元要求に含まれるバージョン番号に対応づけて更新履歴リスト144に登録されている論理アドレスを取得する(ステップS32)。以下の説明においては、ステップS32において取得された論理アドレスを対象論理アドレスと称する。   Next, the version restoration unit 134 acquires a logical address registered in the update history list 144 in association with the version number included in the version restoration request (step S32). In the following description, the logical address acquired in step S32 is referred to as a target logical address.

バージョン復元部134は、対象論理アドレスに対応づけて論物変換テーブル141に保持されている物理アドレスを取得する(ステップS33)。   The version restoration unit 134 acquires the physical address held in the logical-physical conversion table 141 in association with the target logical address (step S33).

バージョン復元部134は、対象論理アドレス及びステップS33において取得された物理アドレスを更新履歴リスト144に追加する(ステップS34)。   The version restoration unit 134 adds the target logical address and the physical address acquired in step S33 to the update history list 144 (step S34).

次に、バージョン復元部134は、バージョン復元要求に含まれるバージョン番号に対応づけて更新履歴リスト144に登録されている論理アドレス(対象論理アドレス)及び物理アドレスを取得する(ステップS35)。   Next, the version restoration unit 134 acquires a logical address (target logical address) and a physical address registered in the update history list 144 in association with the version number included in the version restoration request (step S35).

バージョン復元部134は、ステップS35において取得された論理アドレスに対応づけて論物変換テーブル141に保持されている物理アドレスを、ステップS35において取得された物理アドレスに変更する(ステップS36)。これによって、ユーザによって指定されたバージョンの論物アドレスが論物変換テーブル141に復元される。   The version restoring unit 134 changes the physical address held in the logical-physical conversion table 141 in association with the logical address acquired in step S35 to the physical address acquired in step S35 (step S36). As a result, the logical / physical address of the version specified by the user is restored in the logical / physical conversion table 141.

ここで、図12を参照して、上記したバージョン復元処理が実行された場合における論物変換テーブル141及び更新履歴リスト144の遷移について具体的に説明する。   Here, with reference to FIG. 12, the transition of the logical-physical conversion table 141 and the update history list 144 when the above-described version restoration process is executed will be specifically described.

ここでは、図12に示すように、バージョン復元処理が実行される前の論物変換テーブル141aには、論理アドレス「1」とブロック番号「1」及びページ番号「4」を含む物理アドレスとが対応づけて保持されているものとする。同様に、論物変換テーブル141aには、論理アドレス「2」とブロック番号「1」及びページ番号「5」を含む物理アドレスとが対応づけて保持されているものとする。   Here, as shown in FIG. 12, the logical-physical conversion table 141a before the version restoration process is executed includes a logical address “1”, a physical address including a block number “1”, and a page number “4”. Assume that they are held in correspondence. Similarly, in the logical-physical conversion table 141a, it is assumed that the logical address “2” is associated with the physical address including the block number “1” and the page number “5”.

また、バージョン復元処理が実行される前の更新履歴リスト144aには、バージョン番号「2」に対応づけて、論理アドレス「2」とブロック番号「1」及びページ番号「3」を含む物理アドレスとが登録されているものとする。同様に、更新履歴リスト144aには、バージョン番号「2」に対応づけて、論理アドレス「1」とブロック番号「1」及びページ番号「1」を含む物理アドレスとが登録されているものとする。更に、更新履歴リスト144aには、バージョン番号「1」に対応づけて、論理アドレス「2」とブロック番号「1」及びページ番号「2」を含む物理アドレスとが登録されているものとする。   In addition, in the update history list 144a before the version restoration process is executed, the physical address including the logical address “2”, the block number “1”, and the page number “3” is associated with the version number “2”. Is registered. Similarly, in the update history list 144a, a logical address “1”, a physical address including a block number “1” and a page number “1” are registered in association with the version number “2”. . Furthermore, it is assumed that a logical address “2”, a physical address including a block number “1” and a page number “2” are registered in the update history list 144a in association with the version number “1”.

ここで、バージョン番号「2」を含むバージョン復元要求が入出力部12を介して入力された場合を想定する。この場合、バージョン復元部134は、バージョン復元要求に含まれるバージョン番号「2」に対応づけて更新履歴リスト144aに登録されている論理アドレスを取得する。図12に示す例では、論理アドレス「1」及び論理アドレス「2」が更新履歴リスト144aから取得される。   Here, it is assumed that a version restoration request including the version number “2” is input via the input / output unit 12. In this case, the version restoration unit 134 acquires the logical address registered in the update history list 144a in association with the version number “2” included in the version restoration request. In the example illustrated in FIG. 12, the logical address “1” and the logical address “2” are acquired from the update history list 144a.

このように複数の論理アドレスが取得された場合には、当該論理アドレスの各々について上述した図11に示すステップS32以降の処理が実行される。   When a plurality of logical addresses are acquired in this way, the processing after step S32 shown in FIG. 11 described above is executed for each of the logical addresses.

まず、論理アドレス「1」に関する処理について説明する。この場合、バージョン復元部134は、論理アドレス「1」に対応づけて論物変換テーブル141aに保持されている物理アドレスを取得する。図12に示す論物変換テーブル141aによれば、ブロック番号「1」及びページ番号「4」を含む物理アドレスが取得される。   First, processing related to the logical address “1” will be described. In this case, the version restoration unit 134 acquires the physical address held in the logical-physical conversion table 141a in association with the logical address “1”. According to the logical-physical conversion table 141a illustrated in FIG. 12, a physical address including the block number “1” and the page number “4” is acquired.

この場合、バージョン復元部134は、論理アドレス「1」及び取得された物理アドレス(ブロック番号「1」及びページ番号「4」)を更新履歴リスト144aに追加する。この場合における論理アドレス及び物理アドレスは、バージョン番号「3」(つまり、新しいバージョン)に対応づけて更新履歴リスト144に登録される。これによれば、更新履歴リスト144aは、更新履歴リスト144bに遷移する。   In this case, the version restoration unit 134 adds the logical address “1” and the acquired physical address (block number “1” and page number “4”) to the update history list 144a. The logical address and physical address in this case are registered in the update history list 144 in association with the version number “3” (that is, a new version). According to this, the update history list 144a transitions to the update history list 144b.

一方、バージョン復元部134は、バージョン復元要求に含まれるバージョン番号「2」に対応づけて更新履歴リスト144bに登録されている論物アドレスを取得する。ここでは、論理アドレス「1」とブロック番号「1」及びページ番号「1」を含む物理アドレスとが取得される。   On the other hand, the version restoration unit 134 acquires the logical / physical address registered in the update history list 144b in association with the version number “2” included in the version restoration request. Here, the logical address “1” and the physical address including the block number “1” and the page number “1” are acquired.

この場合、バージョン復元部134は、ブロック番号「1」及びページ番号「1」を含む物理アドレスを、論理アドレス「1」に対応づけて論物変換テーブル141aに書き込む。これによれば、論物変換テーブル141aは、論物変換テーブル141bに遷移する。   In this case, the version restoration unit 134 writes the physical address including the block number “1” and the page number “1” in the logical-physical conversion table 141 a in association with the logical address “1”. According to this, the logical-physical conversion table 141a transitions to the logical-physical conversion table 141b.

次に、論理アドレス「2」に関する処理について説明する。この場合、バージョン復元部134は、論理アドレス「2」に対応づけて論物変換テーブル141bに保持されている物理アドレスを取得する。図12に示す論物変換テーブル141bによれば、ブロック番号「1」及びページ番号「5」を含む物理アドレスが取得される。   Next, processing relating to the logical address “2” will be described. In this case, the version restoration unit 134 acquires the physical address held in the logical-physical conversion table 141b in association with the logical address “2”. According to the logical / physical conversion table 141b illustrated in FIG. 12, a physical address including the block number “1” and the page number “5” is acquired.

この場合、バージョン復元部134は、論理アドレス「2」及び取得された物理アドレス(ブロック番号「1」及びページ番号「5」)を更新履歴リスト144bに追加する。この場合における論理アドレス及び物理アドレスは、バージョン番号「3」に対応づけて更新履歴リスト144bに登録される。これによれば、更新履歴リスト144bは、更新履歴リスト144cに遷移する。   In this case, the version restoration unit 134 adds the logical address “2” and the acquired physical address (block number “1” and page number “5”) to the update history list 144b. In this case, the logical address and the physical address are registered in the update history list 144b in association with the version number “3”. According to this, the update history list 144b transitions to the update history list 144c.

一方、バージョン復元部134は、バージョン復元要求に含まれるバージョン番号「2」に対応づけて更新履歴リスト144bに登録されている論物アドレスを取得する。ここでは、論理アドレス「2」とブロック番号「1」及びページ番号「3」を含む物理アドレスとが取得される。   On the other hand, the version restoration unit 134 acquires the logical / physical address registered in the update history list 144b in association with the version number “2” included in the version restoration request. Here, the logical address “2” and the physical address including the block number “1” and the page number “3” are acquired.

この場合、バージョン復元部134は、ブロック番号「1」及びページ番号「3」を含む物理アドレスを、論理アドレス「2」に対応づけて論物変換テーブル141bに書き込む。これによれば、論物変換テーブル141bは、論物変換テーブル141cに遷移する。   In this case, the version restoration unit 134 writes the physical address including the block number “1” and the page number “3” in the logical-physical conversion table 141b in association with the logical address “2”. According to this, the logical-physical conversion table 141b transitions to the logical-physical conversion table 141c.

上記したようなバージョン復元処理によれば、ユーザによって指定されたバージョン番号(によって表されるバージョン)の論物アドレスが論物変換テーブル141に復元されるとともに、当該論物変換テーブル141に保持されていた論物アドレスが更新履歴リスト144に登録される。   According to the version restoration process as described above, the logical / physical address of the version number designated by the user (the version represented by) is restored to the logical / physical conversion table 141 and held in the logical / physical conversion table 141. The stored logical address is registered in the update history list 144.

なお、バージョン復元要求に含まれるバージョン番号が更新履歴リスト144に存在しない場合、または上述した保存バージョン設定処理及びバージョン確定処理によって当該バージョン番号に対応づけて更新履歴リスト144に登録されている物理アドレスによって特定されるページの状態が無効とされている場合には、エラーがユーザに対して通知されるものとする。   Note that if the version number included in the version restoration request does not exist in the update history list 144, or the physical address registered in the update history list 144 in association with the version number by the stored version setting process and the version confirmation process described above. When the state of the page specified by is invalid, an error is notified to the user.

次に、図13のフローチャートを参照して、前述したデータ消去部135によって実行されるガベージコレクション(GC)の処理手順について説明する。なお、ガベージコレクションは、NAND型フラッシュメモリ11における書き込み領域の確保処理であり、例えば予め定められた期間毎に実行される。   Next, a garbage collection (GC) processing procedure executed by the data erasure unit 135 described above will be described with reference to a flowchart of FIG. The garbage collection is a process for securing a write area in the NAND flash memory 11, and is executed, for example, every predetermined period.

ガベージコレクションにおいては、NAND型フラッシュメモリ11における各ブロックについて以下のステップS41〜S45の処理が実行される。以下、この処理の対象となるブロックを対象ブロックと称する。   In the garbage collection, the following steps S41 to S45 are executed for each block in the NAND flash memory 11. Hereinafter, a block to be processed is referred to as a target block.

まず、データ消去部135は、対象ブロックのページ状態テーブル142を参照して、当該対象ブロックを構成する複数のページのうち、状態が無効であるページ(以下、無効ページと表記)の割合が閾値以上であるか否かを判定する(ステップS41)。   First, the data erasure unit 135 refers to the page status table 142 of the target block, and the ratio of pages having an invalid state (hereinafter referred to as invalid page) among a plurality of pages constituting the target block is a threshold value. It is determined whether or not this is the case (step S41).

無効ページの割合が閾値以上であると判定された場合(ステップS41のYES)、データ消去部135は、対象ブロック以外の各ブロックのページ状態テーブル142を参照して、消去済みブロックを特定する(ステップS42)。なお、消去済みブロックは、状態が消去済みであるページのみから構成されるブロックである。   When it is determined that the ratio of invalid pages is equal to or greater than the threshold (YES in step S41), the data erasure unit 135 refers to the page state table 142 of each block other than the target block and identifies erased blocks ( Step S42). An erased block is a block composed only of pages whose status has been erased.

次に、データ消去部135は、対象ブロックのページ状態テーブル142を参照して、当該対象ブロックを構成する複数のページのうち、状態が有効であるページ(以下、有効ページと表記)のデータをNAND型フラッシュメモリ11から取得する。なお、このデータは、対象ブロックに割り当てられたブロック番号及び有効ページに割り当てられたページ番号(つまり、物理アドレス)に基づいて取得される。データ消去部135は、取得されたデータを、上記した消去済みブロック(を構成するページ)にコピーする(ステップS43)。以下、有効ページのデータがコピーされたページをコピー先ページと称する。   Next, the data erasure unit 135 refers to the page status table 142 of the target block, and stores data of a page (hereinafter referred to as a valid page) whose status is valid among a plurality of pages constituting the target block. Obtained from the NAND flash memory 11. This data is acquired based on the block number assigned to the target block and the page number assigned to the valid page (that is, the physical address). The data erasure unit 135 copies the acquired data to the erased block (the page constituting it) (step S43). Hereinafter, a page on which valid page data is copied is referred to as a copy destination page.

なお、ページ状態テーブル142において、上記したように消去済みブロックを構成する各ページの状態は消去済みである。したがって、上記したステップS44の処理が実行された場合には、ページ状態テーブル142におけるコピー先ページの状態(当該ページに割り当てられたページ番号に対応づけてページ状態テーブル142に保持されている状態)は、消去済みから有効に更新される。   In the page state table 142, the state of each page constituting the erased block is erased as described above. Therefore, when the process of step S44 described above is executed, the status of the copy destination page in the page status table 142 (the status held in the page status table 142 in association with the page number assigned to the page). Are effectively updated from erased.

また、有効ページの物理アドレスが論物変換テーブル141に保持されている場合、当該論物変換テーブル141において、当該有効ページの物理アドレスは、コピー先ページの物理アドレスに更新される。同様に、有効ページの物理アドレスが更新履歴リスト144に登録されている場合には、当該更新履歴リスト144において、当該有効ページの物理アドレスは、コピー先ページの物理アドレスに更新される。   Further, when the physical address of the valid page is held in the logical-physical conversion table 141, the physical address of the valid page is updated to the physical address of the copy destination page in the logical-physical conversion table 141. Similarly, when the physical address of the valid page is registered in the update history list 144, the physical address of the valid page is updated to the physical address of the copy destination page in the update history list 144.

次に、データ消去部135は、対象ブロック(を構成する複数のページ)のデータを消去する(ステップS44)。これによれば、対象ブロックは、消去済みブロックとなり、データの書き込みが可能となる。   Next, the data erasure unit 135 erases the data of the target block (a plurality of pages constituting the block) (step S44). According to this, the target block becomes an erased block, and data can be written.

このように対象ブロックが消去済みブロックとなる場合、当該対象ブロックのページ状態テーブル142における各ページの状態は消去済みに更新される。   When the target block becomes an erased block in this way, the status of each page in the page status table 142 of the target block is updated to erased.

ここで、NAND型フラッシュメモリ11における全てのブロックについてステップS41〜S44の処理が実行されたか否かが判定される(ステップS45)。   Here, it is determined whether or not the processing of steps S41 to S44 has been executed for all blocks in the NAND flash memory 11 (step S45).

全てのブロックについて処理が実行されていないと判定された場合(ステップS45のNO)、上述したステップS41に戻って処理が繰り返される。この場合、ステップS41〜S44の処理が実行されていないブロックを対象ブロックとして処理が実行される。   If it is determined that the processing has not been executed for all the blocks (NO in step S45), the process returns to step S41 described above and the processing is repeated. In this case, the process is executed with a block for which the process of steps S41 to S44 is not executed as a target block.

一方、全てのブロックについて処理が実行されたと判定された場合(ステップS45のYES)、ガベージコレクションは終了される。   On the other hand, if it is determined that the processing has been executed for all the blocks (YES in step S45), the garbage collection is terminated.

なお、上記したステップS41において無効ページの割合が閾値以上でないと判定された場合には、ステップS45の処理が実行される。   If it is determined in step S41 that the ratio of invalid pages is not greater than or equal to the threshold value, the process of step S45 is executed.

上記したようなガベージコレクションによれば、保存バージョン設定処理及びバージョン確定処理によって状態が無効とされたページ(から構成されるブロック)がコントローラ13側で自動的に削除される。   According to the garbage collection as described above, a page (a block constituted by a state) invalidated by the saved version setting process and the version confirmation process is automatically deleted on the controller 13 side.

上記したように本実施形態においては、NAND型フラッシュメモリ(不揮発性の半導体記憶装置)11に記憶されているデータを管理するコントローラ(NANDコントローラ)13が、データの更新時に論物変換テーブル141に保持されている論理アドレス及び物理アドレスをバージョン情報に対応づけて更新履歴リスト144に登録し、当該更新履歴リスト144に登録されたバージョン情報に基づいて当該バージョン情報に対応づけて更新履歴リスト144に登録された物理アドレスに記憶されているデータを消去する。   As described above, in the present embodiment, the controller (NAND controller) 13 that manages the data stored in the NAND flash memory (nonvolatile semiconductor storage device) 11 is stored in the logical-physical conversion table 141 when the data is updated. The held logical address and physical address are registered in the update history list 144 in association with the version information, and the update history list 144 is associated with the version information based on the version information registered in the update history list 144. Erase the data stored at the registered physical address.

すなわち、本実施形態においては、ストレージ装置10が備えるコントローラ(NANDコントローラ)13がデータのバージョン管理を行い、当該コントローラ13によるガベージコレクションの実行時に不要なバージョンのデータが自動的に消去される。このため、本実施形態においては、データベースのロックを伴うバキューム処理等がデータベースシステム側で実行されることなく不要データの消去を行うことが可能となる。   That is, in this embodiment, the controller (NAND controller) 13 included in the storage apparatus 10 performs data version management, and unnecessary version data is automatically deleted when the controller 13 executes garbage collection. For this reason, in the present embodiment, it is possible to erase unnecessary data without executing a vacuum process or the like with a database lock on the database system side.

また、本実施形態においては、ユーザによって指定されたバージョン(つまり、保存バージョン数分のバージョン)より過去のバージョンのデータが消去されるため、ユーザの意図するバージョンのデータを消去することができる。   In the present embodiment, data of a past version is erased from versions specified by the user (that is, versions corresponding to the number of saved versions), so that the version data intended by the user can be erased.

更に、本実施形態においては、ユーザによって指定されたバージョン番号に対応づけて更新履歴リスト144に登録されている論物アドレスを論物変換テーブル141に復元することにより、例えば誤ってデータが書き込まれた場合や最新のデータ(つまり、論物変換テーブル141に保持されている物理アドレスに記憶されているデータ)が破損したような場合に、必要に応じて過去のバージョンのデータを利用することが可能となる。   Furthermore, in this embodiment, by restoring the logical / physical address registered in the update history list 144 in association with the version number designated by the user in the logical / physical conversion table 141, for example, data is erroneously written. If the latest data (that is, the data stored in the physical address held in the logical-physical conversion table 141) is damaged, the past version of the data can be used as necessary. It becomes possible.

また、本実施形態においては、バージョン確定要求が入力されるまでに更新履歴リストに登録された論物アドレスが同一のバージョンとして管理されることにより、例えば一連の処理(トランザクション)単位でのバージョン管理、データの復元及び消去等が可能となる。   In this embodiment, logical addresses registered in the update history list are managed as the same version until a version confirmation request is input, so that version management in a series of processing (transactions), for example, is performed. Data can be restored and erased.

本発明のいくつかの実施形態を説明したが、これらの実施形態は、例として提示したものであり、発明の範囲を限定することは意図していない。これら実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。これら実施形態やその変形は、発明の範囲や要旨に含まれると同様に、特許請求の範囲に記載された発明とその均等の範囲に含まれるものである。   Although several embodiments of the present invention have been described, these embodiments are presented by way of example and are not intended to limit the scope of the invention. These embodiments can be implemented in various other forms, and various omissions, replacements, and changes can be made without departing from the spirit of the invention. These embodiments and their modifications are included in the scope and gist of the invention, and are also included in the invention described in the claims and the equivalents thereof.

10…ストレージ装置、11…NAND型フラッシュメモリ、12…入出力部、13…コントローラ、14…メモリ、131…データ更新部、132…保存バージョン設定部、133…バージョン確定部、134…バージョン復元部、135…データ消去部、141…論物変換テーブル、142…ページ状態テーブル、143…消去済みページリスト、144…更新履歴リスト、145…設定テーブル   DESCRIPTION OF SYMBOLS 10 ... Storage apparatus, 11 ... NAND type flash memory, 12 ... Input / output part, 13 ... Controller, 14 ... Memory, 131 ... Data update part, 132 ... Save version setting part, 133 ... Version confirmation part, 134 ... Version restoration part 135 ... Data erasure unit, 141 ... logical / physical conversion table, 142 ... page state table, 143 ... erased page list, 144 ... update history list, 145 ... setting table

Claims (6)

各種データを記憶する不揮発性の半導体記憶装置を備え、当該半導体記憶装置を使用したデータベースへのアクセスを制御するデータベースシステムが実装されるストレージ装置において、
前記半導体記憶装置に記憶されているデータを管理するコントローラと、
前記データベースシステムにおいて用いられる論理アドレスの各々に対応づけて当該論理アドレスに対応するデータの物理アドレスを保持する論物変換テーブル及び更新履歴リストを記憶するメモリと
を具備し、
前記コントローラは、
ユーザによって指定された論理アドレスに対応する第1のデータを第2のデータに更新するためのデータ更新要求が前記データベースシステムから入力された場合、当該第2のデータを当該第1のデータの第1の物理アドレスとは異なる第2の物理アドレスに書き込むデータ更新手段と、
前記ユーザによって指定された論理アドレス及び当該論理アドレスに対応づけて前記論物変換テーブルに保持されている第1の物理アドレスを、前記第1のデータに割り当てられたバージョンを示すバージョン情報に対応づけて前記更新履歴リストに登録する登録手段と、
前記ユーザによって指定された論理アドレスに対応づけて前記論物変換テーブルに保持されている第1の物理アドレスを前記第2の物理アドレスに更新するテーブル更新手段と、
前記更新履歴リストに登録されたバージョン情報に基づいて、当該バージョン情報に対応づけて前記更新履歴リストに登録された第1の物理アドレスに記憶されている第1のデータを消去する消去手段と
を含む
ことを特徴とするストレージ装置。
In a storage device that includes a nonvolatile semiconductor storage device that stores various data, and in which a database system that controls access to a database using the semiconductor storage device is mounted,
A controller for managing data stored in the semiconductor storage device;
A logical-physical conversion table that holds a physical address of data corresponding to the logical address in association with each logical address used in the database system, and a memory that stores an update history list.
The controller is
When a data update request for updating the first data corresponding to the logical address designated by the user to the second data is input from the database system, the second data is changed to the first data of the first data. Data updating means for writing to a second physical address different from the first physical address;
The logical address designated by the user and the first physical address held in the logical-physical conversion table in association with the logical address are associated with version information indicating the version assigned to the first data. Registration means for registering in the update history list;
Table updating means for updating a first physical address held in the logical-physical translation table in association with a logical address designated by the user to the second physical address;
Erasing means for erasing the first data stored in the first physical address registered in the update history list in association with the version information based on the version information registered in the update history list. A storage device characterized by including.
前記半導体記憶装置は、NAND型フラッシュメモリを含むことを特徴とする請求項1記載のストレージ装置。   The storage device according to claim 1, wherein the semiconductor storage device includes a NAND flash memory. 前記消去手段は、ユーザによって指定されたバージョンより過去のバージョンを示すバージョン情報に対応づけて前記更新履歴リストに登録された第1の物理アドレスに記憶されている第1のデータを消去することを特徴とする請求項1記載のストレージ装置。   The erasing means erases the first data stored in the first physical address registered in the update history list in association with version information indicating a version older than the version designated by the user. The storage apparatus according to claim 1. 前記コントローラは、ユーザによって指定されたバージョンを示すバージョン情報を含む復元要求が入力された場合、当該復元要求に含まれるバージョン情報に対応づけて前記更新履歴リストに登録された論理アドレス及び当該論理アドレスに対応づけて前記論物変換テーブルに登録された第2の物理アドレスを、前記第2のデータに割り当てられたバージョンを示すバージョン情報に対応づけて前記更新履歴リストに登録するとともに、当該論理アドレスに対応づけて前記論物変換テーブルに保持されている第2の物理アドレスを、前記復元要求に含まれるバージョン情報に対応づけて前記更新履歴リストに登録された第1の物理アドレスに変更する復元手段を更に含むことを特徴とする請求項1記載のストレージ装置。   When a restoration request including version information indicating a version designated by the user is input, the controller associates the logical address registered in the update history list with the version information included in the restoration request and the logical address The second physical address registered in the logical-physical conversion table in association with the second physical address is registered in the update history list in association with the version information indicating the version assigned to the second data, and the logical address The second physical address held in the logical-physical translation table in association with the restoration is changed to the first physical address registered in the update history list in association with the version information included in the restoration request. The storage apparatus according to claim 1, further comprising means. 前記コントローラは、バージョン確定手段を更に含み、
前記登録手段は、ユーザの指示に基づくバージョン確定要求が入力されるまでは同一のバージョンを示すバージョン情報に対応づけて前記論理アドレス及び前記第1の物理アドレスを前記更新履歴リストに登録し、
前記バージョン確定手段は、前記バージョン確定要求が入力された場合に前記更新履歴リストに登録された論理アドレス及び第1の物理アドレスを前記同一のバージョンとして確定する
ことを特徴とする請求項1記載のストレージ装置。
The controller further includes a version determining means,
The registration means registers the logical address and the first physical address in the update history list in association with version information indicating the same version until a version confirmation request based on a user instruction is input,
2. The version determination unit according to claim 1, wherein the version determination unit determines the logical address and the first physical address registered in the update history list as the same version when the version determination request is input. Storage device.
各種データを記憶する不揮発性の半導体記憶装置を使用したデータベースへのアクセスを制御するデータベースシステムが実装されるストレージ装置であって、前記半導体記憶装置に記憶されているデータを管理するコントローラと、前記データベースシステムにおいて用いられる論理アドレスの各々に対応づけて当該論理アドレスに対応するデータの物理アドレスを保持する論物変換テーブル及び更新履歴リストを記憶するメモリとを備えるストレージ装置において、前記コントローラが実行するデータ管理方法であって、
ユーザによって指定された論理アドレスに対応する第1のデータを第2のデータに更新するためのデータ更新要求が前記データベースシステムから入力された場合、当該第2のデータを当該第1のデータの第1の物理アドレスとは異なる第2の物理アドレスに書き込むステップと、
前記ユーザによって指定された論理アドレス及び当該論理アドレスに対応づけて前記論物変換テーブルに保持されている第1の物理アドレスを、前記第1のデータに割り当てられたバージョンを示すバージョン情報に対応づけて前記更新履歴リストに登録するステップと、
前記ユーザによって指定された論理アドレスに対応づけて前記論物変換テーブルに保持されている第1の物理アドレスを前記第2の物理アドレスに更新するステップと、
前記更新履歴リストに登録されたバージョン情報に基づいて、当該バージョン情報に対応づけて前記更新履歴リストに登録された第1の物理アドレスに記憶されている第1のデータを消去するステップと
を具備することを特徴とするデータ管理方法。
A storage device in which a database system that controls access to a database using a nonvolatile semiconductor storage device that stores various data is mounted, the controller managing data stored in the semiconductor storage device, and In a storage apparatus comprising a logical-physical conversion table that retains a physical address of data corresponding to each logical address used in the database system and a memory that stores an update history list, the controller executes A data management method,
When a data update request for updating the first data corresponding to the logical address designated by the user to the second data is input from the database system, the second data is changed to the first data of the first data. Writing to a second physical address different from the one physical address;
The logical address designated by the user and the first physical address held in the logical-physical conversion table in association with the logical address are associated with version information indicating the version assigned to the first data. Registering in the update history list,
Updating a first physical address held in the logical-physical translation table in association with a logical address designated by the user to the second physical address;
Erasing the first data stored in the first physical address registered in the update history list in association with the version information based on the version information registered in the update history list. A data management method characterized by:
JP2014033162A 2014-02-24 2014-02-24 Storage apparatus and data management method Expired - Fee Related JP6242711B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014033162A JP6242711B2 (en) 2014-02-24 2014-02-24 Storage apparatus and data management method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014033162A JP6242711B2 (en) 2014-02-24 2014-02-24 Storage apparatus and data management method

Publications (2)

Publication Number Publication Date
JP2015158797A true JP2015158797A (en) 2015-09-03
JP6242711B2 JP6242711B2 (en) 2017-12-06

Family

ID=54182743

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014033162A Expired - Fee Related JP6242711B2 (en) 2014-02-24 2014-02-24 Storage apparatus and data management method

Country Status (1)

Country Link
JP (1) JP6242711B2 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003513357A (en) * 1999-10-26 2003-04-08 テラブス オーワイ Method and apparatus for performing atomic updates using a logical flash memory device
JP2007501468A (en) * 2003-08-06 2007-01-25 オラクル・インターナショナル・コーポレイション Database management system with efficient version control
JP2008159013A (en) * 2006-11-28 2008-07-10 Hitachi Ltd Semiconductor memory device
JP2008181297A (en) * 2007-01-24 2008-08-07 Nec Corp Write-once database management system, unnecessary region restore processing method, and unnecessary region restore program
US20110252000A1 (en) * 2010-04-08 2011-10-13 Microsoft Corporation In-memory database system
JP2013541743A (en) * 2011-02-02 2013-11-14 株式会社日立製作所 Storage system and data control method thereof

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003513357A (en) * 1999-10-26 2003-04-08 テラブス オーワイ Method and apparatus for performing atomic updates using a logical flash memory device
JP2007501468A (en) * 2003-08-06 2007-01-25 オラクル・インターナショナル・コーポレイション Database management system with efficient version control
JP2008159013A (en) * 2006-11-28 2008-07-10 Hitachi Ltd Semiconductor memory device
JP2008181297A (en) * 2007-01-24 2008-08-07 Nec Corp Write-once database management system, unnecessary region restore processing method, and unnecessary region restore program
US20110252000A1 (en) * 2010-04-08 2011-10-13 Microsoft Corporation In-memory database system
JP2013541743A (en) * 2011-02-02 2013-11-14 株式会社日立製作所 Storage system and data control method thereof

Also Published As

Publication number Publication date
JP6242711B2 (en) 2017-12-06

Similar Documents

Publication Publication Date Title
CN110678836B (en) Persistent memory for key value storage
US7991946B2 (en) Apparatus using flash memory as storage and method of operating the same
US9183236B2 (en) Low level object version tracking using non-volatile memory write generations
US8762661B2 (en) System and method of managing metadata
WO2017190604A1 (en) Transaction recovery method in database system and database management system
US20080120488A1 (en) Apparatus and method of managing nonvolatile memory
KR101336258B1 (en) Apparatus and method of processing data of non-volatile memory
JP5120455B2 (en) Garbage collection program, garbage collection method, and garbage collection system
JP2012203443A (en) Memory system and control method of memory system
JP2005242897A (en) Flash disk drive
KR20130066525A (en) Mount-time reconciliation of data availability
JP2011175632A (en) Semiconductor storage device, and method for controlling the same
US10248526B2 (en) Data storage device and data maintenance method thereof
JP2009205689A (en) Flash disk device
TWI676933B (en) Firmware updating method
JP6242711B2 (en) Storage apparatus and data management method
JP6788386B2 (en) File access provision methods, computers, and software products
US9286204B2 (en) Memory controller
JP5204265B2 (en) Semiconductor memory device and method for controlling semiconductor memory device
JP2013109404A (en) Information processing device
JP2008009614A (en) Memory controller, memory system, and memory control method
JP2014112419A (en) Mobile terminal apparatus, software update method, operation control method, and program
US11150940B2 (en) System and method for recording transaction associated with a page-oriented non-volatile memory
US20220164135A1 (en) Apparatus, method and computer program for managing memory page updates within non-volatile memory
JP6644427B2 (en) FAT file system and its program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160923

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170714

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170725

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170922

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: 20171010

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20171108

R151 Written notification of patent or utility model registration

Ref document number: 6242711

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

LAPS Cancellation because of no payment of annual fees