JP4748020B2 - Media writing device - Google Patents
Media writing device Download PDFInfo
- Publication number
- JP4748020B2 JP4748020B2 JP2006272003A JP2006272003A JP4748020B2 JP 4748020 B2 JP4748020 B2 JP 4748020B2 JP 2006272003 A JP2006272003 A JP 2006272003A JP 2006272003 A JP2006272003 A JP 2006272003A JP 4748020 B2 JP4748020 B2 JP 4748020B2
- Authority
- JP
- Japan
- Prior art keywords
- writing
- directory
- written
- information
- session
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Television Signal Processing For Recording (AREA)
- Signal Processing For Digital Recording And Reproducing (AREA)
- Management Or Editing Of Information On Record Carriers (AREA)
Description
本発明は、記録メディアへデータを書込むための技術に関する。 The present invention relates to a technique for writing data to a recording medium.
従来、CD(Compact Disk)やDVD(Digital Versatile Disk)等の記録メディアへデータを書込む方法としては、セッション単位で行うものが知られている。この方法では、一旦書込みを終了した後でも、新たなセッションを追加的に書込むことができ、追記可能となっている。 Conventionally, as a method of writing data to a recording medium such as a CD (Compact Disk) or a DVD (Digital Versatile Disk), a method that is performed in units of sessions is known. In this method, a new session can be additionally written even after the writing is once completed, and additional writing is possible.
通常、このようなセッション単位による書込み方法では、セッションの書込みが途中で中断されると、書込み済みデータ内のファイル本体にアクセスできなくなる。これは、データの一部としてファイル本体とともに書込まれるファイル本体の管理情報が不正確なものとなるからである。また、セッションは、中断された時点で正常にクローズされていないため、追記も不可能である。 Normally, in such a writing method in units of sessions, if the writing of a session is interrupted halfway, the file body in the written data cannot be accessed. This is because the management information of the file body written together with the file body as part of the data becomes inaccurate. Further, since the session is not normally closed when it is interrupted, additional writing is impossible.
特許文献1は、セッションの書込みが途中で中断された記録メディアを復旧する技術である。特許文献1では、まず、途中で中断されたセッションを正常にクローズする。その後、再び、新たにオープンしたセッションへ書込みの対象となるデータを書込むことにより、記録メディアを復旧する。
しかしながら、上述した方法は、中断されたセッションに書込まれたデータを無視して、書込みの対象となるデータを初めから書き直すものである。そのため、書込みの対象となるデータを最初から書込めるだけの空き容量が必要となる。中断されたセッションが占める領域によっては、空き容量が足りなくなり、復旧ができなくなることもある。また、中断されたセッションに書込まれたデータは無視されるので、せっかく書込みが完了したファイル本体は無駄となる。 However, the above-described method ignores data written in the interrupted session and rewrites data to be written from the beginning. Therefore, it is necessary to have enough free space to write data to be written from the beginning. Depending on the area occupied by the interrupted session, there may be insufficient free space and recovery may not be possible. In addition, since data written in the interrupted session is ignored, the file body for which writing has been completed is wasted.
従って、本発明の目的は、記録メディアへセッション単位でデータを書込む場合において、書込みが途中で中断されたときでも、書込み済みのファイル本体へアクセスできるようにするものである。 Accordingly, an object of the present invention is to enable access to a written file body even when writing is interrupted in the middle of writing data to a recording medium in units of sessions.
本発明の一つの態様に従うメディア書込み装置は、メディアに対してセッション単位にデータを書込む書込み手段と、前記書込み手段が前記メディアに書込んだデータを特定するための情報を記憶する手段と、前記書込み手段が、一のセッションの書込み途中に所定の中断指示に従って前記書込みを中断し、当該セッションをクローズしたときは、前記記憶手段を参照して書込み済みデータに関する管理情報を生成する手段とを備え、前記書込み手段は、前記クローズしたセッションとは別のセッションとして前記管理情報を前記メディアに書込むことを特徴とする。 A media writing apparatus according to one aspect of the present invention includes a writing unit that writes data to a medium in session units, a unit that stores information for specifying data written by the writing unit to the medium, Means for generating management information relating to written data with reference to the storage means when the writing means interrupts the writing according to a predetermined interruption instruction during writing of one session and closes the session; The writing means writes the management information into the medium as a session different from the closed session.
好適な実施態様では、前記管理情報は、前記一のセッションの書込みにおいて書込みが完了したファイル本体の位置を示すディレクトリレコードと、前記ディレクトリレコードの位置を示すパステーブルとであってもよい。 In a preferred embodiment, the management information may be a directory record indicating a position of a file body in which writing has been completed in writing of the one session, and a path table indicating a position of the directory record.
好適な実施態様では、前記メディアに書込んだデータを特定するための情報は、書込み対象のデータに含まれる全てのファイル本体について書込みが完了したか否かと、書込み対象のデータに含まれる全てのディレクトリのディレクトリレコードについて書込みが完了したか否かとを示す書込み成否情報と、前記書込みが完了したファイル本体の前記メディア上での書込位置を示すファイル情報とを含むものであってもよい。 In a preferred embodiment, the information for specifying the data written on the medium includes whether or not writing has been completed for all the file bodies included in the data to be written, and all the information included in the data to be written. Write success / failure information indicating whether or not the writing of the directory record of the directory is completed, and file information indicating the writing position on the medium of the file body in which the writing has been completed may be included.
好適な実施態様では、前記メディアに書込んだデータを特定するための情報は、書込み対象のデータに含まれる全ディレクトリについて、それぞれのディレクトリのディレクトリレコードの前記メディア上での書込位置を示す情報と、それぞれのディレクトリ下にある子ディレクトリ及びファイル本体のうち書込みが完了した子ディレクトリのディレクトリレコード及びファイル本体の個数を示す書込み総数とを含むものであってもよい。 In a preferred embodiment, the information for specifying the data written on the medium is information indicating the writing position on the medium of the directory record of each directory for all directories included in the data to be written. And the total number of writes indicating the number of directory records and file bodies of the child directories in which writing has been completed among the child directories and file bodies under the respective directories.
本発明により、記録メディアへセッション単位でデータを書込む場合において、書込みが途中で中断されたときでも、書込み済みのファイル本体へアクセスできるようになる。 According to the present invention, when data is written to a recording medium in session units, the written file body can be accessed even when the writing is interrupted.
以下、本発明の一実施形態に係るメディア書込み装置について、図面を参照して説明する。 Hereinafter, a media writing apparatus according to an embodiment of the present invention will be described with reference to the drawings.
図1は、本実施形態に係るメディア書込み装置101の機能構成図である。
FIG. 1 is a functional configuration diagram of a
メディア書込み装置101は、書込みの対象とするデータ(以下、「書込み対象データ」)を記録メディアへ書込む。書込み対象データは、メディア書込み装置101が内部に保持するデータであってもよいし、メモリカード等の記録メディア上に記録されているデータであってもよい。また、書込み対象データを書込む記録メディアは、例えば、CD、DVD等である。本実施形態では、メモリカード107に記録されたデータを、CD108へ書込む場合を例にあげて説明する。
The
メディア書込み装置101は、例えば、汎用的なコンピュータシステムにより構成され、以下に説明するメディア書込み装置101内の個々の機能は、例えば、コンピュータプログラムを実行することにより実現される。また、メディア書込み装置101は、この装置単体で実現することもできるし、プリンタ、デジタル複合機、ビューワなど他の装置に組み込み、その装置の一部の機能として実現することもできるし、電子式スチルカメラ、デジタルビデオカメラなどの一部機能を利用して、電子式スチルカメラ、デジタルビデオカメラと組み合わせて実現することもできる。
The
メディア書込み装置101は、コントローラ102と、メモリ103と、ユーザI/F104と、メモリカードリーダ/ライタ105と、CDリーダ/ライタ106とを備える。
The
メモリカードリーダ/ライタ105は、メモリカード107に格納されているデータを読み出し、メモリカード107にデータを書き込む。
The memory card reader /
CDリーダ/ライタ106は、CD108に格納されているデータを読み出し、CD108にデータを書き込む。
The CD reader /
メモリ103は、後述する書込み済情報を記憶する。書込み済情報は、書込み制御部1022によって作成され、メモリ103に格納される。また、メモリ103に格納された書込み済情報は、中断制御部1023によって参照される。
The
ユーザI/F104は、ユーザからの書込みの中断を受け付ける。ユーザからの書込み中断の要求を受けたユーザI/F104は、その旨をコントローラ102へ通知する。
The user I /
コントローラ102は、メディア書込み装置101が行う各処理を制御する。コントローラ102は、書込み制御部1021と、書込み済情報作成部1022と、中断制御部1023とを備える。
The
書込み制御部1021は、書込み対象データをCD108へ書込む書込み処理を行う。例えば、まず、書込み制御部1021は、メモリカードリーダ/ライタ105を介して、メモリカード107から書込み対象データを読出す。読み出した書込み対象データから、書込み制御部1021は、後述するようなファイル本体に対する管理情報を生成する。書込み制御部1021は、CDリーダ/ライタ106を介して、管理情報及び書込み対象データから抽出したファイル本体をCD108へ書込むことにより、書込み処理を実行する。
The
ここで、書込み前のデータ(書込み対象データ)と、書込み後のデータ(CD108に書込まれるデータ)との構造について、図2乃至図6を参照して説明する。 Here, the structure of data before writing (data to be written) and data after writing (data written to the CD 108) will be described with reference to FIGS.
図2は、メモリカード107に記録された書込み対象データ201の構造の一例を示した図である。
FIG. 2 is a diagram showing an example of the structure of the write
書込み対象データ201は、例えば、ディレクトリ構造202に示すような階層構造を持ち、ディレクトリとファイル本体との集合からなる。図2の場合は、ディレクトリ構造202からわかるように、ルートディレクトリの下には、2つのディレクトリ「ABC」と「DEF」とがある。また、「ABC」の下には、1つの画像ファイル「ABC001.JPG」があり、「DEF」の下には、3つの画像ファイル「DEF001.JPG」と「DEF002.JPG」と「DEF003.JPG」とがあることを示している。メディア書込み装置101は、これらのディレクトリ及びファイル本体の全部をCD108へ書込むこともできるし、一部のディレクトリ及びファイル本体を指定して、指定した部分だけCD108へ書込むこともできる。本実施形態においては、これらのディレクトリ及びファイル本体の全部をCD108へ書込む場合について説明する。
The
このような階層構造を、論理的なデータ構造として示したものが、FATエントリ203である。メディア書込み装置101は、このFATエントリ203を参照することにより、書込み対象データ201を読み出すことができる。
A FAT entry 203 shows such a hierarchical structure as a logical data structure. The
FATエントリ203に示した符号204は、ディレクトリに関する情報(以下、「ディレクトリ情報」)である。ディレクトリ情報204には、当該ディレクトリ下にあるディレクトリ又はファイル本体のディレクトリエントリ205が含まれる。ディレクトリエントリ205は、そのディレクトリ又はファイル本体についてのディレクトリ名又はファイル名、ファイルサイズ、更新日付、ディレクトリ情報204の位置又はファイル本体の位置等の情報から構成される。従って、メディア書込み装置101は、このディレクトリエントリ205を参照することにより、ディレクトリの階層構造とファイル本体の位置とを特定することができる。
Reference numeral 204 shown in the FAT entry 203 is information about a directory (hereinafter, “directory information”). The directory information 204 includes a directory under the directory or a directory entry 205 of the file body. The directory entry 205 includes information such as the directory name or file name, the file size, the update date, the position of the directory information 204, or the position of the file body for the directory or file body. Therefore, the
FATエントリ203について詳細に説明すると、ディレクトリ情報204としては、ルートディレクトリのディレクトリ情報204a、「ABC」のディレクトリ情報204b、「DEF」のディレクトリ情報204cがそれぞれ格納されている。また、ルートディレクトリのディレクトリ情報204aには、「ABC」のディレクトリエントリ205a及び「DEF」のディレクトリエントリ205bが含まれている。同じように、「ABC」のディレクトリ情報204bには、「ABC001.JPG」のディレクトリエントリ205cが、「DEF」のディレクトリ情報204cには、「DEF001.JPG」のディレクトリエントリ205d、「DEF002.JPG」のディレクトリエントリ205e、及び「DEF003.JPG」のディレクトリエントリ205fが、それぞれ含まれている。
The FAT entry 203 will be described in detail. As the directory information 204,
上述したように、各ディレクトリエントリ205には、そのディレクトリ又はファイル本体についてのディレクトリ情報204の位置又はファイル本体の位置が含まれる。すなわち、例えば、「ABC」のディレクトリエントリ205aには、「ABC」のディレクトリ情報204bの位置が、「ABC001.JPG」のディレクトリエントリ205cには、「ABC001.JPG」のファイル本体の位置が、それぞれ含まれている。従って、メディア書込み装置101は、ルートディレクトリのディレクトリ情報204aにある「ABC」のディレクトリエントリを参照して「ABC」のディレクトリ情報204bの位置を特定し、「ABC」のディレクトリ情報204bにある「ABC001.JPG」のディレクトリエントリを参照することにより「ABC001.JPG」の位置を特定することができる。
As described above, each directory entry 205 includes the location of the directory information 204 or the location of the file body for that directory or file body. That is, for example, the
図3は、CD108へ書込まれるデータ301の構造の一例を示した図である。
FIG. 3 is a diagram showing an example of the structure of
メディア書込み装置101は、セッション単位でデータの書込みを行う。すなわち、セッションの開始を示すリードイン302と、セッションの終了を示すリードアウトとに囲まれた区間にデータが書込まれる。
The
CD108に書込まれるデータとしては、PVD(Primary Volume Descriptor)303と、パステーブル304と、ディレクトリレコード305と、ファイル本体306とがある。パステーブル304及びディレクトリレコード305は、ファイル本体306に対する管理情報307であり、ディレクトリの階層構造を表現し、かつファイル本体306の位置を特定するための情報である。この管理情報307は、通常、書込み対象データ201のFATエントリ203を参照して、ディレクトリ情報204やディレクトリエントリ205から必要な情報を取得することにより生成される。
Data to be written on the
これらのデータが書込まれる位置は、CD108に割当てられるセクタ番号に基づいて特定される。同図においてセクタ番号を記しているが、これらは、数値として正確なものではなく、説明する上で簡易的に付与したものである。
The position where these data are written is specified based on the sector number assigned to the
PVD303には、ボリュームに関する基本的な記述情報、例えば、ボリューム名や作者名及びパステーブル304やルートディレクトリのディレクトリレコード305aの位置等が格納される。図4は、PVD303の情報要素を具体的に示したものである。同図からわかるように、PVD303には、パステーブル304の位置(セクタ番号2)とルートディレクトリのディレクトリレコード305aの位置(セクタ番号3)とが格納される。
The
パステーブル304には、ボリューム内の全ディレクトリの情報、例えば、ディレクトリ名、当該ディレクトリの親のディレクトリ名、当該ディレクトリのディレクトリレコード305の位置等が格納される。図5が、パステーブル304の具体的内容を示したものである。例えば、「ABC」に着目すると、親のディレクトリは、ルートディレクトリであり、「ABC」のディレクトリレコード305bの位置は、セクタ番号4であることがわかる。すなわち、このパステーブル304を参照することにより、直接的に「ABC」のディレクトリレコード305bの位置を特定することができるようになる。後述するが、各ディレクトリレコード305には、当該ディレクトリ下にあるディレクトリのディレクトリレコード305又はファイル本体306の位置が記されており、ルートディレクトリから各サブディレクトリを順に一つずつ辿っていくことによっても、目的のディレクトリ又はファイル本体306を検索することができる。「ABC」の場合は、ルートディレクトリのディレクトリレコード305aを参照して、「ABC」のディレクトリレコード305bの位置(セクタ番号4)を特定することになる。この網羅的な検索方法では、「ABC」のように、階層の浅い位置にあるディレクトリ又はファイル本体306を検索する場合は、あまり問題とはならないが、階層の深い位置にある場合は、検索に多くの時間がかかってしまう。そのため、高速にディレクトリを検索するために、パステーブル304が利用される。
The path table 304 stores information on all directories in the volume, for example, the directory name, the directory name of the parent of the directory, the position of the directory record 305 of the directory, and the like. FIG. 5 shows the specific contents of the path table 304. For example, focusing on “ABC”, it can be seen that the parent directory is the root directory, and the position of the
ディレクトリレコード305には、当該ディレクトリ下にある全てのディレクトリ又はファイル本体306に関する情報(以下、「詳細情報」)、例えば、そのディレクトリ又はファイル本体306についてのディレクトリ名又はファイル名、ファイルサイズ、更新日付、ディレクトリレコード305の位置又はファイル本体306の位置等が格納される。このディレクトリレコード305は、全ディレクトリについて生成され、CD108へ書込まれる。従って、本実施形態の場合は、図3に示すように、ルートディレクトリのディレクトリレコード(以下、「ルートディレクトリレコード」。その他のディレクトリについても同じ。)305aと、ABCディレクトリレコード305bと、DEFディレクトリレコード305cとが生成され、CD108へ書込まれることになる。
The directory record 305 includes information on all directories or file bodies 306 under the directory (hereinafter, “detailed information”), for example, the directory name or file name, file size, update date for the directory or file body 306. The location of the directory record 305 or the location of the file body 306 is stored. This directory record 305 is generated for all directories and written to the
図6が、各ディレクトリレコード305の具体的内容を示したものである。同図(a)からわかるように、ルートディレクトリレコード305aには、「ABC」及び「DEF」に関する詳細情報601が含まれている。これにより、ルートディレクトリ下には、「ABC」及び「DEF」があることがわかる。また、詳細情報601には、開始セクタ番号が格納される。この開始セクタ番号は、詳細情報601がディレクトリに関するものである場合は、そのディレクトリレコード305の位置を示し、詳細情報601がファイル本体306に関するものである場合は、そのファイル本体306の位置を示している。従って、「DEF」に関する詳細情報601aに格納された開始セクタ番号6は、DEFディレクトリレコード305cの位置を示していることになる。同様に、ABCディレクトリレコード305b(同図(b))には、「ABC001.JPG」に関する詳細情報601bが含まれているため、「ABC」下には、「ABC001.JPG」があることがわかる。さらに、「ABC001.JPG」に関する詳細情報601bに格納された開始セクタ番号5は、「ABC001.JPG」のファイル本体(以下、「ABC001.JPGファイル本体」。その他のファイルについても同じ。)306aの位置を示していることになる。
FIG. 6 shows the specific contents of each directory record 305. As can be seen from FIG. 5A, the
ファイル本体306は、書込み対象データ201に含まれるファイル本体そのものである。従って、FATエントリ203のディレクトリ情報204やディレクトリエントリ205を参照して抽出されたファイル本体が、そのまま書込まれる。
The file body 306 is the file body itself included in the
以上、説明したことからもわかるように、書込み後のデータ301においては、管理情報307を利用することにより、ファイル本体306の位置が特定される。例えば、DEF001.JPGファイル本体306bの位置の特定は、以下のように行われる。すなわち、まず、PVD303を参照して、ルートディレクトリレコード305aの位置(セクタ番号3)を取得する。次に、ルートディレクトリレコード305aを参照して、DEFディレクトリレコードの位置(セクタ番号6)を取得する。そして、DEFディレクトリレコード305cを参照して、DEF001.JPGファイル本体306bの位置(セクタ番号7)が特定される。また、次のような方法もある。すなわち、PVD303を参照して、パステーブル304の位置(セクタ番号2)を取得する。パステーブル304を参照して、DEFディレクトリレコード305cの位置(セクタ番号6)を取得し、DEFディレクトリレコード305cからDEF001.JPGファイル本体306bの位置(セクタ番号7)を特定する。
As can be understood from the above description, in the
もし、書込みが途中で中断された場合は、管理情報307は、書込まれなかったディレクトリレコード305やファイル本体306の情報まで含んでしまい、不正確なものとなる。そのため、その後当該セッションをクローズしたとしても、この管理情報307は、利用できなくなり、ファイル本体306へのアクセスは、できなくなってしまう。
If the writing is interrupted in the middle, the
本実施形態に係るメディア書込み装置101は、書込みが途中で中断された場合でも、書込み済みのファイル本体306へのアクセスを行えるようにするものである。すなわち、メディア書込み装置101は、中断されるまでに書込みが完了したファイル本体306を参照できるように管理情報307を再生成する。メディア書込み装置101は、この再生成された管理情報(以下、「適正な管理情報」)を、新たなセッションへ書込んで、書込み済みのファイル本体306へアクセスできるようにする。
The
図1に戻り、以下、適正な管理情報を生成する方法について説明する。 Returning to FIG. 1, a method for generating appropriate management information will be described below.
書込み済情報作成部1022は、適正な管理情報を生成するために必要となる情報(以下、「書込み済情報」)を作成する。書込み済情報とは、CD108への書込みが完了したファイル本体306を特定するための情報である。例えば、中断されるまでに書込みが完了したディレクトリレコード305及びファイル本体306を示す情報と、ファイル本体306の位置情報とが含まれる。この中断されるまでに書込みが完了したディレクトリレコード305及びファイル本体306を示す情報は、例えば、書込みが完了したディレクトリ名又はファイル名をリストとして保持するものであってもよいし、書込み対象データ201に含まれる全ディレクトリ及びファイル本体306について書込みが行われたか否かの情報であってもよい。また、書込みが完了したファイル本体306の位置情報は、そのファイル本体306の開始セクタ番号を特定できるものであればよい。
The written
図7は、書込み済情報701の一例を示した図である。同図は、図3に示すように、DEF002.JPGファイル本体の書込み途中で書込みが中断されたときの書込み済情報701を示している。同図においては、書込み対象データ201に含まれる全ディレクトリについて個々に書込み済情報701が作成されている。ルートディレクトリ書込み済情報701a(同図(a))は、ルートディレクトリに関する書込み済情報である。同様に、ABC書込み済情報701b(同図(b))、DEF書込み済情報701c(同図(c))は、それぞれ「ABC」に関する書込み済情報、「DEF」に関する書込み済情報である。各書込み済情報701には、当該ディレクトリのディレクトリレコード305について書込みが完了したか否かを示す情報(以下、「書込み成否情報」)702が格納される。同図では、全てのディレクトリに関して書込み成否情報702が、「書込み済み」となっている。これにより、全てのディレクトリのディレクトリレコード305について書込みが完了していることがわかる。また、各書込み済情報701には、当該ディレクトリ下にあるファイル本体306について書込みが完了したか否かを示す情報と、そのファイル本体306の位置を示す開始セクタ番号とからなる情報(以下、「ファイル情報」)703が格納される。例えば、DEF書込み済情報701cのファイル情報703cについて見ると、「DEF001.JPG」には、開始セクタ番号が格納されている。これにより、DEF001.JPGファイル本体について書込みが完了していることがわかり、その開始セクタ番号は7であることがわかる。一方、「DEF002.JPG」及び「DEF003.JPG」に関しては、開始セクタ番号が格納されていない。これにより、これらのファイル本体306については書込みが完了しなかったこともわかる。
FIG. 7 is a diagram showing an example of the written information 701. As shown in FIG. 3, DEF002. The written information 701 is shown when writing is interrupted during the writing of the JPG file body. In the figure, written information 701 is individually created for all directories included in the
また、符号701'で示したような書込み済情報も考えられる。この書込み済情報701'では、当該ディレクトリ下にあるディレクトリのディレクトリレコード305及びファイル本体306のうち、書込みが行われたディレクトリレコード305及びファイル本体306の総数(以下、「書込み総数」)704と、当該ディレクトリのディレクトリレコードの開始セクタ番号(以下、「先頭開始セクタ番号」)705とが格納される。通常、書込み対象データ201をCD108へ書込む場合には、FATエントリ203の構成に基づいて、書込まれるデータ301の構造が確定する。すなわち、FATエントリ203を参照することにより、ディレクトリレコード305及びファイル本体306がどのような配置で書込まれたかを知ることができる。従って、書込み総数704及び先頭開始セクタ番号705がわかれば、FATエントリ203を参照して、中断されるまでに書込みが完了したディレクトリレコード305及びファイル本体306を示す情報と、ファイル本体306の位置情報とを知ることができる。具体的には、例えば、ディレクトリレコード305に含まれる複数の詳細情報601の格納順序は、ディレクトリ情報204に含まれるディレクトリエントリ205の格納順序に従って決められる。そのため、当該ディレクトリについての書込み総数704を見ることにより、どのディレクトリレコード305又はファイル本体306まで書込みが行われたかがわかることになる。また、ディレクトリレコード305のサイズは固定であり、また、ファイル本体306のサイズは、対応するディレクトリエントリ205を参照することにより知ることができる。上述したように、ディレクトリレコード305及びファイル本体306の配置もFATエントリ203によりわかるので、先頭開始セクタ番号705からファイル本体306の位置を特定することができることになる。このように、書込み総数704及び先頭開始セクタ番号705により書込み済情報701'を構成することにより、書込み済情報701に比較して、必要な情報量を小さくすることができ、メモリ103の使用量を削減することができる。
Further, written information as indicated by reference numeral 701 ′ is also conceivable. In the written information 701 ′, among the directory record 305 and the file body 306 of the directory under the directory, the total number of directory records 305 and file bodies 306 that have been written (hereinafter, “total number of writes”) 704, The start sector number (hereinafter referred to as “start start sector number”) 705 of the directory record of the directory is stored. Normally, when the
再び図1に戻る。書込み済情報作成部1022は、上述した書込み済情報701を作成した後、メモリ103に格納する。書込み済情報701は、ディレクトリレコード305又はファイル本体306が書込まれる度に、その内容が更新されるので、その都度、書込み済情報作成部1022は、メモリ103に格納された書込み済情報を更新する。
Returning again to FIG. The written
中断制御部1023は、書込み処理が途中で中断されたときに、適正な管理情報を生成して、それを新たなセッションに書込む。書込み処理の中断は、例えば、ユーザI/F104を介して受けた書込みの中断要求又は書込みエラー等によって発生する。
When the writing process is interrupted halfway, the
上述したように、適正な管理情報とは、中断されるまでに書込みが完了したファイル本体306を参照できるようにした管理情報(パステーブル304及びディレクトリレコード305)である。適正な管理情報の生成は、メモリに格納された書込み済情報701を参照して行われる。以下、図3に示すように、DEF002.JPGファイル本体の書込み途中で書込みが中断された場合を例にして、適正な管理情報の生成方法及びその構造について、図8乃至図11を参照して説明する。 As described above, the appropriate management information is management information (path table 304 and directory record 305) that enables reference to the file body 306 that has been written before the interruption. Proper management information is generated with reference to written information 701 stored in the memory. Hereinafter, as shown in FIG. A method for generating proper management information and its structure will be described with reference to FIGS. 8 to 11, taking as an example a case where writing is interrupted in the middle of writing the JPG file body.
図8は、中断後新たに書込まれるデータ801の構造の一例を示す図である。
FIG. 8 shows an example of the structure of
上述したように、適正な管理情報808は、新たなセッション(ここでは第2セッション)に書込まれる。そのため、まず、第1セッションの最後にリードアウト802が書込まれ、第1セッションがクローズされる。また、第2セッションがオープンされ、リードイン803とリードアウト807とに囲まれた区間にデータが書込まれる。新たに書込まれるデータは、PVD804と、適正な管理情報808(パステーブル805及びディレクトリレコード806)とになる。
As described above, the
PVD804の内容を図9に示す。PVD804には、パステーブル及びルートディレクトリレコードの位置情報が含まれるが、ここには、新たに第2セッションに書込まれたパステーブル805及びルートディレクトリレコード806aの位置情報が格納される。すなわち、パステーブル805の開始セクタ番号12及びルートディレクトリレコード806aの開始セクタ番号13がそれぞれ格納される。
The contents of
パステーブル805の内容を図10に示す。パステーブル805の内容は、中断されるまでに書込みが完了したディレクトリレコード305に依存して変わる。例えば、DEFディレクトリレコード305cが書込まれなかった場合には、再生成されたパステーブル805は、「DEF」の項目がないものとなる。従って、このパステーブル805に含むべきディレクトリを特定するために、書込み済情報701が参照される。各ディレクトリに関する書込み済情報701の書込み成否情報702を見ると、全てのディレクトリ(ルートディレクトリ、「ABC」、「DEF」)のディレクトリレコード305について書込みが完了していることがわかる。従って、パステーブル805には、全てのディレクトリが含まれることになる。
The contents of the path table 805 are shown in FIG. The contents of the path table 805 change depending on the directory record 305 for which writing has been completed before being interrupted. For example, when the
また、パステーブル805には、全ディレクトリに関するディレクトリレコード305の位置が格納されるが、ここには、新たに第2セッションに書込まれたディレクトリレコード806の位置が格納される。すなわち、ルートディレクトリレコード806aの開始セクタ番号13、ABCディレクトリレコード806bの開始セクタ番号14、及びDEFディレクトリレコード806cの開始セクタ番号15がそれぞれ格納される。
The path table 805 stores the positions of the directory records 305 related to all the directories. Here, the positions of the directory records 806 newly written in the second session are stored. That is, the
ディレクトリレコード806の内容を図11に示す。ディレクトリレコード806の内容は、中断されるまでに書込みが完了したディレクトリレコード305及びファイル本体306に依存して変わる。例えば、DEFディレクトリレコード305cが書込まれなかった場合には、再生成されたルートディレクトリレコード806aは、「DEF」に関する詳細情報1101aがないものとなる。また、DEFディレクトリレコード806cは、生成されない。従って、生成するディレクトリレコード806自体及びディレクトリレコード806に含むべき詳細情報1101を特定するために、書込み済情報701が参照される。まず、各ディレクトリに関する書込み済情報701の書込み成否情報702を見ると、全てのディレクトリ(ルートディレクトリ、「ABC」、「DEF」)のディレクトリレコード305について書込みが完了していることがわかるので、全てのディレクトリについてディレクトリレコード806が生成されることになる。
The contents of the directory record 806 are shown in FIG. The contents of the directory record 806 vary depending on the directory record 305 and the file body 306 that have been written before being interrupted. For example, when the
また、各ディレクトリレコード806に含むべき詳細情報1101は、以下のようにして特定される。すなわち、ディレクトリに関する詳細情報1101の場合は、そのディレクトリのディレクトリレコード806が生成されたか否か、ファイル本体306に関する詳細情報1101の場合は、そのファイル本体306について書込みが完了したか否かにより特定される。上述したように、書込み済情報701による場合は、全てのディレクトリについてディレクトリレコードが生成される。従って、ルートディレクトリレコード806a(同図(a))には、「ABC」及び「DEF」の詳細情報1101が含まれることになる。また、ABC書込み済情報701bのファイル情報703bを見ると、ABC001.JPGファイル本体306aについて書込みが完了していることがわかる。従って、ABCディレクトリレコード806b(同図(b))には、ABC001.JPGファイル本体306aの詳細情報1101が含まれることになる。さらに、DEF書込み済情報701cのファイル情報703cを見ると、DEF001.JPGファイル本体306bについて書込みが完了しているが、DEF002.JPGファイル本体306cとDEF003.JPGファイル本体とについては、書込みが完了していないことがわかる。従って、DEFディレクトリレコード806c(同図(c))には、DEF001.JPGファイル本体306bの詳細情報1101が含まれることになる(DEF002.JPGファイル本体306c及びDEF003.JPGファイル本体の詳細情報1101は含まれない)。
Further, the detailed information 1101 to be included in each directory record 806 is specified as follows. That is, in the case of the detailed information 1101 related to the directory, the directory record 806 of the directory is generated, and in the case of the detailed information 1101 related to the file main body 306, it is specified by whether or not the writing of the file main body 306 is completed. The As described above, in the case of using the written information 701, directory records are generated for all directories. Accordingly, the detailed information 1101 of “ABC” and “DEF” is included in the
次に、各詳細情報1101に格納される内容であるが、特に、開始セクタ番号は、以下のようにして決められる。すなわち、ディレクトリに関する詳細情報1101の場合は、そのディレクトリのディレクトリレコード806が新たに書込まれた位置を、開始セクタ番号とする。従って、例えば、「DEF」に関する詳細情報1101aの開始セクタ番号には、DEFディレクトリレコード806cが書込まれた位置(セクタ番号15)が格納されることになる。また、ファイル本体306に関する詳細情報1101の場合は、そのファイル本体306が中断前に書込まれたときの位置を、開始セクタ番号とする。従って、この場合は、書込み済情報701のファイル情報703が参照される。例えば、「ABC001.JPG」に関する詳細情報1101bの開始セクタ番号には、ABC001.JPGファイル本体306aが中断前に書込まれたときの位置、すなわち第1セッションにあるセクタ番号5が格納される。このABC001.JPGファイル本体306aの位置は、ABC書込み済情報701bのファイル情報703bを参照することにより得られる。また、開始セクタ番号以外の内容は、利用できなくなった管理情報307と同じである。これは、再度書込み対象データ201のFATエントリ203を参照することにより得ることができる。
Next, the contents stored in each detailed information 1101. In particular, the start sector number is determined as follows. That is, in the case of the detailed information 1101 regarding the directory, the position where the directory record 806 of the directory is newly written is set as the start sector number. Therefore, for example, the position (sector number 15) where the
以下、図12及び図13を参照して、書込み処理が中断されたときの動作の流れを説明する。 Hereinafter, with reference to FIG. 12 and FIG. 13, the flow of the operation when the writing process is interrupted will be described.
図12は、本実施形態に係る書込みが中断されたときの処理を示すフローチャートである。 FIG. 12 is a flowchart showing processing when writing according to the present embodiment is interrupted.
書込み制御部1021が書込みを行っているときに、例えば、ユーザI/Fが書込み中断の要求を受ける等して、書込み処理が中断される(S1201)。
When the
書込み処理が中断されると、中断制御部1022は、書込みが中断されたセッションをクローズする(S1202)。また、中断制御部1022は、適正な管理情報808を書込むために新たなセッションをオープンする(S1203)。
When the writing process is interrupted, the interrupt
その後、PVD804が生成され、新たなセッションへ書込まれる(S1204)。
Thereafter,
さらに、適正な管理情報808が生成され、新たなセッションへ書込まれる(S1205、S1206)。
Further,
最後に、新たなセッションがクローズされ書込みが中断されたときの処理が完了する(S1207)。 Finally, the process when the new session is closed and the writing is interrupted is completed (S1207).
また、図13は、適正な管理情報808の生成処理を示すフローチャートである。本処理は、図12における、S1205に相当する。
FIG. 13 is a flowchart showing a process for generating
中断制御部1022は、適正な管理情報808を生成する(S1301)。
The
すなわち、まず、中断制御部1022は、書込み済情報701を参照して、書込みを行うディレクトリレコード806を特定し、パステーブル805を生成する(S1302)。
That is, first, the
次に、中断制御部1022は、書込み対象データ201に含まれる一のディレクトリを選択し、そのディレクトリレコード806を生成するか否かを判断する(S1303、S1304)。この判断は、上述したように、対応するディレクトリの書込み済情報701における書込み成否情報702を参照することにより行われる。
Next, the
選択されたディレクトリについて、ディレクトリレコード806を生成する場合は(S1304:YES)、上述したように、書込み済情報701を参照して、中断されるまでに書込みが完了したディレクトリレコード305及びファイル本体306とファイル本体306の位置とを取得し、ディレクトリレコード806を生成する(S1305)。尚、ディレクトリレコード806の生成に際しては、FATエントリ203も参照される。 When the directory record 806 is generated for the selected directory (S1304: YES), as described above, the directory record 305 and the file body 306 that have been written before being interrupted with reference to the written information 701 are referred to. And the position of the file body 306 are acquired, and a directory record 806 is generated (S1305). Note that the FAT entry 203 is also referred to when the directory record 806 is generated.
選択されたディレクトリについて、ディレクトリレコード806を生成しない場合(S1304:NO)、又はディレクトリレコード806の生成が完了した場合は、書込み対象データ201に含まれる全ディレクトリについてS1303〜S1305の処理を行ったか否かを確認する(S1306)。もし、全ディレクトリについて行っていない場合は(S1306:NO)、全ディレクトリについてS1303〜S1305の処理を繰り返す。そうでない場合は(S1306:YES)、適正な管理情報808の生成処理が完了する(S1307)。
When the directory record 806 is not generated for the selected directory (S1304: NO), or when the generation of the directory record 806 is completed, whether or not the processing of S1303 to S1305 has been performed for all the directories included in the write target data 201 (S1306). If not performed for all directories (S1306: NO), the processing of S1303 to S1305 is repeated for all directories. If not (S1306: YES), the generation process of the
以上、説明したように、適正な管理情報を新たなセッションに書込むことにより、記録メディアへセッション単位でデータを書込む場合において、書込みが途中で中断されたときでも、書込み済みのファイル本体へアクセスできるようになる。 As described above, by writing appropriate management information to a new session, when writing data to a recording medium in units of sessions, even if the writing is interrupted, the written file itself is restored. It becomes accessible.
上述した本発明の実施形態は、本発明の説明のための例示であり、本発明の範囲をそれらの実施形態にのみ限定する趣旨ではない。本発明は、その要旨を逸脱することなく、その他の様々な態様でも実施することができる。 The above-described embodiments of the present invention are examples for explaining the present invention, and are not intended to limit the scope of the present invention only to those embodiments. The present invention can be implemented in various other modes without departing from the gist thereof.
すなわち、書込み済情報は、本実施形態において示した形式のものには限られない。例えば、適正な管理情報として再生成するディレクトリレコードの形式をそのまま用いることもできる。この場合は、メモリに格納する情報量が大きくなってしまうが、書込み済情報がそのまま適正な管理情報となるため、適正な管理情報の生成にかかる処理負荷は小さくなる。 That is, the written information is not limited to the format shown in the present embodiment. For example, the format of a directory record to be regenerated as appropriate management information can be used as it is. In this case, the amount of information stored in the memory becomes large, but since the written information becomes the appropriate management information as it is, the processing load for generating the appropriate management information is reduced.
101…メディア書込み装置、102…コントローラ、103…メモリ、104…ユーザI/F、105…メモリカードリーダ/ライタ、106…CDリーダ/ライタ、107…メモリカード、108…CD、201…書込み対象データ、202…ディレクトリ構造、203…FATエントリ、204…ディレクトリ情報、205…ディレクトリエントリ、301…書込まれるデータ、307…管理情報、601…詳細情報、701…書込み済情報、702…書込み成否情報、703…ファイル情報、704…書込み総数、705…先頭開始セクタ番号、801…中断後に書込まれるデータ、808…適正な管理情報
DESCRIPTION OF
Claims (4)
前記書込み手段が前記メディアに書込んだデータを特定するための書込済み情報を記憶する記憶手段と、
前記書込み手段が、一のセッションの書込み途中に所定の中断指示に従って前記書込みを中断し、当該セッションをクローズしたときは、前記記憶手段を参照して、前記一のセッションの書込みにおいて書込みが完了したファイル本体の位置を示すディレクトリレコードと、前記ディレクトリレコードの位置を示すパステーブルとを含む管理情報を生成する手段とを備え、
前記書込み手段は、前記クローズしたセッションとは別のセッションとして前記管理情報を前記メディアに書込むことを特徴とするメディア書込み装置。 Writing means for writing data to the media in session units;
Storage means for storing written information for specifying data written to the medium by the writing means;
When the writing means interrupts the writing according to a predetermined interruption instruction during the writing of one session and closes the session, the writing is completed in the writing of the one session with reference to the storage means Means for generating management information including a directory record indicating the position of the file body and a path table indicating the position of the directory record ;
The media writing apparatus characterized in that the writing means writes the management information to the media as a session different from the closed session.
書込み対象のデータに含まれる全てのファイル本体について書込みが完了したか否かと、書込み対象のデータに含まれる全てのディレクトリのディレクトリレコードについて書込みが完了したか否かとを示す書込み成否情報と、
前記書込みが完了したファイル本体の前記メディア上での書込位置を示すファイル情報とを含むことを特徴とする請求項1記載のメディア書込み装置。 The written information is
Write success / failure information indicating whether writing has been completed for all file bodies included in the data to be written and whether writing has been completed for directory records of all directories included in the data to be written;
2. The media writing apparatus according to claim 1, further comprising: file information indicating a writing position on the medium of the file body in which the writing has been completed.
前記メディアに対してセッション単位にデータを書込むステップと、
前記書込みにおいて前記メディアに書込んだデータを特定するための書込済み情報を記憶するステップと、
一のセッションの書込み途中に所定の中断指示に従って前記書込みを中断し、当該セッションをクローズしたときは、前記記憶された書込済み情報を参照して、前記一のセッションの書込みにおいて書込みが完了したファイル本体の位置を示すディレクトリレコードと、前記ディレクトリレコードの位置を示すパステーブルとを含む管理情報を生成するステップと、
前記管理情報を前記クローズしたセッションとは別のセッションとして前記メディアに書込むステップとを行うことを特徴とするコンピュータプログラム。
A computer program for enabling reference to data that has been written when writing to the medium is interrupted,
Writing data to the media in session units;
Storing written information for identifying data written to the medium in the writing ;
When the writing is interrupted in accordance with a predetermined interruption instruction during the writing of one session and the session is closed , the writing is completed in the writing of the one session with reference to the stored written information . Generating management information including a directory record indicating the location of the file body and a path table indicating the location of the directory record ;
A computer program, comprising: writing the management information to the medium as a session different from the closed session.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006272003A JP4748020B2 (en) | 2006-10-03 | 2006-10-03 | Media writing device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006272003A JP4748020B2 (en) | 2006-10-03 | 2006-10-03 | Media writing device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2008090955A JP2008090955A (en) | 2008-04-17 |
JP4748020B2 true JP4748020B2 (en) | 2011-08-17 |
Family
ID=39374945
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006272003A Expired - Fee Related JP4748020B2 (en) | 2006-10-03 | 2006-10-03 | Media writing device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4748020B2 (en) |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003085876A (en) * | 2001-09-07 | 2003-03-20 | Fuji Photo Film Co Ltd | Data recorder |
-
2006
- 2006-10-03 JP JP2006272003A patent/JP4748020B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2008090955A (en) | 2008-04-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TWI354274B (en) | Method and apparatus for managing firmware of an o | |
JP2005108135A (en) | System and method for managing files, as well as file management program and recording medium for recording file management program | |
JP4717841B2 (en) | Recording / playback device | |
JP2008123495A (en) | File management apparatus, method for controlling file management apparatus, and program | |
CN101325078A (en) | Information processing apparatus, information processing method and computer program | |
JPH04186447A (en) | Directory management system | |
US8565051B2 (en) | Storage system and method for generating file system in the storage system | |
US7061836B2 (en) | Method and apparatus for processing information data and management information thereof | |
JP2006195588A (en) | Disk system, disk control method, and computer program | |
JP4258846B2 (en) | Image information processing apparatus and image information processing program | |
JP2007536677A (en) | Data recording / playback for write-once discs | |
JP2002056531A (en) | Information recording method of optical disk, and recording medium | |
JP4748020B2 (en) | Media writing device | |
JP2006323462A (en) | File-copying device and file-copying method | |
JP4219791B2 (en) | Data processing method, data processing apparatus, data processing program, and computer-readable recording medium | |
JP4431110B2 (en) | Recording / reproducing system, recording / reproducing method, program, and program recording medium | |
JP4329794B2 (en) | Recording apparatus, recording method, program, and computer-readable recording medium | |
JP2007128286A (en) | Reproducing apparatus, reproducing method and reproducing program | |
US8032009B2 (en) | Backup management apparatus | |
JP7262977B2 (en) | RECORDING DEVICE, CONTROL METHOD THEREOF, AND PROGRAM | |
JP4165490B2 (en) | Image file editing device | |
JP2005182864A (en) | Recording/reproducing device and recording/reproducing method | |
US20070130422A1 (en) | Removable medium access method and related apparatus in an optical disc drive | |
WO2005034127A1 (en) | Recording medium managing apparatus and recording medium managing method | |
JP2007293804A (en) | Backup management apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20090807 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20110118 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20110125 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20110323 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20110419 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20110502 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 4748020 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140527 Year of fee payment: 3 |
|
S531 | Written request for registration of change of domicile |
Free format text: JAPANESE INTERMEDIATE CODE: R313531 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
LAPS | Cancellation because of no payment of annual fees |