JP2015043178A - Information processing device, information processing method, and program - Google Patents
Information processing device, information processing method, and program Download PDFInfo
- Publication number
- JP2015043178A JP2015043178A JP2013174951A JP2013174951A JP2015043178A JP 2015043178 A JP2015043178 A JP 2015043178A JP 2013174951 A JP2013174951 A JP 2013174951A JP 2013174951 A JP2013174951 A JP 2013174951A JP 2015043178 A JP2015043178 A JP 2015043178A
- Authority
- JP
- Japan
- Prior art keywords
- information
- journaling
- management method
- unit
- management
- 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
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
本発明は、情報処理装置、情報処理方法及びプログラムに関する。 The present invention relates to an information processing apparatus, an information processing method, and a program.
記憶装置に対するファイル操作中に、電源断や記憶媒体の取り出し等の異常事象が発生すると、ファイルを管理するための情報と、ファイルの内容との間で整合性が取れなくなることがある。ジャーナリング機能付きのファイルシステム(以下、ジャーナリングファイルシステムと呼ぶ)では、更新履歴をジャーナルログとして二次記憶装置に保持することで、こういった障害が発生するリスクを低減させている。また、更新履歴には、ファイル等の操作履歴やファイルそのものの差分情報等が含まれ、どのような更新履歴を、どういった手順で保持するかによって、複数のジャーナリング方式が存在する。
特許文献1では、ジャーナリング領域に書き込むデータをスタックに溜めておき、先に二次記憶装置への更新処理が完了してジャーナルログが不要になった場合には、スタックのデータを削除するという技術が開示されている。
特許文献2では、データベースを論理的な単位に分割し、ジャーナルログの取得内容、ジャーナルログの取得の要、不要を設定してジャーナルログの取得を行う技術が開示されている。
特許文献3では、システムの負荷が小さいときには、ジャーナルログをディスクに即座に書き込むという技術が開示されている。
If an abnormal event such as a power interruption or removal of a storage medium occurs during a file operation on the storage device, consistency between the information for managing the file and the contents of the file may not be achieved. In a file system with a journaling function (hereinafter referred to as a journaling file system), the update history is retained as a journal log in the secondary storage device, thereby reducing the risk of such a failure. The update history includes operation history of files, difference information of the file itself, and the like, and there are a plurality of journaling methods depending on what update history is stored and in what procedure.
In
Japanese Patent Application Laid-Open No. 2004-228561 discloses a technique for immediately writing a journal log to a disk when the system load is small.
従来のジャーナリングファイルシステムでは、マウントする際にジャーナリング方式を選択し、マウント中はジャーナリング方式を変更しない。そのため、従来のジャーナリングファイルシステムでは、システムの状態に応じて動的にジャーナリング方式を切り替えることができず、パフォーマンスや電力消費の観点で最適な制御を行うことが困難であった。
本発明は、効率的にデータを更新する技術を提供することを目的とする。
In the conventional journaling file system, the journaling method is selected when mounting, and the journaling method is not changed during mounting. Therefore, in the conventional journaling file system, the journaling method cannot be dynamically switched according to the system state, and it is difficult to perform optimal control from the viewpoint of performance and power consumption.
An object of the present invention is to provide a technique for efficiently updating data.
そこで、本発明の情報処理装置は、データの更新を管理する管理手段の実行中に、前記管理手段の管理方式を処理単位毎に決定する決定手段と、前記決定手段により決定された前記管理方式で、処理単位毎に前記管理に係る履歴情報を作成する作成手段と、前記作成手段により作成された前記履歴情報を処理単位毎に記憶領域に記録する記録手段と、を有することを特徴とする。 Therefore, the information processing apparatus according to the present invention includes a determination unit that determines a management method of the management unit for each processing unit during execution of the management unit that manages data update, and the management method determined by the determination unit And a creation unit that creates history information related to the management for each processing unit, and a recording unit that records the history information created by the creation unit in a storage area for each processing unit. .
本発明によれば、効率的にデータを更新する技術を提供することができる。 According to the present invention, it is possible to provide a technique for efficiently updating data.
以下、本発明を実施するための最良の形態について図面を用いて説明する。
<実施形態1>
図1は、本実施形態における情報処理装置100のハードウェア構成の一例を示す図である。
情報処理装置100は、通常、CPU101が複数のプロセスを1つずつ処理し、一定期間毎に処理を切り替える。ここで、CPU101は、演算処理等を行なうプロセッサコアを複数有していてもよい。また、情報処理装置100は、CPU101自体を複数有していてもよい。また、CPU101が二次記憶装置104等に記憶されているプログラムを一次記憶装置102に展開して実行することにより、後述する情報処理装置100の機能や、OS(Operating System)の機能及びフローチャートに係る処理が実現される。また、CPU101が前記プログラムを実行することにより、ジャーナリングファイルシステムが実現される。なお、上述したように、ジャーナリングファイルシステムは、ジャーナリング機能付きのファイルシステムである。また、ジャーナリングファイルシステムは、データの更新を管理する管理手段の一例である。ジャーナリングファイルシステムの詳細については、図2等を用いて後述する。
一次記憶装置102は、プログラム及びデータを記録するSDRAMやSRAM等を有する。一次記憶装置102に展開するプログラム、ファイル、ディレクトリ等のデータは、二次記憶装置104に記憶されている。
二次記憶装置104は、不揮発性の記憶装置であり、磁気ディスクの様に磁性体が塗布された記憶装置、書き込み回数に制限のあるNAND型フラッシュメモリを利用してデータを記録する記憶装置又は不揮発性のフラッシュメモリ等を用いることができる。また、二次記憶装置104には、半導体レーザーを利用してデータを記録する光ディスク、赤色レーザー光と、磁場とを用いてデータを記録する光磁気ディスク又は情報処理装置に対して挿抜可能な不揮発性のメモリカード等を用いることができる。二次記憶装置104は、CPU101が実行する各種のプログラムや各種のデータを記憶している。CPU101は、二次記憶装置104に記憶されているファイルの操作を、OSからI/Oコントローラ103を介して、READ要求(読出し要求)、WRITE要求(書込み要求)を行うことで実現する。なお、情報処理装置100は、複数の二次記憶装置104を有していてもよい。
The best mode for carrying out the present invention will be described below with reference to the drawings.
<
FIG. 1 is a diagram illustrating an example of a hardware configuration of the
In the
The
The
本実施形態では、図2等を用いて後述するジャーナリングファイルシステムを利用する。ジャーナリングファイルシステムに記録される情報は、情報の内容にあたるデータ部分と、その情報の管理情報にあたるメタデータ部分とを有する。ファイル操作中の電源断や記憶媒体の取り出し等の異常事象が発生した場合、これらのファイルシステムに記録された情報の間で整合性が取れなくなることがある。ジャーナリングファイルシステムは、そのような事態を回避するため、ファイルやディレクトリの更新内容と、その管理情報との履歴情報を記憶装置に記録し、障害回復に利用できるようにしている。ここで、上述の履歴情報は、ジャーナルログと呼ばれる。また、ジャーナルログを記録する領域は、ジャーナリング領域と呼ばれる。また、ジャーナリング領域へジャーナルログを記録する処理は、ジャーナリングと呼ばれる。また、ジャーナリングにおいて、どのようなジャーナルログを、どういった手順で保持するかに関する方式を、ジャーナリング方式と呼ぶ。なお、ジャーナリング方式は、管理方式の一例である。更に、ジャーナリング領域に対して、前述のデータ部分及びメタデータ部分が置かれる領域のことをデータ領域と呼ぶ。
メタデータには、ファイルの管理情報(inode)の他、二次記憶装置104の各ブロックの使用状況を0と、1とで表現したブロックビットマップ、inodeの使用状況を0と、1とで区別したinodeビットマップ等がある。その他、メタデータには、空きブロック数、空きinode数等がある。また、inodeは、構成として、シンボリックリンクやデバイスファイルのようなファイルの種類を表すファイルモード、ファイルサイズ、ファイル最終参照時刻、ファイル最終状態変更時刻、ファイル最終更新時刻等の情報を含む。更に、inodeは、構成として、ファイル削除時刻、ユーザID、グループID、ファイルリンク数、使用ブロック数、ブロック番号、世代番号等の情報を含む。
In this embodiment, a journaling file system described later with reference to FIG. Information recorded in the journaling file system has a data portion corresponding to the information content and a metadata portion corresponding to the management information of the information. When an abnormal event such as power interruption or removal of a storage medium occurs during file operation, consistency may not be achieved between the information recorded in these file systems. In order to avoid such a situation, the journaling file system records history information about the update contents of files and directories and management information thereof in a storage device so that it can be used for failure recovery. Here, the above-mentioned history information is called a journal log. An area for recording a journal log is called a journaling area. The process of recording a journal log in the journaling area is called journaling. In journaling, a method relating to what kind of journal log is stored and in what procedure is called a journaling method. The journaling method is an example of a management method. Further, an area where the data part and the metadata part are placed with respect to the journaling area is called a data area.
In addition to file management information (inode), the metadata includes a block bitmap representing the usage status of each block of the
次に、トランザクションについて説明する。トランザクションは、関連する複数の処理をまとめた処理単位である。なお、トランザクションは、ジャーナリングファイルシステムの整合性を保つために必要な依存関係がその中で閉じているジャーナルログの集合体を含む。トランザクションの中にあるジャーナルログが、トランザクションの外へ依存関係を波及させることはない。即ち、情報処理装置100は、障害発生等でジャーナルログより回復を行う場合、トランザクション単位毎(処理単位毎)で行う必要があり、不完全なトランザクションを回復処理に利用しない。
本実施形態では、ジャーナルログの記録内容や記録方法の違いによってジャーナリングレベルを規定している。なお、ジャーナリングレベルは、管理方式情報の一例である。例えば、ジャーナリングレベルは0から3まで4段階あるものとする。ジャーナリングレベル0は、ジャーナリングを行わないことを規定する。ジャーナリングレベル1と、ジャーナリングレベル2とは、メタデータのみをジャーナリングすることを規定する。両レベルの差異は、ジャーナリングレベル1がデータ領域の更新と、ジャーナリング領域の記録との順序が一意に定まらないことを規定するのに対し、ジャーナリングレベル2はデータ領域の更新後、ジャーナリング領域の記録が行われることを規定する点である。ジャーナリングレベル3は、メタデータのみならず、データの更新内容もジャーナリングを行うことを規定する。総じてジャーナリングレベルが高くなると信頼性が向上する反面、書き込みにかかる時間は長くなる。ジャーナリングレベルは、トランザクション単位で変更することができる。本実施形態では、ジャーナリングファイルシステムを有する情報処理装置100が自装置の状態に応じて一意に定めたジャーナリングレベルのことをジャーナリングポリシと呼ぶ。
Next, a transaction will be described. A transaction is a processing unit in which a plurality of related processes are collected. A transaction includes a collection of journal logs in which dependencies necessary for maintaining the consistency of the journaling file system are closed. Journal logs within a transaction do not propagate dependencies outside the transaction. In other words, the
In this embodiment, the journaling level is defined by the difference in the recorded contents and recording method of the journal log. The journaling level is an example of management method information. For example, there are four levels of journaling levels from 0 to 3.
図2は、本実施形態における情報処理装置100の機能構成等の一例を示す図である。
画像処理タスク201は、画像のフィルタやクロップ等の処理を行う。画像処理タスク201が扱うデータはクリティカル(重要)なものではなく、万が一障害が発生してデータが消失してしまっても、処理の再実行をすることができる。画像処理タスク201は、ジャーナリングファイルシステム203に対してファイル操作を要求する。その際、プログラム上では「open(filename、flags)」という書式のopen関数が用いられる。関数の引数では、「filename」にアクセスするファイルのファイル名、「flags」にアクセスした際のモード(読み込みだけなのか、書き込みも行うのか等)が指定される。open関数の処理が成功すると、画像処理タスク201は、ファイル操作に紐付けられたファイル識別子を得る。なお、ファイル識別子は、ファイル操作を識別する識別情報の一例である。画像処理タスク201は、以降のジャーナリングファイルシステム203に対するファイルの操作要求(以下、ファイル操作要求と呼ぶ)を、ファイル識別子を用いて行うことになる。
ジャーナリングファイルシステム203は、ファイルシステムコア部207、ジャーナルログ制御部208、ジャーナルログ記録部209及びジャーナルログ反映部213を有する。
ジャーナリングポリシ制御部204は、図4及び図5等を用いて後述するシステム監視値211の算出を行う。なお、システム監視値211は、監視値情報の一例である。また、ジャーナリングポリシ制御部204は、図4等を用いて後述する動作状態対応管理テーブル212を参照して、システム監視値211に対応するジャーナリングポリシに関する情報(以下、単にジャーナリングポリシという)を取得する。更に、ジャーナリングポリシ制御部204は、取得したジャーナリングポリシをジャーナルログ制御部208へ通知する。
FIG. 2 is a diagram illustrating an example of a functional configuration of the
The
The
The journaling
一次記憶装置102には、システム監視値211に関する情報(以下、単にシステム監視値211という)が格納されている。
二次記憶装置104は、図3等を用いて後述するジャーナリング領域210、動作状態対応管理テーブル212、データ領域214を有する。
ファイルシステムコア部207は、ジャーナリング以外のファイル操作処理を行う中核である。
ジャーナルログ制御部208は、トランザクションの開始、終了を制御する。ファイルシステムコア部207と、ジャーナルログ制御部208とは、ファイルの更新状態を共有することで、ファイル操作と、ジャーナル操作とにおける整合性を保つ。ジャーナルログ制御部208は、トランザクションを開始する際に、最新のジャーナリングポリシに基づいて、ジャーナルログを作成する。
ジャーナルログ記録部209は、ジャーナリング領域210の内部構成を管理し、ジャーナリング領域210へジャーナルログを記録する。
ジャーナルログ反映部213は、ジャーナリング領域210内のジャーナルログの有効部分をデータ領域214へ反映させる。CPU101は、操作部等を介して受け付けたユーザの指示により、反映するトリガを予め定めることができる。例えば、反映するトリガは、ジャーナリング領域210内の有効なトランザクションが、予め設定されたサイズ(ジャーナリング領域のサイズの4分の1や2分の1等)を超えた場合としてもよい。その他、反映するトリガは、予め定められた時間(例えば5秒単位等)毎とする等してもよい。
The
The
The file
The journal
The journal
The journal
次に、図3を用いてジャーナリング領域210の構成と、トランザクションの構成とについて説明する。
図3の(a)は、ジャーナリング領域210の構成の一例を示す図である。
ジャーナリング領域210は、ジャーナリング情報管理ブロック300及びリングバッファ301を有する。
ジャーナリング情報管理ブロック300は、開始位置情報302を含む。
リングバッファ301は、トランザクション303を含み、新しいトランザクション303の記録と、不要なトランザクション303の解放を繰り返す。
開始位置情報302は、リングバッファ301に記録された最も古いトランザクションの開始位置に関する情報(先頭アドレスやブロック番号等)を保持している。
Next, the configuration of the
FIG. 3A is a diagram illustrating an example of the configuration of the
The
The journaling
The
The
図3の(b)は、トランザクション303の構成の一例を示す図である。
トランザクション303は、ディスクリプタブロック304、メタデータブロック305及びコミットブロック306を有する。
ディスクリプタブロック304は、トランザクション毎の管理情報を格納するブロックであり、二次記憶装置へ書き出す位置情報や、トランザクション識別用IDが格納されている。トランザクション識別用IDは数値であり、トランザクションが作成される度に加算される。
メタデータブロック305は、ジャーナルログの中核データ、即ち、更新履歴データを保持するブロックである。
コミットブロック306は、トランザクションの終了を示すブロックである。
なお、例えば、情報処理装置100は、二次記憶装置206の記憶領域の総容量の5%程度をジャーナリング領域210として確保するようにしてもよい。
FIG. 3B is a diagram illustrating an example of the configuration of the
The
The descriptor block 304 is a block for storing management information for each transaction, and stores position information to be written to the secondary storage device and transaction identification ID. The transaction identification ID is a numerical value and is added every time a transaction is created.
The
The commit
For example, the
次に、図4を用いて動作状態対応管理テーブル212について説明する。
図4は、動作状態対応管理テーブル212の一例を示す図である。
動作状態対応管理テーブル212は、システム監視値211に対応したジャーナリングレベルを規定したテーブルである。なお、動作状態対応管理テーブル212は、システム監視値211と、ジャーナリングレベルとが対応付けられた第1の対応情報の一例である。
例えば、図4の動作状態対応管理テーブル212は、システム監視値が0の場合はジャーナリングレベルを0、システム監視値が1以上10以下の場合はジャーナリングレベルを1と規定している。また、図4の動作状態対応管理テーブル212は、システム監視値が11以上30以下の場合はジャーナリングレベルを2、システム監視値が31以上の場合はジャーナリングレベルを3と規定している。即ち、ジャーナリングポリシ制御部204は、システム監視値211に基づいて、動作状態対応管理テーブル212を検索することで、ジャーナリングレベルに対応するジャーナリング方式を決定(第1の決定)することができる。
Next, the operation state correspondence management table 212 will be described with reference to FIG.
FIG. 4 is a diagram illustrating an example of the operation state correspondence management table 212.
The operation state correspondence management table 212 is a table that defines a journaling level corresponding to the
For example, the operation state correspondence management table 212 in FIG. 4 defines the journaling level as 0 when the system monitoring value is 0, and the journaling level as 1 when the system monitoring value is 1 or more and 10 or less. The operation state correspondence management table 212 of FIG. 4 defines a journaling level of 2 when the system monitoring value is 11 or more and 30 or less, and a journaling level of 3 when the system monitoring value is 31 or more. That is, the journaling
次に、図5を用いてシステム監視値211の算出方法について説明する。
図5は、システム監視値211の算出方法の概念の一例を示す図である。
ジャーナリングポリシ制御部204は、入力値をもとに演算を行い、システム監視値211を算出する。図5の例では、入力値が、ACPI情報401、I/O統計情報402及び起動プロセス情報403の情報量から構成される場合について示している。また、図5の例では、ジャーナリングポリシ制御部204によるシステム監視値211を算出する処理が、正規化処理404、重み付け処理405及び加算処理406から構成される場合について示している。
ACPI情報401は、ACPIのPステート情報を示す。情報処理装置100は、CPU101の使用率等に応じて動作周波数と、動作電圧とを切り替えることで消費電力を抑制する。この際、Pステートは、動作周波数が切り替え可能なシステムにおいて、どの段階で動作しているかを示す指標になる。
I/O統計情報402は、情報処理装置100の単位時間当たりの二次記憶装置104に対するI/Oアクセス量を示す。
起動プロセス情報403は、起動しているプロセスの量や種別をもとに情報処理装置100の状態を数値化したもので、数値が高いほど負荷が高いことを示す。
Next, a method for calculating the
FIG. 5 is a diagram illustrating an example of a concept of a method for calculating the
The journaling
The I / O
The
正規化処理404は、ACPI情報401、I/O統計情報402及び起動プロセス情報403の情報量を正規化する処理である。なお、正規化処理404において、ACPI情報401、I/O統計情報402及び起動プロセス情報403の情報量の中から一つの情報量のみを正規化してシステム監視値211とするようにしてもよい。そして、ジャーナリングポリシ制御部204は、正規化したシステム監視値211に基づいて、動作状態対応管理テーブル212からジャーナリングレベルを導出してもよい。この場合、例えば、ジャーナリングポリシ制御部204は、ACPI情報401から省電力状態であることを検出した場合、ジャーナリングレベルを下げるといった判断をすることができる。なお、ここでいう省電力状態とは、情報処理装置100の機能の一部を一時的に停止している状態のことである。また、ジャーナリングポリシ制御部204は、I/O統計情報402からI/Oアクセス量が予め定められたアクセス量より低い状態であることを検出した場合、ジャーナリングレベルを上げるといった判断をすることができる。なお、CPU101は、操作部等を介して受け付けたユーザの指示により、予めアクセス量の閾値を設定することができる。更に、ジャーナリングポリシ制御部204は、正規化処理404で正規化することにより、ACPI情報401、I/O統計情報402及び起動プロセス情報403の情報量の間での演算処理をすることができるようになる。
重み付け処理405は、正規化処理404での正規化後の各情報量の重み付けを調整するための処理である。そして、ジャーナリングポリシ制御部204が重み付け後の情報量に対して加算処理406して算出した値が、システム監視値211である。ジャーナリングポリシ制御部204は、算出したシステム監視値211に基づいて、動作状態対応管理テーブル212を検索(第1の検索)することで、複数の入力情報に基づいたジャーナリングレベルを取得することができる。
The
The
重み付け処理405による重み付けの内容及び動作状態対応管理テーブル212の内容は、情報処理装置100の使用形態に応じて変更してもよい。例えば、I/O統計情報402の重み付けを他より大きくし、動作状態対応管理テーブル212との関係を調整することによって、ジャーナリングポリシ制御部204は、書き込み量が予め定められた量より多い場合には、ジャーナリングレベルの上限を2までに留めるといった制御をすることができる。なお、CPU101は、操作部等を介して受け付けたユーザの指示により、書き込み量の閾値を予め設定することができる。また、ACPI情報401の重み付けを他より大きくし、動作状態対応管理テーブル212との関係を調整することによって、ジャーナリングポリシ制御部204は、省電力状態の場合には、ジャーナリングレベルを0にするといった制御をすることができる。また、重み付けが必要ない場合、ジャーナリングポリシ制御部204は、重み付け処理405を行わないか、重み付け処理405で各パラメータに対して同等の重み付けをすることによって、重み付けを必要としない場合と同等の効果を得ることができる。
以上、上述した方法により、ジャーナリングポリシ制御部204は、システム監視値211を算出し、更に、算出したシステム監視値211に基づいて動作状態対応管理テーブル212を検索してジャーナリングレベルを導出することができる。そして、ジャーナリングポリシ制御部204は、導出したジャーナリングレベルをジャーナリングポリシとして、ジャーナルログ制御部208へ通知する。なお、ジャーナリングポリシ制御部204が通知するタイミングは、タイマによる定期実行を契機としてもよいし、予め定められたイベントを契機としてもよい。なお、CPU101は、操作部等を介して受け付けたユーザの指示により、予め契機となるタイマの設定をすることができる。同様に、CPU101は、操作部等を介して受け付けたユーザの指示により、予め契機となるイベントの情報を設定することができる。
The content of the weighting by the
As described above, the journaling
次に、図6を用いて、本実施形態におけるジャーナリング処理について説明する。
図6は、本実施形態における情報処理装置100が起動してからジャーナリングを実行して定常状態に至るまでの処理の一例を示すフローチャートである。
S600において、情報処理装置100の電源が投入されると、本フローチャートの処理が開始される。
S601において、情報処理装置100のOSは、ジャーナリングファイルシステム203をマウントし、処理をS602へ進める。即ち、情報処理装置100のOSがジャーナリングファイルシステム203を認識し、ジャーナリングファイルシステム203が実行中の状態となる。
S602において、ジャーナリングポリシ制御部204は、情報処理装置100の起動直後における予め定められたデフォルトのジャーナリングレベルをジャーナリングポリシとして、ジャーナルログ制御部208へ通知する。なお、デフォルトのジャーナリングレベルに関する情報は、予め二次記憶装置104等に格納されているものとする。また、CPU101は、操作部等を介して受け付けたユーザの指示により、デフォルトのジャーナリングレベルに関する情報を変更することができる。ここで、情報処理装置100は、定常状態に移行する。なお、ここでいう定常状態とは、情報処理装置100の機能が全て起動している状態のことである。定常状態において、S603と、S604との処理が並列に実行される。
S603において、ジャーナリングポリシ制御部204は、タイマによる定期実行や特定のイベント等、予め規定した契機毎に、図5等を用いて説明した方法によりジャーナリングポリシを導出し、ジャーナルログ制御部208へ通知する。
S604において、ジャーナルログ記録部209は、トランザクション単位でジャーナルログを記録する。なお、S604の処理の詳細については、図7を用いて後述する。
以上の処理により、情報処理装置100は、自装置の状態に応じてジャーナリングレベルをトランザクション単位で動的に制御することができる。
Next, journaling processing in the present embodiment will be described with reference to FIG.
FIG. 6 is a flowchart illustrating an example of processing from when the
In S600, when the
In S601, the OS of the
In step S <b> 602, the journaling
In step S603, the journaling
In step S604, the journal
With the above processing, the
次に、図7を用いて、図6のフローチャートにおけるS604の処理について説明する。
図7は、図6のS604におけるトランザクションの周期処理の一例を示すフローチャートである。
S700において、ジャーナルログ制御部208は、トランザクションを新規に作成し、処理をS701へ進める。以降、ジャーナルログ制御部208は、作成中のトランザクションを管理する。
S701において、ジャーナルログ制御部208は、ジャーナリングポリシ制御部204から通知されたジャーナリングポリシに基づき、ジャーナルログを作成し、処理をS702へ進める。
S702において、ジャーナルログ記録部209は、ジャーナルログ制御部208が作成したジャーナルログをジャーナリング領域210へ記録し、処理をS703へ進める。
S703において、ジャーナルログ制御部208は、ファイルの更新状態をファイルシステムコア部207と共有し、トランザクションを終了可能か否か判定する。より具体的にいうと、ジャーナルログ制御部208と、ファイルシステムコア部207とは、ファイル操作と、ジャーナル操作とにおける整合性が保てていれば、トランザクションを終了可能と判定する。S703において、ジャーナルログ制御部208は、トランザクションを終了可能と判定した場合、処理をS704に進め、終了可能でないと判定した場合、処理をS701に戻す。
S704において、ジャーナルログ制御部208は、トランザクションを終了する。そして、ジャーナルログ記録部209は、残りのジャーナルログをジャーナリング領域210へ記録する。
以上の処理により、情報処理装置100は、ジャーナリングポリシに基づき、トランザクション単位でジャーナルログを作成し、作成したジャーナルログをジャーナリング領域210へ記録することができる。
Next, the process of S604 in the flowchart of FIG. 6 will be described with reference to FIG.
FIG. 7 is a flowchart illustrating an example of transaction cycle processing in step S604 of FIG.
In S700, the journal
In S701, the journal
In S702, the journal
In step S <b> 703, the journal
In step S704, the journal
Through the above processing, the
以上、本実施形態によれば、情報処理装置100は、自装置の状態に応じてジャーナリングレベルをトランザクション単位で動的に制御することができる。そして、情報処理装置100は、前記ジャーナリングレベルに基づいてトランザクション単位で作成したジャーナルログをジャーナリング領域210へ記録することができる。これにより、情報処理装置100は、ジャーナリングファイルシステムによる処理において、パフォーマンスや電力消費を改善させることができる。
As described above, according to the present embodiment, the
<実施形態2>
実施形態1で述べたように、情報処理装置100のジャーナリングポリシ制御部204は、システム監視値211を算出し、算出したシステム監視値211に基づいて動作状態対応管理テーブル212を検索することで、ジャーナリングポリシを導出する。そして、ジャーナルログ制御部208は、導出したジャーナリングポリシに基づいてジャーナルログを作成する。更に、ジャーナルログ記録部209は、ジャーナルログ制御部208により作成されたジャーナルログをジャーナリング領域210へ記録する。
ここで、実施形態1のopen関数を利用する場合、全てのタスクにおける書き込みアクセスは、情報処理装置100で一意のジャーナリングポリシに準じたジャーナリングレベルになる。しかし、一部のタスクでは、それが望ましくない場合がある。例えば、商業印刷で用いる情報処理装置では、原稿ファイルのサイズが非常に大きくなるため、二次記憶装置への書き込みに多くの時間を費やす。そのため、書き込み中に障害が発生した場合は障害の影響を受けやすくなるが、原稿内容は大変重要なデータであるため、消失を防がなければならない。こういった重要なタスクに関しては、情報処理装置100で一意のジャーナリングポリシに準ずるのではなく、例えば常にジャーナリングレベル3で処理が行われる方が望ましい。以下では、このような要件に対する実施形態について説明する。
<
As described in the first exemplary embodiment, the journaling
Here, when the open function of the first embodiment is used, write access in all tasks is a journaling level according to a journaling policy unique to the
図8は、本実施形態における情報処理装置100の機能構成等の一例を示す図である。
図8の情報処理装置100は、画像処理タスク901、原稿加工タスク902、ジャーナリングファイルシステム903、ジャーナリングポリシ制御部904、一次記憶装置102及び二次記憶装置104を有する。
ジャーナリングファイルシステム903は、ファイルシステムコア部907、ジャーナルログ制御部908、ジャーナルログ記録部909、ジャーナルログ反映部913及び個別ジャーナリングレベル管理テーブル918を有する。
一次記憶装置102は、システム監視値911を有する。
二次記憶装置104は、ジャーナリング領域910、データ領域914及び動作状態対応管理テーブル912を有する。また、ジャーナリング領域910には、レベル1用領域915、レベル2用領域916及びレベル3用領域917が含まれる。
ここで、画像処理タスク901、ジャーナリングポリシ制御部904、一次記憶装置102、二次記憶装置104、システム監視値911、動作状態対応管理テーブル912及びデータ領域914に関しては実施形態1と同様であるため、説明を省略する。
FIG. 8 is a diagram illustrating an example of the functional configuration of the
8 includes an
The
The
The
Here, the
以下、主に実施形態1と異なる点について説明する。
原稿加工タスク902は、原稿ファイルの作成に関わる処理を行う。原稿加工タスク902が扱うデータはクリティカルなデータであるため、障害が発生した際には発生前の状態に確実に復元する必要がある。
画像処理タスク901及び原稿加工タスク902共に、ジャーナリングファイルシステム903に対してファイル操作要求するが、要求の仕方が異なる。画像処理タスク901の場合については、実施形態1と同様であるため説明を省略する。原稿加工タスク902の場合、プログラム上ではopen2(filename、flags、journallevel)という書式のopen2関数を用いる。関数の引数では、filenameにアクセスするファイルのファイル名、flagsにアクセスした際のモード(読み込みだけなのか、書き込みも行うのか等)及びjournallevelにジャーナリングレベルが指定される。Open2関数が呼ばれると、ファイルシステムコア部907は、ファイル操作を識別するためのファイル識別子を新たに割り当てる。また、ファイルシステムコア部907は、open2関数で渡されたジャーナリングレベルと、ファイル識別子との対応を管理するために、個別ジャーナリングレベル管理テーブル918を更新する。
Hereinafter, differences from the first embodiment will be mainly described.
A manuscript processing task 902 performs processing related to creation of a manuscript file. Since the data handled by the manuscript processing task 902 is critical data, it is necessary to reliably restore the state before the occurrence when a failure occurs.
Both the
図9は、個別ジャーナリングレベル管理テーブル918の一例を示す図である。なお、個別ジャーナリングレベル管理テーブル918は、ファイル識別子と、ジャーナリングレベルとが対応付けられた第2の対応情報の一例である。
図9の例は、ファイル識別子がXXXXの場合はジャーナリングレベル0、ファイル識別子がYYYYの場合はジャーナリングレベル3であることを示している。また、図9の例は、ファイル識別子がZZZZの場合はジャーナリングレベル0、ファイル識別子がAAAAの場合はジャーナリングレベル1であることを示している。即ち、ジャーナルログ制御部908は、ファイル識別子に基づいて、個別ジャーナリングレベル管理テーブル918を検索することで、ジャーナリングレベルに対応するジャーナリング方式を決定(第2の決定)することができる。
Open2関数の処理が成功することで、原稿加工タスク902は、ファイル操作に紐付けられたファイル識別子を得る。なお、タスクは、処理を実行する処理実行手段の一例である。以降のジャーナリングファイルシステム903に対するファイル操作要求は、ファイル識別子を用いて行うことになる。
ファイルシステムコア部907と、ジャーナルログ制御部908とは、ファイルの更新状態を共有することで、ファイル操作と、ジャーナル操作との整合性を保つ。ジャーナルログ制御部908は、トランザクション開始の際、個別ジャーナリングレベル管理テーブル918からファイル識別子を検索(第2の検索)する。そして、ジャーナルログ制御部908は、ファイル識別子を特定することができた場合は、対応するジャーナリングレベルに基づいてジャーナルログを作成する。一方、ジャーナルログ制御部908は、ファイル識別子を特定することができなかった場合は、最新のジャーナリングポリシに基づいてジャーナルログを作成する。
FIG. 9 is a diagram illustrating an example of the individual journaling level management table 918. The individual journaling level management table 918 is an example of second correspondence information in which file identifiers are associated with journaling levels.
The example of FIG. 9 indicates that the journaling level is 0 when the file identifier is XXXX, and the journaling level is 3 when the file identifier is YYYY. Further, the example of FIG. 9 indicates that the journaling level is 0 when the file identifier is ZZZZ and the journaling level is 1 when the file identifier is AAAA. That is, the journal
When the processing of the Open2 function is successful, the manuscript processing task 902 obtains a file identifier associated with the file operation. The task is an example of a process execution unit that executes a process. Subsequent file operation requests to the
The file
ジャーナリング領域910は、ジャーナリングレベル毎(管理方式毎)に領域が分割されている。より具体的には、ジャーナリング領域910は、レベル1用領域915、レベル2用領域916、レベル3用領域917に分かれている。ここで、レベル1用領域915は、ジャーナリングレベル1のジャーナルログを記録する記憶領域である。レベル2用領域916は、ジャーナリングレベル2のジャーナルログを記録する記憶領域である。レベル3用領域917は、ジャーナリングレベル3のジャーナルログを記録する記憶領域である。また、レベル1用領域915、レベル2用領域916及びレベル3用領域917のそれぞれが、図3で示した内部構成に含まれる。
ジャーナルログ記録部909は、ジャーナルログを、ジャーナルログのジャーナリングレベルに合ったジャーナリング領域に記録する。また、トランザクション区間中において、各々のジャーナリング領域のディスクリプタブロック304に設定するトランザクション識別用IDは、同一のものとなる。
ジャーナルログ反映部913は、ジャーナリング領域910内のジャーナルログの有効部分をデータ領域914へ反映させる。ここで、ジャーナルログ反映部913は、全ジャーナリング領域のディスクリプタブロック304に記されているトランザクション識別用IDの中から若い順にデータ領域914へ反映させる。もし、同一のトランザクション識別用IDが複数のジャーナリング領域で見つかった場合、ジャーナルログ反映部913は、全てのジャーナリング領域分の反映が終わるまで、それより後ろのトランザクション識別用IDのトランザクションの操作を行ってはならない。
The
The journal
The journal
次に、図10を用いて、本実施形態におけるジャーナリング処理について説明する。
情報処理装置100の電源が投入されてから定常状態に至るまでの処理の流れは、実施形態1の図6と同様であるため、説明を省略する。
図10は、図6のS604におけるトランザクションの周期処理の一例を示すフローチャートである。
S800において、ジャーナルログ制御部908は、トランザクションを新規に作成し、処理をS801へ進める。以降、ジャーナルログ制御部908は、作成中のトランザクションを管理する。
S801において、ジャーナルログ制御部908は、個別ジャーナリングレベル管理テーブル918から上述したファイル識別子を検索し、一致するファイル識別子が存在するか否かを判定する。S801において、ジャーナルログ制御部908は、一致するファイル識別子が存在すると判定した場合、処理をS803に進め、一致するファイル識別子が存在しないと判定した場合、処理をS802に進める。
S802において、ジャーナルログ制御部908は、個別ジャーナリングレベル管理テーブル918から取得したジャーナリングレベルに基づき、ジャーナルログを作成し、処理をS804へ進める。
S803において、ジャーナルログ制御部908は、ジャーナリングポリシ制御部904から通知されたジャーナリングポリシに基づき、ジャーナルログを作成し、処理をS804へ進める。
Next, journaling processing in the present embodiment will be described with reference to FIG.
The flow of processing from when the
FIG. 10 is a flowchart showing an example of a transaction cycle process in S604 of FIG.
In step S800, the journal
In step S <b> 801, the journal
In step S802, the journal
In step S803, the journal
S804において、ジャーナルログ記録部909は、ジャーナリング領域910の中のジャーナリングレベルに合ったジャーナリング領域へジャーナルログを記録し、処理をS805へ進める。
S805において、ジャーナルログ制御部908は、ファイルの更新状態をファイルシステムコア部907と共有し、トランザクションを終了可能か否か判定し、トランザクションを終了可能と判定した場合、処理をS806に進める。一方、S805において、ジャーナルログ制御部908は、トランザクションを終了可能でないと判定した場合、処理をS801に戻す。なお、S805の処理は、図7のS703の処理と同様であるため、詳細な説明を省略する。
S806において、ジャーナルログ制御部908は、トランザクションを終了する。そして、ジャーナルログ記録部909は、残りのジャーナルログをジャーナリング領域910へ記録する。
以上の処理により、情報処理装置100は、処理内容に応じたジャーナリングレベルに基づき、トランザクション単位でジャーナルログを作成し、作成したジャーナルログをジャーナリングレベルに応じた記録領域に記録することができる。
In step S804, the journal
In step S805, the journal
In step S806, the journal
Through the above processing, the
以上、本実施形態によれば、情報処理装置100は、自装置の状態によらず、処理内容に応じたジャーナリングレベルに基づいてジャーナルログを作成することができる。即ち、情報処理装置100は、クリティカルなデータを処理する場合、自装置の状態に基づくジャーナリングレベルではなく、処理内容に応じたジャーナリングレベルに基づいて処理を行うことができる。また、情報処理装置100は、処理内容に応じて同時に複数のジャーナリング方式を利用することができる。更に、情報処理装置100は、作成したジャーナルログをジャーナリングレベルに応じた記録領域に記録することができる。これにより、情報処理装置100は、二次記憶装置104を有効活用しながら効率的な処理を実現することができる。
As described above, according to the present embodiment, the
<その他の実施形態>
また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(又はCPUやMPU等)がプログラムを読み出して実行する処理である。
<Other embodiments>
The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, etc.) of the system or apparatus reads the program. It is a process to be executed.
以上、上述した各実施形態によれば、効率的にデータを更新する技術を提供することができる。 As mentioned above, according to each embodiment mentioned above, the technique which updates data efficiently can be provided.
以上、本発明の好ましい形態について詳述したが、本実施形態は係る特定の実施形態に限定されるものではなく、特許請求の範囲に記載された本発明の要旨の範囲内において、種々の変形・変更が可能である。 The preferred embodiment of the present invention has been described in detail above, but the present embodiment is not limited to the specific embodiment, and various modifications can be made within the scope of the gist of the present invention described in the claims.・ Change is possible.
Claims (11)
前記決定手段により決定された前記管理方式で、処理単位毎に前記管理に係る履歴情報を作成する作成手段と、
前記作成手段により作成された前記履歴情報を処理単位毎に記憶領域に記録する記録手段と、
を有することを特徴とする情報処理装置。 A determination unit that determines a management method of the management unit for each processing unit during execution of the management unit that manages data update;
Creating means for creating history information relating to the management for each processing unit in the management method determined by the determining means;
Recording means for recording the history information created by the creating means in a storage area for each processing unit;
An information processing apparatus comprising:
前記決定手段は、前記算出手段により算出された監視値に基づいて、前記管理方式を決定することを特徴とする請求項2又は3記載の情報処理装置。 The first determination unit includes a calculation unit that calculates a monitoring value related to the state of the information processing apparatus for each processing unit based on input information;
The information processing apparatus according to claim 2, wherein the determination unit determines the management method based on a monitoring value calculated by the calculation unit.
前記判定手段により管理方式情報が検索されたと判定された場合、処理単位毎の管理方式を、前記検索された管理方式情報に対応する管理方式に決定し、前記判定手段により管理方式情報が検索されなかったと判定された場合、処理単位毎の管理方式を、前記第1の決定手段により決定された管理方式に決定することを特徴とする請求項6記載の情報処理装置。 The second determination unit further includes a determination unit that determines whether or not the management method information has been searched,
When it is determined that the management method information has been retrieved by the determination unit, the management method for each processing unit is determined as a management method corresponding to the retrieved management method information, and the management method information is retrieved by the determination unit. The information processing apparatus according to claim 6, wherein if it is determined that there is not, the management method for each processing unit is determined to be the management method determined by the first determination unit.
前記管理方式は、ジャーナリング方式であり、
前記履歴情報は、ジャーナルログであることを特徴とする請求項1乃至8何れか1項記載の情報処理装置。 The management means is a journaling file system,
The management method is a journaling method,
The information processing apparatus according to claim 1, wherein the history information is a journal log.
データの更新を管理する管理手段の実行中に、前記管理手段の管理方式を処理単位毎に決定する決定ステップと、
前記決定ステップにより決定された前記管理方式で、処理単位毎に前記管理に係る履歴情報を作成する作成ステップと、
前記作成ステップにより作成された前記履歴情報を処理単位毎に記憶領域に記録する記録ステップと、
を含むことを特徴とする情報処理方法。 An information processing method executed by an information processing apparatus,
A determination step of determining a management method of the management means for each processing unit during execution of the management means for managing update of data;
In the management method determined in the determination step, a creation step for creating history information related to the management for each processing unit;
A recording step of recording the history information created in the creation step in a storage area for each processing unit;
An information processing method comprising:
データの更新を管理する管理手段の実行中に、前記管理手段の管理方式を処理単位毎に決定する決定ステップと、
前記決定ステップにより決定された前記管理方式で、処理単位毎に前記管理に係る履歴情報を作成する作成ステップと、
前記作成ステップにより作成された前記履歴情報を処理単位毎に記憶領域に記録する記録ステップと、
を実行させるためのプログラム。 On the computer,
A determination step of determining a management method of the management means for each processing unit during execution of the management means for managing update of data;
In the management method determined in the determination step, a creation step for creating history information related to the management for each processing unit;
A recording step of recording the history information created in the creation step in a storage area for each processing unit;
A program for running
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013174951A JP6292796B2 (en) | 2013-08-26 | 2013-08-26 | Information processing apparatus, information processing method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013174951A JP6292796B2 (en) | 2013-08-26 | 2013-08-26 | Information processing apparatus, information processing method, and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2015043178A true JP2015043178A (en) | 2015-03-05 |
JP6292796B2 JP6292796B2 (en) | 2018-03-14 |
Family
ID=52696672
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2013174951A Expired - Fee Related JP6292796B2 (en) | 2013-08-26 | 2013-08-26 | Information processing apparatus, information processing method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6292796B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2017209508A1 (en) * | 2016-06-01 | 2017-12-07 | 삼성전자 주식회사 | Electronic device and file data journaling method of electronic device |
KR101932967B1 (en) * | 2016-12-16 | 2018-12-27 | 한양대학교 산학협력단 | Method for flushing metadata in journaling file system and apparatus for writing data using the method |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0535566A (en) * | 1991-07-25 | 1993-02-12 | Nec Corp | Journal collecting system in on-line information processing system |
JP2009104488A (en) * | 2007-10-24 | 2009-05-14 | Hitachi Ltd | Storage device, its control method, and storage system |
-
2013
- 2013-08-26 JP JP2013174951A patent/JP6292796B2/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0535566A (en) * | 1991-07-25 | 1993-02-12 | Nec Corp | Journal collecting system in on-line information processing system |
JP2009104488A (en) * | 2007-10-24 | 2009-05-14 | Hitachi Ltd | Storage device, its control method, and storage system |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2017209508A1 (en) * | 2016-06-01 | 2017-12-07 | 삼성전자 주식회사 | Electronic device and file data journaling method of electronic device |
KR101932967B1 (en) * | 2016-12-16 | 2018-12-27 | 한양대학교 산학협력단 | Method for flushing metadata in journaling file system and apparatus for writing data using the method |
Also Published As
Publication number | Publication date |
---|---|
JP6292796B2 (en) | 2018-03-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9396198B2 (en) | Computer system, file management method and metadata server | |
US8239356B2 (en) | Methods and apparatuses for data protection | |
US8074035B1 (en) | System and method for using multivolume snapshots for online data backup | |
US8909614B2 (en) | Data access location selecting system, method, and program | |
US20150039837A1 (en) | System and method for tiered caching and storage allocation | |
US20060047926A1 (en) | Managing multiple snapshot copies of data | |
JP5290287B2 (en) | Network boot system | |
JP5445463B2 (en) | Computer system, data storage method and program | |
JP2007183701A (en) | Snapshot restart method | |
JPH04299748A (en) | Automatic file extension system | |
WO2019061352A1 (en) | Data loading method and device | |
CN105573859A (en) | Data recovery method and device of database | |
JP2007241486A (en) | Memory system | |
US20190042373A1 (en) | Systems and methods for copying an operating source volume | |
JP2005301499A (en) | Disk array device and control method for disk array device | |
WO2018113484A1 (en) | Method and apparatus for recovering multi-replica data | |
US20080215843A1 (en) | Storage area management method for a storage system | |
CN108475201A (en) | A kind of data capture method in virtual machine start-up course and cloud computing system | |
CN105469001B (en) | Disk data protection method and device | |
JP6292796B2 (en) | Information processing apparatus, information processing method, and program | |
JP2015114750A (en) | Examination program, information processing device, and information processing method | |
US10789002B1 (en) | Hybrid data deduplication for elastic cloud storage devices | |
US10360990B2 (en) | Information processing device, information processing method, and program | |
JP5660557B2 (en) | Network boot system | |
JP6242054B2 (en) | Information processing apparatus, information processing method, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20160808 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20170531 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20170627 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20170822 |
|
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: 20180116 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20180213 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 6292796 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
LAPS | Cancellation because of no payment of annual fees |