JP2015043178A - Information processing device, information processing method, and program - Google Patents

Information processing device, information processing method, and program Download PDF

Info

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
Application number
JP2013174951A
Other languages
Japanese (ja)
Other versions
JP6292796B2 (en
Inventor
晃生 中川
Akio Nakagawa
晃生 中川
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2013174951A priority Critical patent/JP6292796B2/en
Publication of JP2015043178A publication Critical patent/JP2015043178A/en
Application granted granted Critical
Publication of JP6292796B2 publication Critical patent/JP6292796B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a technique for efficiently updating data.SOLUTION: An information processing device comprises: determination means that during execution of management means which manages update of data, determines a management system of the management means for each processing unit; creation means that creates history information related to the management for each processing unit using the management system determined by the determination means; and recording means that records the history information created by the creation means in a storage area for each processing unit.

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 Patent Document 1, data to be written in a journaling area is stored in a stack, and when the update processing to the secondary storage device is completed first and the journal log is no longer needed, the stack data is deleted. Is disclosed.
Patent Document 2 discloses a technique for dividing a database into logical units, and acquiring journal logs by setting journal log acquisition contents, journal log acquisition necessity and unnecessary.
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.

特開平11−203186号公報Japanese Patent Laid-Open No. 11-203186 特開平05−061751号公報JP 05-061751 A 特開2004−62869号公報JP 2004-62869 A

従来のジャーナリングファイルシステムでは、マウントする際にジャーナリング方式を選択し、マウント中はジャーナリング方式を変更しない。そのため、従来のジャーナリングファイルシステムでは、システムの状態に応じて動的にジャーナリング方式を切り替えることができず、パフォーマンスや電力消費の観点で最適な制御を行うことが困難であった。
本発明は、効率的にデータを更新する技術を提供することを目的とする。
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.

情報処理装置のハードウェア構成の一例を示す図である。It is a figure which shows an example of the hardware constitutions of information processing apparatus. 実施形態1における情報処理装置の機能構成等の一例を示す図である。2 is a diagram illustrating an example of a functional configuration of the information processing apparatus according to the first embodiment. FIG. ジャーナリング領域及びトランザクションの構成の一例を示す図である。It is a figure which shows an example of a structure of a journaling area | region and a transaction. 動作状態対応管理テーブルの一例を示す図である。It is a figure which shows an example of an operation state corresponding | compatible management table. システム監視値の算出方法の概念の一例を示す図である。It is a figure which shows an example of the concept of the calculation method of a system monitoring value. 実施形態1の処理の一例を示すフローチャート(その1)である。6 is a flowchart (part 1) illustrating an example of processing according to the first exemplary embodiment. 実施形態1の処理の一例を示すフローチャート(その2)である。6 is a flowchart (part 2) illustrating an example of processing according to the first exemplary embodiment. 実施形態2における情報処理装置の機能構成等の一例を示す図である。6 is a diagram illustrating an example of a functional configuration of an information processing apparatus according to Embodiment 2. FIG. 個別ジャーナリングレベル管理テーブルの一例を示す図である。It is a figure which shows an example of an individual journaling level management table. 実施形態2の処理の一例を示すフローチャートである。10 is a flowchart illustrating an example of processing according to the second exemplary embodiment.

以下、本発明を実施するための最良の形態について図面を用いて説明する。
<実施形態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.
<Embodiment 1>
FIG. 1 is a diagram illustrating an example of a hardware configuration of the information processing apparatus 100 according to the present embodiment.
In the information processing apparatus 100, the CPU 101 normally processes a plurality of processes one by one, and switches the process at regular intervals. Here, the CPU 101 may have a plurality of processor cores that perform arithmetic processing and the like. The information processing apparatus 100 may include a plurality of CPUs 101 themselves. In addition, the CPU 101 expands and executes a program stored in the secondary storage device 104 or the like in the primary storage device 102, thereby executing functions of the information processing device 100 described later, OS (Operating System) functions and flowcharts. Such processing is realized. Moreover, a journaling file system is implement | achieved when CPU101 runs the said program. As described above, the journaling file system is a file system with a journaling function. The journaling file system is an example of management means for managing data updates. Details of the journaling file system will be described later with reference to FIG.
The primary storage device 102 includes an SDRAM, an SRAM, or the like that records programs and data. Data such as programs, files, and directories developed in the primary storage device 102 is stored in the secondary storage device 104.
The secondary storage device 104 is a nonvolatile storage device, a storage device coated with a magnetic material such as a magnetic disk, a storage device that records data using a NAND flash memory with a limited number of writes, or A nonvolatile flash memory or the like can be used. The secondary storage device 104 is an optical disk that records data using a semiconductor laser, a magneto-optical disk that records data using a red laser beam, and a magnetic field, or a non-volatile that can be inserted into and removed from an information processing device. Can be used. The secondary storage device 104 stores various programs executed by the CPU 101 and various data. The CPU 101 implements the operation of the file stored in the secondary storage device 104 by making a READ request (read request) and a WRITE request (write request) from the OS via the I / O controller 103. Note that the information processing apparatus 100 may include a plurality of secondary storage devices 104.

本実施形態では、図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 secondary storage device 104 as 0 and 1, and the usage status of inode as 0 and 1. There are distinct inode bitmaps and the like. In addition, the metadata includes the number of empty blocks and the number of empty inodes. The inode includes information such as a file mode indicating a file type such as a symbolic link or a device file, a file size, a file last reference time, a file last state change time, and a file last update time. Further, the inode includes information such as a file deletion time, a user ID, a group ID, a file link number, a used block number, a block number, and a generation number as a configuration.

次に、トランザクションについて説明する。トランザクションは、関連する複数の処理をまとめた処理単位である。なお、トランザクションは、ジャーナリングファイルシステムの整合性を保つために必要な依存関係がその中で閉じているジャーナルログの集合体を含む。トランザクションの中にあるジャーナルログが、トランザクションの外へ依存関係を波及させることはない。即ち、情報処理装置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 information processing apparatus 100, when recovering from a journal log due to a failure or the like, needs to be performed for each transaction (each processing unit) and does not use an incomplete transaction for the recovery process.
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. Journaling level 0 specifies that no journaling is performed. Journaling level 1 and journaling level 2 stipulate that only metadata is journaled. The difference between the two levels stipulates that the order of data area update and journal area recording is not uniquely determined in journaling level 1, whereas journaling level 2 records the journal area after the data area is updated. It is a point which prescribes that is performed. Journaling level 3 stipulates that journaling is performed not only on metadata but also on the update contents of data. Overall, the higher the journaling level, the better the reliability, but the longer it takes to write. The journaling level can be changed on a transaction basis. In the present embodiment, the journaling level uniquely determined by the information processing apparatus 100 having the journaling file system according to the state of the own apparatus is called a journaling policy.

図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 information processing apparatus 100 according to the present embodiment.
The image processing task 201 performs processing such as image filtering and cropping. The data handled by the image processing task 201 is not critical, and even if a failure occurs and the data is lost, the process can be re-executed. The image processing task 201 requests a file operation from the journaling file system 203. At that time, an open function having a format of “open (filename, flags)” is used on the program. In the argument of the function, the file name of the file that accesses “filename”, and the mode when accessing “flags” (whether only reading or writing is performed) are specified. When the processing of the open function is successful, the image processing task 201 obtains a file identifier associated with the file operation. The file identifier is an example of identification information that identifies a file operation. The image processing task 201 makes a subsequent file operation request (hereinafter referred to as a file operation request) to the journaling file system 203 using the file identifier.
The journaling file system 203 includes a file system core unit 207, a journal log control unit 208, a journal log recording unit 209, and a journal log reflection unit 213.
The journaling policy control unit 204 calculates a system monitoring value 211 to be described later with reference to FIGS. The system monitoring value 211 is an example of monitoring value information. Further, the journaling policy control unit 204 refers to an operation state correspondence management table 212 to be described later with reference to FIG. . Furthermore, the journaling policy control unit 204 notifies the journal log control unit 208 of the acquired journaling policy.

一次記憶装置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 primary storage device 102 stores information related to the system monitoring value 211 (hereinafter simply referred to as the system monitoring value 211).
The secondary storage device 104 has a journaling area 210, an operation state correspondence management table 212, and a data area 214, which will be described later with reference to FIG.
The file system core unit 207 is a core that performs file operation processing other than journaling.
The journal log control unit 208 controls the start and end of a transaction. The file system core unit 207 and the journal log control unit 208 maintain the consistency between the file operation and the journal operation by sharing the file update state. The journal log control unit 208 creates a journal log based on the latest journaling policy when starting a transaction.
The journal log recording unit 209 manages the internal configuration of the journaling area 210 and records a journal log in the journaling area 210.
The journal log reflecting unit 213 reflects the effective portion of the journal log in the journaling area 210 to the data area 214. The CPU 101 can determine a trigger to be reflected in advance according to a user instruction received via the operation unit or the like. For example, the trigger to be reflected may be a case where a valid transaction in the journaling area 210 exceeds a preset size (a quarter or a half of the size of the journaling area). In addition, the trigger to be reflected may be set at a predetermined time (for example, every 5 seconds).

次に、図3を用いてジャーナリング領域210の構成と、トランザクションの構成とについて説明する。
図3の(a)は、ジャーナリング領域210の構成の一例を示す図である。
ジャーナリング領域210は、ジャーナリング情報管理ブロック300及びリングバッファ301を有する。
ジャーナリング情報管理ブロック300は、開始位置情報302を含む。
リングバッファ301は、トランザクション303を含み、新しいトランザクション303の記録と、不要なトランザクション303の解放を繰り返す。
開始位置情報302は、リングバッファ301に記録された最も古いトランザクションの開始位置に関する情報(先頭アドレスやブロック番号等)を保持している。
Next, the configuration of the journaling area 210 and the configuration of the transaction will be described with reference to FIG.
FIG. 3A is a diagram illustrating an example of the configuration of the journaling region 210.
The journaling area 210 includes a journaling information management block 300 and a ring buffer 301.
The journaling information management block 300 includes start position information 302.
The ring buffer 301 includes a transaction 303, and repeats recording a new transaction 303 and releasing an unnecessary transaction 303.
The start position information 302 holds information (start address, block number, etc.) regarding the start position of the oldest transaction recorded in the ring buffer 301.

図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 transaction 303.
The transaction 303 has a descriptor block 304, a metadata block 305, and a commit block 306.
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 metadata block 305 is a block that holds the core data of the journal log, that is, update history data.
The commit block 306 is a block indicating the end of the transaction.
For example, the information processing apparatus 100 may reserve about 5% of the total capacity of the storage area of the secondary storage device 206 as the journaling area 210.

次に、図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 system monitoring value 211. The operation state correspondence management table 212 is an example of first correspondence information in which the system monitoring value 211 is associated with a journaling level.
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 policy control unit 204 can determine the journaling method corresponding to the journaling level (first determination) by searching the operation state correspondence management table 212 based on the system monitoring value 211.

次に、図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 system monitoring value 211 will be described with reference to FIG.
FIG. 5 is a diagram illustrating an example of a concept of a method for calculating the system monitoring value 211.
The journaling policy control unit 204 performs a calculation based on the input value and calculates a system monitoring value 211. In the example of FIG. 5, a case is shown where the input value is composed of the information amount of ACPI information 401, I / O statistical information 402, and activation process information 403. In the example of FIG. 5, the case where the process of calculating the system monitoring value 211 by the journaling policy control unit 204 includes a normalization process 404, a weighting process 405, and an addition process 406 is shown.
ACPI information 401 indicates ACPI P-state information. The information processing apparatus 100 suppresses power consumption by switching between an operating frequency and an operating voltage according to the usage rate of the CPU 101 and the like. At this time, the P state is an index indicating at which stage the system is operating in a system in which the operating frequency can be switched.
The I / O statistical information 402 indicates the amount of I / O access to the secondary storage device 104 per unit time of the information processing apparatus 100.
The activation process information 403 is obtained by quantifying the state of the information processing apparatus 100 based on the amount and type of the activated process. The higher the numerical value, the higher the load.

正規化処理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 normalization process 404 is a process for normalizing the information amounts of the ACPI information 401, the I / O statistical information 402, and the activation process information 403. In the normalization process 404, only one information amount among the information amounts of the ACPI information 401, the I / O statistical information 402, and the activation process information 403 may be normalized to obtain the system monitoring value 211. The journaling policy control unit 204 may derive a journaling level from the operation state correspondence management table 212 based on the normalized system monitoring value 211. In this case, for example, when the journaling policy control unit 204 detects from the ACPI information 401 that it is in the power saving state, the journaling policy control unit 204 can determine to decrease the journaling level. Note that the power saving state referred to here is a state in which some of the functions of the information processing apparatus 100 are temporarily stopped. In addition, when the journaling policy control unit 204 detects from the I / O statistical information 402 that the I / O access amount is lower than a predetermined access amount, the journaling policy control unit 204 can determine to increase the journaling level. . Note that the CPU 101 can set an access amount threshold value in advance according to a user instruction received via the operation unit or the like. Furthermore, the journaling policy control unit 204 can perform arithmetic processing between the information amounts of the ACPI information 401, the I / O statistical information 402, and the startup process information 403 by normalizing with the normalization processing 404. become.
The weighting process 405 is a process for adjusting the weighting of each information amount after normalization in the normalization process 404. The value calculated by the journaling policy control unit 204 by performing the addition process 406 on the weighted information amount is the system monitoring value 211. The journaling policy control unit 204 can acquire a journaling level based on a plurality of input information by searching the operation state correspondence management table 212 based on the calculated system monitoring value 211 (first search). .

重み付け処理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 weighting process 405 and the content of the operation state correspondence management table 212 may be changed according to the usage mode of the information processing apparatus 100. For example, the journaling policy control unit 204 increases the weight of the I / O statistical information 402 more than others and adjusts the relationship with the operation state correspondence management table 212 so that the writing amount is larger than a predetermined amount. Can control the upper limit of the journaling level to 2. Note that the CPU 101 can set a threshold for the writing amount in advance according to a user instruction received via the operation unit or the like. Further, the journaling policy control unit 204 sets the journaling level to 0 in the power saving state by making the weighting of the ACPI information 401 larger than others and adjusting the relationship with the operation state correspondence management table 212. You can control. When no weighting is required, the journaling policy control unit 204 does not perform the weighting process 405 or performs the same weighting on each parameter in the weighting process 405, thereby achieving the same effect as when no weighting is required. Can be obtained.
As described above, the journaling policy control unit 204 calculates the system monitoring value 211 by the above-described method, and further searches the operation state correspondence management table 212 based on the calculated system monitoring value 211 to derive the journaling level. it can. Then, the journaling policy control unit 204 notifies the journal log control unit 208 of the derived journaling level as a journaling policy. Note that the timing notified by the journaling policy control unit 204 may be triggered by periodic execution by a timer or may be triggered by a predetermined event. Note that the CPU 101 can set a timer to be triggered in advance according to a user instruction received via the operation unit or the like. Similarly, the CPU 101 can set event information as a trigger in advance according to a user instruction received via the operation unit or the like.

次に、図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 information processing apparatus 100 according to the present embodiment starts up to when journaling is performed to reach a steady state.
In S600, when the information processing apparatus 100 is powered on, the processing of this flowchart is started.
In S601, the OS of the information processing apparatus 100 mounts the journaling file system 203, and the process proceeds to S602. That is, the OS of the information processing apparatus 100 recognizes the journaling file system 203, and the journaling file system 203 is in a running state.
In step S <b> 602, the journaling policy control unit 204 notifies the journal log control unit 208 of a predetermined default journaling level immediately after activation of the information processing apparatus 100 as a journaling policy. It is assumed that information regarding the default journaling level is stored in advance in the secondary storage device 104 or the like. Further, the CPU 101 can change information on the default journaling level according to a user instruction received via the operation unit or the like. Here, the information processing apparatus 100 shifts to a steady state. In addition, the steady state here is a state in which all functions of the information processing apparatus 100 are activated. In the steady state, the processes of S603 and S604 are executed in parallel.
In step S603, the journaling policy control unit 204 derives a journaling policy by the method described with reference to FIG. To do.
In step S604, the journal log recording unit 209 records a journal log for each transaction. Details of the process of S604 will be described later with reference to FIG.
With the above processing, the information processing apparatus 100 can dynamically control the journaling level in units of transactions according to the state of the own apparatus.

次に、図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 log control unit 208 creates a new transaction and advances the process to S701. Thereafter, the journal log control unit 208 manages the transaction being created.
In S701, the journal log control unit 208 creates a journal log based on the journaling policy notified from the journaling policy control unit 204, and advances the process to S702.
In S702, the journal log recording unit 209 records the journal log created by the journal log control unit 208 in the journaling area 210, and advances the process to S703.
In step S <b> 703, the journal log control unit 208 shares the file update state with the file system core unit 207 and determines whether the transaction can be terminated. More specifically, the journal log control unit 208 and the file system core unit 207 determine that the transaction can be terminated if the consistency between the file operation and the journal operation is maintained. In S703, when the journal log control unit 208 determines that the transaction can be ended, the process proceeds to S704. When the journal log control unit 208 determines that the transaction cannot be ended, the process returns to S701.
In step S704, the journal log control unit 208 ends the transaction. Then, the journal log recording unit 209 records the remaining journal logs in the journaling area 210.
Through the above processing, the information processing apparatus 100 can create a journal log for each transaction based on the journaling policy, and record the created journal log in the journaling area 210.

以上、本実施形態によれば、情報処理装置100は、自装置の状態に応じてジャーナリングレベルをトランザクション単位で動的に制御することができる。そして、情報処理装置100は、前記ジャーナリングレベルに基づいてトランザクション単位で作成したジャーナルログをジャーナリング領域210へ記録することができる。これにより、情報処理装置100は、ジャーナリングファイルシステムによる処理において、パフォーマンスや電力消費を改善させることができる。   As described above, according to the present embodiment, the information processing apparatus 100 can dynamically control the journaling level in units of transactions according to the state of the own apparatus. The information processing apparatus 100 can record a journal log created for each transaction based on the journaling level in the journaling area 210. Thereby, the information processing apparatus 100 can improve performance and power consumption in the processing by the journaling file system.

<実施形態2>
実施形態1で述べたように、情報処理装置100のジャーナリングポリシ制御部204は、システム監視値211を算出し、算出したシステム監視値211に基づいて動作状態対応管理テーブル212を検索することで、ジャーナリングポリシを導出する。そして、ジャーナルログ制御部208は、導出したジャーナリングポリシに基づいてジャーナルログを作成する。更に、ジャーナルログ記録部209は、ジャーナルログ制御部208により作成されたジャーナルログをジャーナリング領域210へ記録する。
ここで、実施形態1のopen関数を利用する場合、全てのタスクにおける書き込みアクセスは、情報処理装置100で一意のジャーナリングポリシに準じたジャーナリングレベルになる。しかし、一部のタスクでは、それが望ましくない場合がある。例えば、商業印刷で用いる情報処理装置では、原稿ファイルのサイズが非常に大きくなるため、二次記憶装置への書き込みに多くの時間を費やす。そのため、書き込み中に障害が発生した場合は障害の影響を受けやすくなるが、原稿内容は大変重要なデータであるため、消失を防がなければならない。こういった重要なタスクに関しては、情報処理装置100で一意のジャーナリングポリシに準ずるのではなく、例えば常にジャーナリングレベル3で処理が行われる方が望ましい。以下では、このような要件に対する実施形態について説明する。
<Embodiment 2>
As described in the first exemplary embodiment, the journaling policy control unit 204 of the information processing apparatus 100 calculates the system monitoring value 211 and searches the operation state correspondence management table 212 based on the calculated system monitoring value 211. Deriving a journaling policy. The journal log control unit 208 creates a journal log based on the derived journaling policy. Further, the journal log recording unit 209 records the journal log created by the journal log control unit 208 in the journaling area 210.
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 information processing apparatus 100. However, for some tasks it may not be desirable. For example, in an information processing apparatus used for commercial printing, the size of a document file becomes very large, so that a lot of time is spent on writing to a secondary storage device. For this reason, if a failure occurs during writing, it is likely to be affected by the failure, but since the contents of the document are very important data, the loss must be prevented. For such an important task, it is desirable that processing is always performed at the journaling level 3, for example, instead of following the journaling policy unique to the information processing apparatus 100. In the following, embodiments for such requirements will be described.

図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 information processing apparatus 100 according to the present embodiment.
8 includes an image processing task 901, a document processing task 902, a journaling file system 903, a journaling policy control unit 904, a primary storage device 102, and a secondary storage device 104.
The journaling file system 903 includes a file system core unit 907, a journal log control unit 908, a journal log recording unit 909, a journal log reflection unit 913, and an individual journaling level management table 918.
The primary storage device 102 has a system monitoring value 911.
The secondary storage device 104 includes a journaling area 910, a data area 914, and an operation state correspondence management table 912. The journaling area 910 includes a level 1 area 915, a level 2 area 916, and a level 3 area 917.
Here, the image processing task 901, the journaling policy control unit 904, the primary storage device 102, the secondary storage device 104, the system monitoring value 911, the operation state correspondence management table 912, and the data area 914 are the same as in the first embodiment. The description is omitted.

以下、主に実施形態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 image processing task 901 and the manuscript processing task 902 make file operation requests to the journaling file system 903, but the requesting methods are different. Since the case of the image processing task 901 is the same as that of the first embodiment, the description thereof is omitted. In the case of the manuscript processing task 902, an open2 function having a format of open2 (filename, flags, journal level) is used on the program. In the argument of the function, the file name of the file accessing filename, the mode when accessing flags (whether only reading or writing is performed), and the journaling level are specified in journallevel. When the Open2 function is called, the file system core unit 907 newly assigns a file identifier for identifying the file operation. Further, the file system core unit 907 updates the individual journaling level management table 918 in order to manage the correspondence between the journaling level passed by the open2 function and the file identifier.

図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 log control unit 908 can determine the journaling method corresponding to the journaling level (second determination) by searching the individual journaling level management table 918 based on the file identifier.
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 journaling file system 903 are made using the file identifier.
The file system core unit 907 and the journal log control unit 908 maintain the consistency between the file operation and the journal operation by sharing the update state of the file. The journal log control unit 908 searches for a file identifier (second search) from the individual journaling level management table 918 when starting a transaction. Then, if the file identifier can be identified, the journal log control unit 908 creates a journal log based on the corresponding journaling level. On the other hand, if the file identifier cannot be specified, the journal log control unit 908 creates a journal log based on the latest journaling policy.

ジャーナリング領域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 journaling area 910 is divided into areas for each journaling level (for each management method). More specifically, the journaling area 910 is divided into a level 1 area 915, a level 2 area 916, and a level 3 area 917. Here, the level 1 area 915 is a storage area in which journaling level 1 journal logs are recorded. The level 2 area 916 is a storage area for recording journaling level 2 journal logs. The level 3 area 917 is a storage area for recording journaling level 3 journal logs. Each of the level 1 area 915, the level 2 area 916, and the level 3 area 917 is included in the internal configuration shown in FIG.
The journal log recording unit 909 records the journal log in a journaling area that matches the journaling journaling level. In addition, the transaction identification ID set in the descriptor block 304 of each journaling area in the transaction section is the same.
The journal log reflection unit 913 reflects the effective portion of the journal log in the journaling area 910 in the data area 914. Here, the journal log reflecting unit 913 reflects the data in the data area 914 in ascending order from the transaction identification IDs described in the descriptor blocks 304 of all journaling areas. If the same transaction identification ID is found in a plurality of journaling areas, the journal log reflection unit 913 operates the transactions with the transaction identification IDs after that until all the journaling areas are reflected. must not.

次に、図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 information processing apparatus 100 is turned on until it reaches a steady state is the same as that in FIG.
FIG. 10 is a flowchart showing an example of a transaction cycle process in S604 of FIG.
In step S800, the journal log control unit 908 creates a new transaction and advances the process to step S801. Thereafter, the journal log control unit 908 manages the transaction being created.
In step S <b> 801, the journal log control unit 908 searches the individual journaling level management table 918 for the file identifier described above, and determines whether a matching file identifier exists. In S801, if the journal log control unit 908 determines that there is a matching file identifier, the process proceeds to S803. If the journal log control unit 908 determines that there is no matching file identifier, the process proceeds to S802.
In step S802, the journal log control unit 908 creates a journal log based on the journaling level acquired from the individual journaling level management table 918, and advances the process to step S804.
In step S803, the journal log control unit 908 creates a journal log based on the journaling policy notified from the journaling policy control unit 904, and advances the process to step S804.

S804において、ジャーナルログ記録部909は、ジャーナリング領域910の中のジャーナリングレベルに合ったジャーナリング領域へジャーナルログを記録し、処理をS805へ進める。
S805において、ジャーナルログ制御部908は、ファイルの更新状態をファイルシステムコア部907と共有し、トランザクションを終了可能か否か判定し、トランザクションを終了可能と判定した場合、処理をS806に進める。一方、S805において、ジャーナルログ制御部908は、トランザクションを終了可能でないと判定した場合、処理をS801に戻す。なお、S805の処理は、図7のS703の処理と同様であるため、詳細な説明を省略する。
S806において、ジャーナルログ制御部908は、トランザクションを終了する。そして、ジャーナルログ記録部909は、残りのジャーナルログをジャーナリング領域910へ記録する。
以上の処理により、情報処理装置100は、処理内容に応じたジャーナリングレベルに基づき、トランザクション単位でジャーナルログを作成し、作成したジャーナルログをジャーナリングレベルに応じた記録領域に記録することができる。
In step S804, the journal log recording unit 909 records the journal log in the journaling area that matches the journaling level in the journaling area 910, and advances the process to step S805.
In step S805, the journal log control unit 908 shares the file update state with the file system core unit 907, determines whether or not the transaction can be ended, and proceeds to step S806 if it determines that the transaction can be ended. On the other hand, if the journal log control unit 908 determines in step S805 that the transaction cannot be terminated, the process returns to step S801. Note that the processing in S805 is the same as the processing in S703 in FIG.
In step S806, the journal log control unit 908 ends the transaction. Then, the journal log recording unit 909 records the remaining journal logs in the journaling area 910.
Through the above processing, the information processing apparatus 100 can create a journal log for each transaction based on the journaling level corresponding to the processing content, and record the created journal log in a recording area corresponding to the journaling level.

以上、本実施形態によれば、情報処理装置100は、自装置の状態によらず、処理内容に応じたジャーナリングレベルに基づいてジャーナルログを作成することができる。即ち、情報処理装置100は、クリティカルなデータを処理する場合、自装置の状態に基づくジャーナリングレベルではなく、処理内容に応じたジャーナリングレベルに基づいて処理を行うことができる。また、情報処理装置100は、処理内容に応じて同時に複数のジャーナリング方式を利用することができる。更に、情報処理装置100は、作成したジャーナルログをジャーナリングレベルに応じた記録領域に記録することができる。これにより、情報処理装置100は、二次記憶装置104を有効活用しながら効率的な処理を実現することができる。   As described above, according to the present embodiment, the information processing apparatus 100 can create a journal log based on the journaling level corresponding to the processing content regardless of the state of the own apparatus. That is, when processing critical data, the information processing apparatus 100 can perform processing based on the journaling level corresponding to the processing content, not the journaling level based on the state of the own apparatus. Further, the information processing apparatus 100 can use a plurality of journaling methods at the same time according to the processing content. Furthermore, the information processing apparatus 100 can record the created journal log in a recording area corresponding to the journaling level. As a result, the information processing apparatus 100 can realize efficient processing while effectively using the secondary storage device 104.

<その他の実施形態>
また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(又は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:
前記決定手段は、前記情報処理装置の状態に基づいて、前記管理方式を処理単位毎に決定する第1の決定手段を有することを特徴とする請求項1記載の情報処理装置。   The information processing apparatus according to claim 1, wherein the determination unit includes a first determination unit that determines the management method for each processing unit based on a state of the information processing apparatus. 前記決定手段は、前記管理方式に係る管理方式情報が指定された場合、前記指定された管理方式情報に基づいて、前記管理方式を処理単位毎に決定する第2の決定手段を更に有することを特徴とする請求項2記載の情報処理装置。   The determination means further includes second determination means for determining the management method for each processing unit based on the specified management method information when management method information related to the management method is specified. The information processing apparatus according to claim 2. 前記第1の決定手段は、入力情報に基づいて前記情報処理装置の状態に係る監視値を処理単位毎に算出する算出手段を有し、
前記決定手段は、前記算出手段により算出された監視値に基づいて、前記管理方式を決定することを特徴とする請求項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.
前記算出手段は、入力情報が複数ある場合、各入力情報に対して重み付けをし、前記重み付けをした入力情報に基づいて前記監視値を処理単位毎に算出することを特徴とする請求項4記載の情報処理装置。   5. The calculation unit according to claim 4, wherein when there are a plurality of pieces of input information, each input information is weighted, and the monitoring value is calculated for each processing unit based on the weighted input information. Information processing device. 前記第2の決定手段は、前記管理手段の処理を識別する識別情報に対応する管理方式情報を検索し、前記管理方式情報に基づいて、前記管理方式を決定することを特徴とする請求項3記載の情報処理装置。   4. The second determination unit searches for management method information corresponding to identification information for identifying processing of the management unit, and determines the management method based on the management method information. The information processing apparatus described. 前記第2の決定手段は、前記管理方式情報が検索されたか否かを判定する判定手段を更に有し、
前記判定手段により管理方式情報が検索されたと判定された場合、処理単位毎の管理方式を、前記検索された管理方式情報に対応する管理方式に決定し、前記判定手段により管理方式情報が検索されなかったと判定された場合、処理単位毎の管理方式を、前記第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乃至7何れか1項記載の情報処理装置。   The information processing apparatus according to claim 1, wherein the recording unit records the history information created by the creating unit in a storage area that is different for each management method. 前記管理手段は、ジャーナリングファイルシステムであり、
前記管理方式は、ジャーナリング方式であり、
前記履歴情報は、ジャーナルログであることを特徴とする請求項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
JP2013174951A 2013-08-26 2013-08-26 Information processing apparatus, information processing method, and program Expired - Fee Related JP6292796B2 (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

Patent Citations (2)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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