JP2015185024A - File system management device, control method of file system management device, and control program - Google Patents

File system management device, control method of file system management device, and control program Download PDF

Info

Publication number
JP2015185024A
JP2015185024A JP2014062529A JP2014062529A JP2015185024A JP 2015185024 A JP2015185024 A JP 2015185024A JP 2014062529 A JP2014062529 A JP 2014062529A JP 2014062529 A JP2014062529 A JP 2014062529A JP 2015185024 A JP2015185024 A JP 2015185024A
Authority
JP
Japan
Prior art keywords
block
blocks
group
file system
empty
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2014062529A
Other languages
Japanese (ja)
Inventor
洋平 福田
Yohei Fukuda
洋平 福田
和也 山崎
Kazuya Yamazaki
和也 山崎
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.)
Sharp Corp
Original Assignee
Sharp Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sharp Corp filed Critical Sharp Corp
Priority to JP2014062529A priority Critical patent/JP2015185024A/en
Publication of JP2015185024A publication Critical patent/JP2015185024A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To shorten processing time of data processing.SOLUTION: A file system management device includes: a block specifying part (23) for specifying a write block which is a block where data is written, and a part of an empty block which is a block where the data are not written, among a plurality of blocks; and a file processing part (24) for performing common data processing including at least either of reading or writing with respect to all of the specified blocks.

Description

本発明は、ブロック毎に管理されるデータ構造を持つファイルシステムを管理するファイルシステム管理装置等に関する。   The present invention relates to a file system management apparatus for managing a file system having a data structure managed for each block.

近年、データを管理する手法として、ブロック単位で管理され、複数のブロックを含むグループ単位で管理情報を有するファイルシステムが使用されている(非特許文献1、2)。このようなデータ構造を有するファイルシステムにおいて、ディスクのミラーリングを高速化する技術が特許文献1に記載されている。特許文献1に記載された技術では、ブロックごとに使用中であるか、空いているかをビットマップテーブルを用いて判定し、使用されているブロックのみミラーリングの対象とするものである。   In recent years, as a method for managing data, file systems that are managed in units of blocks and have management information in units of groups including a plurality of blocks have been used (Non-Patent Documents 1 and 2). In a file system having such a data structure, Patent Document 1 discloses a technique for speeding up disk mirroring. In the technique described in Patent Document 1, it is determined whether each block is in use or free by using a bitmap table, and only the used block is subject to mirroring.

また、特許文献2には、特許文献1と同様の方法を用い、使用されているブロックのみ暗号化の対象とする技術が開示されている。   Patent Document 2 discloses a technique that uses the same method as Patent Document 1 and encrypts only used blocks.

特開2005−284980号公報(2005年10月13日公開)Japanese Patent Laying-Open No. 2005-284980 (released on October 13, 2005) 特開2009−15357号公報(2009年1月22日公開)JP 2009-15357 A (released January 22, 2009)

Ext4 (and Ext2/Ext3) Wiki [online]、[平成26年3月7日検索]、インターネット〈URL:https://ext4.wiki.kernel.org〉Ext4 (and Ext2 / Ext3) Wiki [online], [Search March 7, 2014], Internet <URL: https://ext4.wiki.kernel.org> Proceedings of the Linux Symposium July 23rd-26th, 2008 Ottawa, Ontario Canada [online]、[平成26年3月7日検索]、インターネット〈URL:http://ols.fedoraproject.org/OLS/Reprints-2008/kumar-reprint.pdf)Proceedings of the Linux Symposium July 23rd-26th, 2008 Ottawa, Ontario Canada [online], [March 7, 2014 search], Internet <URL: http://ols.fedoraproject.org/OLS/Reprints-2008/ (kumar-reprint.pdf)

一般的に、読み出しおよび書き込みを含むデータ処理は、読み出しおよび書き込みの回数が多くなり、処理対象のデータ量が大きくなるほど、処理時間が増大する。   In general, in data processing including reading and writing, the number of times of reading and writing increases, and the processing time increases as the amount of data to be processed increases.

そして、上記特許文献1、2の技術は、使用されているブロックのみをミラーリングまたは暗号化の対象とするため、使用中のブロックと空きブロックとの配置によっては、ブロックの読み出しおよび書き込みの回数が増えてしまうため、処理時間が増大してしまう可能性がある。例えば、図12(b)の「Group3」に示すように、使用中のブロック(“Used”で示す)と空きブロック(“Free”で示す)とが交互に配置されている場合に使用されているブロックのみ(S〜S)を処理対象とすると、読み出しおよび書き込みの回数が増えてしまう。 And since the technique of the said patent documents 1 and 2 makes only the used block the object of mirroring or encryption, depending on arrangement | positioning of the block in use and an empty block, the frequency | count of reading and writing of a block may be sufficient. Since it increases, processing time may increase. For example, as shown in “Group 3” in FIG. 12B, used blocks (indicated by “Used”) and empty blocks (indicated by “Free”) are alternately arranged. If only the existing blocks (S 1 to S 4 ) are processed, the number of times of reading and writing will increase.

また、グループ全体をミラーリングまたは暗号化の対象とすると、読み出しおよび書き込みの回数は最小となるが、対象となるデータ量が最大となるため、やはり処理時間が増大してしまう可能性がある。例えば、図12(a)の「Group3」に示すように、グループ全体(Sgroup)を処理対象とすると処理対処となるデータ量が最大となってしまう。 Further, when the entire group is a target of mirroring or encryption, the number of times of reading and writing is minimized, but the amount of data to be targeted is maximized, so that the processing time may also increase. For example, as shown in “Group 3” in FIG. 12A, if the entire group (S group ) is a processing target, the amount of data to be processed is maximized.

本発明は、上記課題に鑑みてなされたものであり、その目的は、読み出しおよび書き込みの少なくとも何れかを含むデータ処理の処理時間を短縮するファイルシステム管理装置等を実現することにある。   The present invention has been made in view of the above problems, and an object thereof is to realize a file system management apparatus or the like that shortens the processing time of data processing including at least one of reading and writing.

上記の課題を解決するために、本発明の一態様に係るファイルシステム管理装置は、ブロック毎に管理されるデータ構造を持つファイルシステムを管理するファイルシステム管理装置において、複数の上記ブロックのうち、データが書き込まれているブロックである書き込みブロックと、データが書き込まれていないブロックである空きブロックの一部とを特定するブロック特定手段と、上記ブロック特定手段が特定した上記ブロックの全てに対し、読み出しおよび書き込みの少なくとも何れかを含む、共通のデータ処理を実行するデータ処理実行手段と、を備えている。   In order to solve the above problems, a file system management apparatus according to an aspect of the present invention is a file system management apparatus that manages a file system having a data structure managed for each block. A block specifying means for specifying a writing block that is a block in which data is written and a part of an empty block that is a block to which data is not written, and for all of the blocks specified by the block specifying means, Data processing execution means for executing common data processing including at least one of reading and writing.

本発明の一態様によれば、全てのブロックに対しデータ処理を実行する場合と比較して、データ処理量を減らすことができるという効果を奏する。また、空きブロックの一部もデータ処理の実行対象とするので、書き込みブロックのみに対しデータ処理を実行する場合と比較して、データ処理のための読み出しおよび書き込みの回数を減らすことができるという効果を奏する。そして、データ処理量、読み出しおよび書き込み回数を減らすことができるので、データ処理を効率化することができるとともに、処理時間を短縮することができるという効果を奏する。   According to one aspect of the present invention, it is possible to reduce the amount of data processing as compared with the case where data processing is executed on all blocks. In addition, since some of the free blocks are also subject to data processing, the number of reads and writes for data processing can be reduced compared to the case where data processing is performed only on write blocks. Play. Since the amount of data processing and the number of reads and writes can be reduced, the data processing can be made more efficient and the processing time can be shortened.

本発明の実施形態に係る情報処理装置の要部構成を示すブロック図である。It is a block diagram which shows the principal part structure of the information processing apparatus which concerns on embodiment of this invention. 上記情報処理装置で用いるテーブルを示す図であり、(a)はビットマップテーブルを示す図であり、(b)は第1管理テーブルを示す図であり、(c)は第2管理テーブルを示す図である。It is a figure which shows the table used with the said information processing apparatus, (a) is a figure which shows a bitmap table, (b) is a figure which shows a 1st management table, (c) shows a 2nd management table. FIG. 上記情報処理装置における処理の内容を説明するための図であり、(a)は各処理態様におけるデータ量、回数、時間を示す図であり、(b)は最大空き領域がグループの末尾にある場合を示す図であり、(c)は最大空き領域がグループの末尾以外にある場合を示す図である。It is a figure for demonstrating the content of the process in the said information processing apparatus, (a) is a figure which shows the data amount in each process aspect, the frequency | count, and time, (b) is the largest empty area at the end of a group It is a figure which shows a case, (c) is a figure which shows the case where the largest empty area exists in the other than the end of a group. 上記情報処理装置における暗号化処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the encryption process in the said information processing apparatus. 第1暗号化処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a 1st encryption process. 第2暗号化処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a 2nd encryption process. 第1暗号化処理を説明するための図であり、(a)は第1管理テーブルの作成を示す図であり、(b)はファイル追加を示す図であり、(c)はファイル削除を示す図であり、(d)は暗号化処理を示す図である。It is a figure for demonstrating a 1st encryption process, (a) is a figure which shows preparation of a 1st management table, (b) is a figure which shows file addition, (c) shows file deletion. It is a figure and (d) is a figure which shows an encryption process. 第2暗号化処理を説明するための図であり、(a)は第1管理テーブルの作成を示す図であり、(b)はファイル追加を示す図であり、(c)はファイル削除を示す図であり、(d)は暗号化処理を示す図である。It is a figure for demonstrating a 2nd encryption process, (a) is a figure which shows preparation of a 1st management table, (b) is a figure which shows file addition, (c) shows file deletion. It is a figure and (d) is a figure which shows an encryption process. 上記情報処理装置におけるミラーリング処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the mirroring process in the said information processing apparatus. 第1ミラーリング処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a 1st mirroring process. 第2ミラーリング処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a 2nd mirroring process. 本発明の課題を説明するための図であり、(a)はグループ全体を処理対象とする場合を示す図であり、(b)は使用されているブロックのみを処理対象とする場合を示す図である。It is a figure for demonstrating the subject of this invention, (a) is a figure which shows the case where the whole group is made into a process target, (b) is a figure which shows the case where only the used block is made into a process target. It is.

〔実施形態1〕
〔概要〕
以下、本発明の実施の形態について、図1〜図8を参照して説明する。本実施形態に係る情報処理装置(ファイルシステム管理装置)1は、ブロックごとに管理され、複数のブロックを含むグループ毎に管理情報を有するファイルシステムを処理する装置である。なお、本実施形態では、情報処理装置1について、表示部12、操作受付部13、および通信部14を備えた携帯情報端末を前提としているが、これに限られるものではない。これらの部材は必須ではなく、上述したファイルシステムを処理する装置であれば、どのようなものであってもよい。
Embodiment 1
〔Overview〕
Embodiments of the present invention will be described below with reference to FIGS. An information processing apparatus (file system management apparatus) 1 according to the present embodiment is an apparatus that processes a file system that is managed for each block and that has management information for each group including a plurality of blocks. In the present embodiment, the information processing apparatus 1 is assumed to be a portable information terminal including the display unit 12, the operation receiving unit 13, and the communication unit 14, but is not limited thereto. These members are not essential, and any device can be used as long as it is a device that processes the file system described above.

本実施形態に係る情報処理装置1は、ブロックの使用状態に応じて適切な処理対象ブロックを特定することにより、処理時間を短縮するものである。より詳細には、使用されているブロック数に応じて処理対象となるブロックを異ならせることにより、ブロックの使用状態がどのようになっていても、処理時間を短縮するものである。   The information processing apparatus 1 according to the present embodiment shortens the processing time by specifying an appropriate processing target block according to the use state of the block. More specifically, the processing time is shortened by changing the block to be processed in accordance with the number of used blocks, regardless of the block usage state.

〔情報処理装置1の構成〕
図1に、情報処理装置1の要部構成を示すブロック図を示す。図1に示すように、情報処理装置1は、制御部10、記憶部11、表示部12、操作受付部13、通信部14、およびRAM26を含む構成である。
[Configuration of Information Processing Apparatus 1]
FIG. 1 is a block diagram showing a main configuration of the information processing apparatus 1. As illustrated in FIG. 1, the information processing apparatus 1 includes a control unit 10, a storage unit 11, a display unit 12, an operation reception unit 13, a communication unit 14, and a RAM 26.

記憶部11はディスク31を含み、ディスク31にはファイルシステム32が格納されている。なお、ここでは、ディスク31は1個となっているが、個数はこれに限られるものではなくいくつであってもよい。記憶部11は、フラッシュメモリ、ROM(Read Only Memory)などの不揮発性の記憶装置により構成される。また、記憶部11には処理対象となるデータの他、各種プログラム、各種動作設定値、各種データなどが格納されている。   The storage unit 11 includes a disk 31, and a file system 32 is stored in the disk 31. Although the number of the disks 31 is one here, the number is not limited to this, and any number may be used. The storage unit 11 includes a nonvolatile storage device such as a flash memory or a ROM (Read Only Memory). In addition to the data to be processed, the storage unit 11 stores various programs, various operation setting values, various data, and the like.

ファイルシステム32は、ブロックごとに管理され、複数のブロックを含むグループ毎に管理情報が含まれるデータ構造であり、ビットマップテーブル33およびデータ34を含む。ビットマップテーブル33は、データ34の使用状態を管理するものであり、データ34の構成を示す。図2(a)に、ビットマップテーブル33の例を示す。図2(a)に示す例では、ブロックが「#1〜#N」まであり、グループが「Group1〜Group3」まである。そして、Group1のブロック#1、#2は、使用中(「1」で示す)であり、ブロック#3、#4、#5、#6、#Nは空き(「0」で示す)であることが示されている。同様に、Group2のブロック#5、#6は、使用中であり、ブロック#1〜#4、#Nは空きであることが示されている。また、Group3のブロック#1、#2、#4は、使用中であり、ブロック#3、#5、#6、#Nは空きであることが示されている。   The file system 32 is a data structure managed for each block and including management information for each group including a plurality of blocks, and includes a bitmap table 33 and data 34. The bitmap table 33 manages the usage state of the data 34 and indicates the configuration of the data 34. An example of the bitmap table 33 is shown in FIG. In the example illustrated in FIG. 2A, there are blocks from “# 1 to #N” and groups from “Group1 to Group3”. Blocks # 1 and # 2 of Group 1 are in use (indicated by “1”), and blocks # 3, # 4, # 5, # 6, and #N are empty (indicated by “0”). It has been shown. Similarly, blocks # 5 and # 6 of Group 2 are in use, and blocks # 1 to # 4 and #N are empty. Further, it is indicated that blocks # 1, # 2, and # 4 of Group 3 are in use, and blocks # 3, # 5, # 6, and #N are free.

RAM26は、揮発性の記憶装置であり、第1管理テーブル27および第2管理テーブル28を含む。図2(b)に第1管理テーブル27の例を、(c)に第2管理テーブル28の例を示す。図2(b)に示すように第1管理テーブル27は、それぞれのグループにおいて、末尾から続いている空きブロックがどこまであるかを示している(free block number)。図2(b)の例では、Group1については、末尾からブロック#3まで空きブロックが続いていることを示している。また、Group2については、末尾からブロック#15まで、Group3については、末尾からブロック#16まで空きブロックが続いていることを示している。   The RAM 26 is a volatile storage device and includes a first management table 27 and a second management table 28. FIG. 2B shows an example of the first management table 27, and FIG. 2C shows an example of the second management table 28. As shown in FIG. 2B, the first management table 27 indicates how many free blocks continue from the end in each group (free block number). In the example of FIG. 2B, the Group 1 indicates that empty blocks continue from the end to the block # 3. Further, Group 2 indicates that an empty block continues from the end to block # 15, and Group 3 indicates that an empty block continues from the end to block # 16.

また、図2(c)に示すように第2管理テーブル28は、それぞれのグループにおいて、続いている空きブロック数が最大の位置(max_free_block)と、空きブロックの位置(free block_1_start~end等)とを示している。   Further, as shown in FIG. 2 (c), the second management table 28 includes a position where the number of consecutive free blocks (max_free_block) and a position of a free block (such as free block_1_start to end) in each group. Is shown.

図2(c)の例では、Group1については、ブロック#3〜#18までが空きブロックであり、この連続しているブロック#3〜#18が、続いている空きブロック数が最大であることを示している。また、Group2については、ブロック#1〜#4、#12〜#13が空きブロックであり、連続しているブロック#1〜#4(free_block_2)が、続いている空きブロック数が最大であることを示している。また、Group3については、ブロック#3、#5〜#6、…が空きブロックであり、(free_block_5)が示す連続しているブロックが、続いている空きブロック数として最大であることを示している。   In the example of FIG. 2C, for Group 1, blocks # 3 to # 18 are empty blocks, and the continuous blocks # 3 to # 18 have the largest number of free blocks that continue. Is shown. For Group 2, blocks # 1 to # 4 and # 12 to # 13 are empty blocks, and consecutive blocks # 1 to # 4 (free_block_2) have the largest number of free blocks. Is shown. For Group 3, blocks # 3, # 5 to # 6,... Are free blocks, and the continuous block indicated by (free_block_5) is the maximum number of continuous free blocks. .

制御部10は、ファイルシステム32に対する読み出しおよび書き込みを含むデータ処理(例えば、暗号化処理)を実行するとともに、情報処理装置1における各種処理を実行するものである。制御部10は、ビットマップテーブル作成部21、空きブロック数判定部(空きブロック数判定手段)22、ブロック特定部(ブロック特定手段)23、ファイル処理部(データ処理実行手段)24、および管理テーブル作成部25を含む。   The control unit 10 executes data processing (for example, encryption processing) including reading and writing with respect to the file system 32 and executes various processes in the information processing apparatus 1. The control unit 10 includes a bitmap table creation unit 21, a free block number determination unit (free block number determination unit) 22, a block identification unit (block identification unit) 23, a file processing unit (data processing execution unit) 24, and a management table A creation unit 25 is included.

ビットマップテーブル作成部21は、データ34について、グループ毎にどのブロックが使用中でどのブロックが空きであるのかを確認し、ビットマップテーブル33を作成してディスク31に格納する。   The bitmap table creation unit 21 confirms which block is in use and which block is free for each group of data 34, creates a bitmap table 33, and stores it in the disk 31.

空きブロック数判定部22は、ビットマップテーブル33から、データ34の空きブロック数をグループ毎に計数し、第1所定値を超えるか否かを判定する。そして、判定した結果をブロック特定部23に通知する。   The free block number determination unit 22 counts the number of free blocks of the data 34 from the bitmap table 33 for each group, and determines whether or not the first predetermined value is exceeded. Then, the block determination unit 23 is notified of the determined result.

ブロック特定部23は、ファイル処理部24が処理対象とするブロックをグループ毎に特定し、特定したブロックをファイル処理部24へ通知する。より詳細には、空きブロック数判定部22より通知された判定結果が、第1所定値を超えないという場合、使用中のブロックのみを特定してファイル処理部24へ通知する。また、空きブロック数判定部22より通知された判定結果が、第1所定値以上という場合、第2管理テーブル28を参照して、連続する空きブロック数のうち最大のものが、第2所定値を超えるかどうかを判定する。そして第2所定値を超えない場合、第1管理テーブル27を参照して、グループ毎に末尾から連続する空きブロックを特定し、ファイル処理部24へ通知する。また、第2所定値以上の場合、第2管理テーブル28を参照して、グループ毎に連続する空きブロックのうち、最大のものを特定し、ファイル処理部24へ通知する。   The block specifying unit 23 specifies a block to be processed by the file processing unit 24 for each group, and notifies the file processing unit 24 of the specified block. More specifically, when the determination result notified from the free block number determination unit 22 does not exceed the first predetermined value, only the block in use is specified and notified to the file processing unit 24. Further, when the determination result notified from the free block number determination unit 22 is equal to or greater than the first predetermined value, referring to the second management table 28, the largest number of consecutive free blocks is the second predetermined value. Judge whether to exceed. If the second predetermined value is not exceeded, the first management table 27 is referred to identify a free block continuous from the end for each group, and notify the file processing unit 24 of it. If the value is equal to or greater than the second predetermined value, the second management table 28 is referenced to identify the largest free block that is continuous for each group and notify the file processing unit 24 of it.

ファイル処理部24は、ブロック特定部23から通知された、特定されたブロックに対し、処理(暗号化処理)を実行する。なお、ここでは、使用中のブロックのみがブロック特定部23から通知され、これらのブロックを暗号化する場合を第3暗号化処理、グループ毎に末尾から連続する空きブロックがブロック特定部23から通知され、これらのブロックを暗号化する場合を第1暗号化処理、グループ毎に連続する空きブロックのうち、最大のものがブロック特定部23から通知され、これらのブロックを暗号化する場合を第2暗号化処理と呼ぶ。また、暗号化処理自体は、公知技術で可能であるので、その説明は省略する。   The file processing unit 24 performs processing (encryption processing) on the identified block notified from the block identifying unit 23. Here, only the blocks in use are notified from the block specifying unit 23, and when these blocks are encrypted, the third encryption processing is performed, and the free blocks continuous from the end for each group are notified from the block specifying unit 23. The first encryption processing is performed when these blocks are encrypted, and the largest one of the free blocks continuous for each group is notified from the block specifying unit 23, and the second encryption is performed when these blocks are encrypted. This is called encryption processing. Further, the encryption process itself can be performed by a known technique, and thus the description thereof is omitted.

管理テーブル作成部25は、ビットマップテーブル33を参照して第1管理テーブル27および第2管理テーブル28を作成し、RAM26へ格納する。   The management table creation unit 25 creates the first management table 27 and the second management table 28 with reference to the bitmap table 33 and stores them in the RAM 26.

表示部12は、各種情報を表示する。表示部12は、LCD、有機ELディスプレイ等により実現できる。操作受付部13は、情報処理装置1に対する各種操作を受け付けるものである。なお、タッチパネル等により表示部12および操作受付部13を共通で実行できる構成であってもよい。通信部14は、情報処理装置1と外部のネットワークとの通信を行う。上述したように、表示部12、操作受付部13、および通信部14は必須の構成ではない。   The display unit 12 displays various information. The display unit 12 can be realized by an LCD, an organic EL display, or the like. The operation reception unit 13 receives various operations on the information processing apparatus 1. In addition, the structure which can perform the display part 12 and the operation reception part 13 in common with a touchscreen etc. may be sufficient. The communication unit 14 performs communication between the information processing apparatus 1 and an external network. As described above, the display unit 12, the operation receiving unit 13, and the communication unit 14 are not essential components.

〔作用・効果〕
上記のように、本実施形態に係る情報処理装置1は、グループに含まれる未使用ブロックの数、および連続する未使用ブロックの大きさによって、暗号化処理の対象となるブロックを特定する方法を異ならせる。これにより、暗号化処理に要する時間を短縮することができる。これについて、図3を参照して説明する。
[Action / Effect]
As described above, the information processing apparatus 1 according to the present embodiment uses a method of specifying a block to be encrypted by the number of unused blocks included in a group and the size of consecutive unused blocks. Make it different. As a result, the time required for the encryption process can be shortened. This will be described with reference to FIG.

図3は、暗号化処理別(ディスク全体を暗号化処理、第3暗号化処理、第1暗号化処理、第2暗号化処理)に、書き込みデータ量、書き込み回数、処理時間を示す図である。なお、図3(a)に示す各パラメータの意味は以下の通りである。
group:1グループのサイズ
max:1回に書き込み可能な最大サイズ
:i番目の連続になっている書き込み領域のサイズ
S’:SをSmaxで割った余りSmax>S’
:SをSmaxで割った商
:SをSmaxで割った余りがある場合1、無い場合0
=a+b:S書き込むのみ必要な書き込み回数
group=Sgroup/Smax:1グループ分書き込みを行うために必要な最小書き込み回数
f(S):Sの書き込みにかかる処理時間
f(Smax):Smaxの書き込みに係る処理時間
例えば、空きブロック(1つでも、連続していてもよい)が、グループの先頭と末尾の2箇所にある場合、S<S、S<S、C<C、C<Cとなり、第3暗号化処理の処理時間が短くなる。
FIG. 3 is a diagram showing the amount of write data, the number of times of writing, and the processing time for each encryption process (encryption process for the entire disk, third encryption process, first encryption process, and second encryption process). . In addition, the meaning of each parameter shown to Fig.3 (a) is as follows.
S group : Size of one group S max : Maximum size writable at one time S i : Size of the i-th continuous writing area S ′ i : Remainder of dividing S i by S max > S ′ i
a i : quotient obtained by dividing S i by S max b i : 1 when there is a remainder when S i is divided by S max , 0 if there is no remainder
C i = a i + b i : Number of times of writing necessary only for S i writing C group = S group / S max : Minimum number of times of writing required for writing for one group f (S i ): It takes to write S i Processing time f (S max ): Processing time related to writing of S max For example, when there are empty blocks (which may be one or continuous) at the top and the bottom of the group, S A <S B , S A <S C , C A <C B , C A <C C , and the processing time of the third encryption process is shortened.

また、使用中ブロックと空きブロックとが交互となっている場合、S<S、S<Sとなり、第3暗号化処理における書き込みデータ量が、第1、第2暗号化処理における書き込みデータ量よりも小さくなる。一方、C>C、C>Cとなるため、第1、第2暗号化処理の方が第3暗号化処理よりも書き込み回数が少なくなる。よって、書き込み回数が増えれば、第1、第2暗号化処理の方が、処理時間が短くなる。 Further, if the used block and the free blocks is in the alternate, S A <S B, S A <S C , and the amount the write data in the third encryption process, in the first, second encryption process It becomes smaller than the amount of write data. On the other hand, since C A > C B and C A > C C , the number of times of writing is smaller in the first and second encryption processes than in the third encryption process. Therefore, if the number of times of writing increases, the processing time is shorter in the first and second encryption processes.

さらに、使用中ブロックと空きブロックとが交互となっている場合で、グループの末尾以外に連続する空きブロックの最大のものがあるとき(図3(c))、常に、第2暗号化処理における書き込みデータ量が小さくなる(S>S)。第1暗号化処理ではグループの末尾以外を暗号化し、第2暗号化処理では連続する空きブロックの最大のもの以外を暗号化するためである。 Further, when the in-use blocks and the empty blocks are alternated, and there is the largest continuous empty block other than the end of the group (FIG. 3C), always in the second encryption process. The amount of write data becomes small (S B > S C ). This is because the first encryption process encrypts data other than the end of the group, and the second encryption process encrypts data other than the largest continuous empty block.

なお、グループの末尾に連続する空きブロックの最大のものがあるときは(図3(b))、第1暗号化処理および第2暗号化処理において、書き込みデータ量の差異はない(S=S)。また、書き込みデータ量が同じ場合、書き込み回数は、常に第1暗号化処理の方が小さくなる(C<C)。 When there is the largest continuous free block at the end of the group (FIG. 3B), there is no difference in the amount of write data between the first encryption process and the second encryption process (S B = S C ). When the amount of write data is the same, the number of writes is always smaller in the first encryption process (C B <C C ).

また、グループの末尾にのみ空きブロック(1つでも、連続していてもよい)がある場合、S=S=S、C=C=Cとなり、書き込みデータ量、書き込み回数ともに同じとなり、書き込みの処理時間も同じとなる(f(S)=f(S)=f(S))。 In addition, when there is an empty block (which may be one or continuous) only at the end of the group, S A = S B = S C , C A = C B = C C , and the amount of write data and the number of writes Both are the same, and the write processing time is also the same (f (S A ) = f (S B ) = f (S C )).

〔暗号化処理の流れ〕
次に、図4〜図8を参照して、情報処理装置1における暗号化処理の流れを説明する。図4〜6は暗号化処理の流れを示すフローチャートである。
[Encryption process flow]
Next, the flow of encryption processing in the information processing apparatus 1 will be described with reference to FIGS. 4 to 6 are flowcharts showing the flow of the encryption process.

図4に示すように、まず、ビットマップテーブル作成部21がデータ34を参照して、ファイルシステム32におけるビットマップテーブル33を作成する(S1)。その後、ファイルの作成(S2)、またはファイルの削除(S4)があると(S2、S4でYES)、ビットマップテーブル作成部21はビットマップテーブル33を更新する(S3)。   As shown in FIG. 4, first, the bitmap table creation unit 21 creates a bitmap table 33 in the file system 32 with reference to the data 34 (S1). Thereafter, when there is a file creation (S2) or a file deletion (S4) (YES in S2 and S4), the bitmap table creation unit 21 updates the bitmap table 33 (S3).

そして、ファイル処理部24がディスク暗号化を開始すると(S5でYES)、グループi(group i)のビットマップテーブル33を読み込み(S6)、空きブロック数判定部22がビットマップテーブル33を参照して、同一グループ内に空きブロックがN個(閾値)以上あるか否かを判定する(S7)。そして、同一グループ内の空きブロックがN個未満であれば(S7でNO)、ステップS8の「第3暗号化処理」に進む。第3暗号化処理とは、使用中ブロックのみを暗号化の対象とする処理である。   When the file processing unit 24 starts disk encryption (YES in S5), the bitmap table 33 of the group i (group i) is read (S6), and the free block number determination unit 22 refers to the bitmap table 33. Then, it is determined whether or not there are N (threshold) or more empty blocks in the same group (S7). If the number of empty blocks in the same group is less than N (NO in S7), the process proceeds to “third encryption process” in step S8. The third encryption process is a process in which only in-use blocks are targeted for encryption.

一方、同一グループ内に空きブロックがN個以上あれば(S7YES)、ブロック特定部23は、グループ内の最大空き領域(連続する空きブロック)のサイズがF以上であるか否かを判定する(S9)。そして、グループ内の最大空き領域のサイズがF以上であれば(S9でYES)、ステップS11の「第2暗号化処理」へ進む。また、グループ内の最大空き領域のサイズがF未満であれば(S9でNO)、ステップS10の「第1暗号化処理」へ進む。   On the other hand, if there are N or more empty blocks in the same group (S7 YES), the block specifying unit 23 determines whether or not the size of the largest empty area (continuous empty block) in the group is F or more ( S9). If the size of the maximum free area in the group is F or larger (YES in S9), the process proceeds to “second encryption process” in step S11. If the size of the maximum free area in the group is less than F (NO in S9), the process proceeds to “first encryption process” in step S10.

その後、全てのグループについて暗号化処理を行い、全てのグループについて暗号化処理が終了すると(S12でNO)、暗号化処理を終了する。   Thereafter, encryption processing is performed for all groups, and when encryption processing is completed for all groups (NO in S12), the encryption processing is ended.

次に、図5を参照して第1暗号化処理の流れを説明する。まず、管理テーブル作成部25は、ビットマップテーブル33を参照して、グループi(Group i)の第1管理テーブル27を作成する(S101)。次に、ブロック特定部23は、第1管理テーブル27を参照して、対象ブロックが当該グループにおいて、末尾から連続する空きブロックのうちの最初のブロックでないか否かを判定する(S102、ブロック特定ステップ)。そして、末尾から連続する空きブロックのうちの最初のブロックでない場合(S102でYES)、ファイル処理部24は当該ブロックを読み出し、RAM26上で暗号化処理を行う(S103、データ処理実行ステップ)。そして、ファイル処理部24は、RAM26に暗号化処理済みで未書き込みのデータ量が、1回に書き込み可能な最大サイズ(Smax)以上となるか否かを判定し(S104)、Smax未満であれば(S104でNO)、次のブロックに対しステップS102の処理を行う。一方、Smax以上であれば(S104でYES)、未書き込みの暗号化処理済みデータをSmax分、ディスク31に書き込む(S105)。 Next, the flow of the first encryption process will be described with reference to FIG. First, the management table creation unit 25 creates the first management table 27 of the group i (Group i) with reference to the bitmap table 33 (S101). Next, the block specifying unit 23 refers to the first management table 27 and determines whether or not the target block is the first block of empty blocks continuous from the end in the group (S102, block specifying). Step). Then, if it is not the first of the free blocks continuous from the end (YES in S102), the file processing unit 24 reads the block and performs encryption processing on the RAM 26 (S103, data processing execution step). Then, the file processing unit 24 determines whether the amount of unencrypted data that has been encrypted in the RAM 26 is equal to or greater than the maximum size (S max ) that can be written at one time (S 104), and is less than S max. If so (NO in S104), the process of step S102 is performed on the next block. On the other hand, if it is equal to or greater than Smax (YES in S104), unwritten encrypted data is written to the disk 31 for Smax (S105).

ステップS102で、対象ブロックが、末尾から連続する空きブロックのうちの最初のブロックの場合(ステップS102でNO)、ファイル処理部24は、暗号化処理済みの未書き込みブロックがRAM26にあるか否かを判定し(S106)、未書き込みブロックがあれば(S106でYES)、未書き込みブロックをディスク31に書き込む(S107)。そして、第1暗号化処理を終了する。また、未書き込みブロックなければ(S106でNO)、そのまま第1暗号化処理を終了する。   In step S102, when the target block is the first block among the free blocks continuous from the end (NO in step S102), the file processing unit 24 determines whether there is an unwritten block that has been encrypted in the RAM 26. If there is an unwritten block (YES in S106), the unwritten block is written to the disk 31 (S107). Then, the first encryption process is terminated. If there is no unwritten block (NO in S106), the first encryption process is terminated.

次に、図6を参照して第2暗号化処理の流れを説明する。まず、管理テーブル作成部25は、ビットマップテーブル33を参照して第2管理テーブル28を作成する(S201)。そして、管理テーブル作成部25は、グループの中で連続する空きブロック数が最大のものを“max_free_block”として第2管理テーブル28に保持する(S202)。   Next, the flow of the second encryption process will be described with reference to FIG. First, the management table creation unit 25 creates the second management table 28 with reference to the bitmap table 33 (S201). Then, the management table creation unit 25 holds the largest number of consecutive free blocks in the group as “max_free_block” in the second management table 28 (S202).

次に、ファイル処理部24は、対象ブロックが、グループの中で連続する空きブロック数が最大のものの中に含まれないか否かを判定する(S203、ブロック特定ステップ)。そして、グループの中で連続する空きブロック数が最大のものの中に含まれなければ(S203でYES)、対象ブロックを読み出し、RAM26上で暗号化処理を行う(S204、データ処理実行ステップ)。   Next, the file processing unit 24 determines whether the target block is not included in the largest number of consecutive free blocks in the group (S203, block specifying step). If the number of consecutive free blocks in the group is not included in the maximum number (YES in S203), the target block is read and encryption processing is performed on the RAM 26 (S204, data processing execution step).

そして、ファイル処理部24は、RAM26に暗号化処理済みで未書き込みのデータ量が、1回に書き込み可能な最大サイズ(Smax)以上となるか否かを判定し(S205)、Smax以上であれば(S205でYES)、未書き込みの暗号化処理済みデータをSmax分、ディスク31に書き込む(S206)。そして、次のブロックに対しステップS203の処理を行う。一方、Smax未満であれば(S205でNO)、そのまま、次のブロックに対しステップS203の処理を行う。 The file processing section 24, the data amount of unwritten encryption processed in RAM26 is, determines whether the writable maximum size (S max) than at a time (S205), S max or If so (YES in S205), unwritten encrypted data is written to the disk 31 for Smax (S206). Then, the process of step S203 is performed on the next block. On the other hand, if it is less than Smax (NO in S205), the process of step S203 is performed on the next block as it is.

一方、ステップS203で、グループの中で連続する空きブロック数が最大のものの中に含まれる場合(S203でYES)、ファイル処理部24は、暗号化処理済みの未書き込みブロックがRAM26にあるか否かを判定し(S208)、未書き込みブロックがあれば(S208でYES)、未書き込みブロックをディスク31に書き込む(S209)。そして、次のブロックに対しステップS203の処理を行う。   On the other hand, when the number of consecutive free blocks in the group is included in the maximum in step S203 (YES in S203), the file processing unit 24 determines whether there is an unwritten block that has been encrypted in the RAM 26. If there is an unwritten block (YES in S208), the unwritten block is written to the disk 31 (S209). Then, the process of step S203 is performed on the next block.

グループ内の最後のブロックまで処理が終了すると(S207でYES)、ファイル処理部24は、暗号化処理済みの未書き込みブロックがRAM26にあるか否かを判定し(S210)、未書き込みブロックがあれば(S210でYES)、未書き込みブロックをディスク31に書き込む(S211)。そして、第2暗号化処理を終了する。   When the processing is completed up to the last block in the group (YES in S207), the file processing unit 24 determines whether there is an unwritten block that has been encrypted in the RAM 26 (S210), and there is an unwritten block. If this is the case (YES in S210), unwritten blocks are written to the disk 31 (S211). Then, the second encryption process is terminated.

図7は、第1暗号化処理における、ビットマップテーブル33、および第1管理テーブル27の作成、更新、ならびに暗号化処理を説明するための図である。図7(a)に示すように、管理テーブル作成部25は、ビットマップテーブル33を参照して空きブロック情報を取得し、各グループについて、末尾から連続している空きブロックの集団の先頭ブロック番号を示す第1管理テーブル27をRAM26作成する。図7(a)に示す例では、Group1について末尾から連続している空きブロックの集団の先頭ブロック番号が「#2」、Group2については「#N−1」、Group3については「#N」となっている。   FIG. 7 is a diagram for explaining creation, updating, and encryption processing of the bitmap table 33 and the first management table 27 in the first encryption processing. As shown in FIG. 7A, the management table creation unit 25 refers to the bitmap table 33 to obtain free block information, and for each group, the first block number of a group of free blocks that are continuous from the end. A first management table 27 indicating the above is created in the RAM 26. In the example shown in FIG. 7A, the first block number of the group of empty blocks continuing from the end for Group 1 is “# 2”, “# N-1” for Group 2, and “#N” for Group 3. It has become.

そして、例えば、新たにファイルがGroup2の#Nブロックに作成された場合、第1管理テーブル27におけるGroup2のfree block numberを「0(無し)」にする(図7(b))。Group2の末尾に空きブロックがなくなるためである。   For example, when a new file is created in the #N block of Group 2, the free block number of Group 2 in the first management table 27 is set to “0 (none)” (FIG. 7B). This is because there is no empty block at the end of Group2.

また、例えば、Group3の#N−1ブロックにあるファイルが削除された場合、第1管理テーブル27におけるGroup3のfree block numberを「#2」にする(図7(c))。Group3の末尾から連続している空きブロックの集団の先頭は#2ブロックとなるためである。   For example, when a file in the # N-1 block of Group 3 is deleted, the free block number of Group 3 in the first management table 27 is set to “# 2” (FIG. 7C). This is because the beginning of the group of empty blocks continuing from the end of Group 3 is the # 2 block.

そして、ディスク31の暗号化を行う場合、Group毎に先頭のブロックから暗号化を行う。そして、第1管理テーブル27で示されているfree block numberのブロックに到達したとき、当該Groupの暗号化処理を終了する(図7(d))。この処理を全Groupの暗号化が完了するまで、繰り返し行う。   When the disk 31 is encrypted, the encryption is performed from the top block for each group. When the free block number block indicated in the first management table 27 is reached, the Group encryption processing is terminated (FIG. 7D). This process is repeated until all the groups are encrypted.

図8は、第2暗号化処理における、ビットマップテーブル33、および第2管理テーブル28の作成、更新、ならびに暗号化処理を説明するための図である。図8(a)に示すように、管理テーブル作成部25は、ビットマップテーブル33を参照して空きブロック情報を取得し、各グループについて、連続している空きブロックの開始ブロック番号および終了ブロック番号を示す第2管理テーブル28をRAM26に作成する。   FIG. 8 is a diagram for explaining creation, updating, and encryption processing of the bitmap table 33 and the second management table 28 in the second encryption processing. As shown in FIG. 8A, the management table creation unit 25 refers to the bitmap table 33 to obtain free block information, and for each group, the start block number and end block number of consecutive free blocks. Is created in the RAM 26.

図8(a)に示す例では、Group1について、連続している空きブロックの開始ブロック番号が「#2」、終了ブロック番号が「#N」であることを示し、Group2についてはそれぞれ「#N−1」、「#N」であることを示し、Group3については「#2」と「#N−2」、および「#N」と「#N」であることを示している。   In the example shown in FIG. 8A, for Group1, the start block number of consecutive free blocks is “# 2” and the end block number is “#N”, and for Group2, “#N” -1 "and" #N ", and Group 3 indicates" # 2 "and" # N-2 ", and" #N "and" #N ".

そして、例えば、新たにファイルがGroup1の#N−2ブロックに作成された場合、第2管理テーブル28のGroup1は、開始ブロック番号「#2」、終了ブロック番号「#N−3」と、開始ブロック番号「#N−1」、終了ブロック番号「#N」となる(図8(b))。   For example, when a new file is created in the # N-2 block of Group1, Group1 of the second management table 28 starts with the start block number “# 2” and the end block number “# N-3”. The block number is “# N−1” and the end block number is “#N” (FIG. 8B).

また、例えば、Group3の#1ブロックにあるファイルが削除された場合、第2管理テーブル28におけるGroup3の1つ目は、開始ブロック番号「#1」、終了ブロック番号「#N−2」となる(図8(c))。   For example, when a file in the # 1 block of Group 3 is deleted, the first Group 3 in the second management table 28 has the start block number “# 1” and the end block number “# N-2”. (FIG. 8 (c)).

そして、ディスク31の暗号化を行う場合、Group毎に先頭のブロックから暗号化を行う。そして、第2管理テーブル28で示されている連続した空きブロック数が最も多いものに含まれるブロックについては暗号化しない(図8(d))。そして、この処理を全Groupの暗号化が完了するまで、繰り返し行う。   When the disk 31 is encrypted, the encryption is performed from the top block for each group. Then, the blocks included in the block having the largest number of consecutive empty blocks shown in the second management table 28 are not encrypted (FIG. 8D). This process is repeated until all the groups are encrypted.

なお、上述した実施形態では、第1暗号化処理と第2暗号化処理とを選択して実行する構成としたが、どちらかのみを実行するものであってもよい。すなわち、本実施形態は両方の処理を実行可能である装置に限定されない。   In the above-described embodiment, the first encryption process and the second encryption process are selected and executed. However, only one of them may be executed. That is, this embodiment is not limited to an apparatus that can execute both processes.

〔実施形態2〕
本発明の他の実施形態について、図9〜図11に基づいて説明すれば、以下のとおりである。なお、説明の便宜上、前記実施形態にて説明した部材と同じ機能を有する部材については、同じ符号を付記し、その説明を省略する。上記実施形態では、ファイル処理部24が暗号化処理を実行していたが、本実施形態では、ファイル処理部24がミラーリング処理を実行する。ミラーリング処理を実行するときの流れについて説明する。ここでは、ミラーリング対象のディスクをディスクA、ミラーリング先のディスクをディスクBとする。
[Embodiment 2]
The following will describe another embodiment of the present invention with reference to FIGS. For convenience of explanation, members having the same functions as those described in the embodiment are given the same reference numerals, and descriptions thereof are omitted. In the above embodiment, the file processing unit 24 executes the encryption process. However, in the present embodiment, the file processing unit 24 executes the mirroring process. The flow when executing the mirroring process will be described. Here, it is assumed that the disk to be mirrored is disk A and the disk to be mirrored is disk B.

図9に示すように、まず、ビットマップテーブル作成部21がデータ34を参照して、ファイルシステム32におけるビットマップテーブル33を作成する(S501)。その後、ディスクAに対し、ファイルの作成(S502)、またはファイルの削除(S504)があると(S502、S504でYES)、ビットマップテーブル作成部21はビットマップテーブル33を更新する(S503)。   As shown in FIG. 9, first, the bitmap table creation unit 21 creates a bitmap table 33 in the file system 32 by referring to the data 34 (S501). Thereafter, when there is a file creation (S502) or file deletion (S504) for the disk A (YES in S502 and S504), the bitmap table creation unit 21 updates the bitmap table 33 (S503).

そして、ファイル処理部24がディスクAのミラーリングを開始すると(S505でYES)、グループi(group i)のビットマップテーブル33を読み込み(S506)、空きブロック数判定部22がビットマップテーブル33を参照して、同一グループ内に空きブロックがN個以上あるか否かを判定する(S507)。そして、同一グループ内の空きブロックがN個未満であれば(S507でNO)、ステップS508の「第3ミラーリング処理」に進む。   When the file processing unit 24 starts mirroring of the disk A (YES in S505), the bitmap table 33 of the group i (group i) is read (S506), and the free block number determination unit 22 refers to the bitmap table 33. It is then determined whether there are N or more empty blocks in the same group (S507). If the number of empty blocks in the same group is less than N (NO in S507), the process proceeds to “third mirroring process” in step S508.

一方、同一グループ内に空きブロックがN個以上あれば(S507YES)、ブロック特定部23は、グループ内の最大空き領域(連続する空きブロック)のサイズがF以上であるか否かを判定する(S509)。そして、グループ内の最大空き領域のサイズがF以上であれば(S509でYES)、ステップS511の「第2ミラーリング処理」へ進む。また、グループ内の最大空き領域のサイズがF未満であれば(S509でNO)、ステップS510の「第1ミラーリング処理」へ進む。   On the other hand, if there are N or more empty blocks in the same group (S507 YES), the block specifying unit 23 determines whether or not the size of the largest empty area (continuous empty block) in the group is F or more ( S509). If the size of the maximum free area in the group is F or larger (YES in S509), the process proceeds to “second mirroring process” in step S511. If the size of the largest free area in the group is less than F (NO in S509), the process proceeds to “first mirroring process” in step S510.

その後、全てのグループについてミラーリング処理を行い、全てのグループについてミラーリング処理が終了すると(S512でNO)、ミラーリング処理を終了する。   Thereafter, the mirroring process is performed for all the groups, and when the mirroring process is completed for all the groups (NO in S512), the mirroring process is terminated.

次に、図10を参照して第1ミラーリング処理の流れを説明する。まず、管理テーブル作成部25は、ビットマップテーブル33を参照して、グループi(Group i)の第1管理テーブル27を作成する(S601)。次に、ブロック特定部23は、第1管理テーブル27を参照して、対象ブロックが当該グループにおいて、末尾から連続する空きブロックのうちの最初のブロックでないか否かを判定する(S602)。そして、末尾から連続する空きブロックのうちの最初のブロックでない場合(S602でYES)、ファイル処理部24は当該ブロックを読み出し、RAM26上でミラーリング処理を行う(S603)。そして、ファイル処理部24は、RAM26にミラーリング処理済みで未書き込みのデータ量が、1回に書き込み可能な最大サイズ(Smax)以上となるか否かを判定し(S604)、Smax未満であれば(S604でNO)、次のブロックに対しステップS602の処理を行う。一方、Smax以上であれば(S604でYES)、未書き込みのミラーリング処理済みデータをSmax分、ディスクBに書き込む(S605)。 Next, the flow of the first mirroring process will be described with reference to FIG. First, the management table creating unit 25 creates the first management table 27 of the group i (Group i) with reference to the bitmap table 33 (S601). Next, the block specifying unit 23 refers to the first management table 27 and determines whether or not the target block is the first block among empty blocks continuous from the end in the group (S602). If the first free block is not the first free block from the end (YES in S602), the file processing unit 24 reads the block and performs a mirroring process on the RAM 26 (S603). Then, the file processing unit 24 determines whether or not the amount of unwritten data that has been mirrored in the RAM 26 exceeds the maximum size (S max ) that can be written at one time (S 604), and is less than S max . If there is (NO in S604), the process of step S602 is performed on the next block. On the other hand, if it is equal to or greater than Smax (YES in S604), unwritten mirrored data is written to disk B for Smax (S605).

ステップS602で、対象ブロックが、末尾から連続する空きブロックのうちの最初のブロックの場合(ステップS602でNO)、ファイル処理部24は、ミラーリング処理済みの未書き込みブロックがRAM26にあるか否かを判定し(S606)、未書き込みブロックがあれば(S606でYES)、未書き込みブロックをディスクBに書き込む(S607)。そして、第1ミラーリング処理を終了する。また、未書き込みブロックなければ(S606でNO)、そのまま第1ミラーリング処理を終了する。   In step S602, if the target block is the first of the free blocks continuous from the end (NO in step S602), the file processing unit 24 determines whether there is an unwritten block that has undergone mirroring processing in the RAM 26. If there is an unwritten block (YES in S606), the unwritten block is written to the disk B (S607). Then, the first mirroring process is terminated. If there is no unwritten block (NO in S606), the first mirroring process is terminated as it is.

次に、図11を参照して第2ミラーリング処理の流れを説明する。まず、管理テーブル作成部25は、ビットマップテーブル33を参照して第2管理テーブル28を作成する(S701)。そして、管理テーブル作成部25は、グループの中で連続する空きブロック数が最大のものを“max_free_block”として第2管理テーブル28に保持する(S702)。   Next, the flow of the second mirroring process will be described with reference to FIG. First, the management table creation unit 25 creates the second management table 28 with reference to the bitmap table 33 (S701). Then, the management table creation unit 25 holds the largest number of consecutive free blocks in the group as “max_free_block” in the second management table 28 (S702).

次に、ファイル処理部24は、対象ブロックが、グループの中で連続する空きブロック数が最大のものの中に含まれないか否かを判定する(S703)。そして、グループの中で連続する空きブロック数が最大のものの中に含まれなければ(S703でYES)、対象ブロックを読み出し、RAM26上でミラーリング処理を行う(S704)。   Next, the file processing unit 24 determines whether or not the target block is included in the largest number of consecutive free blocks in the group (S703). If the number of consecutive free blocks in the group is not included in the maximum number (YES in S703), the target block is read and mirroring processing is performed on the RAM 26 (S704).

そして、ファイル処理部24は、RAM26にミラーリング処理済みで未書き込みのデータ量が、1回に書き込み可能な最大サイズ(Smax)以上となるか否かを判定し(S705)、Smax以上であれば(S705でYES)、未書き込みのミラーリング処理済みデータをSmax分、ディスクBに書き込む(S706)。そして、次のブロックに対しステップS703の処理を行う。一方、Smax未満であれば(S705でNO)、そのまま、次のブロックに対しステップS703の処理を行う。 Then, the file processor 24, the data amount unwritten in already mirroring process in RAM26 is, determines whether the writable maximum size (S max) than at a time (S705), S max or If there is (YES in S705), unwritten mirrored data is written to disk B for Smax (S706). Then, the process of step S703 is performed on the next block. On the other hand, if it is less than Smax (NO in S705), the process of step S703 is performed on the next block as it is.

一方、ステップS703で、グループの中で連続する空きブロック数が最大のものの中に含まれる場合(S703でYES)、ファイル処理部24は、ミラーリング処理済みの未書き込みブロックがRAM26にあるか否かを判定し(S708)、未書き込みブロックがあれば(S708でYES)、未書き込みブロックをディスクBに書き込む(S709)。そして、次のブロックに対しステップS703の処理を行う。   On the other hand, if it is determined in step S703 that the number of consecutive free blocks in the group is included in the maximum number (YES in S703), the file processing unit 24 determines whether there is an unwritten block that has undergone mirroring processing in the RAM 26. If there is an unwritten block (YES in S708), the unwritten block is written to the disk B (S709). Then, the process of step S703 is performed on the next block.

グループ内の最後のブロックまで処理が終了すると(S707でYES)、ファイル処理部24は、ミラーリング処理済みの未書き込みブロックがRAM26にあるか否かを判定し(S710)、未書き込みブロックがあれば(S710でYES)、未書き込みブロックをディスクBに書き込む(S711)。そして、第2ミラーリング処理を終了する。   When the processing is completed up to the last block in the group (YES in S707), the file processing unit 24 determines whether or not there is an unwritten block that has undergone mirroring processing in the RAM 26 (S710), and if there is an unwritten block. (YES in S710), the unwritten block is written to the disk B (S711). Then, the second mirroring process ends.

なお、第3ミラーリング処理とは、ミラーリングの対象を使用中ブロックのみとする方法である。   The third mirroring process is a method in which the object of mirroring is only used blocks.

〔実施形態3〕
〔ソフトウェアによる実現例〕
実施形態3として、ソフトウェアによる実現例を説明する。情報処理装置1の制御ブロック(制御部(ビットマップテーブル作成部21、空きブロック数判定部22、ブロック特定部23、ファイル処理部24、管理テーブル作成部25)10)は、集積回路(ICチップ)等に形成された論理回路(ハードウェア)によって実現してもよいし、CPU(Central Processing Unit)を用いてソフトウェアによって実現してもよい。
[Embodiment 3]
[Example of software implementation]
As Embodiment 3, an implementation example using software will be described. The control block of the information processing apparatus 1 (control unit (bitmap table creation unit 21, free block number determination unit 22, block identification unit 23, file processing unit 24, management table creation unit 25) 10) is an integrated circuit (IC chip). ) Or the like, or may be realized by software using a CPU (Central Processing Unit).

後者の場合、情報処理装置1は、各機能を実現するソフトウェアであるプログラムの命令を実行するCPU、上記プログラムおよび各種データがコンピュータ(またはCPU)で読み取り可能に記録されたROM(Read Only Memory)または記憶装置(これらを「記録媒体」と称する)、上記プログラムを展開するRAM(Random Access Memory)などを備えている。そして、コンピュータ(またはCPU)が上記プログラムを上記記録媒体から読み取って実行することにより、本発明の目的が達成される。上記記録媒体としては、「一時的でない有形の媒体」、例えば、テープ、ディスク、カード、半導体メモリ、プログラマブルな論理回路などを用いることができる。また、上記プログラムは、該プログラムを伝送可能な任意の伝送媒体(通信ネットワークや放送波等)を介して上記コンピュータに供給されてもよい。なお、本発明は、上記プログラムが電子的な伝送によって具現化された、搬送波に埋め込まれたデータ信号の形態でも実現され得る。   In the latter case, the information processing apparatus 1 includes a CPU that executes instructions of a program that is software that implements each function, and a ROM (Read Only Memory) in which the program and various data are recorded so as to be readable by a computer (or CPU). Alternatively, a storage device (these are referred to as “recording media”), a RAM (Random Access Memory) that expands the program, and the like are provided. And the objective of this invention is achieved when a computer (or CPU) reads the said program from the said recording medium and runs it. As the recording medium, a “non-temporary tangible medium” such as a tape, a disk, a card, a semiconductor memory, a programmable logic circuit, or the like can be used. The program may be supplied to the computer via an arbitrary transmission medium (such as a communication network or a broadcast wave) that can transmit the program. The present invention can also be realized in the form of a data signal embedded in a carrier wave in which the program is embodied by electronic transmission.

〔まとめ〕
本発明の態様1に係るファイルシステム管理装置は、ブロック毎に管理されるデータ構造を持つファイルシステムを管理するファイルシステム管理装置において、複数の上記ブロックのうち、データが書き込まれているブロックである書き込みブロックと、データが書き込まれていないブロックである空きブロックの一部とを特定するブロック特定手段と、上記ブロック特定手段が特定した上記ブロックの全てに対し、読み出しおよび書き込みの少なくとも何れかを含む、共通のデータ処理を実行するデータ処理実行手段と、を備えている。
[Summary]
A file system management apparatus according to an aspect 1 of the present invention is a block in which data is written among a plurality of the blocks in a file system management apparatus that manages a file system having a data structure managed for each block. A block specifying means for specifying a writing block and a part of an empty block that is a block to which data is not written, and at least one of reading and writing for all the blocks specified by the block specifying means Data processing execution means for executing common data processing.

上記の構成によれば、ブロック特定手段が特定した書き込みブロックと空きブロックの一部の全てに対し、読み出しおよび書き込みの少なくともいずれかを含むデータ処理を行う。これにより、全てのブロックに対しデータ処理を実行する場合と比較して、データ処理量を減らすことができる。   According to the above configuration, data processing including at least one of reading and writing is performed on all of the write block and the empty block specified by the block specifying means. Thereby, compared with the case where data processing is performed with respect to all the blocks, the amount of data processing can be reduced.

また、空きブロックの一部もデータ処理の実行対象とするので、書き込みブロックのみに対しデータ処理を実行する場合と比較して、データ処理のための読み出しおよび書き込みの回数を減らすことができる。書き込みブロックのみに対しデータ処理を実行する場合、書き込みブロックの間に空きブロックが存在すると、読み出しおよび書き込みの回数が増えてしまうためである。   Also, since some of the free blocks are also subject to data processing, the number of reads and writes for data processing can be reduced compared to the case where data processing is performed only on the write block. This is because when data processing is executed only for the write block, the number of reading and writing increases if there is an empty block between the write blocks.

以上のように、データ処理量、読み出しおよび書き込み回数を減らすことができるので、データ処理を効率化することができるとともに、処理時間を短縮することができる。   As described above, since the amount of data processing and the number of reading and writing operations can be reduced, the data processing can be made efficient and the processing time can be shortened.

なお、データ処理としては、例えば、暗号化処理、ミラーリング処理を挙げることができる。   Examples of data processing include encryption processing and mirroring processing.

本発明の態様2に係るファイルシステム管理装置は、上記態様1において、上記ファイルシステムは、上記ブロックを複数含むグループに分かれたデータ構造であり、上記ブロック特定手段は、上記グループ毎に、該グループの末尾から連続している空きブロックを除く、上記書き込みブロックおよび上記空きブロックの一部を特定するものであってもよい。   The file system management apparatus according to aspect 2 of the present invention is the file system management apparatus according to aspect 1, wherein the file system has a data structure divided into a group including a plurality of the blocks, and the block specifying means includes the group for each group. The write block and a part of the empty block may be specified except for the empty block continuous from the end of the.

上記の構成によれば、グループにおいて、末尾から連続している空きブロックを除くブロックが、データ処理の対象となる。これにより、全てのブロックに対しデータ処理を実行する場合と比較してデータ処理量を減らすことができるとともに、書き込みブロックのみに対しデータ処理を実行する場合と比較して、読み出しおよび書き込み回数を減らすことができるので、データ処理を効率化することができるとともに、処理時間を短縮することができる。   According to the above configuration, in the group, blocks excluding empty blocks continuing from the end are targeted for data processing. As a result, the data processing amount can be reduced as compared with the case where data processing is executed for all blocks, and the number of reading and writing operations is reduced as compared with the case where data processing is executed only for writing blocks. Therefore, the data processing can be made efficient and the processing time can be shortened.

また、末尾から連続している空きブロックを除いたブロックをデータ処理の対象とするのみなので、簡易なロジックでデータ処理対象のブロックを特定することができる。   In addition, since only the blocks excluding empty blocks continuous from the end are targeted for data processing, it is possible to specify the data processing target block with simple logic.

本発明の態様3に係るファイルシステム管理装置は、上記態様1において、上記ファイルシステムは、上記ブロックを複数含むグループに分かれたデータ構造であり、上記ブロック特定手段は、上記グループ毎に、連続する空きブロック数が最大となる空きブロック群を除く、上記書き込みブロックおよび上記空きブロックの一部を特定するものであってもよい。   The file system management apparatus according to aspect 3 of the present invention is the file system management apparatus according to aspect 1, wherein the file system has a data structure divided into a group including a plurality of the blocks, and the block specifying means is continuous for each group. The write block and a part of the empty block other than the empty block group having the maximum number of empty blocks may be specified.

上記の構成によれば、グループにおいて、連続する空きブロック数が最大となる空きブロック群を除くブロックが、データ処理の対象となる。これにより、全てのブロックに対しデータ処理を実行する場合と比較してデータ処理量を減らすことができるとともに、書き込みブロックのみに対しデータ処理を実行する場合と比較して、読み出しおよび書き込み回数を減らすことができるので、データ処理を効率化することができるとともに、処理時間を短縮することができる。   According to the above configuration, blocks other than the empty block group in which the number of consecutive empty blocks is the largest in the group are targets for data processing. As a result, the data processing amount can be reduced as compared with the case where data processing is executed for all blocks, and the number of reading and writing operations is reduced as compared with the case where data processing is executed only for writing blocks. Therefore, the data processing can be made efficient and the processing time can be shortened.

本発明の態様4に係るファイルシステム管理装置は、上記態様1〜3のいずれかにおいて、上記ファイルシステムは、上記ブロックを複数含むグループに分かれたデータ構造であり、上記グループに含まれる空きブロック数が閾値を超えたか否かを判定する空きブロック数判定手段を備え、上記ブロック特定手段は、上記空きブロック数判定手段が上記グループに含まれる空きブロック数が閾値を超えたと判断した場合、上記書き込みブロックおよび上記空きブロックの一部を特定するものであってもよい。   The file system management device according to aspect 4 of the present invention is the file system management device according to any one of the above aspects 1 to 3, wherein the file system has a data structure divided into a group including a plurality of the blocks, and the number of free blocks included in the group The number of free blocks determining means for determining whether or not the number of free blocks included in the group exceeds the threshold, the block specifying means determines whether the number of free blocks included in the group exceeds the threshold. The block and a part of the empty block may be specified.

グループに含まれるブロック数が少ない場合、該グループに含まれる書き込みブロックのみをデータ処理の対象とした方が、データ処理の効率が良い場合がある。そこで、閾値を、グループに含まれる空きブロック数が閾値以下であれば、書き込みブロックのみに対しデータ処理を実行した方がデータ処理の効率が良くなる値とすれば、上記の構成により、書き込みブロックおよび空きブロックの一部に対しデータ処理を行った方がデータ処理の効率が良くなる場合にのみ、書き込みブロックおよび空きブロックの一部を特定し、データ処理を行うことができる。   When the number of blocks included in a group is small, it may be more efficient to perform data processing when only the write blocks included in the group are subjected to data processing. Therefore, if the number of free blocks included in the group is equal to or less than the threshold value, and if the data processing efficiency is improved by performing data processing only on the write block, the write block can be obtained by the above configuration. Only when data processing is more efficient when data processing is performed on some of the free blocks, it is possible to specify the write blocks and some of the free blocks and perform data processing.

本発明の態様5に係るファイルシステム管理装置の制御方法は、ブロック毎に管理されるデータ構造を持つファイルシステムを管理するファイルシステム管理装置の制御方法において、複数の上記ブロックのうち、データが書き込まれているブロックである書き込みブロックと、データが書き込まれていないブロックである空きブロックの一部とを特定するブロック特定ステップと、上記ブロック特定ステップで特定した上記ブロックの全てに対して、読み出しおよび書き込みを含む、共通のデータ処理を実行するデータ処理実行ステップと、を含む。これにより、上記態様1と同様の効果を奏する。   The file system management apparatus control method according to aspect 5 of the present invention is the file system management apparatus control method for managing a file system having a data structure managed for each block. A block identifying step that identifies a writing block that is a block that is being written and a part of an empty block that is a block to which no data has been written, and reading and writing to all of the blocks identified in the block identifying step A data processing execution step for executing common data processing including writing. Thereby, there exists an effect similar to the said aspect 1. FIG.

本発明の各態様に係るファイルシステム管理装置は、コンピュータによって実現してもよく、この場合には、コンピュータを上記ファイルシステム管理装置が備える各手段として動作させることにより上記ファイルシステム管理装置をコンピュータにて実現させるファイルシステム管理装置の制御プログラム、およびそれを記録したコンピュータ読み取り可能な記録媒体も、本発明の範疇に入る。   The file system management apparatus according to each aspect of the present invention may be realized by a computer. In this case, the file system management apparatus is operated on each computer by causing the computer to operate as each unit included in the file system management apparatus. The control program of the file system management apparatus to be realized in this way and a computer-readable recording medium on which the control program is recorded also fall within the scope of the present invention.

本発明は上述した各実施形態に限定されるものではなく、請求項に示した範囲で種々の変更が可能であり、異なる実施形態にそれぞれ開示された技術的手段を適宜組み合わせて得られる実施形態についても本発明の技術的範囲に含まれる。さらに、各実施形態にそれぞれ開示された技術的手段を組み合わせることにより、新しい技術的特徴を形成することができる。   The present invention is not limited to the above-described embodiments, and various modifications are possible within the scope shown in the claims, and embodiments obtained by appropriately combining technical means disclosed in different embodiments. Is also included in the technical scope of the present invention. Furthermore, a new technical feature can be formed by combining the technical means disclosed in each embodiment.

本発明は、データの読み出しおよび書き込み少なくとも何れかを含むデータ処理を実行する装置に利用することができる。   The present invention can be used for an apparatus that executes data processing including at least one of reading and writing of data.

1 情報処理装置(ファイルシステム管理装置)、10 制御部、22 空きブロック数判定部(空きブロック数判定手段)、23 ブロック特定部(ブロック特定手段)、24 ファイル処理部(データ処理実行手段)、25 管理テーブル作成部、26 RAM、27 第1管理テーブル、28 第2管理テーブル、31 ディスク、32 ファイルシステム、33 ビットマップテーブル   DESCRIPTION OF SYMBOLS 1 Information processing apparatus (file system management apparatus), 10 Control part, 22 Free block number determination part (Free block number determination means), 23 Block specification part (Block specification means), 24 File processing part (Data processing execution means), 25 management table creation unit, 26 RAM, 27 first management table, 28 second management table, 31 disk, 32 file system, 33 bitmap table

Claims (5)

ブロック毎に管理されるデータ構造を持つファイルシステムを管理するファイルシステム管理装置において、
複数の上記ブロックのうち、データが書き込まれているブロックである書き込みブロックと、データが書き込まれていないブロックである空きブロックの一部とを特定するブロック特定手段と、
上記ブロック特定手段が特定した上記ブロックの全てに対し、読み出しおよび書き込みの少なくとも何れかを含む、共通のデータ処理を実行するデータ処理実行手段と、を備えていることを特徴とするファイルシステム管理装置。
In a file system management apparatus that manages a file system having a data structure managed for each block,
A block specifying means for specifying a write block that is a block in which data is written and a part of an empty block that is a block in which no data is written, among the plurality of blocks;
A file system management device comprising: data processing execution means for executing common data processing including at least one of reading and writing for all of the blocks specified by the block specifying means .
上記ファイルシステムは、上記ブロックを複数含むグループに分かれたデータ構造であり、
上記ブロック特定手段は、上記グループ毎に、該グループの末尾から連続している空きブロックを除く、上記書き込みブロックおよび上記空きブロックの一部を特定することを特徴とする請求項1に記載のファイルシステム管理装置。
The file system is a data structure divided into a group including a plurality of the blocks,
2. The file according to claim 1, wherein the block specifying unit specifies, for each of the groups, the write block and a part of the free block excluding the free block continuous from the end of the group. System management device.
上記ファイルシステムは、上記ブロックを複数含むグループに分かれたデータ構造であり、
上記ブロック特定手段は、上記グループ毎に、連続する空きブロック数が最大となる空きブロック群を除く、上記書き込みブロックおよび上記空きブロックの一部を特定することを特徴とする請求項1に記載のファイルシステム管理装置。
The file system is a data structure divided into a group including a plurality of the blocks,
The said block specific | specification part specifies the said write block and a part of said empty block except the empty block group for which the number of continuous empty blocks becomes the largest for every said group. File system management device.
上記ファイルシステムは、上記ブロックを複数含むグループに分かれたデータ構造であり、
上記グループに含まれる空きブロック数が閾値を超えたか否かを判定する空きブロック数判定手段を備え、
上記ブロック特定手段は、上記空きブロック数判定手段が上記グループに含まれる空きブロック数が閾値を超えたと判断した場合、上記書き込みブロックおよび上記空きブロックの一部を特定することを特徴とする請求項1〜3のいずれか1項に記載のファイルシステム管理装置。
The file system is a data structure divided into a group including a plurality of the blocks,
A free block number judging means for judging whether or not the number of free blocks included in the group exceeds a threshold;
The block specifying means specifies the write block and a part of the empty block when the empty block number determining means determines that the number of empty blocks included in the group exceeds a threshold. The file system management apparatus according to any one of 1 to 3.
請求項1から4のいずれか1項に記載のファイルシステム管理装置としてコンピュータを機能させるための制御プログラムであって、コンピュータを上記各手段として機能させるための制御プログラム。   A control program for causing a computer to function as the file system management apparatus according to any one of claims 1 to 4, wherein the control program causes the computer to function as each of the means.
JP2014062529A 2014-03-25 2014-03-25 File system management device, control method of file system management device, and control program Pending JP2015185024A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014062529A JP2015185024A (en) 2014-03-25 2014-03-25 File system management device, control method of file system management device, and control program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014062529A JP2015185024A (en) 2014-03-25 2014-03-25 File system management device, control method of file system management device, and control program

Publications (1)

Publication Number Publication Date
JP2015185024A true JP2015185024A (en) 2015-10-22

Family

ID=54351449

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014062529A Pending JP2015185024A (en) 2014-03-25 2014-03-25 File system management device, control method of file system management device, and control program

Country Status (1)

Country Link
JP (1) JP2015185024A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2022051518A (en) * 2020-09-18 2022-03-31 アゴデジタル コーポレーション Document digitization method capable of securing legal credibility, and system therefor

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2022051518A (en) * 2020-09-18 2022-03-31 アゴデジタル コーポレーション Document digitization method capable of securing legal credibility, and system therefor
JP7282293B2 (en) 2020-09-18 2023-05-29 アゴデジタル コーポレーション A document digitization method that can ensure legal reliability, and a system therefor

Similar Documents

Publication Publication Date Title
US20140115239A1 (en) Method of managing data in nonvolatile memory device
JP6481415B2 (en) Data storage management device and data storage management method
KR20130050124A (en) Garbage collection method for non-volatile memory device
JP6330528B2 (en) Data division control program, data division control method, and data division control device
TW201250471A (en) Managing data placement on flash-based storage by use
JP2014191670A5 (en)
EP3518112A1 (en) Memory device and host device
EP3142014B1 (en) Method, device and user equipment for reading/writing data in nand flash
KR20180014975A (en) Data storage device and operating method thereof
JP2015001909A (en) Information processor, control circuit, control program, and control method
US20140068153A1 (en) Wear management apparatus and method for storage system
CN107229421B (en) Method and device for creating video data storage system, method and device for writing file into video data storage system and method and device for reading video data storage system
CN106156038B (en) Date storage method and device
JP2015185024A (en) File system management device, control method of file system management device, and control program
WO2015087651A1 (en) Device, program, recording medium, and method for extending service life of memory,
CN106354793B (en) Method and device for monitoring hot spot object
CN107209656B (en) Adjusting speaker settings
JP5907189B2 (en) Storage control device, storage control method, and program
CN111221790A (en) Log file processing method and device and computer readable storage medium
CN105700820A (en) Memory device and script-execution control method
CN105183375A (en) Control method and apparatus for service quality of hot spot data
US20180081796A1 (en) Data Storage Device and Data Writing Method Thereof
US9804968B2 (en) Storage system and data writing method
CN104298614A (en) Method for storing data block in memory device and memory device
US9665292B2 (en) System and method for providing consistent metadata for RAID solutions