WO2022259493A1 - Journal log control system, journal log control method, and journal log control program - Google Patents

Journal log control system, journal log control method, and journal log control program Download PDF

Info

Publication number
WO2022259493A1
WO2022259493A1 PCT/JP2021/022211 JP2021022211W WO2022259493A1 WO 2022259493 A1 WO2022259493 A1 WO 2022259493A1 JP 2021022211 W JP2021022211 W JP 2021022211W WO 2022259493 A1 WO2022259493 A1 WO 2022259493A1
Authority
WO
WIPO (PCT)
Prior art keywords
log
data
write
journal
journal log
Prior art date
Application number
PCT/JP2021/022211
Other languages
French (fr)
Japanese (ja)
Inventor
孝治 佐藤
Original Assignee
日本電信電話株式会社
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 日本電信電話株式会社 filed Critical 日本電信電話株式会社
Priority to PCT/JP2021/022211 priority Critical patent/WO2022259493A1/en
Publication of WO2022259493A1 publication Critical patent/WO2022259493A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots

Definitions

  • the present invention relates to a journal log control system, a journal log control method, and a journal log control program.
  • Persistent memory is fast, non-volatile, and byte-addressable.
  • Examples of persistent memory technologies include Phase Change Memory (PCM), Spin Transfer Torque Magnetic Random Access Memory (STT-MRAM), Resistive Random Access Memory (ReRAM) )and so on.
  • Examples of persistent memory products include Non-Volatile Dual In-line Memory Module (NVDIMM) and Intel(R) Optane(TM) Persistent Memory (Non-Patent Document 7).
  • file systems are based on the premise of using a hard disk drive (hereinafter referred to as HDD) or a solid state drive (hereinafter referred to as SSD). It is not suitable for using memory.
  • HDD hard disk drive
  • SSD solid state drive
  • file systems for persistent memory have been proposed.
  • Examples of file systems for persistent memory include PMFS (see Non-Patent Document 1), BPFS (see Non-Patent Document 2), NOVA (see Non-Patent Document 3), Shortcut-JFS (see Non-Patent Document 4), Ext4 (see Non-Patent Document 5), XFS (see Non-Patent Document 6), and the like.
  • the file system for persistent memory mentioned above uses one or more of journaling, copy-on-write, and log structuring to ensure the consistency of file system data and metadata.
  • Journaling writes updates to the journal log before updating the data. After the update has been written to the journal log, a process called checkpoint is executed to reflect the update in the file system itself. In the event of a failure, the journal log can be used to restore the file system to a consistent state.
  • the block to be updated is copied to a newly allocated block, and the copied block is updated. Since the file system is never overwritten, the integrity of the file system can always be ensured.
  • CPU cache When a file system for persistent memory writes to persistent memory, if the cache of the Central Processing Unit (hereinafter referred to as CPU) (hereinafter referred to as CPU cache) is a write-back method, even if an instruction to write data to persistent memory is executed, Data is only written to the CPU cache and not to persistent memory. If the server fails due to a state that has been written to the CPU cache but not to persistent memory, the data written to the CPU cache will be lost.
  • a persistent memory-oriented file system either executes instructions to flush the CPU cache after writing, or writes directly to persistent memory, or automatically flushes the CPU cache on failure.
  • Non-Patent Document 8 Enhanced Asynchronous DRAM Refresh (hereafter, eADR) (see Non-Patent Document 8) for flashing dynamically.
  • eADR Enhanced Asynchronous DRAM Refresh
  • journaling copies-on-write, log structuring, or multiple technologies.
  • journaling updates must be written twice, once in the journal log and reflected in the file system itself, and with copy-on-write and log structuring, cascading updates from the updated data block to the file system root is required, there is a problem that the amount of writing increases and the writing performance of the file system decreases.
  • journal log control system of the present invention provides data, metadata, and a journal log, which is an update history of the data and the metadata, stored in a persistent memory.
  • a journal log control system for controlling a journal log comprising journaling processing for storing update history of data and metadata associated with the write request in the journal log when a write request is made; and storing in the journal log.
  • a commit process for confirming the updated history
  • an immediate checkpoint process for reflecting the confirmed update history stored in the journal log in the data and the metadata
  • a delayed checkpoint process for delaying the immediate checkpoint process.
  • journal log control unit for controlling the execution of checkpoint processing.
  • journaling is used to ensure the consistency of both file system data and metadata in the event of a failure, reduce the amount of writes associated with journaling, and use flush commands and memory barriers. By reducing the number of command executions, it is possible to improve the write performance of the file system.
  • FIG. 1 is a diagram showing an example of the configuration of the entire system to which the present invention is applied in the first embodiment.
  • FIG. 2 is a diagram illustrating an example of a journal log configuration according to the first embodiment.
  • FIG. 3 is a diagram showing an example of the configuration of log entries according to the first embodiment.
  • FIG. 4 is a diagram showing an example of the structure of a data write log entry according to the first embodiment.
  • FIG. 5 is a diagram illustrating an example of the configuration of a log page end log entry according to the first embodiment.
  • FIG. 6 is a flowchart illustrating an example of write processing operations in the first embodiment.
  • FIG. 7 is a flowchart illustrating an example of journaling processing operations in the first embodiment.
  • FIG. 1 is a diagram showing an example of the configuration of the entire system to which the present invention is applied in the first embodiment.
  • FIG. 2 is a diagram illustrating an example of a journal log configuration according to the first embodiment.
  • FIG. 3 is a diagram showing an example of
  • FIG. 8 is a flowchart illustrating an example of the operation of data write log entry addition processing according to the first embodiment.
  • FIG. 9 is a flow chart showing an example of the operation of the data additional writing process according to the first embodiment.
  • FIG. 10 is a flowchart illustrating an example of the operation of log entry area allocation processing according to the first embodiment.
  • FIG. 11 is a flowchart illustrating an example of the operation of log page end log entry addition processing according to the first embodiment.
  • FIG. 12 is a flowchart illustrating an example of commit processing operations in the first embodiment.
  • FIG. 13 is a flowchart illustrating an example of checkpoint processing operations in the first embodiment.
  • FIG. 14 is a flow chart showing an example of the operation of checkpoint processing for data write log entries in the first embodiment.
  • FIG. 15 is a flowchart illustrating an example of the operation of immediate checkpoint processing of data write log entries in the first embodiment.
  • FIG. 16 is a flow chart showing an example of operation of delayed checkpoint processing of data write log entries in the first embodiment.
  • FIG. 17 is a flowchart illustrating an example of operation of insert pointer update processing according to the first embodiment.
  • FIG. 1 is a diagram showing an example of the configuration of the entire system to which the present invention is applied in the first embodiment.
  • a system 1000 embodying the present invention has a file system 1100 and persistent memory 1200 .
  • the file system 1100 is implemented, for example, by the CPU executing processes according to a given program.
  • the journal log control system of the present invention includes at least the journal log control unit 1110 .
  • the file system 1100 is composed of a journal log control unit 1110 and a free space management unit 1120.
  • the journal log control unit 1110 writes updates to the journal log in response to requests from users such as file writing and file attribute changes, commits processing to make permanent and confirm the update contents in the journal log, and and a checkpoint process for reflecting the update contents of the file system body.
  • the free space management unit 1120 executes allocation processing and release processing of the permanent memory 1200 .
  • the area of the persistent memory 1200 is divided into units of a certain size called pages (hereinafter referred to as page size) and managed.
  • the free area management unit 1120 allocates and releases areas in the persistent memory 1200 in units of pages. Note that FIG. 1 shows only the components necessary for explaining the first embodiment of the present invention, and the file system 1100 may have other components.
  • journal logs In conventional journaling file systems for HDDs and SSDs, it is common to statically allocate contiguous areas on HDDs or SSDs as journal logs when the file system is created.
  • pages in the persistent memory area are dynamically allocated and released, and the journal log is It should be configured as a linked list of pages.
  • Each page that constitutes the journal log (hereinafter referred to as a log page) holds a log entry indicating update content.
  • a specific area of persistent memory may be statically allocated as a journal log when a file system is created, like a conventional journaling file system on an HDD or SSD.
  • FIG. 2 is a diagram showing an example of the structure of a journal log in the first embodiment.
  • the journal log 2000 consists of two log page lists 2100, 2200.
  • the journal log control unit 1110 alternately uses the log page lists 2100 and 2200 for each update process such as file writing and file attribute change.
  • the journal log control unit 1110 alternates between the log page lists 2100 and 2200 for each update process, such as using the log page list 2100 in the first write process and using the log page list 2200 in the next write process.
  • the log page list 2100 shows the state used in the previous update process
  • the log page list 2200 shows the state used in the currently executing update process.
  • Log page lists 2100 and 2200 are linked lists of log pages.
  • the log page list 2100 is made up of log pages 2110, 2120, and 2130
  • the log page list 2200 is made up of log pages 2210, 2220, and 2230.
  • FIG. At the end of the log pages 2110 and 2120 other than the last log page in the log page list 2100 and at the end of the log pages 2210 and 2220 other than the last log page in the log page list 2200, the address of the next log page is held. do.
  • a null indicating that the next log page does not exist is held.
  • the log page holds log entries that describe updates such as file writes and file attribute changes.
  • the journal log 2000 manages log page lists 2100 and 2200 using start pointers 2300 and 2400, end pointer 2500 and insertion pointer 2600.
  • the start point pointers 2300, 2400 and the end point pointer 2500 are held on permanent memory.
  • the insert pointer 2600 may be held in volatile memory.
  • the initial values of the start pointers 2300, 2400, the end pointer 2500, and the insertion pointer 2600 are null, and when log entries are added to the journal log 2000, log pages are dynamically allocated as needed, as described above.
  • a starting point pointer 2300 indicates the top position of the log page list 2100
  • a starting point pointer 2400 indicates the top position of the log page list 2200
  • the end point pointer 2500 indicates the position of the log entry for which commit processing has been completed in the log page list.
  • log entries 2111, 2112, 2121, 2122, and 2131 between the start point pointer 2300 and the end point pointer 2500 are log entries for which commit processing has been completed.
  • journal log control unit 1110 When an update process is started and a log entry associated with the update process is added to the journal log 2000, it is added to the position of the insertion pointer 2600, and the insertion pointer 2600 is updated to point to the next position of the log entry. be. If the log page at the position of the insertion pointer 2600 does not have enough free space to hold the log entry, the journal log control unit 1110 requests the free space management unit 1120 to allocate a free page to create a new free space. Get page. Next, the journal log control unit 1110 retains the address of the new log page at the end of the log page, joins the new log page to the log page list, and inserts the log page at the position of the insertion pointer 2600.
  • log entries 2211, 2212, 2221, 2222, and 2231 between the start pointer 2400 and the insertion pointer 2600 are log entries that have been added to the journal log 2000 but have not yet been committed. .
  • the journal log control unit 1110 executes commit processing.
  • the journal log control unit 1110 executes a flush instruction and a memory barrier instruction for the log page area between the start pointer 2400 and the insertion pointer 2600 where the log entry is written.
  • the end point pointer 2500 is updated to the position indicated by the insertion pointer 2600, and the flush instruction for the area holding the end point pointer 2500 and the memory barrier instruction are executed.
  • log entries 2111, 2112, 2121, 2122, and 2131 held by the log page list 2100 become invalid, and the log entries 2211, 2212, 2221, 2222, and 2231 held by the log page list 2200 become the committed logs. valid as an entry.
  • journal log control unit 1110 sets the starting point pointer 2300 to null, executes a flush instruction and a memory barrier instruction for the area holding the starting point pointer 2300, and sends the log to the free area management unit 1120. All log pages in page list 2100 may be requested to be released.
  • journal log control unit 1110 executes checkpoint processing and reflects the contents of the committed log entries in the journal log 2000 to the main body of the file system.
  • the journal log control unit 1110 updates the insertion pointer 2600 to the position indicated by the start point pointer of the log page list that is not the log page list used in the update processing, and ends the update processing.
  • the insert pointer 2600 is updated to the position indicated by the starting point pointer 2300 .
  • the journal log control unit 1110 alternately uses the log page lists 2100 and 2200 in the journal log 2000 for each update process. Even if the checkpoint process in the update process is completed and the log entry associated with the update process becomes unnecessary, the update of the end point pointer 2500 for invalidating the log entry, the flush instruction, and the memory barrier instruction are not performed in the update process. By executing the end point pointer 2500 update, flush instruction, and memory barrier instruction in the log entry commit process in the next update process, invalidation of the log entry in the update process and execution of the next By executing commit processing of the log entries in the update processing of 1 at once, it is possible to reduce the number of executions of the update of the end point pointer 2500, the flush instruction, and the memory barrier instruction.
  • FIG. 3 is a diagram showing an example of the configuration of log entries in the first embodiment.
  • a log entry 3000 is composed of a header portion 3100 and a data portion 3200 .
  • the header portion 3100 holds the type of log entry (hereinafter referred to as log entry type).
  • log entry types include a data write log entry, which is a log entry for writing data in a file, and a metadata update log entry, which is a log entry for updating metadata.
  • Other log entry types may be prepared.
  • Header portion 3100 may also hold other information about the log entry.
  • the data part 3200 may have different information and sizes depending on the log entry type held in the header part 3100 of the log entry. Also, the data section 3200 may not exist.
  • FIG. 4 is a diagram showing an example of the structure of a data write log entry in the first embodiment.
  • write data uses one data write log entry 4000 for one page.
  • Embodiments can also be configured to use one data write log entry 4000 for multiple consecutive pages in the write data.
  • a header portion 4100 of the data write log entry 4000 holds data write log entry identification information 4110 that is information indicating that the log entry type is a data write log entry.
  • the data part 4200 of the data write log entry 4000 allocates a write data page 4300 separately from the data write log entry 4000 and holds the write data in the write data page 4300 .
  • the data part 4200 of the data write log entry 4000 includes the address 4210 of the write data page 4300 that holds the write data (hereinafter referred to as the write data page address) and the offset 4220 from the beginning of the file in the write data (hereinafter referred to as the file offset). , the size 4230 of the write data (hereinafter referred to as write data size), and the address (hereinafter referred to as the reflection destination data page address) of the data page to which the write data is reflected in the file system (hereinafter referred to as the reflection destination data page).
  • the address 4240 (hereinafter referred to as the reflection destination data page address holding address) of the position where the reflection destination data page address is held in the metadata page to be processed is held.
  • Data write log entry 4000 may hold other information.
  • FIG. 5 is a diagram showing an example of the configuration of a log page end log entry in the first embodiment.
  • the header portion 5100 of the log page end log entry 5000 holds log page end log entry identification information 5110 which is information indicating that the log entry type is the log page end log entry.
  • the end of log page log entry 5000 does not have a data portion.
  • the description of the structure and content of the metadata update log entry is omitted.
  • the write processing in the first embodiment consists of journaling processing, commit processing, and checkpoint processing.
  • An outline of the write process is described below.
  • data write log entries are used to keep written data in the journal log.
  • Metadata update log entries are also used to keep updates to file system metadata in the journal log.
  • commit process the log entry associated with the write process is made permanent to confirm the write process.
  • checkpoint processing the contents of the log entries held in the journal log are reflected in the file system. At this time, when the write data to the file has not reached the end of the write data page of the data write log entry, delay checkpoint processing is executed to delay the reflection of the data write log entry to the file system. Deferred checkpointing saves the location of the data write log entry.
  • journaling process for subsequent writes write data for which delayed checkpointing of a data write log entry has been performed in the previous write process, and checkpointing has been delayed by the delayed checkpointing of the data write log entry. If the range of write data of the subsequent write process is continuous with respect to the end of the range, write in the subsequent write process to the write data page of the data write log entry, and write the data Add a new data write log entry to the journal log that holds the write data page address of the log entry as the write data page address. On the other hand, in the journaling process of the subsequent write process, the delayed checkpoint process of the data write log entry is executed in the previous write process, but the checkpoint process is delayed by the delayed checkpoint process of the data write log entry. If the range of write data for the subsequent write operation is not contiguous with the end of the range of write data being written, immediately checkpoint the data write log entry and then journal the subsequent write operation. Execute the process.
  • journaling processing of metadata update log entries, commit processing, and checkpoint processing are required. Since the description of the structure and contents of the metadata is omitted, the details of the metadata update log entry journaling process, commit process, and checkpoint process will be omitted in the following description.
  • FIG. 6 is a flow chart showing an example of write processing operations in the first embodiment.
  • the journal log control unit 1110 receives the write data, the size of the entire write data (hereinafter, total write data size), and the position within the file to write the write data (hereinafter, write position).
  • journal log control unit 1110 executes journaling processing (step S6001). Journaling processing will be described later.
  • the journal log control unit 1110 executes commit process (step S6002). Commit processing will be described later.
  • the journal log control unit 1110 executes checkpoint processing (step S6003). Checkpoint processing will be described later.
  • FIG. 7 is a flowchart illustrating an example of journaling processing operations in the first embodiment.
  • the journal log control unit 1110 transitions to step S7002 if the position in the journal log of the delayed data write log entry is saved, otherwise transitions to step S7007 (step S7001).
  • the journal log control unit 1110 acquires the data write log entry from the position in the journal log of the delayed data write log entry.
  • the write range in the write process is continuous to the end of the range of write data held by the delayed data write log entry, that is, the write position in the write process is within the file of the delayed data write log entry. If equal to the sum of the offset value and the write data size value of the data write log entry, go to step S7003; otherwise, go to step S7006 (step S7002).
  • the write range is continuous to the end of the range of write data held by the delayed data write log entry, that is, the write position in the write process is the offset value in the file of the delayed data write log entry and the data
  • the journal log control unit 1110 executes data append write processing (step S7003).
  • the data append write process will be described later.
  • journal log control unit 1110 adds the data size added in step S7003 to the write position (step S7004), and subtracts the added data size from the total write size (step S7005).
  • the write range is not continuous to the end of the range of write data held by the delayed data write log entry, i.e., the write position is the value of the offset in the file of the delayed data write log entry and the delayed data
  • the journal log control unit 1110 sets the delayed checkpoint flag to false and executes checkpoint processing of the delayed data write log entries (step S7006).
  • the delayed checkpoint flag is a flag that indicates whether to delay the checkpoint processing of the data write log entry. Checkpointing of data write log entries will be described later.
  • the journal log control unit 1110 executes the processing from step S7007 to step S7011 for each data page within the write range after the write position. If the total write size is 0, the journal log control unit 1110 proceeds to step S7012; otherwise, to step S7008 (step S7007).
  • the journal log control unit 1110 executes metadata update log entry addition processing for metadata holding the address of the data page at the write position (step S7008).
  • the metadata update log entry addition process is assumed to update metadata accompanying a change in the address of the data page at the write position. As described above, the details of the metadata update log entry addition process, including whether or not the addition process is necessary, will not be described.
  • the journal log control unit 1110 executes data write log entry addition processing for the data page at the write position (step S7009).
  • the data write log entry addition process will be described later.
  • journal log control unit 1110 adds the data size written in step S7009 to the write position (step S7010), and subtracts the data size from the total write size (step S7011).
  • the journal log control unit 1110 executes metadata update log entry addition processing for the metadata of the entire file (step S7012).
  • the metadata update log entry addition process is assumed to update the file update time. , details of the metadata update log entry addition process will be omitted.
  • FIG. 8 is a flowchart illustrating an example of the operation of data write log entry addition processing according to the first embodiment.
  • the journal log control unit 1110 executes log entry area securing processing to secure an empty area for adding a data write log entry in the journal log (step S8001). The log entry area reservation process will be described later.
  • journal log control unit 1110 acquires information held in the data part of the data write log entry in steps S8002 to S8005.
  • the journal log control unit 1110 acquires a free page by requesting the free space management unit 1120 to allocate a free page. is the write data page address (step S8002).
  • the journal log control unit 1110 searches the metadata of the file to be written, and acquires the address of the position that holds the address of the data page in the metadata page that holds the address of the data page corresponding to the write position. , the address is set as the reflection destination data page address holding address of the data write log entry (step S8003).
  • the journal log control unit 1110 sets the write position to the file offset of the data write log entry (step S8004).
  • the journal log control unit 1110 calculates, from the page size, the remainder obtained by dividing the offset in the file of the data write log entry acquired in step S8004 by the page size, and the minimum value of the total write size. The value is set as the write data size of the data write log entry (step S8005).
  • the journal log control unit 1110 writes write data equal to the write data size of the data write log entry to the position of the remainder value calculated in step S8005 in the write data page of the write log entry. is executed (step S8006).
  • the journal log control unit 1110 stores data write log entry identification information indicating that the log entry type is a data write log entry, the write data page address of the write log entry, and the reflection destination data of the write log entry.
  • a data write log entry is created based on the page address holding address, the offset in the file of the write log entry, and the write data size of the write log entry, and the data write log entry is written at the position indicated by the insertion pointer 2600. (Step S8007).
  • the journal log control unit 1110 sets the insertion pointer 2600 to the position next to the data write log entry written in step S8007 (step S8008).
  • FIG. 9 is a flow chart showing an example of the operation of the data additional writing process according to the first embodiment.
  • the journal log control unit 1110 executes log entry area securing processing to secure an empty area for adding a data write log entry in the journal log (step S9001).
  • the log entry area reservation process will be described later.
  • journal log control unit 1110 acquires information held in the data part of the data write log entry in steps S9002 to S9005.
  • the journal log control unit 1110 uses the data write data page address of the delayed data write log entry acquired in step S7002 as the data write data page address of the data write log entry for the data additional write (step S9002).
  • the journal log control unit 1110 sets the reflection destination data page address holding address of the delayed data write log entry acquired in step S7002 as the reflection destination data page address holding address of the data write log entry for the data append write (step S9003).
  • the journal log control unit 1110 sets the file offset of the delayed data write log entry acquired in step S7002 as the file offset of the data write log entry for the data append write (step S9004).
  • the journal log control unit 1110 calculates, from the page size, the remainder obtained by dividing the file offset of the delayed data write log entry acquired in step S7002 by the page size, and the write data size of the delayed data write log entry. Calculate the minimum value of the value obtained by subtracting the total and the current total write size, and calculate the sum of the write data size of the delayed data write log entry and the minimum value of the data write log entry for the data append write.
  • the write data size is set (step S9005).
  • the journal log control unit 1110 divides the in-file offset of the delayed data write log entry by the page size, in the write data page indicated by the write data page address of the data write log entry for the data append write, and the delay
  • the value obtained by subtracting the write data size of the delayed data write log entry from the write data size of the data write log entry corresponding to the data append write is placed at the position of the sum of the write data size of the delayed data write log entry and the write data size of the delayed data write log entry , writes the write data, and executes the flash command for the written area (step S9006).
  • the journal log control unit 1110 includes data write log entry identification information indicating that the log entry type is a data write log entry, the write data page address of the write log entry for the data append write, and the data write log entry. The data page address to which the write log entry is reflected, the offset in the file of the write log entry for the data appending write, and the write data size of the write log entry for the data appending write. An entry is created, and a data write log entry for the data additional write is written at the position indicated by the insertion pointer 2600 (step S9007). Finally, the journal log control unit 1110 sets the insertion pointer 2600 to the position next to the data write log entry for the data additional write written in step S9007 (step S9008).
  • FIG. 10 is a flowchart illustrating an example of the operation of log entry area allocation processing according to the first embodiment.
  • the journal log control unit 1110 transitions to step S10007 if the insertion pointer is null, otherwise transitions to step S10002 (step S10001).
  • journal log control unit 1110 reserves a log entry area if the log page indicated by the insert pointer 2600 has an area sufficient to hold the log entry to be added. End the process. Otherwise, the journal log control unit 1110 transitions to step S10003 (step S10002).
  • journal log control unit 1110 requests the free space management unit 1120 to allocate a free page. to obtain an empty page (step S10003).
  • journal log control unit 1110 writes the address of the free page acquired in step S10003 to the end of the log page at the position indicated by the insertion pointer 2600, and joins the free page to the log page list of the journal log ( step S10004).
  • the journal log control unit 1110 also executes log page end log entry addition processing (step S10005). The log page end log entry addition processing will be described later.
  • the journal log control unit 1110 sets the insertion pointer 2600 to the top position of the free page acquired in step S10003 (step S10006).
  • journal log control unit 1110 requests allocation of a free page to the free space management unit 1120 and acquires a free page (step S10007).
  • the journal log control unit 1110 sets the head pointer indicating the head of the log page list used in the current update process to the head position of the empty page acquired in step S10007, and sets the head pointer to the area holding the head pointer.
  • a flash instruction and a memory barrier instruction are executed (step S10008).
  • the journal log control unit 1110 sets the insertion pointer 2600 to the top position of the empty page acquired in step S10007 (step S10009).
  • FIG. 11 is a flow chart showing an example of the operation of log page end log entry addition processing according to the first embodiment.
  • the journal log control unit 1110 creates a log page end log entry using the log page end log entry identification information, which is information indicating that the log entry type is a log page end log entry, and inserts the log page end log entry at the position indicated by the insertion pointer 2600.
  • a log page end log entry is written (step S11001).
  • FIG. 12 is a flowchart illustrating an example of commit processing operations in the first embodiment.
  • the journal log control unit 1110 sets a log entry pointer indicating a log entry in the journal log to the position of the head pointer of the log page list used in the journaling process of the write process (step S12001).
  • journal log control unit 1110 proceeds to step S12005, otherwise proceeds to step S12003 (step S12002).
  • journal log control unit 1110 executes a flush instruction for the entire log page indicated by the log entry pointer (step S12003).
  • journal log control unit 1110 sets the log entry pointer to the head position of the next log page in the log page list held at the end of the log page indicated by the log entry pointer (step S12004). ).
  • journal log control unit 1110 executes a flush instruction for the area from the log entry pointer to the insertion pointer 2600, and then executes a memory barrier instruction. Execute (step S12005).
  • the journal log control unit 1110 sets the end point pointer 2500 to the position of the insertion pointer 2600, and executes the flush command and memory barrier command for the area holding the end point pointer 2500 (step S12006).
  • the journal log control unit sets the log entry pointer to the position indicated by the head pointer of the log page list not used in the write process (step S12007).
  • journal log control unit 1110 ends commit processing. Otherwise, the journal log control unit 1110 transitions to step S12009 (step S12008).
  • journal log control unit 1110 saves the value of the log entry pointer, and then stores the log entry pointer at the end of the log page at the position indicated by the log entry pointer.
  • the next log page in the log page list is set at the head position (step S12009).
  • the journal log control unit 1110 requests the free space management unit 1120 to release the log page indicated by the value of the log entry pointer saved in step S12009, and releases the log page (step S12010).
  • FIG. 13 is a flowchart illustrating an example of checkpoint processing operations in the first embodiment.
  • the journal log control unit 1110 performs step S13001 on each committed log entry, that is, each entry between the start point pointer indicating the head position of the log page list used in the update process and the end point pointer 2500. , the process of step S13008 is executed. First, the journal log control unit 1110 sets the log entry pointer indicating the log entry to be processed in the journal log to the position indicated by the start point pointer of the log page list used in the update process (step S13001).
  • journal log control unit 1110 proceeds to step S13009; otherwise, to step S13003 (step S13002).
  • journal log control unit 1110 proceeds to step S13004 if the log entry type of the log entry indicated by the log entry pointer is a data write log entry; otherwise, step S13006. (step S13003).
  • journal log control unit 1110 sets the delay checkpoint flag to true and executes checkpoint processing for the data write log entry (step S13004). . Checkpointing of data write log entries will be described later.
  • journal log control unit 1110 adds the log entry size corresponding to the log entry type of the log entry indicated by the log entry pointer to the log entry pointer (step S13005).
  • journal log control unit 1110 proceeds to step S13007 if the log entry type of the log entry indicated by the log entry pointer is a metadata update log entry. Otherwise, the process proceeds to step S13008 (step S13006).
  • the journal log control unit 1110 executes checkpoint processing for the metadata update log entry (step S13007). As described above, the detailed description of the metadata update log entry checkpoint process is omitted.
  • the journal log control unit 1110 stores the log entry pointer at the end of the log page at the position indicated by the log entry pointer.
  • the next log page in the log page list is set to the head position (step S13008).
  • the log entry type is assumed to be one of data write log entry, metadata update log entry, and log page end log entry. .
  • journal log control unit 1110 executes insert pointer update processing (step S13009). Insert pointer update processing will be described later.
  • FIG. 14 is a flow chart showing an example of the operation of checkpoint processing for data write log entries in the first embodiment.
  • the journal log control unit 1110 determines whether the delayed checkpoint flag is false or the write has reached the end of the write data page, that is, the remainder obtained by dividing the offset in the file of the data write log entry by the page size and the data write log If the total write data size of the entry is the same value as the page size, the process proceeds to step S14002; otherwise, the process proceeds to step S14003 (step S14001).
  • the deferred checkpoint flag is false, or the write has reached the end of the write data page, that is, the remainder of dividing the offset in the file of the data write log entry by the page size and the write data size of the data write log entry
  • the journal log control unit 1110 executes immediate checkpoint processing of the data write log entry (step S14002). Immediate checkpointing of data write log entries is described below.
  • the deferred checkpoint flag is true and the write has not reached the end of the write data page, i.e. the remainder of dividing the offset in the file of the data write log entry by the page size and the write data size of the data write log entry
  • the journal log control unit 1110 executes delayed checkpoint processing of data write log entries (step S14003). Delayed checkpointing of data write log entries is described below.
  • Immediate checkpointing of data write log entries can reduce the amount of data written associated with checkpointing compared to checkpointing in conventional journaling.
  • the write data held in the write data page of the data write log entry is transferred to the reflection destination data page address holding address of the data write log entry.
  • the write data held in the write data page of the data write log entry is transferred to the reflection destination data page address holding address of the data write log entry.
  • write to the location of the remainder obtained by dividing the offset in the file of the relevant data write log entry by the page size, and execute the flush command for the written area. do.
  • the write data page of the data write log entry is transferred to an area other than the range where the write data is held. Data is written from the data page indicated by the reflection destination data page address held at the position of the reflection destination data page address holding address, and the flash instruction of the written area is executed. Furthermore, the write data page address of the data write log entry is written at the position of the reflection destination data page address holding address of the data write log entry, and the flush instruction of the written area is executed.
  • the predetermined threshold is, for example, 1/2 of the page size.
  • FIG. 15 is a flow chart showing an example of the operation of immediate checkpoint processing of data write log entries in the first embodiment.
  • the journal log control unit 1110 detects that the reflection destination data page address held at the position of the reflection destination data page address holding address of the data write log entry is null, that is, if the reflection destination data page does not exist, To step S15011, otherwise, to step S15002 (step S15001).
  • step S15003 the journal log control unit 1110 proceeds to step S15003 if the write data size of the data write log entry is less than a predetermined threshold. Otherwise, the process proceeds to step S15004 (step S15002).
  • the journal log control unit 1110 When the write data size of the data write log entry is less than the predetermined threshold, the journal log control unit 1110 writes the write data held in the write data page indicated by the write data page address of the data write log entry to the The remainder obtained by dividing the offset in the file of the data write log entry by the page size in the reflection destination data page indicated by the reflection destination data page address held at the position of the reflection destination data page address holding address of the data write log entry The write data size of the data write log entry is written to the position of the value, and the flush command of the written area is executed (step S15003).
  • journal log control unit 1110 determines that the write is not from the beginning of the write data page of the data write log entry, that is, within the file of the write log entry. If the remainder obtained by dividing the offset by the page size is not 0, the process proceeds to step S15005; otherwise, the process proceeds to step S15006 (step S15004).
  • the journal log control unit 1110 When writing is not from the beginning of the write data page of the data write log entry, that is, when the remainder obtained by dividing the offset in the file of the data write log entry by the page size is not 0, the journal log control unit 1110 starts the data write. From the beginning of the reflection destination data page indicated by the reflection destination data page address held at the position of the reflection destination data page address holding address of the log entry, to the write data page indicated by the write data page address of the data write log entry Data is written to the top by the remainder obtained by dividing the offset in the file of the data write log entry by the page size, and the flush command for the written area is executed (step S15005).
  • the journal log control unit 1110 determines that the write has not reached the end of the write data page of the data write log entry, that is, the remainder obtained by dividing the offset in the file of the data write log entry by the page size, and the data write log entry is smaller than the page size, the process proceeds to step S15007; otherwise, the process proceeds to step S15008 (step S15006).
  • the write has not reached the end of the write data page for this data write log entry, i.e., the sum of the remainder of dividing the offset in file of this data write log entry by the page size plus the write data size for this data write log entry is smaller than the page size, the journal log control unit 1110, in the reflection destination data page indicated by the reflection destination data page address held at the position of the reflection destination data page address holding address of the data write log entry, Data from the position of the sum of the remainder obtained by dividing the file offset of the relevant data write log entry by the page size and the write data size of the relevant data write log entry to the end of the relevant reflection destination data page In the write data page indicated by the write data page address of the write log entry, the position of the sum of the remainder obtained by dividing the file offset of the data write log entry by the page size and the write data size of the data write log entry , and executes the flash command for the written area (step S15007).
  • the journal log control unit 1110 saves the reflection destination data page address held at the position of the reflection destination data page address holding address of the data write log entry (step S15008).
  • the journal log control unit 1110 writes the write data page address of the data write log entry to the position of the reflection destination data page address holding address of the data write log entry, and executes the flush command for the written area (step S15009). ).
  • the journal log control unit 1110 requests the free space management unit 1120 to release the reflection destination data page indicated by the reflection destination data page address saved in step S15008, and releases the reflection destination data page (step S15010). ).
  • the journal log control unit 1110 determines that the write If not from the beginning of the write data page of the data write log entry, that is, if the remainder obtained by dividing the file offset of the data write log entry by the page size is not 0, go to step S15012; otherwise, go to step S15013. Transition (step S15011).
  • journal log control unit 1110 When writing is not from the beginning of the write data page of the data write log entry, that is, when the remainder obtained by dividing the offset in the file of the data write log entry by the page size is not 0, the journal log control unit 1110 starts the data write. In the write data page indicated by the write data page address of the log entry, 0 is written from the beginning of the write data page by the remainder obtained by dividing the offset in the file of the data write log entry by the page size. A flush command for the area is executed (step S15012).
  • the journal log control unit 1110 determines that the write has not reached the end of the write data page of the data write log entry, that is, the remainder obtained by dividing the offset in the file of the data write log entry by the page size, and the data write log entry is smaller than the page size, the process proceeds to step S15014; otherwise, the process proceeds to step S15015 (step S15013).
  • the write has not reached the end of the write data page for this data write log entry, i.e., the sum of the remainder of dividing the offset in file of this data write log entry by the page size plus the write data size for this data write log entry is smaller than the page size
  • the journal log control unit 1110 divides the offset in the file of the data write log entry by the page size in the write data page indicated by the write data page address of the data write log entry. , 0 is written from the position of the total value of the write data size of the data write log entry to the end of the write data page, and the flush command for the written area is executed (step S15014).
  • the journal log control unit 1110 writes the write data page address of the data write log entry to the position of the reflection destination data page address holding address of the data write log entry, and executes the flush command for the written area (step S15015). ).
  • FIG. 16 is a flow chart showing an example of operation of delayed checkpoint processing of data write log entries in the first embodiment.
  • the journal log control unit 1110 saves the position of the data write log entry indicated by the log entry pointer as the position of the delayed data write log entry (step S16001).
  • the area that holds the location of the delayed data write log entry indicated by the log entry pointer may be volatile memory.
  • FIG. 17 is a flowchart illustrating an example of operation of insert pointer update processing according to the first embodiment.
  • the journal log control unit 1110 sets the insertion pointer 2600 to the position indicated by the start point pointer of the log page list that is not the log page list currently indicated by the insertion pointer 2600 (step S17001). For example, if the insertion pointer 2600 points to the log page list 2100, the insertion pointer 2600 is moved to the position of the start pointer 2400. set.
  • the persistent memory 1200 stores data, metadata, and journal logs, which are update histories of data and metadata. Further, when a write request is received, the journal log control unit 1110 performs journaling processing for storing the update history of data and metadata associated with the write request in the journal log, and commit processing for finalizing the update history stored in the journal log.
  • Checkpoint processing that executes either immediate checkpoint processing that reflects the fixed update history stored in the journal log in data or metadata, or delayed checkpoint processing that delays the immediate checkpoint processing; controls the execution of
  • checkpoint processing when the write data has not reached the end of the write data page of the data write log entry, the write of the data write log entry is performed. It can be delayed until the end of the data page is reached. For this reason, according to the first embodiment, checkpoint processing in multiple write processing can be collectively performed. By ensuring consistency and reducing the amount of writing associated with journaling, the write performance of the file system can be improved.
  • the journal log control unit 1110 transfers the write data in the log entry in the journal log to a file. , and if it is equal to or greater than the predetermined threshold, the page storing the write data in the log entry in the journal log is used as the page storing the file data. As a result, the amount of writing from the journal log to the file can be reduced.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A persistent memory (1200) stores data, metadata, and a journal log that is an update history of the data and metadata. If a write request is issued, a journal log control unit (1110) controls the execution of a journaling process for storing an update history of data and metadata in association with the write request in the journal log, a commit process for committing the update history stored in the journal log, and a checkpoint process for executing either an immediate checkpoint process that causes the committed update history stored in the journal log to be reflected in the data and metadata, or a delayed checkpoint process that delays the immediate checkpoint process.

Description

ジャーナルログ制御システム、ジャーナルログ制御方法およびジャーナルログ制御プログラムJOURNAL LOG CONTROL SYSTEM, JOURNAL LOG CONTROL METHOD AND JOURNAL LOG CONTROL PROGRAM
 本発明は、ジャーナルログ制御システム、ジャーナルログ制御方法およびジャーナルログ制御プログラムに関する。 The present invention relates to a journal log control system, a journal log control method, and a journal log control program.
 近年、永続メモリ(Persistent Memory)が実用化されつつある。永続メモリは高速、不揮発、バイト単位でアドレス可能といった特徴を持つ。永続メモリ技術の例としては、相変化メモリ(Phase Change Memory(PCM))、スピン注入磁気メモリ(Spin Transfer Torque Magnetic Random Access Memory(STT-MRAM))、抵抗変化メモリ(Resistive Random Access Memory(ReRAM))などがある。また、永続メモリ製品の例としては、Non-Volatile Dual In-line Memory Module(NVDIMM)やインテル(R) Optane(TM) パーシステント・メモリ(非特許文献7)がある。 In recent years, persistent memory has been put into practical use. Persistent memory is fast, non-volatile, and byte-addressable. Examples of persistent memory technologies include Phase Change Memory (PCM), Spin Transfer Torque Magnetic Random Access Memory (STT-MRAM), Resistive Random Access Memory (ReRAM) )and so on. Examples of persistent memory products include Non-Volatile Dual In-line Memory Module (NVDIMM) and Intel(R) Optane(TM) Persistent Memory (Non-Patent Document 7).
 従来のファイルシステムはハードディスクドライブ(Hard Disk Drive(以降、HDD)やソリッドステートドライブ(Solid State Drive(以降、SSD))の利用を前提としているため、HDDやSSDとは性能や特性が大きく異なる永続メモリの利用には適していない。そのため、永続メモリ向けファイルシステムが提案されている。永続メモリ向けファイルシステムの例としては、PMFS(非特許文献1参照)、BPFS(非特許文献2参照)、NOVA(非特許文献3参照)、Shortcut-JFS(非特許文献4参照)、Ext4(非特許文献5参照)、XFS(非特許文献6参照)などがある。 Conventional file systems are based on the premise of using a hard disk drive (hereinafter referred to as HDD) or a solid state drive (hereinafter referred to as SSD). It is not suitable for using memory.Therefore, file systems for persistent memory have been proposed.Examples of file systems for persistent memory include PMFS (see Non-Patent Document 1), BPFS (see Non-Patent Document 2), NOVA (see Non-Patent Document 3), Shortcut-JFS (see Non-Patent Document 4), Ext4 (see Non-Patent Document 5), XFS (see Non-Patent Document 6), and the like.
 前述した永続メモリ向けファイルシステムでは、ファイルシステムのデータやメタデータの整合性を確保するためにジャーナリング、コピーオンライト、ログ構造化のいずれか、もしくは複数の技術を用いている。 The file system for persistent memory mentioned above uses one or more of journaling, copy-on-write, and log structuring to ensure the consistency of file system data and metadata.
 ジャーナリングでは、データを更新する前にジャーナルログに更新を書き込む。ジャーナルログへの更新の書き込みが確定したのちに、更新をファイルシステム本体に反映させるチェックポイントと呼ばれる処理を実行する。障害発生時には、ジャーナルログを用いてファイルシステムを整合性のある状態に復旧させることができる。 Journaling writes updates to the journal log before updating the data. After the update has been written to the journal log, a process called checkpoint is executed to reflect the update in the file system itself. In the event of a failure, the journal log can be used to restore the file system to a consistent state.
 コピーオンライトでは、更新対象のブロックを新たに割り当てたブロックにコピーし、コピーされたブロックに対して更新を行う。ファイルシステムを上書きすることがないため、ファイルシステムの整合性を常に確保することができる。 With copy-on-write, the block to be updated is copied to a newly allocated block, and the copied block is updated. Since the file system is never overwritten, the integrity of the file system can always be ensured.
 ログ構造化では、ファイルシステムのデータ構造を連続的なログとして保存する。ファイルシステムの更新は上書きされず、ログの論理的な末尾に追記されるため、ファイルシステムの整合性を常に確保することができる。 In log structuring, the data structure of the file system is saved as a continuous log. Filesystem updates are not overwritten, but appended to the logical end of the log, ensuring filesystem integrity at all times.
 永続メモリ向けファイルシステムが永続メモリへ書き込みを行うとき、Central Processing Unit(以降、CPU)のキャッシュ(以降、CPUキャッシュ)がライトバック方式ならば、データを永続メモリに書き込む命令を実行しても、データはCPUキャッシュに書き込まれるのみであり、永続メモリには書き込まれない。CPUキャッシュには書き込まれたが、永続メモリには書き込まれていない状態のときにサーバが障害により停止すると、CPUキャッシュに書き込まれたデータは失われてしまう。永続メモリに確実に書き込むようにするには、永続メモリ向けファイルシステムは、書き込み後にCPUキャッシュをフラッシュする命令、または、直接永続メモリに書き込む命令を実行するか、もしくは、障害発生時にCPUキャッシュを自動的にフラッシュするためのEnhanced Asynchronous DRAM Refresh(以降、eADR)(非特許文献8参照)を備えたサーバを使用する必要がある。また、近年のCPUは性能を向上させるためにメモリへの書き込みの実行順序を入れ替えることがあるため、永続メモリへの書き込みの実行順序を保証するには、メモリバリア命令を実行する必要がある。 When a file system for persistent memory writes to persistent memory, if the cache of the Central Processing Unit (hereinafter referred to as CPU) (hereinafter referred to as CPU cache) is a write-back method, even if an instruction to write data to persistent memory is executed, Data is only written to the CPU cache and not to persistent memory. If the server fails due to a state that has been written to the CPU cache but not to persistent memory, the data written to the CPU cache will be lost. To ensure that it writes to persistent memory, a persistent memory-oriented file system either executes instructions to flush the CPU cache after writing, or writes directly to persistent memory, or automatically flushes the CPU cache on failure. It is necessary to use a server equipped with Enhanced Asynchronous DRAM Refresh (hereafter, eADR) (see Non-Patent Document 8) for flashing dynamically. In addition, since recent CPUs sometimes change the execution order of writing to memory in order to improve performance, it is necessary to execute a memory barrier instruction to guarantee the execution order of writing to persistent memory.
特開2019-003288号公報JP 2019-003288 A
 ジャーナリング、コピーオンライト、ログ構造化のいずれか、もしくは複数の技術を用いることにより、ファイルシステムの整合性を確保することが可能である。しかし、ジャーナリングでは、更新をジャーナルログとファイルシステム本体への反映の2回書き込む必要があり、また、コピーオンライトやログ構造化では、更新したデータブロックからファイルシステムのルートまでの連鎖的な更新が必要となるため、書き込み量が増加し、ファイルシステムの書き込み性能が低下してしまうという問題がある。 File system consistency can be ensured by using journaling, copy-on-write, log structuring, or multiple technologies. However, with journaling, updates must be written twice, once in the journal log and reflected in the file system itself, and with copy-on-write and log structuring, cascading updates from the updated data block to the file system root is required, there is a problem that the amount of writing increases and the writing performance of the file system decreases.
 また、永続メモリへの書き込みにおいては、書き込み領域のフラッシュ命令やメモリバリア命令を実行する必要があるが、フラッシュ命令やメモリバリア命令は時間のかかる処理であるため、ファイルシステムの書き込み性能が低下してしまうという問題がある。eADRを備えたサーバを使用することにより、フラッシュ命令を実行する必要はなくなるが、永続メモリを利用できるすべてのサーバでeADRが利用できるわけではなく、また、eADRを備えたサーバを使用しても、メモリバリア命令は実行する必要がある。 Also, when writing to persistent memory, it is necessary to execute flush instructions and memory barrier instructions for the write area, but since flush instructions and memory barrier instructions are time-consuming processes, the write performance of the file system decreases. There is a problem that Using a server with eADR eliminates the need to execute flush instructions, but not all servers with persistent memory have eADR available, and using a server with eADR does not. , the memory barrier instruction must be executed.
 上述した課題を解決するために、本発明のジャーナルログ制御システムは、データと、メタデータと、前記データと前記メタデータの更新履歴であるジャーナルログと、を格納する永続メモリに格納された前記ジャーナルログの制御を行うジャーナルログ制御システムであって、書き込み要求があった場合に、前記書き込み要求に伴うデータとメタデータの更新履歴を前記ジャーナルログに格納するジャーナリング処理と、前記ジャーナルログに格納された更新履歴を確定させるコミット処理と、前記ジャーナルログに格納された確定した更新履歴を前記データや前記メタデータに反映させる即時チェックポイント処理と、前記即時チェックポイント処理を遅延させる遅延チェックポイント処理とのどちらかを実行するチェックポイント処理と、の実行を制御するジャーナルログ制御部を備えることを特徴とする。 In order to solve the above-described problems, the journal log control system of the present invention provides data, metadata, and a journal log, which is an update history of the data and the metadata, stored in a persistent memory. A journal log control system for controlling a journal log, comprising journaling processing for storing update history of data and metadata associated with the write request in the journal log when a write request is made; and storing in the journal log. a commit process for confirming the updated history, an immediate checkpoint process for reflecting the confirmed update history stored in the journal log in the data and the metadata, and a delayed checkpoint process for delaying the immediate checkpoint process. and a journal log control unit for controlling the execution of checkpoint processing.
 本発明によれば、ジャーナリングを用いて、障害発生時におけるファイルシステムのデータとメタデータの双方の整合性を確保するとともに、ジャーナリングに伴う書き込み量を削減し、さらに、フラッシュ命令、および、メモリバリア命令の実行回数を削減することにより、ファイルシステムの書き込み性能を向上させることができるという効果を奏する。 According to the present invention, journaling is used to ensure the consistency of both file system data and metadata in the event of a failure, reduce the amount of writes associated with journaling, and use flush commands and memory barriers. By reducing the number of command executions, it is possible to improve the write performance of the file system.
図1は、第1の実施形態における本発明を適用したシステム全体の構成の一例を示す図である。FIG. 1 is a diagram showing an example of the configuration of the entire system to which the present invention is applied in the first embodiment. 図2は、第1の実施形態におけるジャーナルログの構成の一例を示す図である。FIG. 2 is a diagram illustrating an example of a journal log configuration according to the first embodiment. 図3は、第1の実施形態におけるログエントリの構成の一例を示す図である。FIG. 3 is a diagram showing an example of the configuration of log entries according to the first embodiment. 図4は、第1の実施形態におけるデータ書き込みログエントリの構成の一例を示す図である。FIG. 4 is a diagram showing an example of the structure of a data write log entry according to the first embodiment. 図5は、第1の実施形態におけるログページ終端ログエントリの構成の一例を示す図である。FIG. 5 is a diagram illustrating an example of the configuration of a log page end log entry according to the first embodiment. 図6は、第1の実施形態における書き込み処理の動作の一例を示すフローチャートである。FIG. 6 is a flowchart illustrating an example of write processing operations in the first embodiment. 図7は、第1の実施形態におけるジャーナリング処理の動作の一例を示すフローチャートである。FIG. 7 is a flowchart illustrating an example of journaling processing operations in the first embodiment. 図8は、第1の実施形態におけるデータ書き込みログエントリ追加処理の動作の一例を示すフローチャートである。FIG. 8 is a flowchart illustrating an example of the operation of data write log entry addition processing according to the first embodiment. 図9は、第1の実施形態におけるデータ追記書き込み処理の動作の一例を示すフローチャートである。FIG. 9 is a flow chart showing an example of the operation of the data additional writing process according to the first embodiment. 図10は、第1の実施形態におけるログエントリ領域確保処理の動作の一例を示すフローチャートである。FIG. 10 is a flowchart illustrating an example of the operation of log entry area allocation processing according to the first embodiment. 図11は、第1の実施形態におけるログページ終端ログエントリ追加処理の動作の一例を示すフローチャートである。FIG. 11 is a flowchart illustrating an example of the operation of log page end log entry addition processing according to the first embodiment. 図12は、第1の実施形態におけるコミット処理の動作の一例を示すフローチャートである。FIG. 12 is a flowchart illustrating an example of commit processing operations in the first embodiment. 図13は、第1の実施形態におけるチェックポイント処理の動作の一例を示すフローチャートである。FIG. 13 is a flowchart illustrating an example of checkpoint processing operations in the first embodiment. 図14は、第1の実施形態におけるデータ書き込みログエントリのチェックポイント処理の動作の一例を示すフローチャートである。FIG. 14 is a flow chart showing an example of the operation of checkpoint processing for data write log entries in the first embodiment. 図15は、第1の実施形態におけるデータ書き込みログエントリの即時チェックポイント処理の動作の一例を示すフローチャートである。FIG. 15 is a flowchart illustrating an example of the operation of immediate checkpoint processing of data write log entries in the first embodiment. 図16は、第1の実施形態におけるデータ書き込みログエントリの遅延チェックポイント処理の動作の一例を示すフローチャートである。FIG. 16 is a flow chart showing an example of operation of delayed checkpoint processing of data write log entries in the first embodiment. 図17は、第1の実施形態における挿入ポインタ更新処理の動作の一例を示すフローチャートである。FIG. 17 is a flowchart illustrating an example of operation of insert pointer update processing according to the first embodiment.
 以下に添付図面を参照して、この発明に係るジャーナルログ制御システム、ジャーナルログ制御方法およびジャーナルログ制御プログラムの実施形態を説明する。なお、この実施形態により、この発明が限定されるものではない。 Embodiments of a journal log control system, a journal log control method, and a journal log control program according to the present invention will be described below with reference to the accompanying drawings. In addition, this invention is not limited by this embodiment.
[第1の実施形態における本発明を適用したシステム全体の構成の一例]
 図1は、第1の実施形態における本発明を適用したシステム全体の構成の一例を示す図である。図1に示すように、本発明を適用したシステム1000は、ファイルシステム1100および永続メモリ1200を有する。ファイルシステム1100は、例えば、CPUが所定のプログラムに従って処理を実行することによって実現される。また、本発明のジャーナルログ制御システムには、少なくともジャーナルログ制御部1110が含まれる。
[Example of overall system configuration to which the present invention is applied in the first embodiment]
FIG. 1 is a diagram showing an example of the configuration of the entire system to which the present invention is applied in the first embodiment. As shown in FIG. 1, a system 1000 embodying the present invention has a file system 1100 and persistent memory 1200 . The file system 1100 is implemented, for example, by the CPU executing processes according to a given program. Also, the journal log control system of the present invention includes at least the journal log control unit 1110 .
 ファイルシステム1100はジャーナルログ制御部1110と、空き領域管理部1120とで構成される。ジャーナルログ制御部1110は、ファイル書き込みやファイル属性変更などのユーザからの要求に伴う更新のジャーナルログへの書き込み処理と、ジャーナルログ内の更新内容を永続化して確定させるコミット処理と、ジャーナルログ内の更新内容をファイルシステム本体に反映させるチェックポイント処理とを実行する。空き領域管理部1120は永続メモリ1200の割り当て処理と解放処理とを実行する。永続メモリ1200の領域はページと呼ばれる一定サイズ(以降、ページサイズ)の単位に分割して管理される。空き領域管理部1120はページ単位で永続メモリ1200内の領域の割り当てと解放とを行う。なお、図1には本発明の第1の実施形態の説明に必要な構成要素のみを示しており、ファイルシステム1100はその他の構成要素を有していてもよい。 The file system 1100 is composed of a journal log control unit 1110 and a free space management unit 1120. The journal log control unit 1110 writes updates to the journal log in response to requests from users such as file writing and file attribute changes, commits processing to make permanent and confirm the update contents in the journal log, and and a checkpoint process for reflecting the update contents of the file system body. The free space management unit 1120 executes allocation processing and release processing of the permanent memory 1200 . The area of the persistent memory 1200 is divided into units of a certain size called pages (hereinafter referred to as page size) and managed. The free area management unit 1120 allocates and releases areas in the persistent memory 1200 in units of pages. Note that FIG. 1 shows only the components necessary for explaining the first embodiment of the present invention, and the file system 1100 may have other components.
 従来のHDDやSSD向けジャーナリングファイルシステムでは、ファイルシステム作成時に、HDDやSSD上の連続した領域をジャーナルログとして静的に割り当てることが一般的である。一方、永続メモリはHDDやSSDと比べて高速なアクセスが可能であるため、本発明の第1の実施形態では、永続メモリの領域のページを動的に割り当て、解放を行い、ジャーナルログは、ページの連結リストとして構成することとする。ジャーナルログを構成する各ページ(以降、ログページ)は更新内容を示すログエントリを保持する。なお、従来のHDDやSSD上のジャーナリングファイルシステムのように、ファイルシステム作成時に永続メモリの特定の領域をジャーナルログとして静的に割り当てるようにしてもよい。 In conventional journaling file systems for HDDs and SSDs, it is common to statically allocate contiguous areas on HDDs or SSDs as journal logs when the file system is created. On the other hand, since persistent memory can be accessed at high speed compared to HDD and SSD, in the first embodiment of the present invention, pages in the persistent memory area are dynamically allocated and released, and the journal log is It should be configured as a linked list of pages. Each page that constitutes the journal log (hereinafter referred to as a log page) holds a log entry indicating update content. It should be noted that a specific area of persistent memory may be statically allocated as a journal log when a file system is created, like a conventional journaling file system on an HDD or SSD.
 図2は、第1の実施形態におけるジャーナルログの構成の一例を示す図である。図2の例では、ジャーナルログ2000は、2つのログページリスト2100、2200で構成されている。ジャーナルログ制御部1110はファイル書き込みやファイル属性変更などの更新処理ごとにログページリスト2100、2200を交互に使用する。ジャーナルログ制御部1110は、例えば、最初の書き込み処理において、ログページリスト2100を使用し、次の書き込み処理において、ログページリスト2200を使用するなど、更新処理ごとにログページリスト2100、2200を交互に使用する。図2の例では、ログページリスト2100は前回の更新処理で使用された状態であり、ログページリスト2200は現在実行中の更新処理で使用されている状態を示している。 FIG. 2 is a diagram showing an example of the structure of a journal log in the first embodiment. In the example of FIG. 2, the journal log 2000 consists of two log page lists 2100, 2200. The journal log control unit 1110 alternately uses the log page lists 2100 and 2200 for each update process such as file writing and file attribute change. The journal log control unit 1110 alternates between the log page lists 2100 and 2200 for each update process, such as using the log page list 2100 in the first write process and using the log page list 2200 in the next write process. used for In the example of FIG. 2, the log page list 2100 shows the state used in the previous update process, and the log page list 2200 shows the state used in the currently executing update process.
 ログページリスト2100、2200はログページの連結リストである。図2の例では、ログページリスト2100は、ログページ2110、2120、2130で構成されており、ログページリスト2200は、ログページ2210、2220、2230で構成されている。ログページリスト2100の最後のログページ以外のログページ2110、2120の末尾、および、ログページリスト2200の最後のログページ以外のログページ2210,2220の末尾には、次のログページのアドレスを保持する。ログページリスト2100の最後のログページ2130の末尾、および、ログページリスト2200の最後のログページ2230の末尾には、次のログページが存在しないことを示すヌルを保持する。ログページはファイル書き込みやファイル属性変更などの更新処理の内容を表すログエントリを保持する。 Log page lists 2100 and 2200 are linked lists of log pages. In the example of FIG. 2, the log page list 2100 is made up of log pages 2110, 2120, and 2130, and the log page list 2200 is made up of log pages 2210, 2220, and 2230. FIG. At the end of the log pages 2110 and 2120 other than the last log page in the log page list 2100 and at the end of the log pages 2210 and 2220 other than the last log page in the log page list 2200, the address of the next log page is held. do. At the end of the last log page 2130 of the log page list 2100 and at the end of the last log page 2230 of the log page list 2200, a null indicating that the next log page does not exist is held. The log page holds log entries that describe updates such as file writes and file attribute changes.
 ジャーナルログ2000は、始点ポインタ2300、2400、終点ポインタ2500、挿入ポインタ2600を使用して、ログページリスト2100、2200を管理する。始点ポインタ2300,2400、終点ポインタ2500は永続メモリ上に保持する。一方、挿入ポインタ2600は揮発メモリ上に保持してもよい。 The journal log 2000 manages log page lists 2100 and 2200 using start pointers 2300 and 2400, end pointer 2500 and insertion pointer 2600. The start point pointers 2300, 2400 and the end point pointer 2500 are held on permanent memory. Alternatively, the insert pointer 2600 may be held in volatile memory.
 始点ポインタ2300、2400、終点ポインタ2500、挿入ポインタ2600の初期値はヌルであり、ジャーナルログ2000にログエントリを追加するときに、必要に応じて、前述したとおり、ログページを動的に割り当てる。 The initial values of the start pointers 2300, 2400, the end pointer 2500, and the insertion pointer 2600 are null, and when log entries are added to the journal log 2000, log pages are dynamically allocated as needed, as described above.
 始点ポインタ2300はログページリスト2100の先頭の位置を、始点ポインタ2400は、ログページリスト2200の先頭の位置を示している。終点ポインタ2500は、ログページリストにおいて、コミット処理が完了したログエントリの位置を示している。図2の例では、始点ポインタ2300と終点ポインタ2500の間にあるログエントリ2111、2112、2121、2122、2131はコミット処理が完了しているログエントリである。 A starting point pointer 2300 indicates the top position of the log page list 2100 , and a starting point pointer 2400 indicates the top position of the log page list 2200 . The end point pointer 2500 indicates the position of the log entry for which commit processing has been completed in the log page list. In the example of FIG. 2, log entries 2111, 2112, 2121, 2122, and 2131 between the start point pointer 2300 and the end point pointer 2500 are log entries for which commit processing has been completed.
 更新処理を開始し、当該更新処理に伴うログエントリをジャーナルログ2000に追加するときは、挿入ポインタ2600の位置に追加され、挿入ポインタ2600は、当該ログエントリの次の位置を示すように更新される。挿入ポインタ2600の位置のログページに、当該ログエントリを保持するのに必要な空き領域がないときは、ジャーナルログ制御部1110は、空き領域管理部1120に空きページの割り当てを要求して新しい空きページを取得する。次に、ジャーナルログ制御部1110は、当該ログページの末尾に当該新しいログページのアドレスを保持して、当該新しいログページをログページリストに結合し、挿入ポインタ2600の位置に、当該ログページの以降の領域にはログエントリが存在しないことを示す特別なログエントリを追加する。最後に、当該新しいログページの先頭に当該ログエントリを追加し、挿入ポインタ2600を当該ログエントリの次の位置を示すように更新する。図2の例では、始点ポインタ2400と挿入ポインタ2600の間にあるログエントリ2211、2212、2221、2222、2231はジャーナルログ2000に追加されたが、まだコミット処理が完了していないログエントリである。 When an update process is started and a log entry associated with the update process is added to the journal log 2000, it is added to the position of the insertion pointer 2600, and the insertion pointer 2600 is updated to point to the next position of the log entry. be. If the log page at the position of the insertion pointer 2600 does not have enough free space to hold the log entry, the journal log control unit 1110 requests the free space management unit 1120 to allocate a free page to create a new free space. Get page. Next, the journal log control unit 1110 retains the address of the new log page at the end of the log page, joins the new log page to the log page list, and inserts the log page at the position of the insertion pointer 2600. Add a special log entry to indicate that there are no log entries in the following regions. Finally, the log entry is added to the top of the new log page and the insert pointer 2600 is updated to point to the next position of the log entry. In the example of FIG. 2, log entries 2211, 2212, 2221, 2222, and 2231 between the start pointer 2400 and the insertion pointer 2600 are log entries that have been added to the journal log 2000 but have not yet been committed. .
 当該更新処理に伴うログエントリの追加がすべて完了すると、ジャーナルログ制御部1110はコミット処理を実行する。図2の例では、ジャーナルログ制御部1110は、始点ポインタ2400と挿入ポインタ2600の間にある当該ログエントリが書き込まれたログページの領域のフラッシュ命令、および、メモリバリア命令を実行する。次に、終点ポインタ2500を、挿入ポインタ2600が示す位置に更新し、終点ポインタ2500を保持する領域のフラッシュ命令、および、メモリバリア命令を実行する。これにより、ログページリスト2100が保持するログエントリ2111、2112、2121、2122、2131は無効になり、ログページリスト2200が保持するログエントリ2211、2212、2221、2222、2231はコミットが完了したログエントリとして有効になる。 When the addition of all log entries associated with the update processing is completed, the journal log control unit 1110 executes commit processing. In the example of FIG. 2, the journal log control unit 1110 executes a flush instruction and a memory barrier instruction for the log page area between the start pointer 2400 and the insertion pointer 2600 where the log entry is written. Next, the end point pointer 2500 is updated to the position indicated by the insertion pointer 2600, and the flush instruction for the area holding the end point pointer 2500 and the memory barrier instruction are executed. As a result, the log entries 2111, 2112, 2121, 2122, and 2131 held by the log page list 2100 become invalid, and the log entries 2211, 2212, 2221, 2222, and 2231 held by the log page list 2200 become the committed logs. valid as an entry.
 また、コミット処理において、ジャーナルログ制御部1110は、始点ポインタ2300をヌルに設定し、始点ポインタ2300を保持する領域のフラッシュ命令、および、メモリバリア命令を実行し、空き領域管理部1120に、ログページリスト2100のすべてのログページの解放を要求してもよい。 Also, in the commit process, the journal log control unit 1110 sets the starting point pointer 2300 to null, executes a flush instruction and a memory barrier instruction for the area holding the starting point pointer 2300, and sends the log to the free area management unit 1120. All log pages in page list 2100 may be requested to be released.
 コミット処理が完了すると、ジャーナルログ制御部1110は、チェックポイント処理を実行し、ジャーナルログ2000内のコミットしたログエントリの内容をファイルシステム本体に反映させる。 When the commit processing is completed, the journal log control unit 1110 executes checkpoint processing and reflects the contents of the committed log entries in the journal log 2000 to the main body of the file system.
 ジャーナルログ制御部1110は、チェックポイント処理が完了すると、挿入ポインタ2600を、当該更新処理で使用したログページリストではないログページリストの始点ポインタが示す位置に更新し、当該更新処理を終了する。図2の例では、挿入ポインタ2600を始点ポインタ2300が示す位置に更新する。 When the checkpoint processing is completed, the journal log control unit 1110 updates the insertion pointer 2600 to the position indicated by the start point pointer of the log page list that is not the log page list used in the update processing, and ends the update processing. In the example of FIG. 2, the insert pointer 2600 is updated to the position indicated by the starting point pointer 2300 .
 以上のように、ジャーナルログ制御部1110は、更新処理ごとにジャーナルログ2000内のログページリスト2100と2200とを交互に使用する。更新処理におけるチェックポイント処理が完了し、当該更新処理に伴うログエントリが不要になっても、当該ログエントリを無効にするための終点ポインタ2500の更新、フラッシュ命令、および、メモリバリア命令を当該更新処理の終了時には実行せず、次回の更新処理におけるログエントリのコミット処理における終点ポインタ2500の更新、フラッシュ命令、および、メモリバリア命令の実行によって、当該更新処理におけるログエントリの無効化と、当該次回の更新処理におけるログエントリのコミット処理を一度に行うことにより、終点ポインタ2500の更新、フラッシュ命令、および、メモリバリア命令の実行回数を削減することができる。 As described above, the journal log control unit 1110 alternately uses the log page lists 2100 and 2200 in the journal log 2000 for each update process. Even if the checkpoint process in the update process is completed and the log entry associated with the update process becomes unnecessary, the update of the end point pointer 2500 for invalidating the log entry, the flush instruction, and the memory barrier instruction are not performed in the update process. By executing the end point pointer 2500 update, flush instruction, and memory barrier instruction in the log entry commit process in the next update process, invalidation of the log entry in the update process and execution of the next By executing commit processing of the log entries in the update processing of 1 at once, it is possible to reduce the number of executions of the update of the end point pointer 2500, the flush instruction, and the memory barrier instruction.
 図3は、第1の実施形態におけるログエントリの構成の一例を示す図である。ログエントリ3000はヘッダ部3100とデータ部3200とで構成される。ヘッダ部3100は、ログエントリの種別(以降、ログエントリ種別)を保持する。例えば、ログエントリ種別としては、ファイルのデータ書き込みに関するログエントリであるデータ書き込みログエントリ、メタデータの更新に関するログエントリであるメタデータ更新ログエントリなどがある。また、ログページ内の以降の領域にはログエントリが存在しないことを示すログエントリであるログページ終端ログエントリがある。その他のログエントリ種別を用意してもよい。また、ヘッダ部3100はログエントリに関するその他の情報を保持してもよい。データ部3200は、ログエントリのヘッダ部3100に保持されるログエントリ種別によって、保持する情報やサイズが異なってもよい。また、データ部3200は存在しなくてもよい。 FIG. 3 is a diagram showing an example of the configuration of log entries in the first embodiment. A log entry 3000 is composed of a header portion 3100 and a data portion 3200 . The header portion 3100 holds the type of log entry (hereinafter referred to as log entry type). For example, log entry types include a data write log entry, which is a log entry for writing data in a file, and a metadata update log entry, which is a log entry for updating metadata. There is also an end-of-log-page log entry, which is a log entry indicating that there are no log entries in subsequent areas in the log page. Other log entry types may be prepared. Header portion 3100 may also hold other information about the log entry. The data part 3200 may have different information and sizes depending on the log entry type held in the header part 3100 of the log entry. Also, the data section 3200 may not exist.
 図4は、第1の実施形態におけるデータ書き込みログエントリの構成の一例を示す図である。第1の実施形態では、書き込みデータにおいて、1ページに対して1つのデータ書き込みログエントリ4000を使用する。書き込みデータにおいて、連続する複数ページに対して1つのデータ書き込みログエントリ4000を使用するように実施形態を構成することもできる。データ書き込みログエントリ4000のヘッダ部4100は、ログエントリ種別がデータ書き込みログエントリであることを示す情報であるデータ書き込みログエントリ識別情報4110を保持する。データ書き込みログエントリ4000のデータ部4200は、データ書き込みログエントリ4000とは別に、書き込みデータページ4300を割り当てて、当該書き込みデータページ4300に書き込みデータを保持する。 FIG. 4 is a diagram showing an example of the structure of a data write log entry in the first embodiment. In the first embodiment, write data uses one data write log entry 4000 for one page. Embodiments can also be configured to use one data write log entry 4000 for multiple consecutive pages in the write data. A header portion 4100 of the data write log entry 4000 holds data write log entry identification information 4110 that is information indicating that the log entry type is a data write log entry. The data part 4200 of the data write log entry 4000 allocates a write data page 4300 separately from the data write log entry 4000 and holds the write data in the write data page 4300 .
 データ書き込みログエントリ4000のデータ部4200は、書き込みデータを保持する書き込みデータページ4300のアドレス4210(以降、書き込みデータページアドレス)、当該書き込みデータにおけるファイルの先頭からのオフセット4220(以降、ファイル内オフセット)、当該書き込みデータのサイズ4230(以降、書き込みデータサイズ)、当該書き込みデータのファイルシステム内の反映先であるデータページ(以降、反映先データページ)のアドレス(以降、反映先データページアドレス)を保持するメタデータページにおける、当該反映先データページアドレスを保持している位置のアドレス4240(以降、反映先データページアドレス保持アドレス)を保持する。データ書き込みログエントリ4000はその他の情報を保持してもよい。 The data part 4200 of the data write log entry 4000 includes the address 4210 of the write data page 4300 that holds the write data (hereinafter referred to as the write data page address) and the offset 4220 from the beginning of the file in the write data (hereinafter referred to as the file offset). , the size 4230 of the write data (hereinafter referred to as write data size), and the address (hereinafter referred to as the reflection destination data page address) of the data page to which the write data is reflected in the file system (hereinafter referred to as the reflection destination data page). The address 4240 (hereinafter referred to as the reflection destination data page address holding address) of the position where the reflection destination data page address is held in the metadata page to be processed is held. Data write log entry 4000 may hold other information.
 図5は、第1の実施形態におけるログページ終端ログエントリの構成の一例を示す図である。ログページ終端ログエントリ5000のヘッダ部5100は、ログエントリ種別がログページ終端ログエントリであることを示す情報であるログページ終端ログエントリ識別情報5110を保持する。図5の例では、ログページ終端ログエントリ5000はデータ部を有しない。 FIG. 5 is a diagram showing an example of the configuration of a log page end log entry in the first embodiment. The header portion 5100 of the log page end log entry 5000 holds log page end log entry identification information 5110 which is information indicating that the log entry type is the log page end log entry. In the example of FIG. 5, the end of log page log entry 5000 does not have a data portion.
 本発明の第1の実施形態は、メタデータの構造や内容には依存しないため、メタデータ更新ログエントリの構造や内容については説明を省略する。 Since the first embodiment of the present invention does not depend on the structure and content of metadata, the description of the structure and content of the metadata update log entry is omitted.
[第1の実施形態における書き込み処理の一例]
 第1の実施形態における書き込み処理は、ジャーナリング処理と、コミット処理と、チェックポイント処理とで構成される。書き込み処理の概要を以下に説明する。ジャーナリング処理において、データ書き込みログエントリを用いて、書き込みデータをジャーナルログに保持する。また、メタデータ更新ログエントリを用いて、ファイルシステムのメタデータへの更新をジャーナルログに保持する。コミット処理において、当該書き込み処理に伴うログエントリを永続化して、当該書き込み処理を確定させる。チェックポイント処理において、ジャーナルログに保持されたログエントリの内容をファイルシステムに反映させる。このとき、ファイルへの書き込みデータがデータ書き込みログエントリの書き込みデータページの末尾に到達していないときは、当該データ書き込みログエントリのファイルシステムへの反映を遅延させる遅延チェックポイント処理を実行する。遅延チェックポイント処理では、当該データ書き込みログエントリの位置を保存する。
[An example of write processing in the first embodiment]
The write processing in the first embodiment consists of journaling processing, commit processing, and checkpoint processing. An outline of the write process is described below. In the journaling process, data write log entries are used to keep written data in the journal log. Metadata update log entries are also used to keep updates to file system metadata in the journal log. In the commit process, the log entry associated with the write process is made permanent to confirm the write process. In checkpoint processing, the contents of the log entries held in the journal log are reflected in the file system. At this time, when the write data to the file has not reached the end of the write data page of the data write log entry, delay checkpoint processing is executed to delay the reflection of the data write log entry to the file system. Deferred checkpointing saves the location of the data write log entry.
 続く書き込みのジャーナリング処理において、前回の書き込み処理でデータ書き込みログエントリの遅延チェックポイント処理が実行されていて、かつ、当該データ書き込みログエントリの遅延チェックポイント処理によりチェックポイント処理を遅延させている書き込みデータの範囲の末尾に対して、当該続く書き込み処理の書き込みデータの範囲が連続しているならば、当該データ書き込みログエントリの書き込みデータページに対して、当該続く書き込み処理における書き込みを行い、当該データ書き込みログエントリの書き込みデータページアドレスを書き込みデータページアドレスとして保持する新たなデータ書き込みログエントリをジャーナルログに追加する。一方、当該続く書き込み処理のジャーナリング処理において、当該前回の書き込み処理でデータ書き込みログエントリの遅延チェックポイント処理が実行されているが、当該データ書き込みログエントリの遅延チェックポイント処理によりチェックポイント処理を遅延させている書き込みデータの範囲の末尾に対して、当該続く書き込み処理の書き込みデータの範囲が連続していないならば、当該データ書き込みログエントリの即時チェックポイント処理を実行したのち、当該続く書き込み処理のジャーナリング処理を実行する。 In the journaling process for subsequent writes, write data for which delayed checkpointing of a data write log entry has been performed in the previous write process, and checkpointing has been delayed by the delayed checkpointing of the data write log entry. If the range of write data of the subsequent write process is continuous with respect to the end of the range, write in the subsequent write process to the write data page of the data write log entry, and write the data Add a new data write log entry to the journal log that holds the write data page address of the log entry as the write data page address. On the other hand, in the journaling process of the subsequent write process, the delayed checkpoint process of the data write log entry is executed in the previous write process, but the checkpoint process is delayed by the delayed checkpoint process of the data write log entry. If the range of write data for the subsequent write operation is not contiguous with the end of the range of write data being written, immediately checkpoint the data write log entry and then journal the subsequent write operation. Execute the process.
 書き込み処理に伴ってメタデータを更新する場合は、メタデータ更新ログエントリのジャーナリング処理と、コミット処理と、チェックポイント処理とが必要となるが、前述したとおり、本発明の第1の実施形態では、メタデータの構造や内容については説明を省略しているため、以降の説明において、メタデータ更新ログエントリのジャーナリング処理と、コミット処理と、チェックポイント処理との詳細については説明を省略する。 When metadata is updated along with write processing, journaling processing of metadata update log entries, commit processing, and checkpoint processing are required. Since the description of the structure and contents of the metadata is omitted, the details of the metadata update log entry journaling process, commit process, and checkpoint process will be omitted in the following description.
 図6は、第1の実施形態における書き込み処理の動作の一例を示すフローチャートである。書き込み処理では、ジャーナルログ制御部1110は、書き込みデータと、書き込みデータ全体のサイズ(以降、全書き込みデータサイズ)と、書き込みデータを書き込むファイル内の位置(以降、書き込み位置)とを受け取る。 FIG. 6 is a flow chart showing an example of write processing operations in the first embodiment. In the write process, the journal log control unit 1110 receives the write data, the size of the entire write data (hereinafter, total write data size), and the position within the file to write the write data (hereinafter, write position).
 初めに、ジャーナルログ制御部1110は、ジャーナリング処理を実行する(ステップS6001)。ジャーナリング処理については後述する。ジャーナリング処理が完了すると、ジャーナルログ制御部1110は、コミット処理を実行する(ステップS6002)。コミット処理については後述する。コミット処理が完了すると、ジャーナルログ制御部1110は、チェックポイント処理を実行する(ステップS6003)。チェックポイント処理については後述する。 First, the journal log control unit 1110 executes journaling processing (step S6001). Journaling processing will be described later. When the journaling process is completed, the journal log control unit 1110 executes commit process (step S6002). Commit processing will be described later. When the commit processing is completed, the journal log control unit 1110 executes checkpoint processing (step S6003). Checkpoint processing will be described later.
[第1の実施形態におけるジャーナリング処理の一例]
 図7は、第1の実施形態におけるジャーナリング処理の動作の一例を示すフローチャートである。初めに、ジャーナルログ制御部1110は、遅延させたデータ書き込みログエントリのジャーナルログ内での位置が保存されていれば、ステップS7002へ、そうでなければ、ステップS7007へ遷移する(ステップS7001)。
[Example of journaling processing in the first embodiment]
FIG. 7 is a flowchart illustrating an example of journaling processing operations in the first embodiment. First, the journal log control unit 1110 transitions to step S7002 if the position in the journal log of the delayed data write log entry is saved, otherwise transitions to step S7007 (step S7001).
 遅延させたデータ書き込みログエントリのジャーナルログ内での位置が保存されているとき、ジャーナルログ制御部1110は、当該遅延させたデータ書き込みログエントリのジャーナルログ内での位置からデータ書き込みログエントリを取得し、書き込み処理における書き込み範囲が、当該遅延させたデータ書き込みログエントリの保持する書き込みデータの範囲の末尾に連続、すなわち、当該書き込み処理における書き込み位置が、当該遅延させたデータ書き込みログエントリのファイル内オフセットの値と当該データ書き込みログエントリの書き込みデータサイズの値の合計に等しいならば、ステップS7003へ、そうでなければ、ステップS7006へ遷移する(ステップS7002)。 When the position in the journal log of the delayed data write log entry is saved, the journal log control unit 1110 acquires the data write log entry from the position in the journal log of the delayed data write log entry. However, the write range in the write process is continuous to the end of the range of write data held by the delayed data write log entry, that is, the write position in the write process is within the file of the delayed data write log entry. If equal to the sum of the offset value and the write data size value of the data write log entry, go to step S7003; otherwise, go to step S7006 (step S7002).
 書き込み範囲が当該遅延させたデータ書き込みログエントリの保持する書き込みデータの範囲の末尾に連続、すなわち、当該書き込み処理における書き込み位置が、当該遅延させたデータ書き込みログエントリのファイル内オフセットの値と当該データ書き込みログエントリの書き込みデータサイズの値の合計に等しいとき、ジャーナルログ制御部1110は、データ追記書き込み処理を実行する(ステップS7003)。データ追記書き込み処理については後述する。 The write range is continuous to the end of the range of write data held by the delayed data write log entry, that is, the write position in the write process is the offset value in the file of the delayed data write log entry and the data When it is equal to the sum of the write data size values of the write log entries, the journal log control unit 1110 executes data append write processing (step S7003). The data append write process will be described later.
 次に、ジャーナルログ制御部1110は、書き込み位置にステップS7003で追記したデータサイズを加算し(ステップS7004)、全書き込みサイズから当該追記したデータサイズを減算する(ステップS7005)。 Next, the journal log control unit 1110 adds the data size added in step S7003 to the write position (step S7004), and subtracts the added data size from the total write size (step S7005).
 書き込み範囲が当該遅延させたデータ書き込みログエントリの保持する書き込みデータの範囲の末尾に連続でない、すなわち、書き込み位置が、当該遅延させたデータ書き込みログエントリのファイル内オフセットの値と当該遅延させたデータ書き込みログエントリの書き込みデータサイズの値の合計に等しくないとき、ジャーナルログ制御部1110は、遅延チェックポイントフラグを偽にして、当該遅延させたデータ書き込みログエントリのチェックポイント処理を実行する(ステップS7006)。遅延チェックポイントフラグは、データ書き込みログエントリのチェックポイント処理を遅延させるか否かを示すフラグである。データ書き込みログエントリのチェックポイント処理については後述する。 The write range is not continuous to the end of the range of write data held by the delayed data write log entry, i.e., the write position is the value of the offset in the file of the delayed data write log entry and the delayed data When not equal to the sum of the write data size values of the write log entries, the journal log control unit 1110 sets the delayed checkpoint flag to false and executes checkpoint processing of the delayed data write log entries (step S7006). ). The delayed checkpoint flag is a flag that indicates whether to delay the checkpoint processing of the data write log entry. Checkpointing of data write log entries will be described later.
 ジャーナルログ制御部1110は、書き込み位置以降の書き込み範囲内の各データページに対して、ステップS7007からステップS7011の処理を実行する。ジャーナルログ制御部1110は、全書き込みサイズが0ならば、ステップS7012へ、そうでなければ、ステップS7008へ遷移する(ステップS7007)。 The journal log control unit 1110 executes the processing from step S7007 to step S7011 for each data page within the write range after the write position. If the total write size is 0, the journal log control unit 1110 proceeds to step S7012; otherwise, to step S7008 (step S7007).
 全書き込みサイズが0でないとき、ジャーナルログ制御部1110は、書き込み位置のデータページのアドレスを保持するメタデータに対するメタデータ更新ログエントリ追加処理を実行する(ステップS7008)。本発明の第1の実施形態では、当該メタデータ更新ログエントリ追加処理は、当該書き込み位置のデータページのアドレスの変更に伴うメタデータの更新などを想定しているが、メタデータ更新ログエントリの追加処理の要否を含めて、前述のとおり、メタデータ更新ログエントリの追加処理の詳細については説明を省略する。 When the total write size is not 0, the journal log control unit 1110 executes metadata update log entry addition processing for metadata holding the address of the data page at the write position (step S7008). In the first embodiment of the present invention, the metadata update log entry addition process is assumed to update metadata accompanying a change in the address of the data page at the write position. As described above, the details of the metadata update log entry addition process, including whether or not the addition process is necessary, will not be described.
 ジャーナルログ制御部1110は、書き込み位置のデータページに対するデータ書き込みログエントリ追加処理を実行する(ステップS7009)。データ書き込みログエントリ追加処理については後述する。 The journal log control unit 1110 executes data write log entry addition processing for the data page at the write position (step S7009). The data write log entry addition process will be described later.
 次に、ジャーナルログ制御部1110は、書き込み位置にステップS7009で書き込んだデータサイズを加算し(ステップS7010)、全書き込みサイズから当該データサイズを減算する(ステップS7011)。 Next, the journal log control unit 1110 adds the data size written in step S7009 to the write position (step S7010), and subtracts the data size from the total write size (step S7011).
 最後に、全書き込みサイズが0のとき、ジャーナルログ制御部1110は、ファイル全体のメタデータに対するメタデータ更新ログエントリ追加処理を実行する(ステップS7012)。本発明の第1の実施形態では、当該メタデータ更新ログエントリ追加処理は、ファイル更新時間の更新などを想定しているが、メタデータ更新ログエントリ追加処理の要否を含めて、前述のとおり、メタデータ更新ログエントリ追加処理の詳細については説明を省略する。 Finally, when the total write size is 0, the journal log control unit 1110 executes metadata update log entry addition processing for the metadata of the entire file (step S7012). In the first embodiment of the present invention, the metadata update log entry addition process is assumed to update the file update time. , details of the metadata update log entry addition process will be omitted.
[第1の実施形態におけるデータ書き込みログエントリ追加処理]
 図8は、第1の実施形態におけるデータ書き込みログエントリ追加処理の動作の一例を示すフローチャートである。初めに、ジャーナルログ制御部1110は、ログエントリ領域確保処理を実行し、ジャーナルログ内に、データ書き込みログエントリを追加するための空き領域を確保する(ステップS8001)。ログエントリ領域確保処理については後述する。
[Data write log entry addition processing in the first embodiment]
FIG. 8 is a flowchart illustrating an example of the operation of data write log entry addition processing according to the first embodiment. First, the journal log control unit 1110 executes log entry area securing processing to secure an empty area for adding a data write log entry in the journal log (step S8001). The log entry area reservation process will be described later.
 次に、ジャーナルログ制御部1110は、ステップS8002からステップS8005で、データ書き込みログエントリのデータ部に保持する情報を取得する。ジャーナルログ制御部1110は、空き領域管理部1120に空きページの割り当てを要求して空きページを取得し、当該空きページをデータ書き込みログエントリの書き込みデータページ、当該空きページのアドレスをデータ書き込みログエントリの書き込みデータページアドレスとする(ステップS8002)。 Next, the journal log control unit 1110 acquires information held in the data part of the data write log entry in steps S8002 to S8005. The journal log control unit 1110 acquires a free page by requesting the free space management unit 1120 to allocate a free page. is the write data page address (step S8002).
 ジャーナルログ制御部1110は、書き込み対象のファイルのメタデータを探索して、書き込み位置に対応するデータページのアドレスを保持するメタデータページにおける、当該データページのアドレスを保持する位置のアドレスを取得し、当該アドレスをデータ書き込みログエントリの反映先データページアドレス保持アドレスとする(ステップS8003)。 The journal log control unit 1110 searches the metadata of the file to be written, and acquires the address of the position that holds the address of the data page in the metadata page that holds the address of the data page corresponding to the write position. , the address is set as the reflection destination data page address holding address of the data write log entry (step S8003).
 ジャーナルログ制御部1110は、書き込み位置をデータ書き込みログエントリのファイル内オフセットとする(ステップS8004)。 The journal log control unit 1110 sets the write position to the file offset of the data write log entry (step S8004).
 ジャーナルログ制御部1110は、ページサイズから、ステップS8004で取得したデータ書き込みログエントリのファイル内オフセットをページサイズで除算した剰余を減算した値と、全書き込みサイズとの最小値を計算し、当該最小値をデータ書き込みログエントリの書き込みデータサイズとする(ステップS8005)。 The journal log control unit 1110 calculates, from the page size, the remainder obtained by dividing the offset in the file of the data write log entry acquired in step S8004 by the page size, and the minimum value of the total write size. The value is set as the write data size of the data write log entry (step S8005).
 ジャーナルログ制御部1110は、当該書き込みログエントリの書き込みデータページにおける、ステップS8005で計算した当該剰余の値の位置に、当該データ書き込みログエントリの書き込みデータサイズ分、書き込みデータを書き込み、書き込まれた範囲のフラッシュ命令を実行する(ステップS8006)。 The journal log control unit 1110 writes write data equal to the write data size of the data write log entry to the position of the remainder value calculated in step S8005 in the write data page of the write log entry. is executed (step S8006).
 ジャーナルログ制御部1110は、ログエントリ種別がデータ書き込みログエントリであることを示す情報であるデータ書き込みログエントリ識別情報と、当該書き込みログエントリの書き込みデータページアドレスと、当該書き込みログエントリの反映先データページアドレス保持アドレスと、当該書き込みログエントリのファイル内オフセットと、当該書き込みログエントリの書き込みデータサイズと、によりデータ書き込みログエントリを作成し、挿入ポインタ2600の示す位置に、当該データ書き込みログエントリを書き込む(ステップS8007)。最後に、ジャーナルログ制御部1110は、挿入ポインタ2600を、ステップS8007で書き込んだ当該データ書き込みログエントリの次の位置に設定する(ステップS8008)。 The journal log control unit 1110 stores data write log entry identification information indicating that the log entry type is a data write log entry, the write data page address of the write log entry, and the reflection destination data of the write log entry. A data write log entry is created based on the page address holding address, the offset in the file of the write log entry, and the write data size of the write log entry, and the data write log entry is written at the position indicated by the insertion pointer 2600. (Step S8007). Finally, the journal log control unit 1110 sets the insertion pointer 2600 to the position next to the data write log entry written in step S8007 (step S8008).
[第1の実施形態におけるデータ追記書き込み処理]
 図9は、第1の実施形態におけるデータ追記書き込み処理の動作の一例を示すフローチャートである。初めに、ジャーナルログ制御部1110は、ログエントリ領域確保処理を実行し、ジャーナルログ内に、データ書き込みログエントリを追加するための空き領域を確保する(ステップS9001)。ログエントリ領域確保処理については後述する。
[Additional data writing process in the first embodiment]
FIG. 9 is a flow chart showing an example of the operation of the data additional writing process according to the first embodiment. First, the journal log control unit 1110 executes log entry area securing processing to secure an empty area for adding a data write log entry in the journal log (step S9001). The log entry area reservation process will be described later.
 次に、ジャーナルログ制御部1110は、ステップS9002からステップS9005で、データ書き込みログエントリのデータ部に保持する情報を取得する。ジャーナルログ制御部1110は、ステップS7002で取得した当該遅延させたデータ書き込みログエントリのデータ書き込みデータページアドレスを、当該データ追記書き込みに対するデータ書き込みログエントリのデータ書き込みデータページアドレスとする(ステップS9002)。 Next, the journal log control unit 1110 acquires information held in the data part of the data write log entry in steps S9002 to S9005. The journal log control unit 1110 uses the data write data page address of the delayed data write log entry acquired in step S7002 as the data write data page address of the data write log entry for the data additional write (step S9002).
 ジャーナルログ制御部1110は、ステップS7002で取得した当該遅延させたデータ書き込みログエントリの反映先データページアドレス保持アドレスを、当該データ追記書き込みに対するデータ書き込みログエントリの反映先データページアドレス保持アドレスとする(ステップS9003)。 The journal log control unit 1110 sets the reflection destination data page address holding address of the delayed data write log entry acquired in step S7002 as the reflection destination data page address holding address of the data write log entry for the data append write ( step S9003).
 ジャーナルログ制御部1110は、ステップS7002で取得した当該遅延させたデータ書き込みログエントリのファイル内オフセットを、当該データ追記書き込みに対するデータ書き込みログエントリのファイル内オフセットとする(ステップS9004)。 The journal log control unit 1110 sets the file offset of the delayed data write log entry acquired in step S7002 as the file offset of the data write log entry for the data append write (step S9004).
 ジャーナルログ制御部1110は、ページサイズから、ステップS7002で取得した当該遅延させたデータ書き込みログエントリのファイル内オフセットをページサイズで除算した剰余と当該遅延させたデータ書き込みログエントリの書き込みデータサイズとの合計を減算した値と、現在の全書き込みサイズとの最小値を計算し、当該遅延させたデータ書き込みログエントリの書き込みデータサイズと当該最小値の合計を、当該データ追記書き込みに対するデータ書き込みログエントリの書き込みデータサイズとする(ステップS9005)。 The journal log control unit 1110 calculates, from the page size, the remainder obtained by dividing the file offset of the delayed data write log entry acquired in step S7002 by the page size, and the write data size of the delayed data write log entry. Calculate the minimum value of the value obtained by subtracting the total and the current total write size, and calculate the sum of the write data size of the delayed data write log entry and the minimum value of the data write log entry for the data append write. The write data size is set (step S9005).
 ジャーナルログ制御部1110は、当該データ追記書き込みに対するデータ書き込みログエントリの書き込みデータページアドレスが示す書き込みデータページにおける、当該遅延させたデータ書き込みログエントリのファイル内オフセットをページサイズで除算した剰余と当該遅延させたデータ書き込みログエントリの書き込みデータサイズとの合計の値の位置に、当該データ追記書き込みに対するデータ書き込みログエントリの書き込みデータサイズから当該遅延させたデータ書き込みログエントリの書き込みデータサイズを減算した値分、書き込みデータを書き込み、書き込まれた領域のフラッシュ命令を実行する(ステップS9006)。 The journal log control unit 1110 divides the in-file offset of the delayed data write log entry by the page size, in the write data page indicated by the write data page address of the data write log entry for the data append write, and the delay The value obtained by subtracting the write data size of the delayed data write log entry from the write data size of the data write log entry corresponding to the data append write is placed at the position of the sum of the write data size of the delayed data write log entry and the write data size of the delayed data write log entry , writes the write data, and executes the flash command for the written area (step S9006).
 ジャーナルログ制御部1110は、ログエントリ種別がデータ書き込みログエントリであることを示す情報であるデータ書き込みログエントリ識別情報と、当該データ追記書き込みに対する書き込みログエントリの書き込みデータページアドレスと、当該データ追記書き込みに対する書き込みログエントリの反映先データページアドレス保持アドレスと、当該データ追記書き込みに対する書き込みログエントリのファイル内オフセットと、当該データ追記書き込みに対する書き込みログエントリの書き込みデータサイズと、によりデータ追記書き込みに対するデータ書き込みログエントリを作成し、挿入ポインタ2600の示す位置に、当該データ追記書き込みに対するデータ書き込みログエントリを書き込む(ステップS9007)。最後に、ジャーナルログ制御部1110は、挿入ポインタ2600を、ステップS9007で書き込んだ当該データ追記書き込みに対するデータ書き込みログエントリの次の位置に設定する(ステップS9008)。 The journal log control unit 1110 includes data write log entry identification information indicating that the log entry type is a data write log entry, the write data page address of the write log entry for the data append write, and the data write log entry. The data page address to which the write log entry is reflected, the offset in the file of the write log entry for the data appending write, and the write data size of the write log entry for the data appending write. An entry is created, and a data write log entry for the data additional write is written at the position indicated by the insertion pointer 2600 (step S9007). Finally, the journal log control unit 1110 sets the insertion pointer 2600 to the position next to the data write log entry for the data additional write written in step S9007 (step S9008).
[第1の実施形態におけるログエントリ領域確保処理]
 図10は、第1の実施形態におけるログエントリ領域確保処理の動作の一例を示すフローチャートである。初めに、ジャーナルログ制御部1110は、挿入ポインタがヌルならば、ステップS10007へ、そうでなければ、ステップS10002へ遷移する(ステップS10001)。
[Log entry area reservation processing in the first embodiment]
FIG. 10 is a flowchart illustrating an example of the operation of log entry area allocation processing according to the first embodiment. First, the journal log control unit 1110 transitions to step S10007 if the insertion pointer is null, otherwise transitions to step S10002 (step S10001).
 挿入ポインタ2600がヌルでないとき、ジャーナルログ制御部1110は、挿入ポインタ2600の示す位置のログページに、追加すべきログエントリを保持するのに十分な領域が空いているならば、ログエントリ領域確保処理を終了する。そうでなければ、ジャーナルログ制御部1110は、ステップS10003へ遷移する(ステップS10002)。 When the insert pointer 2600 is not null, the journal log control unit 1110 reserves a log entry area if the log page indicated by the insert pointer 2600 has an area sufficient to hold the log entry to be added. End the process. Otherwise, the journal log control unit 1110 transitions to step S10003 (step S10002).
 挿入ポインタ2600の示す位置のログページに、追加すべきログエントリを保持するのに十分な領域が空いていないとき、ジャーナルログ制御部1110は、空き領域管理部1120に空きページの割り当てを要求して、空きページを取得する(ステップS10003)。 When the log page at the position indicated by the insertion pointer 2600 does not have enough free space to hold the log entry to be added, the journal log control unit 1110 requests the free space management unit 1120 to allocate a free page. to obtain an empty page (step S10003).
 次に、ジャーナルログ制御部1110は、ステップS10003で取得した当該空きページのアドレスを、挿入ポインタ2600の示す位置のログページの末尾に書き込み、当該空きページをジャーナルログのログページリストに結合する(ステップS10004)。また、ジャーナルログ制御部1110は、ログページ終端ログエントリ追加処理を実行する(ステップS10005)。ログページ終端ログエントリ追加処理については後述する。 Next, the journal log control unit 1110 writes the address of the free page acquired in step S10003 to the end of the log page at the position indicated by the insertion pointer 2600, and joins the free page to the log page list of the journal log ( step S10004). The journal log control unit 1110 also executes log page end log entry addition processing (step S10005). The log page end log entry addition processing will be described later.
 ジャーナルログ制御部1110は、挿入ポインタ2600を、ステップS10003で取得した当該空きページの先頭の位置に設定する(ステップS10006)。 The journal log control unit 1110 sets the insertion pointer 2600 to the top position of the free page acquired in step S10003 (step S10006).
 挿入ポインタ2600がヌルのとき、ジャーナルログ制御部1110は、空き領域管理部1120に空きページの割り当てを要求して、空きページを取得する(ステップS10007)。 When the insert pointer 2600 is null, the journal log control unit 1110 requests allocation of a free page to the free space management unit 1120 and acquires a free page (step S10007).
 ジャーナルログ制御部1110は、現在の更新処理で使用しているログページリストの先頭を示す先頭ポインタを、ステップS10007で取得した当該空きページの先頭の位置に設定し、先頭ポインタを保持する領域のフラッシュ命令、および、メモリバリア命令を実行する(ステップS10008)。また、ジャーナルログ制御部1110は、挿入ポインタ2600をステップS10007で取得した当該空きページの先頭の位置に設定する(ステップS10009)。 The journal log control unit 1110 sets the head pointer indicating the head of the log page list used in the current update process to the head position of the empty page acquired in step S10007, and sets the head pointer to the area holding the head pointer. A flash instruction and a memory barrier instruction are executed (step S10008). Also, the journal log control unit 1110 sets the insertion pointer 2600 to the top position of the empty page acquired in step S10007 (step S10009).
[第1の実施形態におけるログページ終端ログエントリ追加処理]
 図11は第1の実施形態におけるログページ終端ログエントリ追加処理の動作の一例を示すフローチャートである。ジャーナルログ制御部1110は、ログエントリ種別がログページ終端ログエントリであることを示す情報であるログページ終端ログエントリ識別情報によりログページ終端ログエントリを作成し、挿入ポインタ2600の示す位置に、当該ログページ終端ログエントリを書き込む(ステップS11001)。
[Log page end log entry addition processing in the first embodiment]
FIG. 11 is a flow chart showing an example of the operation of log page end log entry addition processing according to the first embodiment. The journal log control unit 1110 creates a log page end log entry using the log page end log entry identification information, which is information indicating that the log entry type is a log page end log entry, and inserts the log page end log entry at the position indicated by the insertion pointer 2600. A log page end log entry is written (step S11001).
[第1の実施形態におけるコミット処理]
 図12は、第1の実施形態におけるコミット処理の動作の一例を示すフローチャートである。初めに、ジャーナルログ制御部1110は、ジャーナルログ内のログエントリを示すログエントリポインタを、書き込み処理のジャーナリング処理で使用しているログページリストの先頭ポインタの位置に設定する(ステップS12001)。
[Commit processing in the first embodiment]
FIG. 12 is a flowchart illustrating an example of commit processing operations in the first embodiment. First, the journal log control unit 1110 sets a log entry pointer indicating a log entry in the journal log to the position of the head pointer of the log page list used in the journaling process of the write process (step S12001).
 ジャーナルログ制御部1110は、当該ログエントリポインタと挿入ポインタ2600が同じログページを示しているならば、ステップS12005へ、そうでなければ、ステップS12003へ遷移する(ステップS12002)。 If the log entry pointer and the insertion pointer 2600 indicate the same log page, the journal log control unit 1110 proceeds to step S12005, otherwise proceeds to step S12003 (step S12002).
 当該ログエントリポインタと挿入ポインタ2600が同じログページを示していないとき、ジャーナルログ制御部1110は、当該ログエントリポインタが示しているログページ全体のフラッシュ命令を実行する(ステップS12003)。 When the log entry pointer and the insertion pointer 2600 do not indicate the same log page, the journal log control unit 1110 executes a flush instruction for the entire log page indicated by the log entry pointer (step S12003).
 次に、ジャーナルログ制御部1110は、当該ログエントリポインタを、当該ログエントリポインタが示すログページの末尾に保持されている、ログページリストの次のログページの先頭の位置に設定する(ステップS12004)。 Next, the journal log control unit 1110 sets the log entry pointer to the head position of the next log page in the log page list held at the end of the log page indicated by the log entry pointer (step S12004). ).
 当該ログエントリポインタと挿入ポインタ2600が同じログページを示しているとき、ジャーナルログ制御部1110は、当該ログエントリポインタから挿入ポインタ2600までの領域のフラッシュ命令を実行し、次に、メモリバリア命令を実行する(ステップS12005)。 When the log entry pointer and the insertion pointer 2600 indicate the same log page, the journal log control unit 1110 executes a flush instruction for the area from the log entry pointer to the insertion pointer 2600, and then executes a memory barrier instruction. Execute (step S12005).
 ジャーナルログ制御部1110は、終点ポインタ2500を挿入ポインタ2600の位置に設定し、終点ポインタ2500を保持する領域のフラッシュ命令、および、メモリバリア命令を実行する(ステップS12006)。 The journal log control unit 1110 sets the end point pointer 2500 to the position of the insertion pointer 2600, and executes the flush command and memory barrier command for the area holding the end point pointer 2500 (step S12006).
 ジャーナルログ制御部は、当該ログエントリポインタを当該書き込み処理で使用していないログページリストの先頭ポインタの示す位置に設定する(ステップS12007)。 The journal log control unit sets the log entry pointer to the position indicated by the head pointer of the log page list not used in the write process (step S12007).
 ジャーナルログ制御部1110は、当該ログエントリポインタがヌルならば、コミット処理を終了する。そうでなければ、ジャーナルログ制御部1110は、ステップS12009へ遷移する(ステップS12008)。 If the log entry pointer is null, the journal log control unit 1110 ends commit processing. Otherwise, the journal log control unit 1110 transitions to step S12009 (step S12008).
 当該ログエントリポインタがヌルでないとき、ジャーナルログ制御部1110は、ログエントリポインタの値を保存したのち、当該ログエントリポインタを、当該ログエントリポインタの示す位置のログページの末尾に保持されている、ログページリストの次のログページの先頭の位置に設定する(ステップS12009)。 When the log entry pointer is not null, the journal log control unit 1110 saves the value of the log entry pointer, and then stores the log entry pointer at the end of the log page at the position indicated by the log entry pointer. The next log page in the log page list is set at the head position (step S12009).
 ジャーナルログ制御部1110は、空き領域管理部1120に、ステップS12009で保存したログエントリポインタの値が示すログページの解放を要求して、当該ログページを解放する(ステップS12010)。 The journal log control unit 1110 requests the free space management unit 1120 to release the log page indicated by the value of the log entry pointer saved in step S12009, and releases the log page (step S12010).
[第1の実施形態におけるチェックポイント処理]
 図13は、第1の実施形態におけるチェックポイント処理の動作の一例を示すフローチャートである。ジャーナルログ制御部1110は、コミット済みの各ログエントリ、すなわち、更新処理で使用しているログページリストの先頭の位置を示す始点ポインタと終点ポインタ2500の間にある各エントリに対して、ステップS13001からステップS13008の処理を実行する。初めに、ジャーナルログ制御部1110は、ジャーナルログ内の処理対象のログエントリを示すログエントリポインタを更新処理で使用しているログページリストの始点ポインタの示す位置に設定する(ステップS13001)。
[Checkpoint processing in the first embodiment]
FIG. 13 is a flowchart illustrating an example of checkpoint processing operations in the first embodiment. The journal log control unit 1110 performs step S13001 on each committed log entry, that is, each entry between the start point pointer indicating the head position of the log page list used in the update process and the end point pointer 2500. , the process of step S13008 is executed. First, the journal log control unit 1110 sets the log entry pointer indicating the log entry to be processed in the journal log to the position indicated by the start point pointer of the log page list used in the update process (step S13001).
 ジャーナルログ制御部1110は、ログエントリポインタが終点ポインタ2500と同じ位置ならば、ステップS13009へ、そうでなければ、ステップS13003へ遷移する(ステップS13002)。 If the log entry pointer is at the same position as the end point pointer 2500, the journal log control unit 1110 proceeds to step S13009; otherwise, to step S13003 (step S13002).
 ログエントリポインタが終点ポインタ2500と同じ位置でないとき、ジャーナルログ制御部1110は、ログエントリポインタが示すログエントリのログエントリ種別がデータ書き込みログエントリならば、ステップS13004へ、そうでなければ、ステップS13006へ遷移する(ステップS13003)。 When the log entry pointer is not at the same position as the end point pointer 2500, the journal log control unit 1110 proceeds to step S13004 if the log entry type of the log entry indicated by the log entry pointer is a data write log entry; otherwise, step S13006. (step S13003).
 ジャーナルログ制御部1110は、ログエントリポインタが示すログエントリのログエントリ種別がデータ書き込みログエントリのとき、遅延チェックポイントフラグを真にして、データ書き込みログエントリのチェックポイント処理を実行する(ステップS13004)。データ書き込みログエントリのチェックポイント処理については後述する。 When the log entry type of the log entry indicated by the log entry pointer is the data write log entry, the journal log control unit 1110 sets the delay checkpoint flag to true and executes checkpoint processing for the data write log entry (step S13004). . Checkpointing of data write log entries will be described later.
 次に、ジャーナルログ制御部1110は、ログエントリポインタに、当該ログエントリポインタの示すログエントリのログエントリ種別に応じたログエントリのサイズを加算する(ステップS13005)。 Next, the journal log control unit 1110 adds the log entry size corresponding to the log entry type of the log entry indicated by the log entry pointer to the log entry pointer (step S13005).
 ログエントリポインタが示すログエントリのログエントリ種別がデータ書き込みログエントリでないとき、ジャーナルログ制御部1110は、ログエントリポインタが示すログエントリのログエントリ種別がメタデータ更新ログエントリならば、ステップS13007へ、そうでなければ、ステップS13008へ遷移する(ステップS13006)。 When the log entry type of the log entry indicated by the log entry pointer is not a data write log entry, the journal log control unit 1110 proceeds to step S13007 if the log entry type of the log entry indicated by the log entry pointer is a metadata update log entry. Otherwise, the process proceeds to step S13008 (step S13006).
 ログエントリポインタが示すログエントリのログエントリ種別がメタデータ更新ログエントリのとき、ジャーナルログ制御部1110は、メタデータ更新ログエントリのチェックポイント処理を実行する(ステップS13007)。前述のとおり、メタデータ更新ログエントリのチェックポイント処理の詳細については説明を省略する。 When the log entry type of the log entry indicated by the log entry pointer is metadata update log entry, the journal log control unit 1110 executes checkpoint processing for the metadata update log entry (step S13007). As described above, the detailed description of the metadata update log entry checkpoint process is omitted.
 ログエントリポインタが示すログエントリのログエントリ種別がメタデータ更新ログエントリでないとき、ジャーナルログ制御部1110は、ログエントリポインタを、当該ログエントリポインタの示す位置のログページの末尾に保持されている、ログページリストの次のログページの先頭の位置に設定する(ステップS13008)。第1の実施形態におけるチェックポイント処理の動作の一例では、ログエントリ種別は、データ書き込みログエントリと、メタデータ更新ログエントリと、ログページ終端ログエントリとのいずれかであることを想定している。その他のログエントリ種別が存在するときは、当該その他のログエントリ種別であることの判定と、当該その他のログエントリに対応したチェックポイント処理を実行する必要がある。 When the log entry type of the log entry indicated by the log entry pointer is not a metadata update log entry, the journal log control unit 1110 stores the log entry pointer at the end of the log page at the position indicated by the log entry pointer. The next log page in the log page list is set to the head position (step S13008). In one example of the checkpoint processing operation in the first embodiment, the log entry type is assumed to be one of data write log entry, metadata update log entry, and log page end log entry. . When other log entry types exist, it is necessary to determine that the log entry type is the other log entry type and to execute checkpoint processing corresponding to the other log entry.
 最後に、ログエントリポインタが終点ポインタと同じ位置のとき、ジャーナルログ制御部1110は、挿入ポインタ更新処理を実行する(ステップS13009)。挿入ポインタ更新処理については後述する。 Finally, when the log entry pointer is at the same position as the end point pointer, the journal log control unit 1110 executes insert pointer update processing (step S13009). Insert pointer update processing will be described later.
[第1の実施形態におけるデータ書き込みログエントリのチェックポイント処理]
 図14は、第1の実施形態におけるデータ書き込みログエントリのチェックポイント処理の動作の一例を示すフローチャートである。ジャーナルログ制御部1110は、遅延チェックポイントフラグが偽、または、書き込みが書き込みデータページの末尾に達している、すなわち、データ書き込みログエントリのファイル内オフセットをページサイズで除算した剰余と当該データ書き込みログエントリの書き込みデータサイズの合計がページサイズと同じ値ならば、ステップS14002へ、そうでなければ、ステップS14003へ遷移する(ステップS14001)。
[Checkpoint processing of data write log entries in the first embodiment]
FIG. 14 is a flow chart showing an example of the operation of checkpoint processing for data write log entries in the first embodiment. The journal log control unit 1110 determines whether the delayed checkpoint flag is false or the write has reached the end of the write data page, that is, the remainder obtained by dividing the offset in the file of the data write log entry by the page size and the data write log If the total write data size of the entry is the same value as the page size, the process proceeds to step S14002; otherwise, the process proceeds to step S14003 (step S14001).
 遅延チェックポイントフラグが偽、または、書き込みが書き込みデータページの末尾に達している、すなわち、当該データ書き込みログエントリのファイル内オフセットをページサイズで除算した剰余と当該データ書き込みログエントリの書き込みデータサイズの合計がページサイズと同じ値のとき、ジャーナルログ制御部1110は、データ書き込みログエントリの即時チェックポイント処理を実行する(ステップS14002)。データ書き込みログエントリの即時チェックポイント処理については後述する。 The deferred checkpoint flag is false, or the write has reached the end of the write data page, that is, the remainder of dividing the offset in the file of the data write log entry by the page size and the write data size of the data write log entry When the total is the same value as the page size, the journal log control unit 1110 executes immediate checkpoint processing of the data write log entry (step S14002). Immediate checkpointing of data write log entries is described below.
 遅延チェックポイントフラグが真、かつ、書き込みが書き込みデータページの末尾に達していない、すなわち、当該データ書き込みログエントリのファイル内オフセットをページサイズで除算した剰余と当該データ書き込みログエントリの書き込みデータサイズの合計がページサイズ未満のとき、ジャーナルログ制御部1110は、データ書き込みログエントリの遅延チェックポイント処理を実行する(ステップS14003)。データ書き込みログエントリの遅延チェックポイント処理については後述する。 The deferred checkpoint flag is true and the write has not reached the end of the write data page, i.e. the remainder of dividing the offset in the file of the data write log entry by the page size and the write data size of the data write log entry When the total is less than the page size, the journal log control unit 1110 executes delayed checkpoint processing of data write log entries (step S14003). Delayed checkpointing of data write log entries is described below.
[第1の実施形態におけるデータ書き込みログエントリの即時チェックポイント処理]
 データ書き込みログエントリの即時チェックポイント処理は、チェックポイント処理に伴うデータの書き込み量を、従来のジャーナリングにおけるチェックポイント処理よりも削減することができる。
[Immediate checkpoint processing of data write log entries in the first embodiment]
Immediate checkpointing of data write log entries can reduce the amount of data written associated with checkpointing compared to checkpointing in conventional journaling.
 例えば、データ書き込みログエントリの書き込みデータサイズが所定の閾値未満ならば、当該データ書き込みログエントリの書き込みデータページに保持されている書き込みデータを、当該データ書き込みログエントリの反映先データページアドレス保持アドレスの位置に保持されている反映先データページアドレスで示されるデータページにおける、当該データ書き込みログエントリのファイル内オフセットをページサイズで除算した剰余の値の位置に書き込み、書き込まれた領域のフラッシュ命令を実行する。 For example, if the write data size of the data write log entry is less than a predetermined threshold, the write data held in the write data page of the data write log entry is transferred to the reflection destination data page address holding address of the data write log entry. In the data page indicated by the target data page address held at the location, write to the location of the remainder obtained by dividing the offset in the file of the relevant data write log entry by the page size, and execute the flush command for the written area. do.
 また、例えば、データ書き込みログエントリの書き込みデータサイズが所定の閾値以上ならば、当該データ書き込みログエントリの書き込みデータページにおいて、書き込みデータが保持されている範囲以外の領域へ、当該データ書き込みログエントリの反映先データページアドレス保持アドレスの位置に保持されている反映先データページアドレスで示されるデータページからデータを書き込み、書き込まれた領域のフラッシュ命令を実行する。さらに、当該データ書き込みログエントリの反映先データページアドレス保持アドレスの位置に、当該データ書き込みログエントリの書き込みデータページアドレスを書き込み、書き込まれた領域のフラッシュ命令を実行する。所定の閾値としては、例えば、ページサイズの1/2とする。 Further, for example, if the write data size of the data write log entry is equal to or greater than a predetermined threshold, the write data page of the data write log entry is transferred to an area other than the range where the write data is held. Data is written from the data page indicated by the reflection destination data page address held at the position of the reflection destination data page address holding address, and the flash instruction of the written area is executed. Furthermore, the write data page address of the data write log entry is written at the position of the reflection destination data page address holding address of the data write log entry, and the flush instruction of the written area is executed. The predetermined threshold is, for example, 1/2 of the page size.
 図15は、第1の実施形態におけるデータ書き込みログエントリの即時チェックポイント処理の動作の一例を示すフローチャートである。初めに、ジャーナルログ制御部1110は、データ書き込みログエントリの反映先データページアドレス保持アドレスの位置に保持されている反映先データページアドレスがヌル、すなわち、当該反映先データページが存在しないならば、ステップS15011へ、そうでなければ、ステップS15002へ遷移する(ステップS15001)。 FIG. 15 is a flow chart showing an example of the operation of immediate checkpoint processing of data write log entries in the first embodiment. First, the journal log control unit 1110 detects that the reflection destination data page address held at the position of the reflection destination data page address holding address of the data write log entry is null, that is, if the reflection destination data page does not exist, To step S15011, otherwise, to step S15002 (step S15001).
 反映先データページアドレスがヌルでない、すなわち、当該反映先データページが存在するとき、ジャーナルログ制御部1110は、当該データ書き込みログエントリの書き込みデータサイズが所定の閾値未満ならば、ステップS15003へ、そうでなければ、ステップS15004へ遷移する(ステップS15002)。 When the reflection destination data page address is not null, that is, when the reflection destination data page exists, the journal log control unit 1110 proceeds to step S15003 if the write data size of the data write log entry is less than a predetermined threshold. Otherwise, the process proceeds to step S15004 (step S15002).
 当該データ書き込みログエントリの書き込みデータサイズが所定の閾値未満のとき、ジャーナルログ制御部1110は、当該データ書き込みログエントリの書き込みデータページアドレスで示される書き込みデータページに保持されている書き込みデータを、当該データ書き込みログエントリの反映先データページアドレス保持アドレスの位置に保持されている反映先データページアドレスで示される反映先データページにおける、当該データ書き込みログエントリのファイル内オフセットをページサイズで除算した剰余の値の位置へ、当該データ書き込みログエントリの書き込みデータサイズ分、書き込み、書き込まれた領域のフラッシュ命令を実行する(ステップS15003)。 When the write data size of the data write log entry is less than the predetermined threshold, the journal log control unit 1110 writes the write data held in the write data page indicated by the write data page address of the data write log entry to the The remainder obtained by dividing the offset in the file of the data write log entry by the page size in the reflection destination data page indicated by the reflection destination data page address held at the position of the reflection destination data page address holding address of the data write log entry The write data size of the data write log entry is written to the position of the value, and the flush command of the written area is executed (step S15003).
 当該データ書き込みログエントリの書き込みデータサイズが所定の閾値未満でないとき、ジャーナルログ制御部1110は、書き込みが当該データ書き込みログエントリの書き込みデータページの先頭からではない、すなわち、当該書き込みログエントリのファイル内オフセットをページサイズで除算した剰余が0でないならば、ステップS15005へ、そうでなければ、ステップS15006へ遷移する(ステップS15004)。 When the write data size of the data write log entry is not less than the predetermined threshold, the journal log control unit 1110 determines that the write is not from the beginning of the write data page of the data write log entry, that is, within the file of the write log entry. If the remainder obtained by dividing the offset by the page size is not 0, the process proceeds to step S15005; otherwise, the process proceeds to step S15006 (step S15004).
 書き込みが当該データ書き込みログエントリの書き込みデータページの先頭からではない、すなわち、当該データ書き込みログエントリのファイル内オフセットをページサイズで除算した剰余が0でないとき、ジャーナルログ制御部1110は、当該データ書き込みログエントリの反映先データページアドレス保持アドレスの位置に保持されている反映先データページアドレスで示される反映先データページの先頭から、当該データ書き込みログエントリの書き込みデータページアドレスで示される書き込みデータページの先頭へ、当該データ書き込みログエントリのファイル内オフセットをページサイズで除算した剰余の値分、データを書き込み、書き込まれた領域のフラッシュ命令を実行する(ステップS15005)。 When writing is not from the beginning of the write data page of the data write log entry, that is, when the remainder obtained by dividing the offset in the file of the data write log entry by the page size is not 0, the journal log control unit 1110 starts the data write. From the beginning of the reflection destination data page indicated by the reflection destination data page address held at the position of the reflection destination data page address holding address of the log entry, to the write data page indicated by the write data page address of the data write log entry Data is written to the top by the remainder obtained by dividing the offset in the file of the data write log entry by the page size, and the flush command for the written area is executed (step S15005).
 ジャーナルログ制御部1110は、書き込みが当該データ書き込みログエントリの書き込みデータページの末尾に達していない、すなわち、当該データ書き込みログエントリのファイル内オフセットをページサイズで除算した剰余と、当該データ書き込みログエントリの書き込みデータサイズとの合計が、ページサイズよりも小さいならば、ステップS15007へ、そうでなければ、ステップS15008へ遷移する(ステップS15006)。 The journal log control unit 1110 determines that the write has not reached the end of the write data page of the data write log entry, that is, the remainder obtained by dividing the offset in the file of the data write log entry by the page size, and the data write log entry is smaller than the page size, the process proceeds to step S15007; otherwise, the process proceeds to step S15008 (step S15006).
 書き込みが当該データ書き込みログエントリの書き込みデータページの末尾に達していない、すなわち、当該データ書き込みログエントリのファイル内オフセットをページサイズで除算した剰余と、当該データ書き込みログエントリの書き込みデータサイズとの合計が、ページサイズよりも小さいとき、ジャーナルログ制御部1110は、当該データ書き込みログエントリの反映先データページアドレス保持アドレスの位置に保持されている反映先データページアドレスで示される反映先データページにおいて、当該データ書き込みログエントリのファイル内オフセットをページサイズで除算した剰余と、当該データ書き込みログエントリの書き込みデータサイズとの合計の値の位置から、当該反映先データページの末尾までのデータを、当該データ書き込みログエントリの書き込みデータページアドレスで示される書き込みデータページにおいて、当該データ書き込みログエントリのファイル内オフセットをページサイズで除算した剰余と、当該データ書き込みログエントリの書き込みデータサイズとの合計の値の位置へ書き込み、書き込まれた領域のフラッシュ命令を実行する(ステップS15007)。 The write has not reached the end of the write data page for this data write log entry, i.e., the sum of the remainder of dividing the offset in file of this data write log entry by the page size plus the write data size for this data write log entry is smaller than the page size, the journal log control unit 1110, in the reflection destination data page indicated by the reflection destination data page address held at the position of the reflection destination data page address holding address of the data write log entry, Data from the position of the sum of the remainder obtained by dividing the file offset of the relevant data write log entry by the page size and the write data size of the relevant data write log entry to the end of the relevant reflection destination data page In the write data page indicated by the write data page address of the write log entry, the position of the sum of the remainder obtained by dividing the file offset of the data write log entry by the page size and the write data size of the data write log entry , and executes the flash command for the written area (step S15007).
 ジャーナルログ制御部1110は、当該データ書き込みログエントリの反映先データページアドレス保持アドレスの位置に保持されている反映先データページアドレスを保存する(ステップS15008)。 The journal log control unit 1110 saves the reflection destination data page address held at the position of the reflection destination data page address holding address of the data write log entry (step S15008).
 ジャーナルログ制御部1110は、当該データ書き込みログエントリの反映先データページアドレス保持アドレスの位置に、当該データ書き込みログエントリの書き込みデータページアドレスを書き込み、書き込まれた領域のフラッシュ命令を実行する(ステップS15009)。 The journal log control unit 1110 writes the write data page address of the data write log entry to the position of the reflection destination data page address holding address of the data write log entry, and executes the flush command for the written area (step S15009). ).
 ジャーナルログ制御部1110は、空き領域管理部1120に、ステップS15008で保存した当該反映先データページアドレスで示される反映先データページの解放を要求して、当該反映先データページを解放する(ステップS15010)。 The journal log control unit 1110 requests the free space management unit 1120 to release the reflection destination data page indicated by the reflection destination data page address saved in step S15008, and releases the reflection destination data page (step S15010). ).
 当該データ書き込みログエントリの反映先データページアドレス保持アドレスの位置に保持されている反映先データページアドレスがヌル、すなわち、当該反映先データページが存在しないとき、ジャーナルログ制御部1110は、書き込みが当該データ書き込みログエントリの書き込みデータページの先頭からではない、すなわち、当該データ書き込みログエントリのファイル内オフセットをページサイズで除算した剰余が0でないならば、ステップS15012へ、そうでなければ、ステップS15013へ遷移する(ステップS15011)。 When the reflection destination data page address held at the position of the reflection destination data page address holding address of the data write log entry is null, that is, when the reflection destination data page does not exist, the journal log control unit 1110 determines that the write If not from the beginning of the write data page of the data write log entry, that is, if the remainder obtained by dividing the file offset of the data write log entry by the page size is not 0, go to step S15012; otherwise, go to step S15013. Transition (step S15011).
 書き込みが当該データ書き込みログエントリの書き込みデータページの先頭からではない、すなわち、当該データ書き込みログエントリのファイル内オフセットをページサイズで除算した剰余が0でないとき、ジャーナルログ制御部1110は、当該データ書き込みログエントリの書き込みデータページアドレスで示される書き込みデータページにおいて、当該書き込みデータページの先頭から、当該データ書き込みログエントリのファイル内オフセットをページサイズで除算した剰余の値分、0を書き込み、書き込まれた領域のフラッシュ命令を実行する(ステップS15012)。 When writing is not from the beginning of the write data page of the data write log entry, that is, when the remainder obtained by dividing the offset in the file of the data write log entry by the page size is not 0, the journal log control unit 1110 starts the data write. In the write data page indicated by the write data page address of the log entry, 0 is written from the beginning of the write data page by the remainder obtained by dividing the offset in the file of the data write log entry by the page size. A flush command for the area is executed (step S15012).
 ジャーナルログ制御部1110は、書き込みが当該データ書き込みログエントリの書き込みデータページの末尾に達していない、すなわち、当該データ書き込みログエントリのファイル内オフセットをページサイズで除算した剰余と、当該データ書き込みログエントリの書き込みデータサイズとの合計が、ページサイズよりも小さいならば、ステップS15014へ、そうでなければ、ステップS15015へ遷移する(ステップS15013)。 The journal log control unit 1110 determines that the write has not reached the end of the write data page of the data write log entry, that is, the remainder obtained by dividing the offset in the file of the data write log entry by the page size, and the data write log entry is smaller than the page size, the process proceeds to step S15014; otherwise, the process proceeds to step S15015 (step S15013).
 書き込みが当該データ書き込みログエントリの書き込みデータページの末尾に達していない、すなわち、当該データ書き込みログエントリのファイル内オフセットをページサイズで除算した剰余と、当該データ書き込みログエントリの書き込みデータサイズとの合計が、ページサイズよりも小さいとき、ジャーナルログ制御部1110は、当該データ書き込みログエントリの書き込みデータページアドレスで示される書き込みデータページにおいて、当該データ書き込みログエントリのファイル内オフセットをページサイズで除算した剰余と、当該データ書き込みログエントリの書き込みデータサイズとの合計の値の位置から、当該書き込みデータページの末尾まで、0を書き込み、書き込まれた領域のフラッシュ命令を実行する(ステップS15014)。 The write has not reached the end of the write data page for this data write log entry, i.e., the sum of the remainder of dividing the offset in file of this data write log entry by the page size plus the write data size for this data write log entry is smaller than the page size, the journal log control unit 1110 divides the offset in the file of the data write log entry by the page size in the write data page indicated by the write data page address of the data write log entry. , 0 is written from the position of the total value of the write data size of the data write log entry to the end of the write data page, and the flush command for the written area is executed (step S15014).
 ジャーナルログ制御部1110は、当該データ書き込みログエントリの反映先データページアドレス保持アドレスの位置に、当該データ書き込みログエントリの書き込みデータページアドレスを書き込み、書き込まれた領域のフラッシュ命令を実行する(ステップS15015)。 The journal log control unit 1110 writes the write data page address of the data write log entry to the position of the reflection destination data page address holding address of the data write log entry, and executes the flush command for the written area (step S15015). ).
[第1の実施形態におけるデータ書き込みログエントリの遅延チェックポイント処理]
 図16は、第1の実施形態におけるデータ書き込みログエントリの遅延チェックポイント処理の動作の一例を示すフローチャートである。ジャーナルログ制御部1110は、ログエントリポインタの示すデータ書き込みログエントリの位置を遅延されたデータ書き込みログエントリの位置として保存する(ステップS16001)。ログエントリポインタの示す遅延されたデータ書き込みログエントリの位置を保持する領域は揮発メモリでもよい。
[Delayed checkpoint processing of data write log entries in the first embodiment]
FIG. 16 is a flow chart showing an example of operation of delayed checkpoint processing of data write log entries in the first embodiment. The journal log control unit 1110 saves the position of the data write log entry indicated by the log entry pointer as the position of the delayed data write log entry (step S16001). The area that holds the location of the delayed data write log entry indicated by the log entry pointer may be volatile memory.
[第1の実施形態における挿入ポインタ更新処理]
 図17は、第1の実施形態における挿入ポインタ更新処理の動作の一例を示すフローチャートである。ジャーナルログ制御部1110は、挿入ポインタ2600を、挿入ポインタ2600が現在示しているログページリストではないログページリストの始点ポインタの示す位置に設定する(ステップS17001)。例えば、挿入ポインタ2600がログページリスト2100を示しているならば、始点ポインタ2400の位置に、挿入ポインタ2600がログページリスト2200を示しているならば、始点ポインタ2300の位置に、挿入ポインタ2600を設定する。
[Insertion Pointer Update Processing in First Embodiment]
FIG. 17 is a flowchart illustrating an example of operation of insert pointer update processing according to the first embodiment. The journal log control unit 1110 sets the insertion pointer 2600 to the position indicated by the start point pointer of the log page list that is not the log page list currently indicated by the insertion pointer 2600 (step S17001). For example, if the insertion pointer 2600 points to the log page list 2100, the insertion pointer 2600 is moved to the position of the start pointer 2400. set.
[第1の実施形態の効果]
 第1の実施形態において、永続メモリ1200は、データと、メタデータと、データとメタデータの更新履歴であるジャーナルログと、を格納する。また、ジャーナルログ制御部1110は、書き込み要求があった場合に、書き込み要求に伴うデータとメタデータの更新履歴をジャーナルログに格納するジャーナリング処理と、ジャーナルログに格納された更新履歴を確定させるコミット処理と、ジャーナルログに格納された確定した更新履歴をデータやメタデータに反映させる即時チェックポイント処理と、即時チェックポイント処理を遅延させる遅延チェックポイント処理とのどちらかを実行するチェックポイント処理と、の実行を制御する。
[Effects of the first embodiment]
In a first embodiment, the persistent memory 1200 stores data, metadata, and journal logs, which are update histories of data and metadata. Further, when a write request is received, the journal log control unit 1110 performs journaling processing for storing the update history of data and metadata associated with the write request in the journal log, and commit processing for finalizing the update history stored in the journal log. Checkpoint processing that executes either immediate checkpoint processing that reflects the fixed update history stored in the journal log in data or metadata, or delayed checkpoint processing that delays the immediate checkpoint processing; controls the execution of
 例えば、第1の実施形態によれば、チェックポイント処理において、書き込みデータがデータ書き込みログエントリの書き込みデータページの末尾に到達していないときは、当該データ書き込みログエントリの書き込みを、書き込みデータが書き込みデータページの末尾に到達するまで遅延させることができる。このため、第1の実施形態によれば、複数回の書き込み処理におけるチェックポイント処理を、まとめて行うことができるため、ジャーナリングを用いて、障害発生時におけるファイルシステムのデータとメタデータの双方の整合性を確保するとともに、ジャーナリングに伴う書き込み量を削減することにより、ファイルシステムの書き込み性能を向上させることができる。 For example, according to the first embodiment, in checkpoint processing, when the write data has not reached the end of the write data page of the data write log entry, the write of the data write log entry is performed. It can be delayed until the end of the data page is reached. For this reason, according to the first embodiment, checkpoint processing in multiple write processing can be collectively performed. By ensuring consistency and reducing the amount of writing associated with journaling, the write performance of the file system can be improved.
 また、ジャーナルログ制御部1110は、チェックポイント処理を遅延させているジャーナルログ内のログエントリにおける書き込みデータのサイズが所定の閾値未満である場合には、ジャーナルログ内のログエントリにおける書き込みデータをファイルに反映させ、所定の閾値以上である場合には、ジャーナルログ内のログエントリにおける書き込みデータを格納しているページを、ファイルのデータを格納するページとして用いる。これにより、ジャーナルログからファイルへの書き込み量を削減することができる。 Further, if the size of the write data in the log entry in the journal log for which checkpoint processing is delayed is less than a predetermined threshold, the journal log control unit 1110 transfers the write data in the log entry in the journal log to a file. , and if it is equal to or greater than the predetermined threshold, the page storing the write data in the log entry in the journal log is used as the page storing the file data. As a result, the amount of writing from the journal log to the file can be reduced.
 さらに、ジャーナルログ内の2つのログページリストを交互に使用し、書き込み処理におけるチェックポイント処理が完了して、当該チェックポイント処理が完了したログエントリが不要になっても、当該チェックポイント処理の完了時に、当該ログエントリを無効にするための終点ポインタの更新、フラッシュ命令、および、メモリバリア命令の実行を行わず、次回の書き込み処理におけるコミット処理における終点ポインタの更新、フラッシュ命令、および、メモリバリア命令の実行によって、当該書き込み処理に伴うログエントリの無効化と、当該次回の書き込み処理に伴うログエントリのコミット処理を同時に行うことにより、終点ポインタの更新、フラッシュ命令、および、メモリバリア命令の実行回数を削減することができる。 Furthermore, by alternately using two log page lists in the journal log, even if the checkpoint processing in the write processing is completed and the log entry for which the checkpoint processing is completed becomes unnecessary, the checkpoint processing is completed. Sometimes, without updating the endpoint pointer, flush instruction, and memory barrier instruction to invalidate the log entry, update the endpoint pointer, flush instruction, and memory barrier in commit processing in the next write processing By executing the instruction, invalidation of the log entry associated with the write processing and commit processing of the log entry associated with the next write processing are performed at the same time, thereby updating the end point pointer, executing the flush instruction, and executing the memory barrier instruction. The number of times can be reduced.
 1000 システム
 1100 ファイルシステム
 1110 ジャーナルログ制御部
 1120 空き領域管理部
 1200 永続メモリ
 2000 ジャーナルログ
 2100 ログページリスト
 2110 ログページ
 2111、2112 ログエントリ
 2120 ログページ
 2121、2122 ログエントリ
 2130 ログページ
 2131 ログエントリ
 2200 ログページリスト
 2210 ログページ
 2211、2212 ログエントリ
 2220 ログページ
 2221、2222 ログエントリ
 2230 ログページ
 2231 ログエントリ
 2300、2400 始点ポインタ
 2500 終点ポインタ
 2600 挿入ポインタ
 3000 ログエントリ
 3100 ヘッダ部
 3200 データ部
 4000 データ書き込みログエントリ
 4100 ヘッダ部
 4110 データ書き込みログエントリ識別情報
 4200 データ部
 4210 書き込みデータページアドレス
 4220 ファイル内オフセット
 4230 書き込みデータサイズ
 4240 反映先データページアドレス保持アドレス
 4300 書き込みデータページ
 5000 ログページ終端ログエントリ
 5100 ヘッダ部
 5110 ログページ終端ログエントリ識別情報
1000 system 1100 file system 1110 journal log control unit 1120 free area management unit 1200 persistent memory 2000 journal log 2100 log page list 2110 log page 2111, 2112 log entry 2120 log page 2121, 2122 log entry 2130 log page 2131 log entry 2200 log page List 2210 Log pages 2211, 2212 Log entries 2220 Log pages 2221, 2222 Log entries 2230 Log pages 2231 Log entries 2300, 2400 Start pointer 2500 End pointer 2600 Insert pointer 3000 Log entries 3100 Header 3200 Data 4000 Data write log entry 4100 Header Part 4110 Data write log entry identification information 4200 Data part 4210 Write data page address 4220 File offset 4230 Write data size 4240 Reflection target data page address holding address 4300 Write data page 5000 Log page end log entry 5100 Header part 5110 Log page end log Entry identification information

Claims (5)

  1.  データと、メタデータと、前記データと前記メタデータの更新履歴であるジャーナルログと、を格納する永続メモリに格納された前記ジャーナルログの制御を行うジャーナルログ制御システムであって、書き込み要求があった場合に、前記書き込み要求に伴うデータとメタデータの更新履歴を前記ジャーナルログに格納するジャーナリング処理と、前記ジャーナルログに格納された更新履歴を確定させるコミット処理と、前記ジャーナルログに格納された確定した更新履歴を前記データや前記メタデータに反映させる即時チェックポイント処理と、前記即時チェックポイント処理を遅延させる遅延チェックポイント処理とのどちらかを実行するチェックポイント処理と、の実行を制御するジャーナルログ制御部を備えることを特徴とするジャーナルログ制御システム。 A journal log control system for controlling the journal log stored in a persistent memory that stores data, metadata, and a journal log that is an update history of the data and the metadata, wherein a write request is received. journaling processing for storing update history of data and metadata associated with the write request in the journal log; commit processing for finalizing the update history stored in the journal log; A journal that controls the execution of checkpoint processing that executes either immediate checkpoint processing for reflecting a confirmed update history on the data or metadata, or delayed checkpoint processing that delays the immediate checkpoint processing. A journal log control system comprising a log control unit.
  2.  前記ジャーナルログ制御部は、チェックポイント処理を遅延させているジャーナルログ内のログエントリにおける書き込みデータのサイズが所定の閾値未満である場合には、前記ジャーナルログ内のログエントリにおける書き込みデータをファイルに反映させ、所定の閾値以上である場合には、前記ジャーナルログ内のログエントリにおける書き込みデータを格納しているページを、ファイルのデータを格納するページとして用いることを特徴とする請求項1に記載のジャーナルログ制御システム。 When the size of the write data in the log entry in the journal log for which checkpoint processing is delayed is less than a predetermined threshold, the journal log control unit writes the write data in the log entry in the journal log to a file. 2. The method according to claim 1, characterized in that, if the result is reflected and is equal to or greater than a predetermined threshold, a page storing write data in the log entry in the journal log is used as a page storing file data. journal log control system.
  3.  前記ジャーナルログ制御部は、ジャーナルログに格納する更新履歴の格納場所を複数用意し、ジャーナリング処理の実行ごとに前記複数の格納場所を使い分け、チェックポイント処理を実行して不要になったジャーナルログに格納された更新履歴の無効化と次回の更新のコミット処理とを同時に実行することを特徴とする請求項1に記載のジャーナルログ制御システム。 The journal log control unit prepares a plurality of storage locations for the update history to be stored in the journal log, uses the plurality of storage locations properly for each execution of journaling processing, and executes checkpoint processing to store unnecessary journal logs. 2. The journal log control system according to claim 1, wherein invalidation of the stored update history and commit processing for the next update are executed simultaneously.
  4.  データと、メタデータと、前記データと前記メタデータの更新履歴であるジャーナルログと、を格納する永続メモリに格納された前記ジャーナルログの制御を行うコンピュータによって実行されるジャーナルログ制御方法であって、
     書き込み要求があった場合に、前記書き込み要求に伴うデータとメタデータの更新履歴を前記ジャーナルログに格納するジャーナリング処理と、
     前記ジャーナルログに格納された更新履歴を確定させるコミット処理と、
     前記ジャーナルログに格納された確定した更新履歴を前記データや前記メタデータに反映させる即時チェックポイント処理と、
     前記即時チェックポイント処理を遅延させる遅延チェックポイント処理とのどちらかを実行するチェックポイント処理と、
     を含むことを特徴とするジャーナルログ制御方法。
    A journal log control method executed by a computer that controls the journal log stored in a persistent memory that stores data, metadata, and a journal log that is an update history of the data and the metadata, wherein ,
    a journaling process of storing an update history of data and metadata associated with the write request in the journal log when a write request is made;
    a commit process for finalizing the update history stored in the journal log;
    Immediate checkpoint processing for reflecting the confirmed update history stored in the journal log in the data and the metadata;
    a checkpoint process that performs either a deferred checkpoint process that delays the immediate checkpoint process;
    A journal log control method comprising:
  5.  データと、メタデータと、前記データと前記メタデータの更新履歴であるジャーナルログと、を格納する永続メモリに格納された前記ジャーナルログの制御を行うコンピュータに、
     書き込み要求があった場合に、前記書き込み要求に伴うデータとメタデータの更新履歴を前記ジャーナルログに格納するジャーナリング処理と、
     前記ジャーナルログに格納された更新履歴を確定させるコミット処理と、
     前記ジャーナルログに格納された確定した更新履歴を前記データや前記メタデータに反映させる即時チェックポイント処理と、
     前記即時チェックポイント処理を遅延させる遅延チェックポイント処理とのどちらかを実行するチェックポイント処理と、
     を実行させることを特徴とするジャーナルログ制御プログラム。
    A computer that controls the journal log stored in a permanent memory that stores data, metadata, and a journal log that is an update history of the data and the metadata,
    a journaling process of storing an update history of data and metadata associated with the write request in the journal log when a write request is made;
    a commit process for finalizing the update history stored in the journal log;
    Immediate checkpoint processing for reflecting the confirmed update history stored in the journal log in the data and the metadata;
    a checkpoint process that performs either a deferred checkpoint process that delays the immediate checkpoint process;
    A journal log control program characterized by executing
PCT/JP2021/022211 2021-06-10 2021-06-10 Journal log control system, journal log control method, and journal log control program WO2022259493A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/JP2021/022211 WO2022259493A1 (en) 2021-06-10 2021-06-10 Journal log control system, journal log control method, and journal log control program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2021/022211 WO2022259493A1 (en) 2021-06-10 2021-06-10 Journal log control system, journal log control method, and journal log control program

Publications (1)

Publication Number Publication Date
WO2022259493A1 true WO2022259493A1 (en) 2022-12-15

Family

ID=84425078

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2021/022211 WO2022259493A1 (en) 2021-06-10 2021-06-10 Journal log control system, journal log control method, and journal log control program

Country Status (1)

Country Link
WO (1) WO2022259493A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002108640A (en) * 2000-10-03 2002-04-12 Shinjo Keiei Kenkyusho:Kk Duplex system, single processor system and sub-board
JP2013531835A (en) * 2010-05-17 2013-08-08 テクニッシュ ウニヴェルジテート ミュンヘン Hybrid OLTP and OLAP high performance database system
JP2019003288A (en) * 2017-06-12 2019-01-10 日本電信電話株式会社 Journal log control system, journal log control method, and journal log control program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002108640A (en) * 2000-10-03 2002-04-12 Shinjo Keiei Kenkyusho:Kk Duplex system, single processor system and sub-board
JP2013531835A (en) * 2010-05-17 2013-08-08 テクニッシュ ウニヴェルジテート ミュンヘン Hybrid OLTP and OLAP high performance database system
JP2019003288A (en) * 2017-06-12 2019-01-10 日本電信電話株式会社 Journal log control system, journal log control method, and journal log control program

Similar Documents

Publication Publication Date Title
US7035881B2 (en) Organization of read-write snapshot copies in a data storage system
US5949970A (en) Dual XPCS for disaster recovery
KR101567134B1 (en) Buffer cache apparatus, journaling file system and journaling method for incorporating journaling features within non-volatile buffer cache
US6192432B1 (en) Caching uncompressed data on a compressed drive
US8738850B2 (en) Flash-aware storage optimized for mobile and embedded DBMS on NAND flash memory
US20170185512A1 (en) Specializing i/o access patterns for flash storage
EP1702271B1 (en) Adaptive file readahead based on multiple factors
US9959053B2 (en) Method for constructing NVRAM-based efficient file system
US20060190510A1 (en) Write barrier for data storage integrity
US11756618B1 (en) System and method for atomic persistence in storage class memory
US20060227585A1 (en) Computer system, disk apparatus and data update control method
US9311333B1 (en) Managing files of file systems
US8250035B1 (en) Methods and apparatus for creating a branch file in a file system
US20060224639A1 (en) Backup system, program and backup method
KR20060044631A (en) Communication-link-attached persistent memory system
US10664450B2 (en) Decoupling the commit and replay of metadata updates in a clustered file system
US6658541B2 (en) Computer system and a database access method thereof
US20050256859A1 (en) System, application and method of providing application programs continued access to frozen file systems
US8117160B1 (en) Methods and apparatus for creating point in time copies in a file system using reference counts
US20160036912A1 (en) File server, file server control method, and storage system
US6993627B2 (en) Data storage system and a method of storing data including a multi-level cache
Zhang et al. A cost-efficient nvm-based journaling scheme for file systems
WO2022259493A1 (en) Journal log control system, journal log control method, and journal log control program
JPH11120051A (en) Computer system for correcting information in database and its correcting
US9323671B1 (en) Managing enhanced write caching

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21945167

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE