JP2021072016A - Image forming apparatus, method for controlling the same, and program - Google Patents

Image forming apparatus, method for controlling the same, and program Download PDF

Info

Publication number
JP2021072016A
JP2021072016A JP2019199567A JP2019199567A JP2021072016A JP 2021072016 A JP2021072016 A JP 2021072016A JP 2019199567 A JP2019199567 A JP 2019199567A JP 2019199567 A JP2019199567 A JP 2019199567A JP 2021072016 A JP2021072016 A JP 2021072016A
Authority
JP
Japan
Prior art keywords
writing
recording medium
data
write command
forming apparatus
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
JP2019199567A
Other languages
Japanese (ja)
Inventor
原 健二
Kenji Hara
健二 原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2019199567A priority Critical patent/JP2021072016A/en
Publication of JP2021072016A publication Critical patent/JP2021072016A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Accessory Devices And Overall Control Thereof (AREA)
  • Facsimiles In General (AREA)

Abstract

To provide an image forming apparatus that can perform writing control suitable for the type of a mounted storage, a method for controlling the same, and a program.SOLUTION: A multi-functional printer changes, based on information on the type of a storage, a writing command for writing meta data in a recording medium to any one of a speed priority writing command for putting the priority on a writing speed in the multi-functional printer and a short break countermeasure priority writing command for putting the priority on the countermeasure against a short break in the multi-functional printer.SELECTED DRAWING: Figure 4

Description

本発明は、画像形成装置、その制御方法、及びプログラムに関する。 The present invention relates to an image forming apparatus, a control method thereof, and a program.

SSDやHDD等のストレージを備える画像形成装置としての複合機が知られている。複合機がストレージにデータを格納する場合、当該データ(以下、「実データ」という。)及び実データの管理情報を含むメタデータがストレージに書き込まれる。ストレージは、揮発性のキャッシュメモリ及び不揮発性の記録媒体を備える。ストレージは、複合機の制御部から書き込み要求を受けると、書き込み速度が記録媒体より速いキャッシュメモリにデータを保持する。これにより、制御部は、書き込み速度が比較的遅い記録媒体への書き込みの完了を待たずに、次のデータの書き込み要求を行うことができる。ストレージにおいて、キャッシュメモリに保持されたデータは、複合機が電源OFF状態に移行してもデータを保持可能な不揮発性の記録媒体に所定のタイミングで書き込まれる。ストレージは、データを効率的に書き込むために記録媒体への書き込み順を制御し、例えば、書き込み要求の受け付け順と異なる順にデータを記録媒体に書き込む。 A multifunction device as an image forming apparatus including storage such as SSD and HDD is known. When the multifunction device stores data in the storage, metadata including the data (hereinafter referred to as "actual data") and management information of the actual data is written in the storage. The storage includes a volatile cache memory and a non-volatile recording medium. When the storage receives a write request from the control unit of the multifunction device, the storage holds the data in a cache memory whose writing speed is faster than that of the recording medium. As a result, the control unit can request the writing of the next data without waiting for the completion of writing to the recording medium having a relatively slow writing speed. In the storage, the data held in the cache memory is written at a predetermined timing to a non-volatile recording medium that can hold the data even when the multifunction device shifts to the power-off state. The storage controls the writing order to the recording medium in order to efficiently write the data. For example, the storage writes the data to the recording medium in an order different from the order in which the writing request is received.

複合機では、ストレージへの書き込み時に瞬断が発生すると、実データとメタデータとが不整合状態となり、実データへアクセスできない等の不具合が生じる。このような不具合の発生を回避するために、複合機は、ジャーナリングファイルシステムを用いる。複合機では、ジャーナリングファイルシステムにより、瞬断に起因する実データとメタデータとの不整合状態が短時間で復旧される。ジャーナリングファイルシステムでは、キャッシュメモリに保持されたメタデータ同士が、書き込み要求の受け付け順と異なる順に記録媒体に書き込まれると、ジャーナリングファイルシステムによる復旧の成功率が下がる。これに対し、従来では、システムに影響を与える重要なデータをストレージに書き込む場合、瞬断対策制御が行われる。瞬断対策制御では、例えば、データが、キャッシュメモリに保持されず、書き込み要求の受け付け順に従って、記録媒体に直接書き込まれる(例えば、特許文献1参照)。これにより、例えば、書き込み速度が比較的遅い記録媒体への書き込みを完了した後に次の書き込み要求を行う必要があるため、複合機における書き込みパフォーマンスが低下するが、ジャーナリングファイルシステムによる復旧の成功率の低下を抑制可能となる。 In a multifunction device, if a momentary interruption occurs when writing to the storage, the actual data and the metadata become inconsistent, causing problems such as inaccessibility of the actual data. In order to avoid the occurrence of such a problem, the multifunction device uses a journaling file system. In the multifunction device, the journaling file system recovers the inconsistency between the actual data and the metadata caused by the momentary interruption in a short time. In the journaling file system, if the metadata held in the cache memory is written to the recording medium in an order different from the order in which the write requests are accepted, the success rate of recovery by the journaling file system decreases. On the other hand, conventionally, when writing important data that affects the system to the storage, momentary interruption countermeasure control is performed. In the momentary interruption countermeasure control, for example, the data is not held in the cache memory and is written directly to the recording medium according to the order in which the write requests are accepted (see, for example, Patent Document 1). As a result, for example, since it is necessary to make the next write request after completing writing to a recording medium having a relatively slow writing speed, the writing performance in the multifunction device deteriorates, but the success rate of recovery by the journaling file system is reduced. The decrease can be suppressed.

特表2010−537309号公報Special Table 2010-537309

しかしながら、複合機には、上述した瞬断対策制御を行う必要が無いストレージが搭載されることがある。例えば、HDDのように、所定の容量より小さい容量のキャッシュメモリを備えるストレージは、記録媒体への書き込み順を制御するために必要な記憶領域をキャッシュメモリに確保できないので、書き込み要求の受け付け順と同じ順にデータが記録媒体に書き込まれる。このようなストレージは、ジャーナリングファイルシステムによる復旧の成功率が低下しないので、上述した瞬断対策制御を行う必要がない。むしろ、このようなストレージにデータを書き込む際に上述した瞬断対策制御を行うと、複合機の書き込みパフォーマンスを不要に低下させてしまう。このように、従来では、搭載されたストレージに適した書き込み制御を行うことができない。 However, the multifunction device may be equipped with a storage that does not need to perform the above-mentioned momentary interruption countermeasure control. For example, in a storage having a cache memory having a capacity smaller than a predetermined capacity, such as an HDD, the storage area required for controlling the writing order to the recording medium cannot be secured in the cache memory. Data are written to the recording medium in the same order. Since such storage does not reduce the success rate of recovery by the journaling file system, it is not necessary to perform the above-mentioned momentary interruption countermeasure control. Rather, if the above-mentioned momentary interruption countermeasure control is performed when writing data to such a storage, the write performance of the multifunction device is unnecessarily reduced. As described above, conventionally, it is not possible to perform write control suitable for the installed storage.

本発明の目的は、搭載されたストレージに適した書き込み制御を行うことができる画像形成装置、その制御方法、及びプログラムを提供することにある。 An object of the present invention is to provide an image forming apparatus capable of performing write control suitable for an mounted storage, a control method thereof, and a program.

上記目的を達成するために、本発明の画像形成装置は、記録媒体及び前記記録媒体より書き込み速度が速い保持手段を備える記憶手段を備える画像形成装置であって、前記保持手段にデータを保持し、前記保持されたデータを前記記録媒体に書き込む制御を行う制御手段と、前記記憶手段に関する情報を取得する取得手段とを備え、前記制御手段は、前記記憶手段に関する情報に基づいて、前記データの管理情報を含むメタデータを前記記録媒体へ書き込むための書き込みコマンドを、前記画像形成装置における書き込み速度を優先する速度優先書き込みコマンド及び前記画像形成装置における瞬断の対策を優先する瞬断対策優先書き込みコマンドの何れかに切り替えることを特徴とする。 In order to achieve the above object, the image forming apparatus of the present invention is an image forming apparatus including a recording medium and a storage means including a holding means having a writing speed faster than that of the recording medium, and holds data in the holding means. The control means is provided with a control means for controlling the writing of the held data to the recording medium and an acquisition means for acquiring information about the storage means, and the control means is based on the information about the storage means. The write command for writing the metadata including the management information to the recording medium is a speed priority write command that prioritizes the writing speed in the image forming apparatus and a momentary interruption countermeasure priority writing that gives priority to the instantaneous interruption countermeasure in the image forming apparatus. It is characterized by switching to any of the commands.

本発明によれば、搭載されたストレージに適した書き込み制御を行うことができる。 According to the present invention, write control suitable for the installed storage can be performed.

本発明の実施の形態に係る画像形成装置としての複合機の外観図である。It is an external view of the multifunction device as an image forming apparatus which concerns on embodiment of this invention. 図1のコントローラの構成を概略的に示すブロック図である。It is a block diagram which shows schematic structure of the controller of FIG. 図1の複合機のソフトウェアモジュールの構成を概略的に示すブロック図である。It is a block diagram which shows schematic structure of the software module of the multifunction device of FIG. 図2のCPUによって実行される登録処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the registration process executed by the CPU of FIG. 図2のストレージにおける書き込みを説明するための図である。It is a figure for demonstrating the writing in the storage of FIG. 図3のデバイスドライバによって実行される書き込みコマンド切替処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the write command switching process executed by the device driver of FIG. 図1の操作部に表示される設定画面の一例を示す図である。It is a figure which shows an example of the setting screen displayed on the operation part of FIG. 図6の書き込みコマンド切替処理の変形例の手順を示すフローチャートである。It is a flowchart which shows the procedure of the modification of the writing command switching process of FIG.

以下、本発明の実施の形態について図面を参照しながら詳述する。なお、本実施の形態では、画像形成装置としての複合機に本発明を適用した場合について説明するが、本発明は複合機に限られない。例えば、PC、携帯端末、タブレット端末、サーバといった記録媒体及び当該記録媒体より書き込み速度が速いキャッシュメモリを備えるストレージを備える情報処理装置に本発明を適用してもよい。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In the present embodiment, the case where the present invention is applied to a multifunction device as an image forming apparatus will be described, but the present invention is not limited to the multifunction device. For example, the present invention may be applied to an information processing device including a recording medium such as a PC, a mobile terminal, a tablet terminal, or a server, and a storage having a cache memory having a writing speed faster than that of the recording medium.

図1は、本発明の実施の形態に係る画像形成装置としての複合機1の外観図である。図1において、複合機1は、コントローラ2、操作部3、スキャン部4、及びプリント部5を備える。複合機1は、ネットワークを介して接続された外部装置、例えば、PC9から印刷の実行指示を受け付ける。 FIG. 1 is an external view of a multifunction device 1 as an image forming apparatus according to an embodiment of the present invention. In FIG. 1, the multifunction device 1 includes a controller 2, an operation unit 3, a scanning unit 4, and a printing unit 5. The multifunction device 1 receives a print execution instruction from an external device connected via a network, for example, a PC 9.

コントローラ2は、複合機1全体を制御する。操作部3は、ユーザから各種指示を受け付け、また、複合機1に関する情報等を表示する。スキャン部4は、原稿から光学的に読み取ったデータをデジタル画像データに変換する。プリント部5は、用紙カセット6、電子写真プロセス7、及び排紙トレイ8を備える。用紙カセット6は、用紙を収納する。電子写真プロセス7は、スキャン部4によって変換されたデジタル画像データを用紙に印刷する。排紙トレイ8は、印刷済みの用紙を出力する。 The controller 2 controls the entire multifunction device 1. The operation unit 3 receives various instructions from the user and displays information and the like related to the multifunction device 1. The scanning unit 4 converts the data optically read from the document into digital image data. The printing unit 5 includes a paper cassette 6, an electrophotographic process 7, and a paper ejection tray 8. The paper cassette 6 stores paper. The electrophotographic process 7 prints the digital image data converted by the scanning unit 4 on paper. The output tray 8 outputs printed paper.

例えば、ユーザが操作部3からコピーの開始を指示した場合、コントローラ2は、スキャン部4を制御して、載置された原稿を逐次読み込んでデジタル画像データを生成する。また、コントローラ2は、プリント部5を制御して、用紙カセット6から電子写真プロセス7へ用紙を給紙し、電子写真プロセス7によって上記デジタル画像データを用紙に複写して定着させ、印刷済みの用紙を排紙トレイ8に出力する。 For example, when the user instructs the operation unit 3 to start copying, the controller 2 controls the scanning unit 4 to sequentially read the placed documents and generate digital image data. Further, the controller 2 controls the printing unit 5, feeds the paper from the paper cassette 6 to the electrophotographic process 7, copies the digital image data on the paper by the electrophotographic process 7, fixes the paper, and prints the paper. The paper is output to the output tray 8.

また、複合機1がPC9からページ記述言語で記述された印刷データを受信した場合、コントローラ2は、受信した印刷データを解析し、当該印刷データを印刷可能なビットマップ形式の画像データに変換する。次いで、コントローラ2は、プリント部5を制御して、用紙カセット6から電子写真プロセス7へ用紙を給紙し、電子写真プロセス7によって当該画像データを用紙に複写して定着させ、印刷済みの用紙を排紙トレイ8に出力する。 When the multifunction device 1 receives the print data described in the page description language from the PC 9, the controller 2 analyzes the received print data and converts the print data into printable bitmap image data. .. Next, the controller 2 controls the printing unit 5 to feed the paper from the paper cassette 6 to the electrophotographic process 7, and the electrophotographic process 7 copies and fixes the image data on the paper to fix the printed paper. Is output to the output tray 8.

図2は、図1のコントローラ2の構成を概略的に示すブロック図である。図2において、コントローラ2は、CPU10、メモリ11、ストレージコントローラ12、ストレージ13(記憶手段)、不揮発性メモリ14、及び電源スイッチ15を備える。CPU10は、メモリ11、ストレージコントローラ12、不揮発性メモリ14、電源スイッチ15、及び操作部3と接続されている。ストレージ13は、ストレージコントローラ12と接続されている。 FIG. 2 is a block diagram schematically showing the configuration of the controller 2 of FIG. In FIG. 2, the controller 2 includes a CPU 10, a memory 11, a storage controller 12, a storage 13 (storage means), a non-volatile memory 14, and a power switch 15. The CPU 10 is connected to a memory 11, a storage controller 12, a non-volatile memory 14, a power switch 15, and an operation unit 3. The storage 13 is connected to the storage controller 12.

CPU10は、複合機1における各種処理の実行を制御する。メモリ11は、CPU10の作業領域として、また、各データの一時格納領域として用いられる。ストレージコントローラ12は、ストレージ13からデータを読み出す制御やストレージ13へデータを書き込む制御を行う。ストレージ13は、例えば、SSDやHDDである。ストレージ13は、後述する図3に示すように、揮発性のキャッシュメモリ23(保持手段)及び不揮発性の記録媒体24を備える。ストレージ13は、画像データや設定データ等の各種データを格納する。不揮発性メモリ14は、ブートプログラムや制御プログラム等を格納する。電源スイッチ15は、ユーザが複合機1の電源オン/電源オフを指示するためのボタンである。 The CPU 10 controls the execution of various processes in the multifunction device 1. The memory 11 is used as a work area of the CPU 10 and as a temporary storage area for each data. The storage controller 12 controls to read data from the storage 13 and to write data to the storage 13. The storage 13 is, for example, an SSD or an HDD. As shown in FIG. 3, which will be described later, the storage 13 includes a volatile cache memory 23 (holding means) and a non-volatile recording medium 24. The storage 13 stores various data such as image data and setting data. The non-volatile memory 14 stores a boot program, a control program, and the like. The power switch 15 is a button for the user to instruct the power on / off of the multifunction device 1.

図3は、図1の複合機1のソフトウェアモジュールの構成を概略的に示すブロック図である。複合機1は、モジュールとして、少なくともアプリケーション16及びカーネル17を備える。 FIG. 3 is a block diagram schematically showing the configuration of the software module of the multifunction device 1 of FIG. The multifunction device 1 includes at least an application 16 and a kernel 17 as modules.

アプリケーション16は、カーネル17上で動作する汎用プログラムである。アプリケーション16は、カーネル17を構成するファイルシステム18に対し、データをストレージ13から読み出すための読み出し要求や、データをストレージ13に書き込むための書き込み要求を行う。カーネル17は、CPU10上で動作するプログラムである。カーネル17は、ファイルシステム18、デバイスキュー21、デバイスドライバ22から構成される。ファイルシステム18は、アプリケーション16から受けた書き込み要求に応じて実データ19及びメタデータ20を生成する。 Application 16 is a general-purpose program that runs on kernel 17. The application 16 makes a read request for reading data from the storage 13 and a write request for writing data to the storage 13 to the file system 18 constituting the kernel 17. The kernel 17 is a program that runs on the CPU 10. The kernel 17 is composed of a file system 18, a device queue 21, and a device driver 22. The file system 18 generates the actual data 19 and the metadata 20 in response to the write request received from the application 16.

実データ19は、書き込み対象となるデータ(以下、「書き込み対象データ」という。)自身である。メタデータ20は、書き込み対象データを管理するための管理情報を含む。管理情報は、例えば、書き込み対象データの名称、書き込み対象データのデータサイズを示す情報、及び書き込み対象データの更新日時を示す情報である。本実施の形態では、実データ19は、ファイルシステム18がアプリケーション16から書き込み要求を受けた場合に生成される。一方、メタデータ20は、データの新規作成やデータの編集に伴うデータサイズの更新といったメタデータ20の作成又は更新が必要となった場合のみ、生成される。このため、1つの書き込み要求に対し、メタデータ20が生成されない場合もある一方、複数のメタデータ20が生成される場合もある。 The actual data 19 is the data to be written (hereinafter, referred to as “write target data”) itself. The metadata 20 includes management information for managing the data to be written. The management information is, for example, the name of the data to be written, the information indicating the data size of the data to be written, and the information indicating the update date and time of the data to be written. In this embodiment, the actual data 19 is generated when the file system 18 receives a write request from the application 16. On the other hand, the metadata 20 is generated only when it is necessary to create or update the metadata 20 such as newly creating data or updating the data size accompanying data editing. Therefore, the metadata 20 may not be generated for one write request, while a plurality of metadata 20 may be generated.

ファイルシステム18は、生成した実データ19及びメタデータ20をストレージ13に書き込むためのキューをデバイスキュー21に投入する。例えば、ファイルシステム18は、実データ19をストレージ13に書き込むためのキュー(以下、「実データキュー」という。)、メタデータ20をストレージ13に書き込むためのキュー(以下、「メタデータキュー」という。)を、この順にデバイスキュー21に投入する。 The file system 18 puts a queue for writing the generated actual data 19 and metadata 20 into the storage 13 into the device queue 21. For example, the file system 18 has a queue for writing the actual data 19 to the storage 13 (hereinafter referred to as “real data queue”) and a queue for writing the metadata 20 to the storage 13 (hereinafter referred to as “metadata queue”). ) Are put into the device queue 21 in this order.

デバイスキュー21は、メモリ11上に構成されたFIFO構造を持つデータキューである。デバイスキュー21は、ストレージ13の仕様で定められた読み書きサイズ、例えば、セクタサイズ(4kB等)の整数倍のサイズのキューを作成する。このキューには、例えば、実データ19やメタデータ20といった書き込み対象データ、当該書き込み対象データが書き込まれる記録媒体24における物理的な書き込み位置を示す書き込み位置情報が含まれる。書き込み位置情報は、例えば、書き込み開始アドレス(LBA等)や書き込みサイズ(セクタサイズxn)である。 The device queue 21 is a data queue having a FIFO structure configured on the memory 11. The device queue 21 creates a queue having a read / write size defined in the specifications of the storage 13, for example, a size that is an integral multiple of the sector size (4 kB, etc.). This queue includes, for example, write target data such as actual data 19 and metadata 20, and write position information indicating a physical write position on the recording medium 24 on which the write target data is written. The write position information is, for example, a write start address (LBA or the like) or a write size (sector size xn).

デバイスドライバ22は、ストレージコントローラ12を駆動するためのソフトウェアモジュールである。デバイスドライバ22は、投入されたキューをデバイスキュー21から順次取り出し、取り出したキューに対応する書き込み対象データのヘッダに従って、DMAを用いた書き込みコマンドをストレージコントローラ12へ送信する。書き込みコマンドを受信したストレージコントローラ12は、書き込み対象データを、所定のインターフェイスのパケット規格に従った電気的な信号に変換し、変換済みの書き込み対象データをストレージ13に出力する。ストレージ13は、受信した書き込み対象データを、記録媒体24より書き込み速度が速い揮発性のキャッシュメモリ23に保持する。キャッシュメモリ23に保持された書き込み対象データは、ストレージ13のCPU(不図示)によって決定された所定のタイミングで不揮発性の記録媒体24に書き込まれる。これにより、複合機1が電源OFF状態に移行しても、ストレージ13に書き込まれたデータが保持される。 The device driver 22 is a software module for driving the storage controller 12. The device driver 22 sequentially takes out the inserted queue from the device queue 21, and transmits a write command using DMA to the storage controller 12 according to the header of the write target data corresponding to the taken out queue. Upon receiving the write command, the storage controller 12 converts the write target data into an electrical signal according to the packet standard of the predetermined interface, and outputs the converted write target data to the storage 13. The storage 13 holds the received data to be written in the volatile cache memory 23 having a writing speed faster than that of the recording medium 24. The data to be written stored in the cache memory 23 is written to the non-volatile recording medium 24 at a predetermined timing determined by the CPU (not shown) of the storage 13. As a result, even if the multifunction device 1 shifts to the power-off state, the data written in the storage 13 is retained.

本実施の形態において、デバイスドライバ22は、2つの書き込み要求に対して記録媒体24における連続したブロックに書き込み可能な場合、2つの書き込み要求を1つの書き込み要求にまとめる最適化処理を行う。また、デバイスドライバ22は、異なる種別の書き込みコマンドを使い分けることで、ストレージ13のキャッシュメモリ23を使用するか否かを制御する(例えば、図3の制御25〜27を参照。)。 In the present embodiment, when the device driver 22 can write to a continuous block in the recording medium 24 for two write requests, the device driver 22 performs an optimization process for combining the two write requests into one write request. Further, the device driver 22 controls whether or not to use the cache memory 23 of the storage 13 by properly using different types of write commands (see, for example, controls 25 to 27 in FIG. 3).

例えば、ストレージ13への書き込み処理においてキャッシュメモリ23を使用する場合、デバイスドライバ22は、速度優先書き込みコマンドをストレージコントローラ12へ送信する。速度優先書き込みコマンドは、ATA規格に従った書き込みコマンド、例えば、WriteDMA Extである。ストレージコントローラ12は、受信した速度優先書き込みコマンドに基づいて書き込み対象データをストレージ13へ送信する。ストレージ13は、受信した書き込み対象データをキャッシュメモリ23に書き込む。一方、デバイスドライバ22は、書き込み対象データが記録媒体24に書き込まれた否かに関わらず、次の書き込み対象データを書き込むための速度優先書き込みコマンドをストレージコントローラ12へ送信する。このように、速度優先書き込みコマンドを用いた書き込み処理では、デバイスドライバ22は、キャッシュメモリ23より書き込み速度が遅い記録媒体24への書き込みの完了を待たずに、次の書き込み対象データの書き込みが指示される。その結果、複合機1における書き込みパフォーマンスを向上可能となる。このようにしてキャッシュメモリ23には、複数の書き込み対象データが保持される。キャッシュメモリ23に保持された複数の書き込み対象データは、所定のタイミングで記録媒体24に書き込まれる。このとき、各書き込み対象データは、デバイスドライバ22が書き込み要求を受け付けた順(キャッシュメモリ23に書き込まれた順)ではなく、ストレージ13のCPU(不図示)が決定した書き込み順、例えば、データを効率的に書き込み可能な書き込み順に従って書き込まれる。 For example, when the cache memory 23 is used in the write process to the storage 13, the device driver 22 transmits a speed priority write command to the storage controller 12. The speed priority write command is a write command according to the ATA standard, for example, WriteDMAExt. The storage controller 12 transmits the write target data to the storage 13 based on the received speed priority write command. The storage 13 writes the received write target data to the cache memory 23. On the other hand, the device driver 22 transmits a speed priority write command for writing the next write target data to the storage controller 12 regardless of whether or not the write target data has been written to the recording medium 24. As described above, in the writing process using the speed priority writing command, the device driver 22 is instructed to write the next data to be written without waiting for the completion of writing to the recording medium 24 whose writing speed is slower than that of the cache memory 23. Will be done. As a result, the writing performance in the multifunction device 1 can be improved. In this way, the cache memory 23 holds a plurality of data to be written. The plurality of write target data held in the cache memory 23 are written to the recording medium 24 at a predetermined timing. At this time, each write target data is not in the order in which the device driver 22 receives the write request (in the order in which it was written in the cache memory 23), but in the write order determined by the CPU (not shown) of the storage 13, for example, data. Written according to an efficiently writable write order.

複合機1では、ストレージ13への書き込み対象データの書き込み時に瞬断が発生すると、実データ19とメタデータ20とが不整合状態となり、実データ19へアクセスできなくなる、若しくは新たなデータを作成できなくなる等の不具合が生じる。その結果、例えば、アプリケーション16が正常に動作できなくなり、複合機1がハングするといった重大な障害が発生してしまう。このような重大な障害の発生を防止するために、上記不具合が生じた際に、fsck等の専用の修復ソフトウェアモジュールによるデータ修復処理を実施する必要があるが、このデータ修復処理を完了するまでに数分〜数時間程度の時間を要してしまう。データ修復処理を完了するまでデータへアクセスできない状態が続くのは好ましくないので、複合機1は、上述した不具合が生じた際に、ジャーナリングファイルシステムを用いる。複合機1では、ジャーナリングファイルシステムにより、瞬断に起因する実データ19とメタデータ20との不整合状態が短時間で復旧される。ジャーナリングファイルシステムによる復旧の成功率は、ファイルシステム18の仕様に依存する。例えば、実データA1、実データA1の管理情報を含むメタデータA2、実データB1、実データB1の管理情報を含むメタデータB2の順に書き込み要求を受け付けたのに対し、メタデータB2の後にメタデータA2が書き込まれるといった、書き込み要求の受け付け順と異なる順にメタデータA2,B2が記録媒体24に書き込まれると、ジャーナリングファイルシステムによる復旧の成功率が下がる。 In the multifunction device 1, if a momentary interruption occurs when writing the data to be written to the storage 13, the actual data 19 and the metadata 20 become inconsistent, the actual data 19 cannot be accessed, or new data can be created. Problems such as disappearance occur. As a result, for example, the application 16 cannot operate normally, and a serious failure such as the multifunction device 1 hangs occurs. In order to prevent the occurrence of such a serious failure, it is necessary to carry out data repair processing by a dedicated repair software module such as fsck when the above-mentioned trouble occurs, but until this data repair processing is completed. It takes a few minutes to a few hours. Since it is not preferable that the data cannot be accessed until the data restoration process is completed, the multifunction device 1 uses a journaling file system when the above-mentioned problems occur. In the multifunction device 1, the journaling file system recovers the inconsistent state between the actual data 19 and the metadata 20 due to the momentary interruption in a short time. The success rate of recovery by the journaling file system depends on the specifications of the file system 18. For example, the write request is received in the order of the actual data A1, the metadata A2 including the management information of the actual data A1, the actual data B1, and the metadata B2 including the management information of the actual data B1, whereas the meta data B2 is followed by the meta. If the metadata A2 and B2 are written to the recording medium 24 in an order different from the order in which the write requests are received, such as when the data A2 is written, the success rate of recovery by the journaling file system decreases.

上記復旧の成功率の低下を抑制する瞬断対策制御として、デバイスドライバ22は、メタデータ同士が書き込み要求の受け付け順と異なる順に記録媒体24へ書き込まれないように制御する。例えば、デバイスドライバ22は、記録媒体24へ一のメタデータの書き込みを完了した後に次のデータ(例えば、他のメタデータ。)を記録媒体24へ書きこむための書き込みコマンドをストレージコントローラ12に送信する。瞬断対策制御は、上記復旧の成功率が下がる可能性が高いストレージに対して有効である。しかし、複合機1には、上述した瞬断対策制御を行う必要が無いストレージが搭載されることがある。例えば、HDDのように、所定の容量より小さい容量のキャッシュメモリを備えるストレージは、記録媒体への書き込み順を制御するために必要な記憶領域をキャッシュメモリに確保できず、書き込み要求の受け付け順と同じ順にデータが記録媒体に書き込まれる。このようなストレージは、上記復旧の成功率が低下しないので、瞬断対策制御を行う必要がない。むしろ、このようなストレージにデータを書き込む際に瞬断対策制御を行うと、複合機の書き込みパフォーマンスを不要に低下させてしまう。このように、従来では、搭載されたストレージに適した書き込み制御を行うことができない。 As an instantaneous interruption countermeasure control for suppressing the decrease in the success rate of recovery, the device driver 22 controls so that the metadata is not written to the recording medium 24 in an order different from the reception order of the write request. For example, the device driver 22 transmits a write command for writing the next data (for example, other metadata) to the recording medium 24 to the storage controller 12 after completing the writing of one metadata to the recording medium 24. To do. The momentary interruption countermeasure control is effective for the storage in which the success rate of the above recovery is likely to decrease. However, the multifunction device 1 may be equipped with a storage that does not need to perform the above-mentioned instantaneous interruption countermeasure control. For example, in a storage having a cache memory having a capacity smaller than a predetermined capacity, such as an HDD, the storage area required for controlling the writing order to the recording medium cannot be secured in the cache memory, and the writing request reception order and Data are written to the recording medium in the same order. In such a storage, since the success rate of the above recovery does not decrease, it is not necessary to perform momentary interruption countermeasure control. Rather, if momentary interruption countermeasure control is performed when writing data to such storage, the write performance of the multifunction device is unnecessarily reduced. As described above, conventionally, it is not possible to perform write control suitable for the installed storage.

このような課題を解決するために、本実施の形態では、ストレージ13に関する情報に基づいて、メタデータ20を記録媒体24へ書き込むための書き込みコマンドが、複合機1における書き込み速度を優先する速度優先書き込みコマンド及び複合機1における瞬断の対策を優先する瞬断対策優先書き込みコマンドの何れかに切り替わる。 In order to solve such a problem, in the present embodiment, the write command for writing the metadata 20 to the recording medium 24 gives priority to the write speed in the multifunction device 1 based on the information about the storage 13. It switches to either the write command or the instantaneous interruption countermeasure priority write command that gives priority to the instantaneous interruption countermeasure in the multifunction device 1.

図4は、図2のCPU10によって実行される登録処理の手順を示すフローチャートである。図4の処理は、CPU10が不揮発性メモリ14に格納された制御プログラムを実行することによって実現される。図4の処理は、ユーザによる電源スイッチ15のオン操作に従ってCPU10が不揮発性メモリ14に格納されたブートプログラムを実行した際に行われる。なお、この時点では、ストレージ13がカーネル17に登録されておらず、複合機1はストレージ13を使用不可能な状態である。 FIG. 4 is a flowchart showing a procedure of registration processing executed by the CPU 10 of FIG. The process of FIG. 4 is realized by the CPU 10 executing the control program stored in the non-volatile memory 14. The process of FIG. 4 is performed when the CPU 10 executes a boot program stored in the non-volatile memory 14 according to an on operation of the power switch 15 by the user. At this point, the storage 13 is not registered in the kernel 17, and the multifunction device 1 is in a state where the storage 13 cannot be used.

図4において、まず、CPU10は、ストレージ13を検出すると(ステップS401でYES)、検出したストレージ13からストレージ13に関する情報を取得する(ステップS402)。ステップS402では、CPU10は、例えば、検出したストレージ13へ、ストレージ13に関する情報を要求するIdentifyコマンドを送信する。ストレージ13は、受信したIdentifyコマンドに応答してストレージ13に関する情報をCPU10へ送信する。ストレージ13に関する情報は、ストレージ13の種別を示す情報、例えば、ストレージ13の型番を示す情報や記録媒体24の回転数を示す情報を含む。次いで、CPU10は、取得したストレージ13に関する情報に基づいてストレージ13の種別を判別する(ステップS403)。具体的に、CPU10は、ストレージ13がHDD及びSSDの何れであるかを判別する。 In FIG. 4, first, when the CPU 10 detects the storage 13 (YES in step S401), the CPU 10 acquires information about the storage 13 from the detected storage 13 (step S402). In step S402, the CPU 10 transmits, for example, an Identity command requesting information about the storage 13 to the detected storage 13. The storage 13 transmits information about the storage 13 to the CPU 10 in response to the received Identity command. The information regarding the storage 13 includes information indicating the type of the storage 13, for example, information indicating the model number of the storage 13 and information indicating the rotation speed of the recording medium 24. Next, the CPU 10 determines the type of the storage 13 based on the acquired information about the storage 13 (step S403). Specifically, the CPU 10 determines whether the storage 13 is an HDD or an SSD.

HDDは、一般的に、キャッシュメモリの容量が所定の容量より小さく、記録媒体への書き込み順を制御するために必要な記憶領域をキャッシュメモリに確保できず、書き込み要求の受け付け順と同じ順にデータを記録媒体に書き込む。このため、HDDは、上記復旧の成功率が下がらない。また、HDDは、記録媒体であるプラッタにデータを書き込む書き込み速度が所定の速度より遅い。このようなストレージに対する書き込み処理では、上記復旧の成功率の低下の抑制より、複合機1における書き込みパフォーマンスの向上を優先するのが好ましい。 In the HDD, the capacity of the cache memory is generally smaller than a predetermined capacity, the storage area required for controlling the writing order to the recording medium cannot be secured in the cache memory, and the data is stored in the same order as the writing request acceptance order. Is written on the recording medium. Therefore, the success rate of the above recovery of the HDD does not decrease. Further, in the HDD, the writing speed for writing data to the platter, which is a recording medium, is slower than a predetermined speed. In such a write process for the storage, it is preferable to prioritize the improvement of the write performance in the multifunction device 1 rather than suppressing the decrease in the success rate of the recovery.

一方、SSDは、一般的に、キャッシュメモリの容量が所定の容量より大きく、記録媒体への書き込み順を制御するために必要な記憶領域をキャッシュメモリに確保可能であり、書き込み要求の受け付け順と異なる順にデータを記録媒体に書き込む。このため、SSDは、上記復旧の成功率が下がる可能性が極めて高い。また、SSDは、瞬断対策制御によってSSDにおける書き込み速度が低下しても、複合機1の仕様として求められる書き込み速度を満たすことが可能な書き込み性能を備えている。このようなストレージに対する書き込み処理では、書き込みパフォーマンスの向上より、上記復旧の成功率の低下の抑制を優先するのが好ましい。 On the other hand, in the SSD, the capacity of the cache memory is generally larger than a predetermined capacity, and the storage area required for controlling the writing order to the recording medium can be secured in the cache memory, and the writing request reception order and the SSD The data is written to the recording medium in a different order. For this reason, SSD has a very high possibility that the success rate of the above recovery will decrease. Further, the SSD has a writing performance capable of satisfying the writing speed required as the specifications of the multifunction device 1 even if the writing speed in the SSD is lowered due to the momentary interruption countermeasure control. In the write process for such storage, it is preferable to prioritize the suppression of the decrease in the success rate of recovery rather than the improvement of write performance.

ステップS403の判別の結果、ストレージ13がHDDであるとき、CPU10は、実データ19及びメタデータ20を記録媒体24へ書き込むための書き込みコマンドを速度優先書き込みコマンドに設定する(ステップS404)。上述したように速度優先書き込みコマンドを用いた書き込み処理では、デバイスドライバ22は、記録媒体24にデータが書き込まれたか否かに関わらず、次のデータの書き込みを指示可能となる(例えば、図5(a)を参照。)。これにより、デバイスドライバ22は、書き込み速度が遅い記録媒体24への書き込みの完了を待たずに、次のデータの書き込みを指示可能となり、書き込みパフォーマンスを向上することが可能となる。また、HDDでは、上述したように書き込み要求の受け付け順と同じ順にデータが記録媒体に書き込まれ、上記復旧の成功率が下がらないので、速度優先書き込みコマンドを用いた書き込み処理を行っても、複合機1における瞬断耐性を低下させることなく、複合機1における書き込みパフォーマンスを向上することが可能となる。 As a result of the determination in step S403, when the storage 13 is an HDD, the CPU 10 sets a write command for writing the actual data 19 and the metadata 20 to the recording medium 24 as the speed priority write command (step S404). As described above, in the writing process using the speed priority writing command, the device driver 22 can instruct the writing of the next data regardless of whether or not the data has been written to the recording medium 24 (for example, FIG. 5). (A). As a result, the device driver 22 can instruct the writing of the next data without waiting for the completion of writing to the recording medium 24 having a slow writing speed, and the writing performance can be improved. Further, in the HDD, as described above, the data is written to the recording medium in the same order as the reception order of the write request, and the success rate of the recovery does not decrease. Therefore, even if the write process using the speed priority write command is performed, the data is compounded. It is possible to improve the writing performance in the multifunction device 1 without lowering the momentary interruption resistance in the machine 1.

ステップS403の判別の結果、ストレージ13がSSDであるとき、CPU10は、実データ19を記録媒体24へ書き込むための書き込みコマンドを速度優先書き込みコマンドに設定する。また、CPU10は、メタデータ20を記録媒体24へ書き込むための書き込みコマンドを瞬断対策優先書き込みコマンドに設定する(ステップS405)。このように、本実施の形態では、ストレージ13がSSDである場合、実データ19及びメタデータ20のうち、上記復旧の成功率が下がる要因となるメタデータ20の書き込み処理においてのみ瞬断対策優先書き込みコマンドが用いられる。 As a result of the determination in step S403, when the storage 13 is an SSD, the CPU 10 sets a write command for writing the actual data 19 to the recording medium 24 as a speed priority write command. Further, the CPU 10 sets a write command for writing the metadata 20 to the recording medium 24 as a priority write command for measures against momentary interruption (step S405). As described above, in the present embodiment, when the storage 13 is an SSD, priority is given to measures against momentary interruption only in the writing process of the metadata 20 which causes the success rate of recovery to decrease among the actual data 19 and the metadata 20. A write command is used.

瞬断対策優先書き込みコマンドは、ATA規格に従った書き込みコマンド、例えば、WriteDMA FUA Extである。瞬断対策優先書き込みコマンドを用いた書き込み処理では、デバイスドライバ22は、書き込み対象データ、つまり、メタデータ20が記録媒体24に書き込まれるまで待機する。記録媒体24へのメタデータ20の書き込みを完了すると、デバイスドライバ22は、次の書き込み対象データを記録媒体24へ書き込むための書き込みコマンドをストレージコントローラ12へ送信する。これにより、例えば、実データA1、実データA1の管理情報を含むメタデータA2、実データB1、実データB1の管理情報を含むメタデータB2の順に書き込み要求を受け付けた場合に、図5(b)に示すように、メタデータA2、B2同士は、書き込み要求の受け付け順に従った順で記録媒体24に書き込まれる。その結果、上記復旧の成功率の低下を抑制可能となる。また、SSDは、上述したように瞬断対策優先書き込みコマンドを用いた書き込み処理を行ってSSDにおける書き込み速度が低下しても、複合機1の仕様として求められる書き込み速度を満たすことが可能な書き込み性能を備えている。このため、複合機1における書き込みパフォーマンスを低下させることなく、複合機1における瞬断耐性の低下を抑制することが可能となる。 The momentary interruption countermeasure priority write command is a write command according to the ATA standard, for example, WriteDMA FUA Ext. In the writing process using the momentary interruption countermeasure priority writing command, the device driver 22 waits until the data to be written, that is, the metadata 20 is written to the recording medium 24. When the writing of the metadata 20 to the recording medium 24 is completed, the device driver 22 transmits a write command for writing the next data to be written to the recording medium 24 to the storage controller 12. As a result, for example, when a write request is received in the order of the actual data A1, the metadata A2 including the management information of the actual data A1, the actual data B1, and the metadata B2 including the management information of the actual data B1, FIG. 5 (b) ), The metadata A2 and B2 are written to the recording medium 24 in the order of accepting the write request. As a result, it is possible to suppress the decrease in the success rate of the restoration. Further, the SSD is capable of satisfying the writing speed required as the specification of the multifunction device 1 even if the writing processing in the SSD is reduced by performing the writing process using the instantaneous interruption countermeasure priority writing command as described above. It has performance. Therefore, it is possible to suppress a decrease in the momentary interruption resistance in the multifunction device 1 without deteriorating the writing performance in the multifunction device 1.

次いで、CPU10は、カーネル17の仕様に基づくStrage Contextを作成し(ステップS406)、DeviceName、DeviceSizeを決定する(ステップS407)。次いで、CPU10は、Strage Context、DeviceName、DeviceSizeをカーネル17に登録する(ステップS408)。これにより、ストレージ13では、ステップS404,405で設定された書き込みコマンドを用いた書き込み処理が行われる。次いで、CPU10は、本処理を終了する。 Next, the CPU 10 creates a Strage Context based on the specifications of the kernel 17 (step S406), and determines the DeviceName and DeviceSize (step S407). Next, the CPU 10 registers the Strage Context, DeviceName, and DeviceSize in the kernel 17 (step S408). As a result, in the storage 13, the write process using the write command set in steps S404 and 405 is performed. Next, the CPU 10 ends this process.

上述した実施の形態によれば、ストレージ13に関する情報に基づいて、メタデータ20を記録媒体24へ書き込むための書き込みコマンドが、速度優先書き込みコマンド及び瞬断対策優先書き込みコマンドの何れかに切り替わる。これにより、搭載されたストレージ13に適した書き込みコマンドに切り替えることができ、もって、搭載されたストレージ13に適した書き込み制御を行うことができる。 According to the above-described embodiment, the write command for writing the metadata 20 to the recording medium 24 is switched to either a speed priority write command or a momentary interruption countermeasure priority write command based on the information about the storage 13. As a result, it is possible to switch to a write command suitable for the mounted storage 13, and thus it is possible to perform write control suitable for the mounted storage 13.

また、上述した実施の形態では、ストレージ13に関する情報は、ストレージ13の種別を示す情報を含む。これにより、ストレージ13の種別に適した書き込み制御を行うことができる。 Further, in the above-described embodiment, the information regarding the storage 13 includes information indicating the type of the storage 13. As a result, write control suitable for the type of storage 13 can be performed.

上述した実施の形態では、ストレージ13がHDDである場合、メタデータ20を記録媒体24へ書き込むための書き込みコマンドに速度優先書き込みコマンドが使用される。これにより、HDDを備える複合機1において、瞬断耐性を低下させることなく、書き込みパフォーマンスを向上することができる。 In the above-described embodiment, when the storage 13 is an HDD, a speed priority write command is used as a write command for writing the metadata 20 to the recording medium 24. As a result, in the multifunction device 1 provided with the HDD, the writing performance can be improved without lowering the momentary interruption resistance.

また、上述した実施の形態では、ストレージ13がSSDである場合、メタデータ20を記録媒体24へ書き込むための書き込みコマンドに瞬断対策優先書き込みコマンドが使用される。これにより、SSDを備える複合機1において、書き込みパフォーマンスを低下させることなく、瞬断耐性の低下を抑制することができる。 Further, in the above-described embodiment, when the storage 13 is an SSD, a momentary interruption countermeasure priority write command is used as a write command for writing the metadata 20 to the recording medium 24. As a result, in the multifunction device 1 provided with the SSD, it is possible to suppress a decrease in the momentary interruption resistance without deteriorating the writing performance.

以上、本発明について、上述した実施の形態を用いて説明したが、本発明は上述した実施の形態に限定されるものではない。例えば、ステップS402にて取得したストレージ13に関する情報に含まれるストレージ13の型番を示す情報からキャッシュメモリ23の容量を特定し、特定したキャッシュメモリ23の容量に基づいてメタデータ20を記録媒体24へ書き込むための書き込みコマンドを、速度優先書き込みコマンド及び瞬断対策優先書き込みコマンドの何れかに切り替えても良い。 Although the present invention has been described above with reference to the above-described embodiments, the present invention is not limited to the above-described embodiments. For example, the capacity of the cache memory 23 is specified from the information indicating the model number of the storage 13 included in the information about the storage 13 acquired in step S402, and the metadata 20 is transferred to the recording medium 24 based on the capacity of the specified cache memory 23. The write command for writing may be switched to either a speed priority write command or a momentary interruption countermeasure priority write command.

上述した実施の形態では、実データ19及びメタデータ20が別々の構成である場合について説明したが、この構成に限られず、例えば、メタデータ20が実データ19を含む構成であっても良い。 In the above-described embodiment, the case where the actual data 19 and the metadata 20 have separate configurations has been described, but the present invention is not limited to this configuration, and for example, the metadata 20 may include the actual data 19.

また、上述した実施の形態では、実データ19が、アプリケーション16に指定されたデータ以外の情報を含んでいても良い。例えば、パケットデータ型の構成として、実データ19のヘッダに、ストレージ13における書き込み位置を示すLBA、書き込む量を示すデータサイズ、書き込み時にキャッシュを使用するか否かを指定する情報等が含まれていても良い。 Further, in the above-described embodiment, the actual data 19 may include information other than the data specified in the application 16. For example, as a packet data type configuration, the header of the actual data 19 includes an LBA indicating a write position in the storage 13, a data size indicating the amount to be written, information specifying whether or not to use a cache at the time of writing, and the like. You may.

さらに、上述した実施の形態では、実データ19がファイルの一部を構成するデータであり、複数の実データ19で構成されるファイルを記録媒体24へ書き込む処理に本発明を適用しても良い。 Further, in the above-described embodiment, the present invention may be applied to a process in which the actual data 19 is data constituting a part of the file and the file composed of the plurality of actual data 19 is written to the recording medium 24. ..

上述した実施の形態では、ストレージ13がSSDであり且つデバイスドライバ22又はストレージコントローラ12がWriteDMA FUA Ext等のFUAコマンドに対応していない場合、瞬断対策優先書き込みコマンドとして、キャッシュフラッシュコマンドが用いられても良い。この場合、ステップS405において、メタデータ20を記録媒体24へ書き込むための書き込みコマンドにWriteDMA Ext等を設定し、ステップS406において、Strage ContextにFUA未対応である旨を設定する。これにより、キャッシュメモリ23へ実データ19及びメタデータ20の書き込みを完了すると、デバイスドライバ22がストレージコントローラ12にキャッシュフラッシュコマンドを送信する。キャッシュフラッシュコマンドを受信したストレージコントローラ12はストレージ13に対し、キャッシュメモリ23に保持されたデータのうち、記録媒体24へ書き込まれていないデータを記録媒体24へ書き込む指示を行う。キャッシュフラッシュコマンドは、キャッシュメモリ23へメタデータ20の書き込みを完了する毎にストレージコントローラ12へ送信される。このため、例えば、実データA1、実データA1の管理情報を含むメタデータA2、実データB1、実データB1の管理情報を含むメタデータB2の順に書き込み要求を受け付けた場合に、図5(c)に示すように、メタデータA2、B2同士は、書き込み要求の受け付け順に従った順で記録媒体24に書き込まれる。キャッシュフラッシュコマンドを用いることで、デバイスドライバ22又はストレージコントローラ12がFUAコマンドに対応していなくても、複合機1に搭載されたストレージ13に適した書き込み制御を行うことができる。 In the above-described embodiment, when the storage 13 is an SSD and the device driver 22 or the storage controller 12 does not support a FUA command such as WriteDMA FUA Ext, a cache flash command is used as a priority write command for measures against momentary interruption. You may. In this case, in step S405, WriteDMAExt or the like is set as a write command for writing the metadata 20 to the recording medium 24, and in step S406, it is set that FUA is not supported in the Strage Context. As a result, when the writing of the actual data 19 and the metadata 20 to the cache memory 23 is completed, the device driver 22 sends a cache flush command to the storage controller 12. Upon receiving the cache flush command, the storage controller 12 instructs the storage 13 to write the data stored in the cache memory 23 that has not been written to the recording medium 24 to the recording medium 24. The cache flush command is transmitted to the storage controller 12 every time the writing of the metadata 20 to the cache memory 23 is completed. Therefore, for example, when the write request is received in the order of the actual data A1, the metadata A2 including the management information of the actual data A1, the actual data B1, and the metadata B2 including the management information of the actual data B1, FIG. 5 (c). ), The metadata A2 and B2 are written to the recording medium 24 in the order of accepting the write request. By using the cache flash command, even if the device driver 22 or the storage controller 12 does not support the FUA command, write control suitable for the storage 13 mounted on the multifunction device 1 can be performed.

また、上述した実施の形態では、ストレージ13がSSDである場合、瞬断対策優先書き込みコマンドとして、Write DMA FUAExt及びキャッシュフラッシュコマンドの何れを用いるかを切り替え可能な構成であっても良い。 Further, in the above-described embodiment, when the storage 13 is an SSD, it may be possible to switch whether to use the Write DMA FUAExt or the cache flash command as the priority write command for measures against momentary interruption.

上述した実施の形態では、カーネル17がStrage Contextによる書き込みコマンドの切り替え制御に対応していない場合、デバイスキュー21からキューを取り出したデバイスドライバ22がストレージ13に関する情報に基づいて、メタデータ20を記録媒体24へ書き込むための書き込みコマンドを、速度優先書き込みコマンド及び瞬断対策優先書き込みコマンドの何れかに切り替えても良い。 In the above-described embodiment, when the kernel 17 does not support the switching control of the write command by the Strage Context, the device driver 22 that has taken out the queue from the device queue 21 records the metadata 20 based on the information about the storage 13. The write command for writing to the medium 24 may be switched to either a speed priority write command or a momentary interruption countermeasure priority write command.

図6は、図3のデバイスドライバ22によって実行される書き込みコマンド切替処理の手順を示すフローチャートである。図6の処理は、複合機1がデータをストレージ13に格納する処理を含むジョブを実行した際に実行される。例えば、図6の処理は、アプリケーション16が、操作部3のコピーボタンの押下に従ってスキャン部4が読み取って生成した画像データをストレージ13に書き込むための書き込み要求を、ファイルシステム18に対して行った際に実行される。ファイルシステム18は、アプリケーション16から取得した画像データに基づいて実データ19及びメタデータ20を生成し、生成した各データを書き込むための複数のキューをデバイスキュー21に順次入力する。 FIG. 6 is a flowchart showing a procedure of the write command switching process executed by the device driver 22 of FIG. The process of FIG. 6 is executed when the multifunction device 1 executes a job including a process of storing data in the storage 13. For example, in the process of FIG. 6, the application 16 makes a write request to the file system 18 for writing the image data read and generated by the scan unit 4 to the storage 13 in accordance with the pressing of the copy button of the operation unit 3. Will be executed when. The file system 18 generates actual data 19 and metadata 20 based on the image data acquired from the application 16, and sequentially inputs a plurality of queues for writing the generated data to the device queue 21.

図6において、デバイスドライバ22は、デバイスキュー21から1つのキューを取得すると(ステップS601)、CPU10が起動時に取得したストレージ13に関する情報からストレージ13の種別を判別する(ステップS602)。 In FIG. 6, when one queue is acquired from the device queue 21 (step S601), the device driver 22 determines the type of the storage 13 from the information about the storage 13 acquired by the CPU 10 at the time of startup (step S602).

ステップS602の判別の結果、ストレージ13がHDDである場合、デバイスドライバ22は、ステップS601にて取得したキューに対応する書き込みコマンドとして速度優先書き込みコマンドをストレージコントローラ12に送信する(ステップS603)。これにより、HDDのストレージ13では、実データ19及びメタデータ20の書き込みにおいて、速度優先書き込みコマンドを用いた書き込み処理が行われる。次いで、CPU10は、後述するステップS606の処理を行う。 As a result of the determination in step S602, when the storage 13 is an HDD, the device driver 22 transmits a speed priority write command to the storage controller 12 as a write command corresponding to the queue acquired in step S601 (step S603). As a result, in the storage 13 of the HDD, the writing process using the speed priority writing command is performed in writing the actual data 19 and the metadata 20. Next, the CPU 10 performs the process of step S606 described later.

ステップS602の判別の結果、ストレージ13がSSDである場合、CPU10は、ステップS601にて取得したキューが示す書き込み対象データが実データ19及びメタデータ20の何れであるかを判別する(ステップS604)。 As a result of the determination in step S602, when the storage 13 is an SSD, the CPU 10 determines whether the write target data indicated by the queue acquired in step S601 is the actual data 19 or the metadata 20 (step S604). ..

ステップS604の判別の結果、ステップS601にて取得したキューが示す書き込み対象データが実データ19であるとき、CPU10は、ステップS603の処理を行う。これにより、SSDのストレージ13では、実データ19の書き込みにおいて、速度優先書き込みコマンドを用いた書き込み処理が行われる。 As a result of the determination in step S604, when the write target data indicated by the queue acquired in step S601 is the actual data 19, the CPU 10 performs the process of step S603. As a result, in the SSD storage 13, when writing the actual data 19, a writing process using the speed priority writing command is performed.

ステップS604の判別の結果、ステップS601にて取得したキューが示す書き込み対象データがメタデータ20であるとき、CPU10は、ステップS601にて取得したキューに対応する書き込みコマンドとして瞬断対策優先書き込みコマンドをストレージコントローラ12に送信する(ステップS605)。これにより、SSDのストレージ13では、メタデータ20の書き込みにおいて、瞬断対策優先書き込みコマンドを用いた書き込み処理が行われる。次いで、CPU10は、ステップS601にて取得したキューが示す書き込み対象データのストレージ13への書き込みを完了すると(ステップS606でYES)、ステップS601の処理に戻り、次のキューに対する処理を行う。 As a result of the determination in step S604, when the write target data indicated by the queue acquired in step S601 is the metadata 20, the CPU 10 issues a momentary interruption countermeasure priority write command as a write command corresponding to the queue acquired in step S601. It is transmitted to the storage controller 12 (step S605). As a result, in the SSD storage 13, when writing the metadata 20, a writing process using the momentary interruption countermeasure priority writing command is performed. Next, when the CPU 10 completes writing the write target data indicated by the queue acquired in step S601 to the storage 13 (YES in step S606), the CPU 10 returns to the process of step S601 and performs the process for the next queue.

このように、カーネル17がStrage Contextによる書き込みコマンドの切り替え制御に対応していない場合であっても、複合機1に搭載されたストレージ13に適した書き込み制御を行うことができる。 As described above, even when the kernel 17 does not support the switching control of the write command by the Strage Context, the write control suitable for the storage 13 mounted on the multifunction device 1 can be performed.

また、上述した実施の形態では、ユーザが設定したストレージ13の動作設定に基づいてメタデータ20を記録媒体24へ書き込むための書き込みコマンドを、速度優先書き込みコマンド及び瞬断対策優先書き込みコマンドの何れかに切り替えても良い。 Further, in the above-described embodiment, the write command for writing the metadata 20 to the recording medium 24 based on the operation setting of the storage 13 set by the user is either a speed priority write command or a momentary interruption countermeasure priority write command. You may switch to.

図7は、図1の操作部3に表示される設定画面700の一例を示す図である。設定画面700は、ストレージ13の動作設定を設定するための画面であり、速度優先ボタン701及び故障回避優先ボタン702を備える。 FIG. 7 is a diagram showing an example of the setting screen 700 displayed on the operation unit 3 of FIG. The setting screen 700 is a screen for setting the operation setting of the storage 13, and includes a speed priority button 701 and a failure avoidance priority button 702.

図8は、図6の書き込みコマンド切替処理の変形例の手順を示すフローチャートである。図8の処理も、図6の処理と同様に、複合機1がデータをストレージ13に格納する処理を含むジョブを実行した際に実行される。なお、図8の処理は、ユーザが設定画面700において速度優先ボタン701及び故障回避優先ボタン702の何れかを既に選択していることとする。 FIG. 8 is a flowchart showing a procedure of a modification of the write command switching process of FIG. Similar to the process of FIG. 6, the process of FIG. 8 is also executed when the multifunction device 1 executes a job including a process of storing data in the storage 13. In the process of FIG. 8, it is assumed that the user has already selected either the speed priority button 701 or the failure avoidance priority button 702 on the setting screen 700.

図8において、デバイスドライバ22は、ステップS601の処理を行う。次いで、デバイスドライバ22は、設定画面700において速度優先ボタン701及び故障回避優先ボタン702の何れが選択されているかを判別する(ステップS801)。 In FIG. 8, the device driver 22 performs the process of step S601. Next, the device driver 22 determines which of the speed priority button 701 and the failure avoidance priority button 702 is selected on the setting screen 700 (step S801).

ステップS801の判別の結果、設定画面700において速度優先ボタン701が選択されているとき、デバイスドライバ22は、ステップS603以降の処理を行う。ステップS801の判別の結果、設定画面700において故障回避優先ボタン702が選択されているとき、デバイスドライバ22は、ステップS604以降の処理を行う。 As a result of the determination in step S801, when the speed priority button 701 is selected on the setting screen 700, the device driver 22 performs the processes after step S603. As a result of the determination in step S801, when the failure avoidance priority button 702 is selected on the setting screen 700, the device driver 22 performs the processes after step S604.

上述した実施の形態では、ユーザが設定したストレージ13の動作設定に基づいてメタデータ20を記録媒体24へ書き込むための書き込みコマンドが、速度優先書き込みコマンド及び瞬断対策優先書き込みコマンドの何れかに切り替わる。これにより、ストレージ13の書き込み制御に関し、ユーザの意図を反映させることができる。 In the above-described embodiment, the write command for writing the metadata 20 to the recording medium 24 based on the operation setting of the storage 13 set by the user is switched to either the speed priority write command or the instantaneous interruption countermeasure priority write command. .. This makes it possible to reflect the user's intention regarding the write control of the storage 13.

本発明は、上述の実施の形態の1以上の機能を実現するプログラムをネットワーク又は記憶媒体を介してシステム又は装置に供給し、該システム又は装置のコンピュータにおける1つ以上のプロセッサがプログラムを読み出して実行する処理でも実現可能である。また、本発明は、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。 The present invention supplies a program that realizes one or more functions of the above-described embodiment to a system or device via a network or storage medium, and one or more processors in the computer of the system or device read the program. It can also be realized by the processing to be executed. The present invention can also be realized by a circuit (for example, ASIC) that realizes one or more functions.

1 複合機
10 CPU
12 ストレージコントローラ
13 ストレージ
22 デバイスドライバ
23 キャッシュメモリ
24 記録媒体
700 設定画面
1 Multifunction device 10 CPU
12 Storage controller 13 Storage 22 Device driver 23 Cache memory 24 Recording medium 700 Setting screen

Claims (10)

記録媒体及び前記記録媒体より書き込み速度が速い保持手段を備える記憶手段を備える画像形成装置であって、
前記保持手段にデータを保持し、前記保持されたデータを前記記録媒体に書き込む制御を行う制御手段と、
前記記憶手段に関する情報を取得する取得手段とを備え、
前記制御手段は、前記記憶手段に関する情報に基づいて、前記データの管理情報を含むメタデータを前記記録媒体へ書き込むための書き込みコマンドを、前記画像形成装置における書き込み速度を優先する速度優先書き込みコマンド及び前記画像形成装置における瞬断の対策を優先する瞬断対策優先書き込みコマンドの何れかに切り替えることを特徴とする画像形成装置。
An image forming apparatus including a recording medium and a storage means including a holding means having a writing speed faster than that of the recording medium.
A control means that holds data in the holding means and controls the writing of the held data to the recording medium.
It is provided with an acquisition means for acquiring information about the storage means.
Based on the information about the storage means, the control means sends a write command for writing metadata including management information of the data to the recording medium, a speed priority write command for giving priority to the write speed in the image forming apparatus, and a speed priority write command. An image forming apparatus characterized in that the image forming apparatus is switched to any of the instantaneous interruption countermeasure priority writing commands that prioritize the countermeasures against the momentary interruption in the image forming apparatus.
前記記憶手段に関する情報は、前記記憶手段の種別を示す情報を含むことを特徴とする請求項1記載の画像形成装置。 The image forming apparatus according to claim 1, wherein the information regarding the storage means includes information indicating the type of the storage means. 前記記憶手段がHDDである場合、前記制御手段は、前記メタデータを前記記録媒体へ書き込むための書き込みコマンドとして前記速度優先書き込みコマンドを用いることを特徴とする請求項2記載の画像形成装置。 The image forming apparatus according to claim 2, wherein when the storage means is an HDD, the control means uses the speed priority write command as a write command for writing the metadata to the recording medium. 前記記憶手段がSSDである場合、前記制御手段は、前記メタデータを前記記録媒体へ書き込むための書き込みコマンドとして前記瞬断対策優先書き込みコマンドを用いることを特徴とする請求項2又は3記載の画像形成装置。 The image according to claim 2 or 3, wherein when the storage means is an SSD, the control means uses the momentary interruption countermeasure priority write command as a write command for writing the metadata to the recording medium. Forming device. 前記記憶手段に関する情報は、前記記憶手段の動作設定に関する情報を含み、
前記記憶手段の動作設定に関する情報は、ユーザによって設定されることを特徴とする請求項1記載の画像形成装置。
The information regarding the storage means includes information regarding the operation setting of the storage means.
The image forming apparatus according to claim 1, wherein the information regarding the operation setting of the storage means is set by the user.
前記速度優先書き込みコマンドは、当該速度優先書き込みコマンドが示す書き込み対象データが前記記録媒体に書き込まれたか否かに関わらず次の書き込み対象データの書き込みを指示可能な書き込みコマンドであることを特徴とする請求項1乃至5のいずれか1項に記載の画像形成装置。 The speed priority write command is a write command capable of instructing the writing of the next write target data regardless of whether or not the write target data indicated by the speed priority write command has been written to the recording medium. The image forming apparatus according to any one of claims 1 to 5. 前記瞬断対策優先書き込みコマンドは、当該瞬断対策優先書き込みコマンドが示す書き込み対象データが前記記録媒体に書き込まれたことに従って次の書き込み対象データの書き込みを指示可能な書き込みコマンドであることを特徴とする請求項1乃至6のいずれか1項に記載の画像形成装置。 The momentary interruption countermeasure priority write command is a write command capable of instructing the writing of the next write target data according to the writing target data indicated by the momentary interruption countermeasure priority write command being written to the recording medium. The image forming apparatus according to any one of claims 1 to 6. 前記瞬断対策優先書き込みコマンドは、前記保持されたデータのうち前記記録媒体へ書き込まれていないデータを前記記録媒体へ書き込む指示を行う書き込みコマンドであることを特徴とする請求項1乃至6のいずれか1項に記載の画像形成装置。 Any of claims 1 to 6, wherein the momentary interruption countermeasure priority write command is a write command for instructing the recording medium to write data that has not been written to the recording medium among the retained data. The image forming apparatus according to item 1. 記録媒体及び前記記録媒体より書き込み速度が速い保持手段を備える記憶手段を備える画像形成装置の制御方法であって、
前記保持手段にデータを保持し、前記保持されたデータを前記記録媒体に書き込む制御を行う制御ステップと、
前記記憶手段に関する情報を取得する取得ステップとを有し、
前記制御ステップは、前記記憶手段に関する情報に基づいて、前記データの管理情報を含むメタデータを前記記録媒体へ書き込むための書き込みコマンドを、前記画像形成装置における書き込み速度を優先する速度優先書き込みコマンド及び前記画像形成装置における瞬断の対策を優先する瞬断対策優先書き込みコマンドの何れかに切り替えることを特徴とする画像形成装置の制御方法。
A control method for an image forming apparatus including a recording medium and a storage means including a holding means having a writing speed faster than that of the recording medium.
A control step in which data is held in the holding means and control is performed to write the held data to the recording medium.
It has an acquisition step of acquiring information about the storage means.
In the control step, a write command for writing metadata including management information of the data to the recording medium based on the information about the storage means, a speed priority write command for giving priority to the write speed in the image forming apparatus, and a speed priority write command for writing the metadata including the management information of the data to the recording medium. A control method for an image forming apparatus, which comprises switching to any of the instantaneous interruption countermeasure priority writing commands that prioritize countermeasures for momentary interruptions in the image forming apparatus.
記録媒体及び前記記録媒体より書き込み速度が速い保持手段を備える記憶手段を備える画像形成装置の制御方法をコンピュータに実行させるプログラムであって、
前記画像形成装置の制御方法は、
前記保持手段にデータを保持し、前記保持されたデータを前記記録媒体に書き込む制御を行う制御ステップと、
前記記憶手段に関する情報を取得する取得ステップとを有し、
前記制御ステップは、前記記憶手段に関する情報に基づいて、前記データの管理情報を含むメタデータを前記記録媒体へ書き込むための書き込みコマンドを、前記画像形成装置における書き込み速度を優先する速度優先書き込みコマンド及び前記画像形成装置における瞬断の対策を優先する瞬断対策優先書き込みコマンドの何れかに切り替えることを特徴とするプログラム。
A program that causes a computer to execute a control method of a recording medium and an image forming apparatus including a storage means including a holding means having a writing speed faster than that of the recording medium.
The control method of the image forming apparatus is
A control step in which data is held in the holding means and control is performed to write the held data to the recording medium.
It has an acquisition step of acquiring information about the storage means.
In the control step, a write command for writing metadata including management information of the data to the recording medium based on the information about the storage means, a speed priority write command for giving priority to the write speed in the image forming apparatus, and a speed priority write command for writing the metadata including the management information of the data to the recording medium. A program characterized by switching to one of the instantaneous interruption countermeasure priority write commands that prioritize the instantaneous interruption countermeasures in the image forming apparatus.
JP2019199567A 2019-11-01 2019-11-01 Image forming apparatus, method for controlling the same, and program Pending JP2021072016A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019199567A JP2021072016A (en) 2019-11-01 2019-11-01 Image forming apparatus, method for controlling the same, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019199567A JP2021072016A (en) 2019-11-01 2019-11-01 Image forming apparatus, method for controlling the same, and program

Publications (1)

Publication Number Publication Date
JP2021072016A true JP2021072016A (en) 2021-05-06

Family

ID=75714019

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019199567A Pending JP2021072016A (en) 2019-11-01 2019-11-01 Image forming apparatus, method for controlling the same, and program

Country Status (1)

Country Link
JP (1) JP2021072016A (en)

Similar Documents

Publication Publication Date Title
US20120137170A1 (en) Information processing apparatus, control method of the information processing apparatus, and recording medium
JP6875808B2 (en) Information processing device
JP6289128B2 (en) Information processing apparatus, control method therefor, and program
JP2015219602A (en) Information processing device, method, and program
US9135541B2 (en) Image forming apparatus and nonvolatile memory writing method
JP2006261889A (en) Image processing device and image processing method
JP2016206938A (en) Information processing system, memory control method for information processing system, and program
US8688925B2 (en) Method for communication between two memory-related processes in a computer system, corresponding software product, computer system and printing system
JP2021072016A (en) Image forming apparatus, method for controlling the same, and program
JP2018063676A (en) Information processing device, control method thereof, and program
US7710839B2 (en) Information processing apparatus and control method therefor
JP6000754B2 (en) Image processing apparatus, image processing apparatus control method, and program
JP4211648B2 (en) Software installation method and system
JP2014138265A (en) Image forming apparatus
JP2020021246A (en) Image forming apparatus for updating firmware
US20200288031A1 (en) Information processing apparatus equipped with storage device, control method therefor, and storage medium
US20220206730A1 (en) Image processing apparatus, method, and non-transitory computer-readable storage medium for storing program
JP2018063499A (en) Information processing device, control method thereof, and program
JP2021179730A (en) Information processing apparatus, control method thereof, and program
JP2012070028A (en) Image forming apparatus
JP2007068015A (en) Image forming system, image forming apparatus, image reader, and control method for image forming apparatus
JP5350077B2 (en) Information processing apparatus and image forming apparatus having the same
JP2006236006A (en) Printer, program and recording medium
JP2019212026A (en) Information processor, control method therefor, and program
US20200183595A1 (en) Information processing apparatus and method for controlling the same