JP2009093712A - Recording / reproducing apparatus and recording / reproducing method - Google Patents
Recording / reproducing apparatus and recording / reproducing method Download PDFInfo
- Publication number
- JP2009093712A JP2009093712A JP2007261054A JP2007261054A JP2009093712A JP 2009093712 A JP2009093712 A JP 2009093712A JP 2007261054 A JP2007261054 A JP 2007261054A JP 2007261054 A JP2007261054 A JP 2007261054A JP 2009093712 A JP2009093712 A JP 2009093712A
- Authority
- JP
- Japan
- Prior art keywords
- file
- recording
- command
- defragmentation
- storage device
- 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
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Signal Processing For Digital Recording And Reproducing (AREA)
Abstract
【課題】デフラグ実行時におけるデフラグ実行対象の蓄積装置へのアクセスを伴うアプリケーションの動作速度に与える影響を従来のものよりも低減化することができる記録再生装置及び記録再生方法を提供すること。
【解決手段】記録再生装置100は、ファイルシステム部10と、蓄積装置制御部20とを備え、ファイルシステム部10は、ファイル入出力管理部11と、データバッファ12と、コマンド送受信部13と、ファイル管理部14と、コマンドバッファ15と、ファイル管理テーブル16a及びファイル分断情報16bを記憶するファイル管理バッファ16と、デフラグ手順コマンド生成部17と、デフラグ手順バッファ18とを備え、デフラグ手順コマンド生成部17は、コマンドバッファ15が空のときファイル分断情報16bを基にデフラグ手順情報を生成する。
【選択図】図1The present invention provides a recording / reproducing apparatus and a recording / reproducing method capable of reducing the influence on the operation speed of an application that accompanies access to a storage device to be defragmented at the time of defragmentation as compared with a conventional one.
A recording / reproducing apparatus includes a file system unit and a storage device control unit. The file system unit includes a file input / output management unit, a data buffer, a command transmission / reception unit, A file management unit 14, a command buffer 15, a file management buffer 16 for storing a file management table 16a and file division information 16b, a defragmentation procedure command generation unit 17, and a defragmentation procedure buffer 18 are provided, and a defragmentation procedure command generation unit 17 generates defragmentation procedure information based on the file division information 16b when the command buffer 15 is empty.
[Selection] Figure 1
Description
本発明は、例えばハードディスクドライブに対してファイルの記録及び再生を行う記録再生装置及び記録再生方法に関する。 The present invention relates to a recording / reproducing apparatus and a recording / reproducing method for recording and reproducing files on, for example, a hard disk drive.
データを蓄積する蓄積装置、例えばハードディスクドライブ(HDD:Hard Disk Drive)に対し、文書データや画像データ等を含むファイル(以下、単に「ファイル」という。)の記録再生を繰り返すと、ファイルが分断されて記録され、この分断化(フラグメンテーション)が記録再生の速度を低下させる1つの要因となる。この解決策としては、フラグメンテーションの解消(デフラグメンテーション、略語:デフラグ)がある。デフラグ用のツールは既に実現されており、例えばマイクロソフト社のWindows(登録商標)はこのツールを標準ツールとして提供している。 When a recording device for storing data, such as a hard disk drive (HDD), repeatedly records and reproduces a file containing document data, image data, or the like (hereinafter simply referred to as “file”), the file is divided. This fragmentation is one factor that reduces the recording / reproducing speed. One solution is to eliminate fragmentation (defragmentation, abbreviation: defragmentation). A tool for defragmentation has already been realized. For example, Windows (registered trademark) of Microsoft Corporation provides this tool as a standard tool.
デフラグの実行によりCPU(Central Processing Unit)の使用量や蓄積装置へのアクセス回数が増加するため、一般的にデフラグの実行中はCPUや蓄積装置を使用する他のアプリケーションなどの動作が遅くなる。 Since the amount of CPU (Central Processing Unit) used and the number of accesses to the storage device increase due to the execution of defragmentation, operations of other applications that use the CPU and the storage device are generally delayed during the execution of defragmentation.
また、ファイルの分断化は、ファイルを記録しようとする連続空き領域がファイルのサイズよりも小さい場合に発生するが、一般的にはファイルを記録し始めた時点ではそのファイルのサイズは不明であるため、記録装置上の複数の連続空き領域の中から記録しようとするファイルにとって最適な空き領域を選択することはできない。連続空き領域の中でサイズの最も大きい領域を選択するのが無難であるが、ファイルの記録を繰り返すうちにその領域はだんだんと小さくなり、いつかは記録するファイルのサイズよりも小さくなる。ファイル記録の際に、ファイルのサイズよりも小さな連続空き領域を選択したときに、ファイルが分断記録されないだけの連続した空き領域を確保するためにデフラグを実行してからファイルを記録するという方法も考えられるが、この方法によりファイルの分断化は回避できるものの、そのファイルの記録に要する時間はデフラグにより移動するデータの量に応じて長くなる。 In addition, file segmentation occurs when the continuous free space where a file is to be recorded is smaller than the file size, but the file size is generally unknown when the file starts to be recorded. Therefore, it is not possible to select an optimum free area for a file to be recorded from a plurality of continuous free areas on the recording apparatus. It is safe to select the largest free area among the continuous free areas, but as the file recording is repeated, the area gradually becomes smaller and eventually becomes smaller than the size of the file to be recorded. When recording a file, if you select a continuous free space that is smaller than the file size, you can also record the file after executing defragmentation in order to secure a continuous free space that does not divide and record the file. Although it is conceivable, the file division can be avoided by this method, but the time required for recording the file becomes longer depending on the amount of data moved by defragmentation.
したがって、他のアプリケーションによるCPUや蓄積装置へのアクセスが少ないと想定されるタイミングを計ってデフラグを実行するのが一般的である。例えば、ユーザが指示したときに実行するもの(例えば、特許文献1参照)、予め指定された時刻に実行するもの(例えば、特許文献2及び3参照)、システム終了時に実行するもの(例えば、特許文献4参照)、既に分かっている別のアプリケーションが動作する時間帯を避けて実行するもの(例えば、特許文献3及び5参照)、他の記録再生動作を利用して効率的に実行するもの(例えば、特許文献6参照)などが既に提案されている。
ところで、一般的なデフラグのツールは一度デフラグの動作が開始すると、デフラグが終了するまで中断することなく動作を続ける。また、デフラグのツールは、ファイル分断状況の調査から始めるので、フラグメンテーションがほとんど発生していない場合でもある程度まとまった時間を要する。したがって、CPUや蓄積装置などのリソースを大量に消費するアプリケーションとデフラグとが同時に動作している間は互いの処理速度が遅くなる。特にHDDなどの蓄積装置へのアクセスが競合すると、互いのアクセス速度が著しく低下する。その結果、デフラグの動作により、デフラグ動作対象の記録装置へのアクセスを伴うアプリケーションの動作速度が遅くなる。したがって、アプリケーションの動作速度を落とさないようにするには、デフラグとアプリケーションとが同時に動作しないようにすることが求められる。 By the way, once a general defragmentation tool starts the defragmentation operation, it continues to operate without interruption until the defragmentation is completed. In addition, since the defragmentation tool starts from the investigation of the file fragmentation status, it takes a certain amount of time even if little fragmentation has occurred. Accordingly, while an application that consumes a large amount of resources such as a CPU and a storage device and defragmentation are operating simultaneously, the processing speed of each other is reduced. In particular, when access to storage devices such as HDDs competes, the access speed of each other is significantly reduced. As a result, due to the defragmentation operation, the operation speed of the application that accompanies access to the recording device that is the defragmentation operation is slowed down. Therefore, in order not to decrease the operation speed of the application, it is required that the defragmentation and the application do not operate simultaneously.
一般的には、同じホスト上で動作する他のアプリケーションが動作していない時、又は他のアプリケーションへの影響が小さいと想定される時を狙って、手動又は自動でデフラグを実行するが、デフラグとアプリケーションとが同時に動作することは、確率は低いがあり得る。 In general, defragmentation is executed manually or automatically when other applications running on the same host are not running or when it is assumed that the impact on other applications is small. It is possible that the probability that the application and the application operate simultaneously is low.
例えば、特許文献1に示された、ユーザが指示したときにデフラグを実行するものは、複数のユーザが扱うシステムにおいては、デフラグを指示したユーザ以外のユーザがアプリケーションを使用する可能性があり、その場合はデフラグとアプリケーションとが同時に動作することとなる。また、デフラグを指示したユーザ本人でも、デフラグを指示した直後に急にアプリケーションを使用しなければならないこともあり、その場合は、動作速度が遅い状態でアプリケーションを動作させるか、デフラグを中断する必要がある。
For example, in the system that is described in
また、特許文献2及び3に示された、予め指定された時刻にデフラグを実行するものは、複数のユーザが扱うシステムにおいては、指定された時刻に誰かが使用する可能性がある。
Further, in the systems that are described in
また、特許文献4に示された、システム終了時にデフラグを実行するものは、24時間運用中はデフラグが実行されないので、適用できない。
In addition, the method of performing defragmentation at the time of system termination shown in
また、特許文献3及び5に示された、既に分かっている別のアプリケーションが動作する時間帯を避けてデフラグを実行するものは、他のすべてのアプリケーションの動作スケジュールが事前に分かっている場合のみ有効である。
In addition, those that perform defragmentation while avoiding a time zone in which another known application operates as shown in
また、特許文献6に示された、他の記録再生動作を利用して効率的にデフラグを実行するものは、その記録再生動作が行われていないファイルのデフラグは実行されない。 Also, in the case of performing defragmentation efficiently using another recording / reproducing operation shown in Patent Document 6, the defragmentation of a file for which the recording / reproducing operation is not performed is not performed.
以上のように、従来のものにおいては、デフラグとアプリケーションとが同時に動作することがあり、アプリケーションの動作速度がデフラグの実行によって低下するという課題があった。 As described above, in the conventional device, there is a problem that the defragmentation and the application operate at the same time, and the operation speed of the application decreases due to the execution of the defragmentation.
本発明は、このような事情に鑑みてなされたものであり、デフラグ実行時におけるデフラグ実行対象の蓄積装置へのアクセスを伴うアプリケーションの動作速度に与える影響を従来のものよりも低減化することができる記録再生装置及び記録再生方法を提供することを目的とする。 The present invention has been made in view of such circumstances, and the effect on the operation speed of an application that accompanies access to a defragmentation execution target storage device at the time of defragmentation can be reduced as compared with the conventional one. An object of the present invention is to provide a recording / reproducing apparatus and a recording / reproducing method.
本発明の記録再生装置は、ファイルデータを蓄積する蓄積装置に対する制御コマンドを一時的に格納するコマンド格納手段と、前記コマンド格納手段が空のとき前記蓄積装置において複数の領域に分断されて記録されたファイルデータのうち少なくとも1つの分断箇所の分断化を解消するための分断化解消コマンドを生成する分断化解消コマンド生成手段とを備えた構成を有している。 The recording / reproducing apparatus of the present invention includes a command storage means for temporarily storing a control command for a storage apparatus that stores file data, and a recording apparatus that is divided into a plurality of areas and recorded in the storage apparatus when the command storage means is empty. And a fragmentation elimination command generation means for generating a fragmentation elimination command for eliminating the fragmentation of at least one division location in the file data.
この構成により、本発明の記録再生装置は、コマンド格納手段が空のとき少なくとも1つの分断箇所に対応する分断解消コマンドを生成してデフラグを実行することで、デフラグの実行単位を細かくすることにより、少なくとも1つの分断箇所に対するデフラグ実行時間を短くすることができる。したがって、本発明の記録再生装置は、アプリケーションの動作速度に与える影響を従来のものよりも低減化することができる。 With this configuration, the recording / reproducing apparatus of the present invention generates a fragmentation cancellation command corresponding to at least one fragmentation location and executes defragmentation when the command storage means is empty, thereby reducing the defragmentation execution unit. The defragmentation execution time for at least one parting point can be shortened. Therefore, the recording / reproducing apparatus of the present invention can reduce the influence on the operation speed of the application compared to the conventional one.
また、本発明の記録再生装置は、前記分断化解消コマンド生成手段が、複数の領域に分断されて記録された前記ファイルデータの分断箇所の情報を示すファイル分断情報に基づいて前記分断化解消コマンドを生成する構成を有している。 Further, in the recording / reproducing apparatus of the present invention, the fragmentation cancellation command generation means is configured to use the fragmentation cancellation command based on file division information indicating information on a division location of the file data that is divided into a plurality of areas and recorded. Is generated.
この構成により、本発明の記録再生装置は、ファイル分断情報に基づいて分断解消コマンドを生成することにより、蓄積装置におけるファイルの分断箇所をCPUを極力使用せずに比較的高速に検索することができて好ましい。 With this configuration, the recording / reproducing apparatus of the present invention can generate a division cancellation command based on the file division information, thereby searching for a file division point in the storage device at a relatively high speed without using the CPU as much as possible. This is preferable.
また、本発明の記録再生装置は、前記分断化解消コマンド生成手段は、前記蓄積装置において前記ファイルデータを管理するためのファイル管理テーブルと、前記ファイル分断情報とに基づき、前記ファイルデータの分断化を解消するための分断化解消手順情報を生成する構成を有している。 Further, in the recording / reproducing apparatus of the present invention, the fragmentation elimination command generation means divides the file data based on a file management table for managing the file data in the storage device and the file division information. It has the structure which produces | generates the division | segmentation cancellation | release procedure information for canceling.
この構成により、本発明の記録再生装置は、生成した分断化解消手順情報に基づいてデフラグを実行することができる。 With this configuration, the recording / reproducing apparatus of the present invention can perform defragmentation based on the generated fragmentation elimination procedure information.
本発明の記録再生方法は、ファイルデータを蓄積する蓄積装置に対する制御コマンドを一時的に格納するコマンド格納手段を備えた記録再生装置において、前記ファイルデータを記録又は再生する記録再生方法であって、前記コマンド格納手段が空のとき前記蓄積装置において複数の領域に分断されて記録されたファイルデータのうち少なくとも1つの分断箇所の分断化を解消するための分断化解消コマンドを生成し分断化解消を実行するステップを含む構成を有している。 The recording / reproducing method of the present invention is a recording / reproducing method for recording or reproducing the file data in a recording / reproducing apparatus comprising command storage means for temporarily storing a control command for a storage apparatus for accumulating file data, When the command storage means is empty, a fragmentation cancellation command is generated to cancel the fragmentation of at least one part of the file data recorded by being divided into a plurality of areas in the storage device, and the fragmentation is resolved. It has the structure including the step to perform.
この構成により、本発明の記録再生方法は、コマンド格納手段が空のとき少なくとも1つの分断箇所に対応する分断解消コマンドを生成してデフラグを実行することで、デフラグの実行単位を細かくすることにより、少なくとも1つの分断箇所に対するデフラグ実行時間を短くすることができる。したがって、本発明の記録再生方法は、アプリケーションの動作速度に与える影響を従来のものよりも低減化することができる。 With this configuration, the recording / reproducing method of the present invention reduces the defragmentation execution unit by generating a fragmentation cancellation command corresponding to at least one fragmentation location and executing defragmentation when the command storage means is empty. The defragmentation execution time for at least one parting point can be shortened. Therefore, the recording / reproducing method of the present invention can reduce the influence on the operation speed of the application compared to the conventional one.
本発明は、デフラグ実行時におけるデフラグ実行対象の蓄積装置へのアクセスを伴うアプリケーションの動作速度に与える影響を従来のものよりも低減化することができるという効果を有する記録再生装置及び記録再生方法を提供することができるものである。 The present invention provides a recording / reproducing apparatus and a recording / reproducing method having an effect that the influence on the operation speed of an application accompanied by access to a storage device to be defragmented at the time of defragmentation can be reduced as compared with the conventional one. It can be provided.
以下、本発明の一実施の形態について図面を用いて説明する。図1は、本実施の形態における記録再生装置100の概略構成を示すブロック図である。
Hereinafter, an embodiment of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing a schematic configuration of a recording / reproducing
図1に示すように、本実施の形態における記録再生装置100は、ファイルシステム部10と、蓄積装置制御部20とを備えている。なお、図示を省略したが、記録再生装置100は、CPUやメモリなどを備えている。また、ファイルシステム部10及び蓄積装置制御部20は、例えばOS(Operating System)として動作するソフトウェアプログラムで構成される。このソフトウェアプログラムは、記録再生装置100のメモリにロードされ、CPUによって処理される。
As shown in FIG. 1, the recording / reproducing
ファイルシステム部10は、VFS(Virtual File System)10aと、ファイルシステム10bとを備え、蓄積装置102(例えばHDD)を制御するための制御コマンド(以下「蓄積装置制御コマンド」という。)を蓄積装置制御部20に出力するものである。この蓄積装置制御コマンドは、ファイルの記録、再生及び消去に関するコマンド(以下「ファイル記録再生コマンド」という。)を含む。
The
VFS10aは、仕様の異なるファイルシステムに対し、共通のインターフェースを提供するものである。ファイルシステム10bは、例えばext2fs(second EXTended File System)、JFS(Journaled File System)、XFS(eXternal File System)、FAT(File Allocation Table)などが存在する。
The VFS 10a provides a common interface for file systems having different specifications. Examples of the
ファイルシステム部10は、通常のOSではファイルシステム及びファイルシステムのドライバに相当する部分である。一般的に、蓄積装置102はセクタと呼ばれるブロック単位で管理されており、ファイル単位での管理はされない。ファイルシステム部10はファイルを蓄積装置102内のどの部分に格納するかを管理するためのシステムであり、ファイルシステム部10を備えることにより、ユーザはファイルが蓄積装置102内のどの部分に格納されているかを全く意識せずに蓄積装置102に対してファイルを記録・再生することができ、ファイル単位での管理が可能となる。ファイル管理やファイル記録再生速度などの観点から、すべてのファイルは分断されずに連続するブロックに記録されるのが望ましいが、ファイルの記録・消去を繰り返すうちに、蓄積装置102の空き領域の都合上、ファイルの分断化は避けられなくなる。
The
蓄積装置制御部20は、蓄積装置制御コマンド変換部20aと、蓄積装置通信部20bとを備え、蓄積装置102のインターフェース用コマンドを生成するものである。蓄積装置制御コマンド変換部20aは、ファイルシステム部10から出力される蓄積装置制御コマンドを蓄積装置通信部20bと蓄積装置102との間で使用するプロトコルの規格で決められたフォーマットに従って変換して蓄積装置通信部20bに出力するものである。蓄積装置通信部20bは、例えばATA(AT Attachment)やSCSI(Small Computer System Interface)などの規格に基づいて蓄積装置102と通信するものである。
The storage
次に、本実施の形態における記録再生装置100の詳細な構成について説明する。図2は、本実施の形態における記録再生装置100の詳細な構成を示している。なお、図2においてはVFS10a(図1参照)の図示を省略した。理由は、VFS10aは、ファイルシステム10bの種類に関係なく、アプリケーション101から単一のインターフェースで操作できるものであり、以下の説明では単一のファイルシステムに関する説明のみ行うためである。また、近年のほとんどのOSは、記録装置の記録再生動作の遅さをカバーするために蓄積装置との間にキャッシュを持っており、ファイルの記録再生は蓄積装置に対して直接行われずキャッシュを介して行われるため、頻繁にアクセスされるファイルの記録再生速度が大幅に改善される。したがって、一般のファイルシステムでは、キャッシュへの記録再生及びキャッシュから蓄積装置への記録再生に関わる機能ブロックが存在するが、図2においては図の複雑化を避けるため、OSのキャッシュに関わる部分の図示は省略した。
Next, a detailed configuration of the recording / reproducing
図2に示すように、本実施の形態における記録再生装置100は、蓄積装置102に格納されたファイルを管理するファイルシステム部10と、蓄積装置102を制御する蓄積装置制御部20とを備えている。
As shown in FIG. 2, the recording / reproducing
ファイルシステム部10は、ファイル入出力管理部11と、データバッファ12と、コマンド送受信部13と、ファイル管理部14と、コマンドバッファ15と、ファイル管理テーブル16a及びファイル分断情報16bを記憶するファイル管理バッファ16と、デフラグ手順コマンド生成部17と、デフラグ手順バッファ18とを備えている。
The
ファイル入出力管理部11は、ファイル実データの入出力を管理するものである。また、ファイル入出力管理部11は、アプリケーション101からコマンド及びファイル名などのファイル情報を入力し、ファイル管理部14に出力するものである。
The file input / output management unit 11 manages input / output of file actual data. The file input / output management unit 11 receives file information such as a command and a file name from the
データバッファ12は、ファイル実データを一時的に蓄えるものである。
The
コマンド送受信部13は、後述するコマンドバッファ15及びデフラグ手順コマンド生成部17から蓄積装置制御コマンドを受信するものである。また、コマンド送受信部13は、蓄積装置制御コマンドを蓄積装置制御部20に送信するとともに、蓄積装置制御部20に対してファイル実データを送受信するようになっている。
The command transmission /
さらに、コマンド送受信部13は、コマンドバッファ15が空か否かを確認するようになっている。そして、コマンド送受信部13は、コマンドバッファ15が空のとき、デフラグの手順を示すデフラグ手順情報をデフラグ手順コマンド生成部17に生成するよう指示するようになっている。なお、デフラグ手順情報は、特許請求の範囲に記載の分断化解消手順情報に対応する。
Further, the command transmission /
ファイル管理部14は、ファイルの記録、再生及び消去に関する管理を行うものである。また、ファイル管理部14は、ファイル管理バッファ16に記憶されたファイル管理テーブル16a及びファイル分断情報16bを管理するものである。
The
コマンドバッファ15は、ファイル管理部14からの蓄積装置制御コマンドを一時的に蓄え、コマンド送受信部13に出力するものである。なお、コマンドバッファ15は、本発明のコマンド格納手段に対応する。
The
ファイル管理バッファ16は、ファイル管理テーブル16a及びファイル分断情報16bを記憶するものである。ここで、ファイル管理テーブル16aは、ファイル実データが蓄積装置102内のどの部分に格納されているかを管理するためのテーブルであり、一般的には例えばFAT(File Allocation Table)と呼ばれているものである。ファイルの記録・再生・消去に関しては、ファイル管理部14がファイル管理テーブル16aを参照しながら実行するようになっている。
The
なお、ファイル管理テーブル16aは、実際には蓄積装置102内で管理されているが、通常はパフォーマンス向上のため、起動時(ソフトウェアプログラムが記録再生装置100にマウントされたとき)にファイル管理バッファ16内に一部又は全部がコピーされ、テーブルの内容については一定時間ごとに蓄積装置102内にコピーすることで、定期的に同期をとるような仕組みになっている。同期をとる仕組みについては、図2への記載を省略した。
Note that the file management table 16a is actually managed in the
次に、ファイル分断情報16bは、蓄積装置102におけるファイルの分断箇所を高速に検索するための情報であり、ファイルが分断されて記録されるときには、ファイル管理部14は、ファイル管理テーブル16aを更新し、分断された箇所を示す情報をファイル分断情報16bに登録するようになっている。ここで、ファイル分断情報16bは、実装されていなくてもファイル管理テーブル16aを参照すれば得られる情報である。しかしながら、デフラグの動作がアプリケーション101の動作を極力妨げないようにするため、分断されているファイルとファイルの分断箇所とを示す情報をデフラグ手順コマンド生成部17がCPUを極力使用せずに高速に検索できるよう、ファイルシステム部10がファイル分断情報16bを持つことが好ましい。
Next, the
デフラグ手順コマンド生成部17は、コマンド送受信部13の指示に従って、ファイル分断情報16bを基にデフラグの手順を示すデフラグ手順情報を生成するものである。また、デフラグ手順コマンド生成部17は、生成したデフラグ手順情報を蓄積装置制御コマンドに変換してコマンド送受信部13に出力するものである。この蓄積装置制御コマンドは、コマンド送受信部13によって蓄積装置制御部20に出力されるようになっている。なお、デフラグ手順コマンド生成部17は、本発明の分断化解消コマンド生成手段に対応する。また、デフラグ手順コマンド生成部17がコマンド送受信部13に出力するコマンドは、特許請求の範囲に記載の分断化解消コマンドに対応する。
The defragmentation procedure
デフラグ手順バッファ18は、デフラグ手順コマンド生成部17が生成したデフラグ手順情報を一時的に蓄えるものである。
The
以上のように、本実施の形態におけるファイルシステム部10は、蓄積装置102におけるファイルの分断化の解消を考慮した管理システムになっている。
As described above, the
なお、OSが提供するAPI(Application Program Interface)で使用できるように、ファイルシステムのドライバとしてVFS10aの下に他のファイルシステムと同様にファイルシステム10bを実装するのが望ましいが、蓄積装置102を管理するアプリケーション101でファイルシステム10bを実装し、独自APIで動作させることもできる。
Although it is desirable to mount the
次に、本実施の形態における記録再生装置100の動作について説明する。以下において(1)ファイルの記録、再生、消去に関する動作説明、(2)デフラグに関する処理の動作説明の順で記載する。
Next, the operation of the recording / reproducing
(1)ファイルの記録、再生、消去に関する動作説明
ファイルシステム部10が、アプリケーション101の指示により、(a)ファイルを蓄積装置102に記録するとき、(b)ファイルを蓄積装置102から再生するとき、(c)ファイルを蓄積装置102から消去するときについての動作をそれぞれ説明する。
(1) Description of operations related to recording, reproduction, and deletion of files When the
(a)アプリケーション101の指示によりファイルを蓄積装置102に記録するとき、ファイルシステム部10は次のように動作する。
(A) When a file is recorded in the
ファイル入出力管理部11は、蓄積装置102に記録するファイルのファイルサイズが未知数であるため、データサイズをカウントしながらアプリケーション101からのファイル実データをデータバッファ12に送る。データバッファ12は、ファイル入出力管理部11からファイル実データを一時的に蓄える。
Since the file size of the file to be recorded in the
前述の動作と並行して、ファイル入出力管理部11は、記録するファイルのファイル情報をアプリケーション101から受け取り、ファイル管理部14にファイル情報を送る。ここで、ファイル情報はファイル名情報及びファイルのデータサイズ情報(書き込み時はファイル全体のサイズは未知数なので、実データがデータバッファ12に送られたサイズ)などで構成されるファイルに関する情報である。
In parallel with the above-described operation, the file input / output management unit 11 receives the file information of the file to be recorded from the
ファイル管理部14は、指定されたファイルと同じ名前のファイルが存在しないか確認する。指定されたファイルと同じ名前のファイルが存在しない場合は、そのファイルを登録し、ファイル管理バッファ16に記憶されたファイル管理テーブル16aを基に蓄積装置102の空き領域を探し、ファイル実データを蓄積装置102に格納するためアドレス情報を決定し、動作モード(記録)、データ格納先頭アドレス、データ長の情報をセットでコマンドバッファ15にファイル記録コマンドとして格納する。指定されたファイルと同じ名前のファイルが存在する場合は、指定されたファイルの記録前又は記録後に既に記録されていた同じ名前のファイルを消去するか、既に記録されていた同じ名前のファイルの記録領域を空き領域として、指定されたファイルを記録する。
The
また、ファイル管理部14は、ファイルが分断されて記録される場合は、分断数分の動作モード(記録)、データ格納先頭アドレス、データ長の情報をセットでコマンドバッファ15にファイル記録コマンドとして格納する。その後、ファイル管理部14は、ファイルの記録場所に関する情報をファイル管理テーブル16aに追加登録する。
In addition, when the file is divided and recorded, the
コマンド送受信部13は、データバッファ12及びコマンドバッファ15からそれぞれファイル実データ及びファイル記録コマンドを取り出し、蓄積装置制御部20に渡す。蓄積装置制御部20は、ファイル実データを蓄積装置102に記録する。
The command transmission /
(b)アプリケーション101の指示によりファイルを蓄積装置102から再生するとき、ファイルシステム部10は次のように動作する。
(B) When a file is reproduced from the
ファイル入出力管理部11は、再生するファイルのファイル情報をアプリケーション101から受け取り、ファイル管理部14に送る。
The file input / output management unit 11 receives the file information of the file to be reproduced from the
ファイル管理部14は、ファイル情報及びファイル管理テーブル16aの情報を基にそのファイルが格納されている場所を探し、指定されたファイルと同じ名前のファイルが存在する場合は、動作モード(再生)、データ格納先頭アドレス、データ長の情報をセットでコマンドバッファ15にファイル再生コマンドとして格納する。また、ファイル管理部14は、ファイルが分断されて記録されている場合は、分断数分の動作モード、データ格納先頭アドレス、データ長の情報をセットでコマンドバッファ15にファイル再生コマンドとして格納する。
The
コマンド送受信部13は、コマンドバッファ15からファイル再生コマンドを取り出し、蓄積装置制御部20に渡し、蓄積装置制御部20は、アプリケーション101が指示したファイル実データを蓄積装置102から取り出す。取り出されたファイル実データは、データバッファ12に格納される。ファイル入出力管理部11は、データバッファ12からファイル実データを受け取り、アプリケーション101に渡す。
The command transmission /
(c)アプリケーション101の指示によりファイルを蓄積装置102から消去するとき、ファイルシステム部10は次のように動作する。
(C) When erasing a file from the
ファイル入出力管理部11は、消去するファイルのファイル情報をアプリケーション101から受け取り、ファイル管理部14に送る。
The file input / output management unit 11 receives the file information of the file to be deleted from the
ファイル管理部14は、アプリケーション101によって指定されたファイル名と同じ名前のファイルが存在する場合は、そのファイルの登録を抹消し、ファイル情報及びファイル管理テーブル16aの情報を基に該当するファイルが格納されている場所を探し、その場所を未使用領域としてファイル管理テーブル16aに登録する。
If a file with the same name as the file name specified by the
(2)デフラグに関する処理
以下の説明では、(a)デフラグに関する処理の概要、(b)デフラグに関する処理の具体例の順に説明する。
(2) Processing related to defragmentation In the following description, (a) an outline of processing related to defragmentation and (b) a specific example of processing related to defragmentation will be described.
(a)デフラグに関する処理の概要
デフラグ手順コマンド生成部17は、分断されて記録されたファイルがあるか否かをファイル管理部14に問い合わせる。ファイル管理部14は、デフラグ手順コマンド生成部17から分断ファイルの情報の問い合わせがあると、ファイル分断情報16bを参照し、分断ファイルがないときには分断ファイルがないことを示す情報をデフラグ手順コマンド生成部17に返す。一方、ファイル管理部14は、分断ファイルがあるときには分断ファイルのファイル名情報及び分断箇所を示す情報(以下「分断箇所情報」という。)をデフラグ手順コマンド生成部17に渡す。ここで、分断箇所が多い場合はデフラグ処理の時間が長くなり、アプリケーションの動作を長時間妨げる恐れがあるので、ファイル管理部14は、分断ファイルや分断箇所が複数あるときは、1回のデフラグ処理の時間をできるだけ短くするため、そのうちの1つのファイルのファイル名情報及び分断箇所情報をデフラグ手順コマンド生成部17に渡すのが好ましい。この処理でデフラグされなかった分断箇所は、次回以降にコマンド送受信部13から指示されるときに1箇所ずつデフラグ処理を行えばよい。
(A) Outline of processing related to defragmentation The defragmentation procedure
その後、ファイル管理部14は、デフラグ手順コマンド生成部17に送ったファイル名情報及び分断箇所情報をファイル分断情報16bから消去する。このとき、アプリケーション101からのファイル入出力があるとファイル管理テーブル16aが不整合となるため、ファイル管理部14は、ファイル入出力管理部11からの指示を受け付けないよう自身をロックする。
Thereafter, the
デフラグ手順コマンド生成部17は、ファイル名情報及び分断箇所情報を受け取ると、デフラグ手順情報を生成し、デフラグ手順バッファ18に一時蓄える。デフラグ手順コマンド生成部17は、デフラグ手順バッファ18に蓄えられたデフラグ手順情報を蓄積装置制御コマンドに変換してコマンド送受信部13に渡すとともに、デフラグ手順情報に応じたファイル管理テーブル16aの更新情報をファイル管理部14に送る。このとき、ファイル管理部14は、デフラグ手順コマンド生成部17から受け取ったファイル管理テーブル16aの更新情報を基にファイル管理テーブル16aを更新した後、ファイル入出力管理部11からの指示を受け付けるよう自身のロックを解除する。
When the defragmentation
また、デフラグ手順コマンド生成部17は、デフラグ処理により移動するブロック数が多くブロックの移動に長時間を要すると判断した場合に複数のデフラグ手順に分割する機能があれば、1回のデフラグ処理に要する時間を短くすることができる。
In addition, if the defragmentation procedure
コマンド送受信部13は、デフラグ手順コマンド生成部17から受け取った、デフラグを実行するための蓄積装置制御コマンドを蓄積装置制御部20に渡す。蓄積装置制御部20は、蓄積装置102のインターフェース用のコマンドを生成し、蓄積装置102に対して蓄積装置制御コマンドを発行する。
The command transmission /
(b)デフラグに関する処理の具体例
現在の蓄積装置はHDD1台で数十GBから数百GBの容量があり、このHDDのブロック数は数百万〜数千万程度あるが、ここでは説明を簡略化するため、蓄積装置102の実データ用の容量を6ブロックとし、ファイルシステムは動作説明のための簡単な仕組みのものとする。
(B) Specific example of processing related to defragmentation The current storage device has a capacity of several tens of GB to several hundreds GB with one HDD, and the number of blocks of this HDD is about several million to several tens of millions. For simplification, it is assumed that the storage capacity of the
ファイル管理のためのテーブルとして、ファイル管理テーブル16a、ファイル分断情報16b、デフラグ手順バッファ18を用意する。ファイルの記録時は、ファイル管理テーブル16aに示された空きブロックのうちアドレスの小さい方から順に必要数のブロックを使用する。ファイルの記録時にファイルが分断されることとなったら、ファイル管理部14は、分断されたファイルのファイル名情報と、分断された先頭のブロック番号情報とをファイル分断情報16bに記録する。ここでブロック番号はファイル先頭から数えた、0を基準としたブロックのアドレスを意味する。例えば3ブロック目でファイルが分断された場合はブロックのアドレスとして2が記録され、5ブロック目及び10ブロック目でファイルが分断された場合はブロックのアドレスとして4及び9が記録される。
As a file management table, a file management table 16a, file
以下、ファイルを記録したり消去したりしたときに、どのように記録・消去され、どのようにデフラグが実行されるかについて、ファイル管理テーブル16a、ファイル分断情報16b、デフラグ手順バッファ18の内容の遷移を交えて図3〜5を参照しながら説明する。
Hereinafter, the contents of the file management table 16a, the
初期状態はファイルが蓄積装置102に何も記録されていない状態とし、未使用領域として、0、1、2、3、4、5のアドレスが登録されているものとする(図3(a))。
The initial state is that no file is recorded in the
ここで、ファイルA(ブロックサイズ=1)が蓄積装置102に記録される場合、ファイル管理テーブル16aの未使用領域の先頭に登録されているアドレス0にファイルAの実データが格納され、ファイル管理テーブル16aの未使用領域から格納アドレス0が外される。同時に、ファイル管理テーブル16aにファイルAを登録し、ファイルAの格納アドレス0が登録される。ファイルは分断されないため、ファイル分断情報16bは変更されない(図3(b))。
Here, when the file A (block size = 1) is recorded in the
次にファイルB(ブロックサイズ=2)が記録される場合、ファイル管理テーブル16aの未使用領域の先頭に登録されているアドレス1及び2にBの実データが格納され、ファイル管理テーブル16aの未使用領域から格納アドレス1及び2が外される。同時に、ファイル管理テーブル16aにファイルBを登録し、ファイルBの格納アドレス1及び2が登録される。ファイルは分断されないため、ファイル分断情報16bは変更されない(図3(c))。
Next, when the file B (block size = 2) is recorded, the actual data of B is stored at
次にファイルAを消去する場合、ファイル管理テーブル16aのファイルAに登録されているアドレス0からファイルAの実データを消去し(実際は実データを消去する処理は不要であるが、説明のため図3(d)ではファイルAの実データを消去している)、ファイル管理テーブル16aのファイルAは消去され、さらに未使用領域として格納アドレス0が復活する。ファイルは分断されないため、ファイル分断情報16bは変更されない(図3(d))。
Next, when deleting the file A, the actual data of the file A is deleted from the
次にファイルC(ブロックサイズ=3)が記録される場合、ファイル管理テーブル16aの未使用領域の先頭に登録されているアドレス0、3、4にファイルCの実データが格納され、ファイル管理テーブル16aの未使用領域から格納アドレス0、3、4が外される。同時に、ファイル管理テーブル16aにファイルCが登録され、格納アドレス0、3、4が登録される。ファイルCはアドレス0の次にアドレス3に分断されたため、ファイルCが2ブロック目で分断されていることを示す分断アドレス1がファイル分断情報16bに登録される(図3(e))。
Next, when file C (block size = 3) is recorded, the actual data of file C is stored at
次に、分断されたファイルに対し、どのようにデフラグを実行するかについて図4のフローチャートを用いて説明する。 Next, how to perform defragmentation on the divided file will be described with reference to the flowchart of FIG.
まず、コマンド送受信部13は、コマンドバッファ15にファイル記録再生コマンドが存在するか否かを確認する(ステップS11)。
First, the command transmission /
ステップS11においてコマンドバッファ15にファイル記録再生コマンドが存在する場合、コマンド送受信部13は、コマンドバッファ15からファイル記録再生コマンドを取得し(ステップS12)、蓄積装置制御部20に蓄積装置制御コマンドとして送信する(ステップS13)。
If there is a file recording / playback command in the
一方、ステップS11においてコマンドバッファ15にファイル記録再生コマンドが存在しない場合、デフラグ手順コマンド生成部17は、ファイル管理部14を経由してファイル分断情報16bを確認し(ステップS14)、ファイル分断情報が存在するか否かを判断する(ステップS15)。
On the other hand, when there is no file recording / playback command in the
ステップS15においてファイル分断情報が存在しない場合、すなわちファイル分断情報16bに分断アドレス情報が登録されていない場合はどのファイルも分断されていないので、デフラグ手順コマンド生成部17は、処理をコマンド送受信部13に戻す。
If there is no file division information in step S15, that is, if no division address information is registered in the
一方、ステップS15においてファイル分断情報が存在する場合、すなわちファイル分断情報16bに分断アドレス情報が登録されている場合、デフラグ手順コマンド生成部17は、そのうちの1つの分断アドレス情報を取り出しデフラグ手順コマンドを生成する(ステップS16)。
On the other hand, when the file division information exists in step S15, that is, when the division address information is registered in the
ここで、デフラグ手順コマンドの生成について図5を用いて説明する。図5(a)はデフラグ前における各情報を示し、図5(b)はデフラグ後における各情報を示している。 Here, generation of a defragmentation procedure command will be described with reference to FIG. FIG. 5A shows each information before defragmentation, and FIG. 5B shows each information after defragmentation.
図5(a)に示す例では、ファイル分断情報16bからファイルCがアドレス1で分断されていることが分かるので、デフラグ手順コマンド生成部17は、デフラグ手順コマンドを生成し、コマンド送受信部13は、蓄積装置制御部20に蓄積装置制御コマンドとして送信する。以下、具体的に説明する。
In the example shown in FIG. 5 (a), it can be seen from the
図5(a)に示すように、ファイル管理テーブル16aを参照すると、ファイルCはアドレス0、3、4のブロックに記録され、ファイルBはアドレス1、2のブロックに記録されているのが分かる。そこで、ファイルCの先頭から2ブロック目にあたるアドレス3から最後のアドレス4までをファイルCの先頭から1ブロック目のアドレス(0)+1であるアドレス1に移動する。すなわち、ファイルCの実データをアドレス3からアドレス1に、アドレス4からアドレス2にそれぞれ移動する。移動先となった元々のアドレス1、2は移動ブロック数である2だけ後ろに移動する。すなわち、ファイルBの実データをアドレス1からアドレス3に、アドレス2からアドレス4に移動する。ここまでの処理をまとめると、アドレス1、2とアドレス3、4とを入れ替えることになる。その結果、図5(b)に示すように、ファイルCが格納されるアドレスは0、1、2になるのでファイルCの実データが連続になり、ファイルBが格納されるアドレスは3、4に移動されるが分断はされない。
As shown in FIG. 5A, referring to the file management table 16a, it can be seen that the file C is recorded in the blocks of the
デフラグの手順としては、移動元アドレス=3、移動先アドレス=1、移動ブロック数=2であるので、デフラグ手順コマンド生成部17は、再生:アドレス=3から2ブロック、再生:アドレス=1から2ブロック、記録:アドレス=1から4ブロックというシーケンス情報をデフラグ手順バッファ18に記録する(図5(a)右端)。
As the defragmentation procedure, the source address = 3, the destination address = 1, and the number of blocks to be moved = 2. Therefore, the defragmentation procedure
ここで再生対象のブロックに格納されているファイルの実データは、記録再生装置100のメモリ(図示省略)内に再生された順に一時的に記録されるため、アドレス3、4、1、2の順で当該メモリ内に記録されるものとする。これに合わせて、ファイル管理部14は、ファイル管理テーブル16aの内容を、ファイルCの格納アドレスを0、1、2、ファイルBの格納アドレスを3、4に更新する。また、ファイル管理部14は、ファイル分断情報16bから、ファイルCの分断アドレスを消去する。
Here, since the actual data of the file stored in the block to be played back is temporarily recorded in the order of playback in the memory (not shown) of the recording /
以上のように、本実施の形態における記録再生装置100によれば、コマンド送受信部13は、コマンドバッファ15が空のとき、デフラグの手順を示すデフラグ手順情報をデフラグ手順コマンド生成部17に生成するよう指示し、デフラグ手順コマンド生成部17は、ファイルの分断情報を基に1箇所ずつデフラグ手順情報を生成し、1つのデフラグ動作が終了するとコマンド送受信部13に処理を戻す構成としたので、デフラグ実行時におけるデフラグ実行対象の蓄積装置102へのアクセスを伴うアプリケーション101の動作速度に与える影響を従来のものよりも低減化することができる。
As described above, according to the recording / reproducing
また、本実施の形態における記録再生装置100は、前述のように構成されているので、従来のものとは異なり、複数のユーザが扱うシステムや24時間運用するシステムにおいてもデフラグを実行することができ、かつ、デフラグ実行時におけるデフラグ実行対象の蓄積装置102へのアクセスを伴うアプリケーション101の動作速度に与える影響を従来のものよりも低減化することができる。
In addition, since the recording / reproducing
以上のように、本発明に係る記録再生装置及び記録再生方法は、デフラグ実行時におけるデフラグ実行対象の蓄積装置102へのアクセスを伴うアプリケーションの動作速度に与える影響を従来のものよりも低減化することができるという効果を有し、ハードディスクドライブ等に対してファイルの記録及び再生を行う記録再生装置及び記録再生方法等として有用である。
As described above, the recording / reproducing apparatus and the recording / reproducing method according to the present invention reduce the influence on the operation speed of an application that accompanies access to the defragmentation execution
10 ファイルシステム部
10a VFS
10b ファイルシステム
11 ファイル入出力管理部
12 データバッファ
13 コマンド送受信部
14 ファイル管理部
15 コマンドバッファ(コマンド格納手段)
16 ファイル管理バッファ
16a ファイル管理テーブル
16b ファイル分断情報
17 デフラグ手順コマンド生成部(分断化解消コマンド生成手段)
18 デフラグ手順バッファ
20 蓄積装置制御部
20a 蓄積装置制御コマンド変換部
20b 蓄積装置通信部
100 記録再生装置
101 アプリケーション
102 蓄積装置
10
10b File system 11 File input /
16
18
Claims (4)
前記コマンド格納手段が空のとき前記蓄積装置において複数の領域に分断されて記録されたファイルデータのうち少なくとも1つの分断箇所の分断化を解消するための分断化解消コマンドを生成し分断化解消を実行するステップを含むことを特徴とする記録再生方法。 In a recording / reproducing apparatus comprising command storage means for temporarily storing a control command for an accumulating device for accumulating file data, a recording / reproducing method for recording or reproducing the file data,
When the command storage means is empty, a fragmentation cancellation command is generated to cancel the fragmentation of at least one part of the file data recorded by being divided into a plurality of areas in the storage device, and the fragmentation is resolved. A recording / reproducing method comprising the steps of:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007261054A JP2009093712A (en) | 2007-10-04 | 2007-10-04 | Recording / reproducing apparatus and recording / reproducing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007261054A JP2009093712A (en) | 2007-10-04 | 2007-10-04 | Recording / reproducing apparatus and recording / reproducing method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2009093712A true JP2009093712A (en) | 2009-04-30 |
Family
ID=40665549
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007261054A Pending JP2009093712A (en) | 2007-10-04 | 2007-10-04 | Recording / reproducing apparatus and recording / reproducing method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2009093712A (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003316622A (en) * | 2002-04-23 | 2003-11-07 | Fujitsu Ltd | Information storage device |
-
2007
- 2007-10-04 JP JP2007261054A patent/JP2009093712A/en active Pending
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003316622A (en) * | 2002-04-23 | 2003-11-07 | Fujitsu Ltd | Information storage device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8078819B2 (en) | Arrangements for managing metadata of an integrated logical unit including differing types of storage media | |
US7827368B2 (en) | Snapshot format conversion method and apparatus | |
EP1783595A2 (en) | Information processing system, control method for information processing system, and storage system | |
EP2759942A1 (en) | Computer system, file management method and metadata server | |
JP4402103B2 (en) | Data storage device, data relocation method thereof, and program | |
JP2006268829A (en) | Method and apparatus for mirroring objects between storage systems | |
US20140074782A1 (en) | Re-trim of free space within vhdx | |
US20040268070A1 (en) | Method and apparatus for backing up data in virtual storage medium | |
US8478933B2 (en) | Systems and methods for performing deduplicated data processing on tape | |
JPWO2010055937A1 (en) | Computer system, data storage method and program | |
JP2000122902A (en) | Method for writing data in log structure storage destination, medium and data storage system | |
US8433871B2 (en) | Data copy management for faster reads | |
JP2005316635A (en) | Data processing system and method, and processing program therefor | |
JP2015090655A (en) | Support for worm cartridges realized by linear tape file system (ltfs) | |
JP2005202942A (en) | Information recording medium, data processing apparatus, and data processing method | |
JP5459102B2 (en) | Storage control device, storage system, and storage control method | |
JP2008090378A (en) | Hybrid file system, operating system, cache control method, and recording medium | |
JP2005215940A (en) | Storage system, server apparatus, and preceding copy data generation method | |
JP2008269520A (en) | Recording apparatus and recording method | |
JP2009093712A (en) | Recording / reproducing apparatus and recording / reproducing method | |
JP4984677B2 (en) | Information processing device | |
US20140059305A1 (en) | Management apparatus, storage device, and initialization method | |
JP2006039942A (en) | File management device in hierarchical storage system, and its file management method | |
JP2014059760A (en) | Storage device, control method of storage device, and control program of storage device | |
JP2005122602A (en) | Cache system, information processing system, cache method, program, and recording medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20100310 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20110222 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20110412 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20110608 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20110628 |