[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

JP2009093712A - Recording / reproducing apparatus and recording / reproducing method - Google Patents

Recording / reproducing apparatus and recording / reproducing method Download PDF

Info

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
Application number
JP2007261054A
Other languages
Japanese (ja)
Inventor
Hiroki Minami
浩樹 南
Yutaka Kaneko
金子  豊
Shinya Takeuchi
真也 竹内
Akira Taguchi
亮 田口
Hiroshi Fujisawa
寛 藤沢
Yoshinori Izumi
吉則 和泉
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.)
Japan Broadcasting Corp
Original Assignee
Nippon Hoso Kyokai NHK
Japan Broadcasting 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 Nippon Hoso Kyokai NHK, Japan Broadcasting Corp filed Critical Nippon Hoso Kyokai NHK
Priority to JP2007261054A priority Critical patent/JP2009093712A/en
Publication of JP2009093712A publication Critical patent/JP2009093712A/en
Pending legal-status Critical Current

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を基にデフラグ手順情報を生成する。
【選択図】図1
The 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参照)などが既に提案されている。
特開2001−280976号公報 特開2004−264953号公報 特開2005−92484号公報 特開2004−12965号公報 特開2003−283971号公報 特開2002−268924号公報
Therefore, the defragmentation is generally performed at the timing when it is assumed that there is little access to the CPU and the storage device by other applications. For example, what is executed when the user gives an instruction (for example, see Patent Document 1), what is executed at a predesignated time (for example, see Patent Documents 2 and 3), and what is executed when the system ends (for example, Patent (Refer to Document 4), one that is executed while avoiding a time zone in which another known application operates (for example, see Patent Documents 3 and 5), and one that is executed efficiently using another recording / reproduction operation ( For example, Patent Document 6) has already been proposed.
JP 2001-280976 A JP 2004-264953 A JP 2005-92484 A JP 2004-12965 A JP 2003-283971 A JP 2002-268924 A

ところで、一般的なデフラグのツールは一度デフラグの動作が開始すると、デフラグが終了するまで中断することなく動作を続ける。また、デフラグのツールは、ファイル分断状況の調査から始めるので、フラグメンテーションがほとんど発生していない場合でもある程度まとまった時間を要する。したがって、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 Patent Document 1 that executes defragmentation when a user instructs, in a system handled by a plurality of users, a user other than the user who instructs defragmentation may use an application. In that case, the defragmentation and the application operate simultaneously. In addition, even the user who instructed defragmentation may have to use the application suddenly immediately after instructing defragmentation. In this case, it is necessary to operate the application at a low operating speed or to interrupt defragmentation. There is.

また、特許文献2及び3に示された、予め指定された時刻にデフラグを実行するものは、複数のユーザが扱うシステムにおいては、指定された時刻に誰かが使用する可能性がある。   Further, in the systems that are described in Patent Documents 2 and 3 and execute defragmentation at a predesignated time, there is a possibility that someone uses it at the designated time in a system handled by a plurality of users.

また、特許文献4に示された、システム終了時にデフラグを実行するものは、24時間運用中はデフラグが実行されないので、適用できない。   In addition, the method of performing defragmentation at the time of system termination shown in Patent Document 4 is not applicable because defragmentation is not performed during 24-hour operation.

また、特許文献3及び5に示された、既に分かっている別のアプリケーションが動作する時間帯を避けてデフラグを実行するものは、他のすべてのアプリケーションの動作スケジュールが事前に分かっている場合のみ有効である。   In addition, those that perform defragmentation while avoiding a time zone in which another known application operates as shown in Patent Documents 3 and 5 are only when the operation schedules of all other applications are known in advance. It is valid.

また、特許文献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 apparatus 100 in the present embodiment.

図1に示すように、本実施の形態における記録再生装置100は、ファイルシステム部10と、蓄積装置制御部20とを備えている。なお、図示を省略したが、記録再生装置100は、CPUやメモリなどを備えている。また、ファイルシステム部10及び蓄積装置制御部20は、例えばOS(Operating System)として動作するソフトウェアプログラムで構成される。このソフトウェアプログラムは、記録再生装置100のメモリにロードされ、CPUによって処理される。   As shown in FIG. 1, the recording / reproducing apparatus 100 in the present embodiment includes a file system unit 10 and a storage device control unit 20. Although not shown, the recording / reproducing apparatus 100 includes a CPU, a memory, and the like. Further, the file system unit 10 and the storage device control unit 20 are configured by software programs that operate as an OS (Operating System), for example. This software program is loaded into the memory of the recording / reproducing apparatus 100 and processed by the CPU.

ファイルシステム部10は、VFS(Virtual File System)10aと、ファイルシステム10bとを備え、蓄積装置102(例えばHDD)を制御するための制御コマンド(以下「蓄積装置制御コマンド」という。)を蓄積装置制御部20に出力するものである。この蓄積装置制御コマンドは、ファイルの記録、再生及び消去に関するコマンド(以下「ファイル記録再生コマンド」という。)を含む。   The file system unit 10 includes a VFS (Virtual File System) 10a and a file system 10b, and a control command (hereinafter referred to as “storage device control command”) for controlling the storage device 102 (for example, HDD). This is output to the control unit 20. This storage device control command includes commands relating to file recording, playback and erasure (hereinafter referred to as “file recording / playback commands”).

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 file system 10b include ext2fs (second EXTENDED FILE SYSTEM), JFS (Journaled File System), XFS (External File System), and FAT (File Allocation Table).

ファイルシステム部10は、通常のOSではファイルシステム及びファイルシステムのドライバに相当する部分である。一般的に、蓄積装置102はセクタと呼ばれるブロック単位で管理されており、ファイル単位での管理はされない。ファイルシステム部10はファイルを蓄積装置102内のどの部分に格納するかを管理するためのシステムであり、ファイルシステム部10を備えることにより、ユーザはファイルが蓄積装置102内のどの部分に格納されているかを全く意識せずに蓄積装置102に対してファイルを記録・再生することができ、ファイル単位での管理が可能となる。ファイル管理やファイル記録再生速度などの観点から、すべてのファイルは分断されずに連続するブロックに記録されるのが望ましいが、ファイルの記録・消去を繰り返すうちに、蓄積装置102の空き領域の都合上、ファイルの分断化は避けられなくなる。   The file system unit 10 corresponds to a file system and a file system driver in a normal OS. In general, the storage device 102 is managed in units of blocks called sectors, and is not managed in units of files. The file system unit 10 is a system for managing in which part of the storage device 102 the file is stored. By providing the file system unit 10, the user can store the file in which part of the storage device 102. A file can be recorded / reproduced to / from the storage device 102 without being conscious of whether the file is stored, and management in units of files becomes possible. From the viewpoint of file management, file recording / playback speed, etc., it is desirable that all files be recorded in continuous blocks without being divided. On top of that, file fragmentation is inevitable.

蓄積装置制御部20は、蓄積装置制御コマンド変換部20aと、蓄積装置通信部20bとを備え、蓄積装置102のインターフェース用コマンドを生成するものである。蓄積装置制御コマンド変換部20aは、ファイルシステム部10から出力される蓄積装置制御コマンドを蓄積装置通信部20bと蓄積装置102との間で使用するプロトコルの規格で決められたフォーマットに従って変換して蓄積装置通信部20bに出力するものである。蓄積装置通信部20bは、例えばATA(AT Attachment)やSCSI(Small Computer System Interface)などの規格に基づいて蓄積装置102と通信するものである。   The storage device control unit 20 includes a storage device control command conversion unit 20a and a storage device communication unit 20b, and generates an interface command for the storage device 102. The storage device control command conversion unit 20a converts and stores the storage device control command output from the file system unit 10 according to the format determined by the protocol standard used between the storage device communication unit 20b and the storage device 102. This is output to the device communication unit 20b. The storage device communication unit 20b communicates with the storage device 102 based on a standard such as ATA (AT Attachment) or SCSI (Small Computer System Interface).

次に、本実施の形態における記録再生装置100の詳細な構成について説明する。図2は、本実施の形態における記録再生装置100の詳細な構成を示している。なお、図2においてはVFS10a(図1参照)の図示を省略した。理由は、VFS10aは、ファイルシステム10bの種類に関係なく、アプリケーション101から単一のインターフェースで操作できるものであり、以下の説明では単一のファイルシステムに関する説明のみ行うためである。また、近年のほとんどのOSは、記録装置の記録再生動作の遅さをカバーするために蓄積装置との間にキャッシュを持っており、ファイルの記録再生は蓄積装置に対して直接行われずキャッシュを介して行われるため、頻繁にアクセスされるファイルの記録再生速度が大幅に改善される。したがって、一般のファイルシステムでは、キャッシュへの記録再生及びキャッシュから蓄積装置への記録再生に関わる機能ブロックが存在するが、図2においては図の複雑化を避けるため、OSのキャッシュに関わる部分の図示は省略した。   Next, a detailed configuration of the recording / reproducing apparatus 100 in the present embodiment will be described. FIG. 2 shows a detailed configuration of the recording / reproducing apparatus 100 in the present embodiment. In addition, illustration of VFS10a (refer FIG. 1) was abbreviate | omitted in FIG. The reason is that the VFS 10a can be operated from the application 101 with a single interface regardless of the type of the file system 10b, and in the following description, only a single file system is described. Also, most recent OSs have a cache with the storage device in order to cover the slow recording / playback operation of the recording device, and file recording / playback is not performed directly on the storage device. Therefore, the recording / playback speed of a frequently accessed file is greatly improved. Therefore, in a general file system, there are functional blocks related to recording / playback to the cache and recording / playback from the cache to the storage device. However, in FIG. Illustration is omitted.

図2に示すように、本実施の形態における記録再生装置100は、蓄積装置102に格納されたファイルを管理するファイルシステム部10と、蓄積装置102を制御する蓄積装置制御部20とを備えている。   As shown in FIG. 2, the recording / reproducing apparatus 100 in the present embodiment includes a file system unit 10 that manages files stored in the storage device 102, and a storage device control unit 20 that controls the storage device 102. Yes.

ファイルシステム部10は、ファイル入出力管理部11と、データバッファ12と、コマンド送受信部13と、ファイル管理部14と、コマンドバッファ15と、ファイル管理テーブル16a及びファイル分断情報16bを記憶するファイル管理バッファ16と、デフラグ手順コマンド生成部17と、デフラグ手順バッファ18とを備えている。   The file system unit 10 stores a file input / output management unit 11, a data buffer 12, a command transmission / reception unit 13, a file management unit 14, a command buffer 15, a file management table 16a, and file division information 16b. A buffer 16, a defragmentation procedure command generator 17, and a defragmentation procedure buffer 18 are provided.

ファイル入出力管理部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 application 101 and outputs the file information to the file management unit 14.

データバッファ12は、ファイル実データを一時的に蓄えるものである。   The data buffer 12 temporarily stores file actual data.

コマンド送受信部13は、後述するコマンドバッファ15及びデフラグ手順コマンド生成部17から蓄積装置制御コマンドを受信するものである。また、コマンド送受信部13は、蓄積装置制御コマンドを蓄積装置制御部20に送信するとともに、蓄積装置制御部20に対してファイル実データを送受信するようになっている。   The command transmission / reception unit 13 receives storage device control commands from a command buffer 15 and a defragmentation procedure command generation unit 17 which will be described later. The command transmission / reception unit 13 transmits a storage device control command to the storage device control unit 20 and transmits / receives actual file data to / from the storage device control unit 20.

さらに、コマンド送受信部13は、コマンドバッファ15が空か否かを確認するようになっている。そして、コマンド送受信部13は、コマンドバッファ15が空のとき、デフラグの手順を示すデフラグ手順情報をデフラグ手順コマンド生成部17に生成するよう指示するようになっている。なお、デフラグ手順情報は、特許請求の範囲に記載の分断化解消手順情報に対応する。   Further, the command transmission / reception unit 13 confirms whether or not the command buffer 15 is empty. The command transmission / reception unit 13 instructs the defragmentation procedure command generation unit 17 to generate defragmentation procedure information indicating the defragmentation procedure when the command buffer 15 is empty. The defragmentation procedure information corresponds to the fragmentation elimination procedure information described in the claims.

ファイル管理部14は、ファイルの記録、再生及び消去に関する管理を行うものである。また、ファイル管理部14は、ファイル管理バッファ16に記憶されたファイル管理テーブル16a及びファイル分断情報16bを管理するものである。   The file management unit 14 manages file recording, reproduction, and erasure. The file management unit 14 manages the file management table 16a and the file division information 16b stored in the file management buffer 16.

コマンドバッファ15は、ファイル管理部14からの蓄積装置制御コマンドを一時的に蓄え、コマンド送受信部13に出力するものである。なお、コマンドバッファ15は、本発明のコマンド格納手段に対応する。   The command buffer 15 temporarily stores storage device control commands from the file management unit 14 and outputs them to the command transmission / reception unit 13. The command buffer 15 corresponds to command storage means of the present invention.

ファイル管理バッファ16は、ファイル管理テーブル16a及びファイル分断情報16bを記憶するものである。ここで、ファイル管理テーブル16aは、ファイル実データが蓄積装置102内のどの部分に格納されているかを管理するためのテーブルであり、一般的には例えばFAT(File Allocation Table)と呼ばれているものである。ファイルの記録・再生・消去に関しては、ファイル管理部14がファイル管理テーブル16aを参照しながら実行するようになっている。   The file management buffer 16 stores a file management table 16a and file division information 16b. Here, the file management table 16a is a table for managing in which part of the storage device 102 the actual file data is stored, and is generally called, for example, a FAT (File Allocation Table). Is. Regarding file recording / playback / erasing, the file management unit 14 executes the file referring to the file management table 16a.

なお、ファイル管理テーブル16aは、実際には蓄積装置102内で管理されているが、通常はパフォーマンス向上のため、起動時(ソフトウェアプログラムが記録再生装置100にマウントされたとき)にファイル管理バッファ16内に一部又は全部がコピーされ、テーブルの内容については一定時間ごとに蓄積装置102内にコピーすることで、定期的に同期をとるような仕組みになっている。同期をとる仕組みについては、図2への記載を省略した。   Note that the file management table 16a is actually managed in the storage device 102, but usually the file management buffer 16 at the time of startup (when the software program is mounted on the recording / reproducing device 100) for performance improvement. A part or all of the contents of the table is copied, and the contents of the table are copied into the storage device 102 at regular intervals, so that synchronization is periodically obtained. The description of the mechanism for synchronization is omitted in FIG.

次に、ファイル分断情報16bは、蓄積装置102におけるファイルの分断箇所を高速に検索するための情報であり、ファイルが分断されて記録されるときには、ファイル管理部14は、ファイル管理テーブル16aを更新し、分断された箇所を示す情報をファイル分断情報16bに登録するようになっている。ここで、ファイル分断情報16bは、実装されていなくてもファイル管理テーブル16aを参照すれば得られる情報である。しかしながら、デフラグの動作がアプリケーション101の動作を極力妨げないようにするため、分断されているファイルとファイルの分断箇所とを示す情報をデフラグ手順コマンド生成部17がCPUを極力使用せずに高速に検索できるよう、ファイルシステム部10がファイル分断情報16bを持つことが好ましい。   Next, the file division information 16b is information for quickly searching for a division point of the file in the storage device 102. When the file is divided and recorded, the file management unit 14 updates the file management table 16a. In addition, information indicating the divided location is registered in the file division information 16b. Here, the file division information 16b is information obtained by referring to the file management table 16a even if it is not mounted. However, in order to prevent the defragmentation operation from interfering with the operation of the application 101 as much as possible, the defragmentation procedure command generation unit 17 can display the information indicating the divided file and the division point of the file at high speed without using the CPU as much as possible. It is preferable that the file system unit 10 has the file division information 16b so that it can be searched.

デフラグ手順コマンド生成部17は、コマンド送受信部13の指示に従って、ファイル分断情報16bを基にデフラグの手順を示すデフラグ手順情報を生成するものである。また、デフラグ手順コマンド生成部17は、生成したデフラグ手順情報を蓄積装置制御コマンドに変換してコマンド送受信部13に出力するものである。この蓄積装置制御コマンドは、コマンド送受信部13によって蓄積装置制御部20に出力されるようになっている。なお、デフラグ手順コマンド生成部17は、本発明の分断化解消コマンド生成手段に対応する。また、デフラグ手順コマンド生成部17がコマンド送受信部13に出力するコマンドは、特許請求の範囲に記載の分断化解消コマンドに対応する。   The defragmentation procedure command generation unit 17 generates defragmentation procedure information indicating a defragmentation procedure based on the file division information 16b in accordance with an instruction from the command transmission / reception unit 13. The defragmentation procedure command generation unit 17 converts the generated defragmentation procedure information into a storage device control command and outputs it to the command transmission / reception unit 13. The storage device control command is output to the storage device control unit 20 by the command transmission / reception unit 13. The defragmentation procedure command generation unit 17 corresponds to the fragmentation elimination command generation unit of the present invention. Moreover, the command which the defragmentation procedure command generation part 17 outputs to the command transmission / reception part 13 respond | corresponds to the fragmentation cancellation | release command as described in a claim.

デフラグ手順バッファ18は、デフラグ手順コマンド生成部17が生成したデフラグ手順情報を一時的に蓄えるものである。   The defragmentation procedure buffer 18 temporarily stores the defragmentation procedure information generated by the defragmentation procedure command generator 17.

以上のように、本実施の形態におけるファイルシステム部10は、蓄積装置102におけるファイルの分断化の解消を考慮した管理システムになっている。   As described above, the file system unit 10 in the present embodiment is a management system that takes into account the elimination of file fragmentation in the storage device 102.

なお、OSが提供するAPI(Application Program Interface)で使用できるように、ファイルシステムのドライバとしてVFS10aの下に他のファイルシステムと同様にファイルシステム10bを実装するのが望ましいが、蓄積装置102を管理するアプリケーション101でファイルシステム10bを実装し、独自APIで動作させることもできる。   Although it is desirable to mount the file system 10b under the VFS 10a as a file system driver in the same manner as other file systems so that it can be used in an API (Application Program Interface) provided by the OS, the storage device 102 is managed. It is also possible to mount the file system 10b with the application 101 to be operated and operate with a unique API.

次に、本実施の形態における記録再生装置100の動作について説明する。以下において(1)ファイルの記録、再生、消去に関する動作説明、(2)デフラグに関する処理の動作説明の順で記載する。   Next, the operation of the recording / reproducing apparatus 100 in the present embodiment will be described. In the following, description will be made in the order of (1) operation description relating to file recording, reproduction, and deletion, and (2) operation description relating to defragmentation.

(1)ファイルの記録、再生、消去に関する動作説明
ファイルシステム部10が、アプリケーション101の指示により、(a)ファイルを蓄積装置102に記録するとき、(b)ファイルを蓄積装置102から再生するとき、(c)ファイルを蓄積装置102から消去するときについての動作をそれぞれ説明する。
(1) Description of operations related to recording, reproduction, and deletion of files When the file system unit 10 records (a) a file in the storage device 102 according to an instruction from the application 101, (b) when reproducing a file from the storage device 102 , (C) Operations for deleting a file from the storage device 102 will be described.

(a)アプリケーション101の指示によりファイルを蓄積装置102に記録するとき、ファイルシステム部10は次のように動作する。   (A) When a file is recorded in the storage device 102 according to an instruction from the application 101, the file system unit 10 operates as follows.

ファイル入出力管理部11は、蓄積装置102に記録するファイルのファイルサイズが未知数であるため、データサイズをカウントしながらアプリケーション101からのファイル実データをデータバッファ12に送る。データバッファ12は、ファイル入出力管理部11からファイル実データを一時的に蓄える。   Since the file size of the file to be recorded in the storage device 102 is an unknown number, the file input / output management unit 11 sends the actual file data from the application 101 to the data buffer 12 while counting the data size. The data buffer 12 temporarily stores actual file data from the file input / output management unit 11.

前述の動作と並行して、ファイル入出力管理部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 application 101 and sends the file information to the file management unit 14. Here, the file information is information related to the file including file name information and file data size information (the size of the entire file is unknown at the time of writing, so the actual data is sent to the data buffer 12).

ファイル管理部14は、指定されたファイルと同じ名前のファイルが存在しないか確認する。指定されたファイルと同じ名前のファイルが存在しない場合は、そのファイルを登録し、ファイル管理バッファ16に記憶されたファイル管理テーブル16aを基に蓄積装置102の空き領域を探し、ファイル実データを蓄積装置102に格納するためアドレス情報を決定し、動作モード(記録)、データ格納先頭アドレス、データ長の情報をセットでコマンドバッファ15にファイル記録コマンドとして格納する。指定されたファイルと同じ名前のファイルが存在する場合は、指定されたファイルの記録前又は記録後に既に記録されていた同じ名前のファイルを消去するか、既に記録されていた同じ名前のファイルの記録領域を空き領域として、指定されたファイルを記録する。   The file management unit 14 checks whether there is a file having the same name as the designated file. If a file with the same name as the specified file does not exist, the file is registered, the free space of the storage device 102 is searched based on the file management table 16a stored in the file management buffer 16, and the actual file data is stored. Address information is determined to be stored in the apparatus 102, and the operation mode (recording), data storage head address, and data length information are set and stored in the command buffer 15 as a file recording command. If a file with the same name as the specified file exists, delete the file with the same name that was already recorded before or after recording the specified file, or record the file with the same name that was already recorded. Record the specified file with the area as an empty area.

また、ファイル管理部14は、ファイルが分断されて記録される場合は、分断数分の動作モード(記録)、データ格納先頭アドレス、データ長の情報をセットでコマンドバッファ15にファイル記録コマンドとして格納する。その後、ファイル管理部14は、ファイルの記録場所に関する情報をファイル管理テーブル16aに追加登録する。   In addition, when the file is divided and recorded, the file management unit 14 stores the operation mode (record), data storage start address, and data length information for the number of divisions as a file recording command in the command buffer 15 as a set. To do. Thereafter, the file management unit 14 additionally registers information regarding the recording location of the file in the file management table 16a.

コマンド送受信部13は、データバッファ12及びコマンドバッファ15からそれぞれファイル実データ及びファイル記録コマンドを取り出し、蓄積装置制御部20に渡す。蓄積装置制御部20は、ファイル実データを蓄積装置102に記録する。   The command transmission / reception unit 13 retrieves the actual file data and the file recording command from the data buffer 12 and the command buffer 15, and passes them to the storage device control unit 20. The storage device control unit 20 records the actual file data in the storage device 102.

(b)アプリケーション101の指示によりファイルを蓄積装置102から再生するとき、ファイルシステム部10は次のように動作する。   (B) When a file is reproduced from the storage device 102 in accordance with an instruction from the application 101, the file system unit 10 operates as follows.

ファイル入出力管理部11は、再生するファイルのファイル情報をアプリケーション101から受け取り、ファイル管理部14に送る。   The file input / output management unit 11 receives the file information of the file to be reproduced from the application 101 and sends it to the file management unit 14.

ファイル管理部14は、ファイル情報及びファイル管理テーブル16aの情報を基にそのファイルが格納されている場所を探し、指定されたファイルと同じ名前のファイルが存在する場合は、動作モード(再生)、データ格納先頭アドレス、データ長の情報をセットでコマンドバッファ15にファイル再生コマンドとして格納する。また、ファイル管理部14は、ファイルが分断されて記録されている場合は、分断数分の動作モード、データ格納先頭アドレス、データ長の情報をセットでコマンドバッファ15にファイル再生コマンドとして格納する。   The file management unit 14 searches for the location where the file is stored based on the file information and the information of the file management table 16a. When a file having the same name as the designated file exists, the operation mode (playback), The data storage start address and data length information are stored as a file reproduction command in the command buffer 15 as a set. In addition, when the file is divided and recorded, the file management unit 14 stores the operation mode, the data storage start address, and the data length information corresponding to the number of divisions as a file reproduction command in the command buffer 15 as a set.

コマンド送受信部13は、コマンドバッファ15からファイル再生コマンドを取り出し、蓄積装置制御部20に渡し、蓄積装置制御部20は、アプリケーション101が指示したファイル実データを蓄積装置102から取り出す。取り出されたファイル実データは、データバッファ12に格納される。ファイル入出力管理部11は、データバッファ12からファイル実データを受け取り、アプリケーション101に渡す。   The command transmission / reception unit 13 takes out a file reproduction command from the command buffer 15 and passes it to the storage device control unit 20, and the storage device control unit 20 takes out actual file data instructed by the application 101 from the storage device 102. The extracted file actual data is stored in the data buffer 12. The file input / output management unit 11 receives file actual data from the data buffer 12 and passes it to the application 101.

(c)アプリケーション101の指示によりファイルを蓄積装置102から消去するとき、ファイルシステム部10は次のように動作する。   (C) When erasing a file from the storage device 102 according to an instruction from the application 101, the file system unit 10 operates as follows.

ファイル入出力管理部11は、消去するファイルのファイル情報をアプリケーション101から受け取り、ファイル管理部14に送る。   The file input / output management unit 11 receives the file information of the file to be deleted from the application 101 and sends it to the file management unit 14.

ファイル管理部14は、アプリケーション101によって指定されたファイル名と同じ名前のファイルが存在する場合は、そのファイルの登録を抹消し、ファイル情報及びファイル管理テーブル16aの情報を基に該当するファイルが格納されている場所を探し、その場所を未使用領域としてファイル管理テーブル16aに登録する。   If a file with the same name as the file name specified by the application 101 exists, the file management unit 14 deletes the registration of the file and stores the corresponding file based on the file information and the information in the file management table 16a. The registered location is searched and the location is registered in the file management table 16a as an unused area.

(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 command generation unit 17 inquires of the file management unit 14 whether or not there is a divided and recorded file. The file management unit 14 refers to the file division information 16b when there is an inquiry about the information on the division file from the defragmentation procedure command generation unit 17, and when there is no division file, the file management unit 14 displays information indicating that there is no division file. Return to 17. On the other hand, when there is a divided file, the file management unit 14 passes the file name information of the divided file and information indicating the divided location (hereinafter referred to as “divided location information”) to the defragmentation procedure command generating unit 17. Here, when there are many divided parts, the defragmentation process takes a long time, and there is a possibility that the operation of the application may be hindered for a long time. Therefore, when there are a plurality of divided files and divided parts, the file management unit 14 performs one defragmentation. In order to shorten the processing time as much as possible, it is preferable to pass the file name information and the division part information of one of the files to the defragmentation procedure command generation unit 17. The defragmentation process may be performed for each part that has not been defragmented in this process when the command transmission / reception unit 13 instructs the next time.

その後、ファイル管理部14は、デフラグ手順コマンド生成部17に送ったファイル名情報及び分断箇所情報をファイル分断情報16bから消去する。このとき、アプリケーション101からのファイル入出力があるとファイル管理テーブル16aが不整合となるため、ファイル管理部14は、ファイル入出力管理部11からの指示を受け付けないよう自身をロックする。   Thereafter, the file management unit 14 deletes the file name information and the division location information sent to the defragmentation procedure command generation unit 17 from the file division information 16b. At this time, if there is a file input / output from the application 101, the file management table 16a becomes inconsistent, so the file management unit 14 locks itself so as not to accept an instruction from the file input / output management unit 11.

デフラグ手順コマンド生成部17は、ファイル名情報及び分断箇所情報を受け取ると、デフラグ手順情報を生成し、デフラグ手順バッファ18に一時蓄える。デフラグ手順コマンド生成部17は、デフラグ手順バッファ18に蓄えられたデフラグ手順情報を蓄積装置制御コマンドに変換してコマンド送受信部13に渡すとともに、デフラグ手順情報に応じたファイル管理テーブル16aの更新情報をファイル管理部14に送る。このとき、ファイル管理部14は、デフラグ手順コマンド生成部17から受け取ったファイル管理テーブル16aの更新情報を基にファイル管理テーブル16aを更新した後、ファイル入出力管理部11からの指示を受け付けるよう自身のロックを解除する。   When the defragmentation procedure command generator 17 receives the file name information and the fragmentation location information, it generates defragmentation procedure information and temporarily stores it in the defragmentation procedure buffer 18. The defragmentation procedure command generation unit 17 converts the defragmentation procedure information stored in the defragmentation procedure buffer 18 into a storage device control command and passes it to the command transmission / reception unit 13, and updates information of the file management table 16 a corresponding to the defragmentation procedure information. The file is sent to the file management unit 14. At this time, the file management unit 14 updates the file management table 16a based on the update information of the file management table 16a received from the defragmentation procedure command generation unit 17 and then receives an instruction from the file input / output management unit 11 Release the lock.

また、デフラグ手順コマンド生成部17は、デフラグ処理により移動するブロック数が多くブロックの移動に長時間を要すると判断した場合に複数のデフラグ手順に分割する機能があれば、1回のデフラグ処理に要する時間を短くすることができる。   In addition, if the defragmentation procedure command generation unit 17 has a function to divide into a plurality of defragmentation procedures when it is determined that the number of blocks to be moved is large due to the defragmentation processing and it takes a long time to move, one defragmentation processing is performed The time required can be shortened.

コマンド送受信部13は、デフラグ手順コマンド生成部17から受け取った、デフラグを実行するための蓄積装置制御コマンドを蓄積装置制御部20に渡す。蓄積装置制御部20は、蓄積装置102のインターフェース用のコマンドを生成し、蓄積装置102に対して蓄積装置制御コマンドを発行する。   The command transmission / reception unit 13 passes the storage device control command received from the defragmentation procedure command generation unit 17 to execute the defragmentation to the storage device control unit 20. The storage device control unit 20 generates an interface command for the storage device 102 and issues a storage device control command to the storage device 102.

(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 storage device 102 is 6 blocks, and the file system has a simple mechanism for explaining the operation.

ファイル管理のためのテーブルとして、ファイル管理テーブル16a、ファイル分断情報16b、デフラグ手順バッファ18を用意する。ファイルの記録時は、ファイル管理テーブル16aに示された空きブロックのうちアドレスの小さい方から順に必要数のブロックを使用する。ファイルの記録時にファイルが分断されることとなったら、ファイル管理部14は、分断されたファイルのファイル名情報と、分断された先頭のブロック番号情報とをファイル分断情報16bに記録する。ここでブロック番号はファイル先頭から数えた、0を基準としたブロックのアドレスを意味する。例えば3ブロック目でファイルが分断された場合はブロックのアドレスとして2が記録され、5ブロック目及び10ブロック目でファイルが分断された場合はブロックのアドレスとして4及び9が記録される。   As a file management table, a file management table 16a, file division information 16b, and a defragmentation procedure buffer 18 are prepared. When recording a file, a necessary number of blocks are used in order from the smallest address among the free blocks shown in the file management table 16a. If the file is divided at the time of recording the file, the file management unit 14 records the file name information of the divided file and the divided first block number information in the file division information 16b. Here, the block number means the address of the block with reference to 0, counted from the top of the file. For example, when the file is divided at the third block, 2 is recorded as the block address, and when the file is divided at the fifth block and the tenth block, 4 and 9 are recorded as the block addresses.

以下、ファイルを記録したり消去したりしたときに、どのように記録・消去され、どのようにデフラグが実行されるかについて、ファイル管理テーブル16a、ファイル分断情報16b、デフラグ手順バッファ18の内容の遷移を交えて図3〜5を参照しながら説明する。   Hereinafter, the contents of the file management table 16a, the file division information 16b, and the contents of the defragmentation procedure buffer 18 will be described as to how the file is recorded / erased and how defragmentation is executed when the file is recorded or erased. This will be described with reference to FIGS.

初期状態はファイルが蓄積装置102に何も記録されていない状態とし、未使用領域として、0、1、2、3、4、5のアドレスが登録されているものとする(図3(a))。   The initial state is that no file is recorded in the storage device 102, and addresses 0, 1, 2, 3, 4, and 5 are registered as unused areas (FIG. 3A). ).

ここで、ファイル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 storage device 102, the actual data of the file A is stored at the address 0 registered at the top of the unused area of the file management table 16a, and the file management is performed. The storage address 0 is removed from the unused area of the table 16a. At the same time, the file A is registered in the file management table 16a, and the storage address 0 of the file A is registered. Since the file is not divided, the file division information 16b is not changed (FIG. 3B).

次にファイル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 addresses 1 and 2 registered at the top of the unused area of the file management table 16a, and the file management table 16a Storage addresses 1 and 2 are removed from the use area. At the same time, file B is registered in the file management table 16a, and storage addresses 1 and 2 of file B are registered. Since the file is not divided, the file division information 16b is not changed (FIG. 3C).

次にファイル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 address 0 registered in the file A of the file management table 16a (actually, the process of deleting the actual data is unnecessary, 3 (d), the actual data of file A is erased), file A of file management table 16a is erased, and storage address 0 is restored as an unused area. Since the file is not divided, the file division information 16b is not changed (FIG. 3D).

次にファイル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 addresses 0, 3, and 4 registered at the beginning of the unused area of the file management table 16a. The storage addresses 0, 3, and 4 are removed from the unused area of 16a. At the same time, file C is registered in the file management table 16a, and storage addresses 0, 3, and 4 are registered. Since the file C is divided into the address 3 after the address 0, the division address 1 indicating that the file C is divided at the second block is registered in the file division information 16b (FIG. 3E).

次に、分断されたファイルに対し、どのようにデフラグを実行するかについて図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 / reception unit 13 checks whether or not a file recording / playback command exists in the command buffer 15 (step S11).

ステップS11においてコマンドバッファ15にファイル記録再生コマンドが存在する場合、コマンド送受信部13は、コマンドバッファ15からファイル記録再生コマンドを取得し(ステップS12)、蓄積装置制御部20に蓄積装置制御コマンドとして送信する(ステップS13)。   If there is a file recording / playback command in the command buffer 15 in step S11, the command transmission / reception unit 13 acquires the file recording / playback command from the command buffer 15 (step S12), and transmits it to the storage device control unit 20 as a storage device control command. (Step S13).

一方、ステップS11においてコマンドバッファ15にファイル記録再生コマンドが存在しない場合、デフラグ手順コマンド生成部17は、ファイル管理部14を経由してファイル分断情報16bを確認し(ステップS14)、ファイル分断情報が存在するか否かを判断する(ステップS15)。   On the other hand, when there is no file recording / playback command in the command buffer 15 in step S11, the defragmentation procedure command generation unit 17 checks the file division information 16b via the file management unit 14 (step S14), and the file division information is It is determined whether or not it exists (step S15).

ステップ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 file division information 16b, no file is divided, so the defragmentation procedure command generation unit 17 performs the process of the command transmission / reception unit 13 Return to.

一方、ステップ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 file division information 16b, the defragmentation procedure command generation unit 17 takes out one of the division address information and outputs the defragmentation procedure command. Generate (step S16).

ここで、デフラグ手順コマンドの生成について図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 file division information 16b that the file C is divided at the address 1, so the defragmentation procedure command generation unit 17 generates a defragmentation procedure command, and the command transmission / reception unit 13 Then, the data is transmitted to the storage device control unit 20 as a storage device control command. This will be specifically described below.

図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 addresses 0, 3, 4 and the file B is recorded in the blocks of the addresses 1, 2. . Therefore, the address 3 from the beginning of the file C, which is the second block to the last address 4, is moved from the beginning of the file C to the address 1 which is the address (0) +1 of the first block. That is, the actual data of file C is moved from address 3 to address 1 and from address 4 to address 2. The original addresses 1 and 2 that are the movement destinations move backward by 2 which is the number of movement blocks. That is, the actual data of file B is moved from address 1 to address 3 and from address 2 to address 4. To summarize the processing so far, the addresses 1 and 2 and the addresses 3 and 4 are exchanged. As a result, as shown in FIG. 5B, the addresses where the file C is stored are 0, 1 and 2, so the actual data of the file C is continuous, and the addresses where the file B is stored are 3, 4 It is moved to but is not divided.

デフラグの手順としては、移動元アドレス=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 command generation unit 17 performs reproduction: address = 3 to 2 blocks, reproduction: from address = 1. Sequence information of 2 blocks, recording: address = 1 to 4 blocks is recorded in the defragmentation procedure buffer 18 (the right end of FIG. 5A).

ここで再生対象のブロックに格納されているファイルの実データは、記録再生装置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 / playback apparatus 100, the addresses 3, 4, 1, 2 are stored. It shall be recorded in the memory in order. In accordance with this, the file management unit 14 updates the contents of the file management table 16a to 0, 1, 2 for the storage address of the file C and 3 and 4 for the storage address of the file B. Further, the file management unit 14 deletes the division address of the file C from the file division information 16b.

以上のように、本実施の形態における記録再生装置100によれば、コマンド送受信部13は、コマンドバッファ15が空のとき、デフラグの手順を示すデフラグ手順情報をデフラグ手順コマンド生成部17に生成するよう指示し、デフラグ手順コマンド生成部17は、ファイルの分断情報を基に1箇所ずつデフラグ手順情報を生成し、1つのデフラグ動作が終了するとコマンド送受信部13に処理を戻す構成としたので、デフラグ実行時におけるデフラグ実行対象の蓄積装置102へのアクセスを伴うアプリケーション101の動作速度に与える影響を従来のものよりも低減化することができる。   As described above, according to the recording / reproducing apparatus 100 in the present embodiment, the command transmission / reception unit 13 generates the defragmentation procedure information indicating the defragmentation procedure in the defragmentation procedure command generation unit 17 when the command buffer 15 is empty. The defragmentation procedure command generation unit 17 is configured to generate defragmentation procedure information one place at a time based on the file division information and return the processing to the command transmission / reception unit 13 when one defragmentation operation is completed. The influence on the operation speed of the application 101 that accompanies access to the storage device 102 to be defragmented at the time of execution can be reduced as compared with the conventional one.

また、本実施の形態における記録再生装置100は、前述のように構成されているので、従来のものとは異なり、複数のユーザが扱うシステムや24時間運用するシステムにおいてもデフラグを実行することができ、かつ、デフラグ実行時におけるデフラグ実行対象の蓄積装置102へのアクセスを伴うアプリケーション101の動作速度に与える影響を従来のものよりも低減化することができる。   In addition, since the recording / reproducing apparatus 100 according to the present embodiment is configured as described above, unlike the conventional one, it is possible to execute defragmentation even in a system handled by a plurality of users and a system operated for 24 hours. In addition, the influence on the operation speed of the application 101 that accompanies access to the storage device 102 to be defragmented at the time of defragmentation can be reduced as compared with the conventional one.

以上のように、本発明に係る記録再生装置及び記録再生方法は、デフラグ実行時におけるデフラグ実行対象の蓄積装置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 target storage apparatus 102 at the time of defragmentation, compared to the conventional one. And is useful as a recording / reproducing apparatus and a recording / reproducing method for recording and reproducing a file to / from a hard disk drive or the like.

本発明に係る記録再生装置の一実施の形態における概略構成を示すブロック図The block diagram which shows schematic structure in one Embodiment of the recording / reproducing apparatus which concerns on this invention 本発明に係る記録再生装置の一実施の形態における詳細な構成を示すブロック図The block diagram which shows the detailed structure in one Embodiment of the recording / reproducing apparatus concerning this invention 本発明に係る記録再生装置の一実施の形態におけるデフラグ処理の説明図Explanatory drawing of the defragmentation process in one Embodiment of the recording / reproducing apparatus concerning this invention 本発明に係る記録再生装置の一実施の形態におけるデフラグ処理の各ステップを示すフローチャートThe flowchart which shows each step of the defragmentation process in one Embodiment of the recording / reproducing apparatus based on this invention 本発明に係る記録再生装置の一実施の形態におけるデフラグ手順コマンドの生成についての説明図Explanatory drawing about generation | occurrence | production of the defragmentation procedure command in one Embodiment of the recording / reproducing apparatus based on this invention

符号の説明Explanation of symbols

10 ファイルシステム部
10a VFS
10b ファイルシステム
11 ファイル入出力管理部
12 データバッファ
13 コマンド送受信部
14 ファイル管理部
15 コマンドバッファ(コマンド格納手段)
16 ファイル管理バッファ
16a ファイル管理テーブル
16b ファイル分断情報
17 デフラグ手順コマンド生成部(分断化解消コマンド生成手段)
18 デフラグ手順バッファ
20 蓄積装置制御部
20a 蓄積装置制御コマンド変換部
20b 蓄積装置通信部
100 記録再生装置
101 アプリケーション
102 蓄積装置
10 File system part 10a VFS
10b File system 11 File input / output management unit 12 Data buffer 13 Command transmission / reception unit 14 File management unit 15 Command buffer (command storage means)
16 File management buffer 16a File management table 16b File segmentation information 17 Defragmentation procedure command generation unit (segmentation cancellation command generation means)
18 Defragmentation procedure buffer 20 Storage device control unit 20a Storage device control command conversion unit 20b Storage device communication unit 100 Recording / playback device 101 Application 102 Storage device

Claims (4)

ファイルデータを蓄積する蓄積装置に対する制御コマンドを一時的に格納するコマンド格納手段と、前記コマンド格納手段が空のとき前記蓄積装置において複数の領域に分断されて記録されたファイルデータのうち少なくとも1つの分断箇所の分断化を解消するための分断化解消コマンドを生成する分断化解消コマンド生成手段とを備えたことを特徴とする記録再生装置。 Command storage means for temporarily storing a control command for the storage device for storing file data; and at least one of the file data divided and recorded in a plurality of areas in the storage device when the command storage means is empty What is claimed is: 1. A recording / reproducing apparatus comprising: a fragmentation elimination command generation means for generating a fragmentation elimination command for eliminating fragmentation at a division location. 前記分断化解消コマンド生成手段は、複数の領域に分断されて記録された前記ファイルデータの分断箇所の情報を示すファイル分断情報に基づいて前記分断化解消コマンドを生成することを特徴とする請求項1に記載の記録再生装置。 The segmentation cancellation command generation unit generates the segmentation cancellation command based on file segmentation information indicating information on a segmentation location of the file data segmented and recorded in a plurality of areas. 2. The recording / reproducing apparatus according to 1. 前記分断化解消コマンド生成手段は、前記蓄積装置において前記ファイルデータを管理するためのファイル管理テーブルと、前記ファイル分断情報とに基づき、前記ファイルデータの分断化を解消するための分断化解消手順情報を生成することを特徴とする請求項2に記載の記録再生装置。 The fragmentation elimination command generation means is a fragmentation elimination procedure information for eliminating the division of the file data based on a file management table for managing the file data in the storage device and the file division information. The recording / reproducing apparatus according to claim 2, wherein: ファイルデータを蓄積する蓄積装置に対する制御コマンドを一時的に格納するコマンド格納手段を備えた記録再生装置において、前記ファイルデータを記録又は再生する記録再生方法であって、
前記コマンド格納手段が空のとき前記蓄積装置において複数の領域に分断されて記録されたファイルデータのうち少なくとも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:
JP2007261054A 2007-10-04 2007-10-04 Recording / reproducing apparatus and recording / reproducing method Pending JP2009093712A (en)

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)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003316622A (en) * 2002-04-23 2003-11-07 Fujitsu Ltd Information storage device

Patent Citations (1)

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