KR101932967B1 - Method for flushing metadata in journaling file system and apparatus for writing data using the method - Google Patents

Method for flushing metadata in journaling file system and apparatus for writing data using the method Download PDF

Info

Publication number
KR101932967B1
KR101932967B1 KR1020160172390A KR20160172390A KR101932967B1 KR 101932967 B1 KR101932967 B1 KR 101932967B1 KR 1020160172390 A KR1020160172390 A KR 1020160172390A KR 20160172390 A KR20160172390 A KR 20160172390A KR 101932967 B1 KR101932967 B1 KR 101932967B1
Authority
KR
South Korea
Prior art keywords
file
time
metadata
journaling
current
Prior art date
Application number
KR1020160172390A
Other languages
Korean (ko)
Other versions
KR20180070102A (en
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 KR1020160172390A priority Critical patent/KR101932967B1/en
Publication of KR20180070102A publication Critical patent/KR20180070102A/en
Application granted granted Critical
Publication of KR101932967B1 publication Critical patent/KR101932967B1/en

Links

Images

Classifications

    • G06F17/30091
    • G06F17/30191

Landscapes

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

Abstract

저널링 파일 시스템에서의 메타데이터 저장 방법을 제공한다. 본 발명의 일 실시예에 따른 저널링 파일 시스템에서의 메타데이터 저장 방법은 저널링 파일 시스템(journaling file system)에서 파일이 변경된 시간인 파일변경시간의 정보를 포함하는 메타데이터(metadata)를 저장장치에 저장하는 방법에 있어서, 상기 파일변경시간을 갱신하는 간격인 시간갱신간격의 정보를 포함하는 저널링정보를 수신하는 단계; 상기 파일의 변경에 따라, 상기 저널링정보에 포함된 시간갱신간격에 기초하여 상기 저장장치에 저장하려는 현재메타데이터에 포함된 상기 파일변경시간을 산출하는 단계; 및 상기 저장장치에 마지막으로 저장된 과거메타데이터와 상기 현재메타데이터 각각의 상기 파일변경시간을 비교하여, 선택적으로 상기 현재메타데이터를 상기 저장장치에 저장하는 단계를 포함한다.Provides a method for storing metadata in a journaling file system. A method for storing metadata in a journaling file system according to an embodiment of the present invention includes storing metadata in a journaling file system including metadata of a file change time, The method comprising: receiving journaling information including information of a time update interval which is an interval for updating the file modification time; Calculating the file modification time included in the current metadata to be stored in the storage device based on the time update interval included in the journaling information according to the modification of the file; And comparing the file modification time of each of the current metadata with the past metadata last stored in the storage device and selectively storing the current metadata in the storage device.

Description

저널링 파일 시스템에서의 메타데이터 저장 방법 및 그 방법이 적용된 데이터 기록 장치 {METHOD FOR FLUSHING METADATA IN JOURNALING FILE SYSTEM AND APPARATUS FOR WRITING DATA USING THE METHOD}[0001] METHOD FOR STORING METADATA IN JARNING FILE SYSTEM AND METHOD FOR RECORDING DATA [0002] BACKGROUND OF THE INVENTION [0003]

본 발명은 저널링 파일 시스템에서 데이터의 변경사항에 대한 정보를 포함하는 메타데이터를 저장장치에 저장하는 방법 및 그 방법이 적용된 데이터 기록 장치에 관한 것이다.
The present invention relates to a method of storing metadata in a storage device including information on changes of data in a journaling file system and a data recording apparatus to which the method is applied.

저널링 파일 시스템(journaling file system)은 파일 시스템의 변경사항을 반영(commit)하기 전에, 파일 시스템의 지정된 영역인 저널에 생성된 변경사항을 추적하는 파일 시스템이다. 이 파일 시스템은 시스템 충돌이나 전원 문제가 발생하면, 저널에 생성된 변경사항을 이용하여 빠르게 데이터를 복구할 수 있으며, 그 결과 데이터가 손상될 가능성이 낮은 특징이 있다.A journaling file system is a file system that keeps track of changes made to a specified area of the file system, before committing changes to the file system. This file system is characterized by the ability to quickly recover data using changes made to the journal, in the event of a system crash or power failure, with the result that data is less likely to be corrupted.

그러나, 이러한 저널링 파일 시스템은 데이터베이스 관리 시스템과 같이 빈번하게 동기화 쓰기를 요청하는 응용프로그램에서는 오버헤드가 발생하여, 성능이 저하되는 단점을 나타낸다. 즉, 응용프로그램이 동기화 쓰기(예, 리눅스의 fsync()함수)를 요청하는 경우, 메모리 상의 갱신 데이터를 저장장치에 동일하게 반영하기 위하여 갱신 데이터를 저장장치에 저장한다. 이때, 그 갱신 데이터의 변경사항에 대한 정보를 포함하는 메타데이터 역시 저장장치의 저널 영역에 저장하게 되어, 저널링 오버헤드가 발생할 수 있다. 특히, 메타데이터를 저널 영역에 저장할 때 그 메타데이터를 블록단위로 저장하면서, 헤더블럭와 커밋블럭을 더 붙여서 쓰게 되므로, 저널링 오버헤드가 가중될 수 있다.However, such a journaling file system is disadvantageous in that an overhead occurs in an application program frequently requesting synchronous writing, such as a database management system, and performance is degraded. That is, when an application requests a synchronous write (for example, fsync () function of Linux), the update data is stored in the storage device to reflect update data on the memory equally to the storage device. At this time, the metadata including information on the change of the update data is also stored in the journal area of the storage device, resulting in journaling overhead. In particular, when metadata is stored in a journal area, the metadata is stored in units of blocks, and a header block and a commit block are additionally written, so journaling overhead can be increased.

따라서, 저널링 파일 시스템의 장점을 유지하면서, 저널링 오버헤드를 줄여 파일 시스템의 성능 저하를 막을 수 있는 메타데이터의 저장 방법 및 그 방법이 적용된 데이터 기록 장치의 필요성이 대두되고 있다.Accordingly, there is a need for a method of storing metadata and a data recording apparatus to which the method is applied, while reducing the journaling overhead while preventing the performance degradation of the file system while maintaining the advantages of the journaling file system.

관련 선행기술로는 대한민국 등록특허공보 제10-1258589호(발명의 명칭: 저널링 파일 시스템에 따라 데이터를 기록한 정보저장매체, 저널링 파일 시스템을 이용해서 데이터를 기록/복구하는 방법 및 장치, 공고일자: 2013년 5월 2일)가 있다.
The related art is disclosed in Korean Patent Registration No. 10-1258589 entitled " Information Storage Medium in which Data is Recorded According to a Journaling File System, Method and Apparatus for Recording / Restoring Data Using a Journaling File System, May 2, 2013).

본 발명은 저널링 파일 시스템의 장점을 유지하면서, 반복적인 동기화 쓰기 명령에 따른 저널링 오버헤드를 줄여 파일 시스템의 성능 저하를 최소화하는 메타데이터의 저장 방법 및 그 방법이 적용된 데이터 기록 장치를 제공하고자 한다.An object of the present invention is to provide a method of storing metadata that minimizes degradation of a file system by reducing journaling overhead caused by repeated synchronous write commands while maintaining the advantages of a journaling file system, and a data recording apparatus to which the method is applied.

본 발명이 해결하고자 하는 과제는 이상에서 언급한 과제(들)로 제한되지 않으며, 언급되지 않은 또 다른 과제(들)은 아래의 기재로부터 당업자에게 명확하게 이해될 수 있을 것이다.
The problems to be solved by the present invention are not limited to the above-mentioned problem (s), and another problem (s) not mentioned can be clearly understood by those skilled in the art from the following description.

상기 목적을 달성하기 위한 본 발명의 일 실시예에 따른 저널링 파일 시스템에서의 메타데이터 저장 방법은 저널링 파일 시스템(journaling file system)에서 파일이 변경된 시간인 파일변경시간의 정보를 포함하는 메타데이터(metadata)를 저장장치에 저장하는 방법에 있어서, 상기 파일변경시간을 갱신하는 간격인 시간갱신간격의 정보를 포함하는 저널링정보를 수신하는 단계; 상기 파일의 변경에 따라, 상기 저널링정보에 포함된 시간갱신간격에 기초하여 상기 저장장치에 저장하려는 현재메타데이터에 포함된 상기 파일변경시간을 산출하는 단계; 및 상기 저장장치에 마지막으로 저장된 과거메타데이터와 상기 현재메타데이터 각각의 상기 파일변경시간을 비교하여, 선택적으로 상기 현재메타데이터를 상기 저장장치에 저장하는 단계를 포함한다.According to an aspect of the present invention, there is provided a method for storing metadata in a journaling file system, the method comprising: storing metadata in a journaling file system, ) In a storage device, the method comprising the steps of: receiving journaling information including information of a time update interval which is an interval for updating the file modification time; Calculating the file modification time included in the current metadata to be stored in the storage device based on the time update interval included in the journaling information according to the modification of the file; And comparing the file modification time of each of the current metadata with the past metadata last stored in the storage device and selectively storing the current metadata in the storage device.

바람직하게는, 상기 파일변경시간을 산출하는 단계는 상기 저널링 파일 시스템이 탑재된 데이터 기록 장치로부터 현재의 시간을 나타내는 현재시간을 획득하는 단계; 및 상기 현재시간 및 상기 시간갱신간격에 기초하여, 상기 파일변경시간을 산출하는 단계를 포함할 수 있다.Preferably, the step of calculating the file modification time includes: obtaining a current time indicating a current time from a data recording apparatus on which the journaling file system is mounted; And calculating the file modification time based on the current time and the time update interval.

바람직하게는, 상기 파일변경시간을 산출하는 단계는 상기 현재시간에서 상기 현재시간을 상기 시간갱신간격으로 나눈 나머지를 감산한 결과로부터 상기 파일변경시간을 산출할 수 있다.Preferably, the calculating the file modification time may calculate the file modification time from a result obtained by subtracting a remainder obtained by dividing the current time by the time update interval at the current time.

바람직하게는, 상기 저장장치에 저장하는 단계는 상기 과거메타데이터의 상기 파일변경시간과 상기 현재메타데이터의 상기 파일변경시간이 상호 일치하지 않는 경우에만, 상기 현재메타데이터를 상기 저장장치에 저장할 수 있다.Preferably, storing in the storage device may store the current metadata in the storage device only if the file modification time of the historical metadata and the file modification time of the current metadata do not match each other have.

바람직하게는, 상기 파일변경시간을 결정하는 단계와 상기 현재메타데이터를 상기 저장장치에 저장하는 단계는 상기 저널링 파일 시스템에 포함된 복수의 파일 중에서 선별된 적어도 하나의 저널링대상파일에 대하여만 수행될 수 있다.Preferably, the step of determining the file modification time and the step of storing the current metadata in the storage device are performed only for at least one journaling target file selected from among a plurality of files included in the journaling file system .

바람직하게는, 상기 파일변경시간은 상기 파일의 내용 및 속성 중 적어도 하나가 변경된 시간일 수 있다.Preferably, the file modification time may be a time at which at least one of contents and attributes of the file are changed.

바람직하게는, 상기 파일변경시간은 상기 파일의 내용이 변경된 시간인 파일내용수정시간(mtime) 또는 상기 파일의 내용 및 속성 중 적어도 하나가 변경된 시간인 파일내용변경시간(ctime)인 것을 특징으로 하는 저널링 파일 시스템에서의 메타데이터 저장 방법.Preferably, the file modification time is a file content modification time (mtime), which is a time at which the contents of the file are changed, or a file content modification time (ctime), at which at least one of the contents and attributes of the file is changed A method for storing metadata in a journaling file system.

바람직하게는, 상기 시간갱신간격은 상기 저널링 파일 시스템이 탑재된 데이터 기록 장치의 중앙처리장치(CPU)의 성능, 메모리(RAM)의 용량 및 저장장치의 입출력속도 중 적어도 하나에 대한 성능정보에 기초하여 결정될 수 있다.Preferably, the time update interval is based on performance information on at least one of a performance of a central processing unit (CPU) of a data recording apparatus on which the journaling file system is mounted, a capacity of a memory (RAM) ≪ / RTI >

또한, 상기 목적을 달성하기 위한 본 발명의 일 실시예에 따른 저널링 파일 시스템에서의 메타데이터 저장 방법이 적용된 데이터 기록 장치는 파일이 변경된 시간인 파일변경시간의 정보를 포함하는 메타데이터를 저장장치에 저장하는 저널링 파일 시스템이 적용된 데이터 기록 장치에 있어서, 상기 파일변경시간을 갱신하는 간격인 시간갱신간격의 정보를 포함하는 저널링정보를 수신하는 수신부; 상기 파일의 변경에 따라, 상기 저널링정보에 포함된 시간갱신간격에 기초하여 상기 저장장치에 저장하려는 현재메타데이터에 포함된 상기 파일변경시간을 산출하는 산출부; 및 상기 저장장치에 마지막으로 저장된 과거메타데이터와 상기 현재메타데이터 각각의 상기 파일변경시간을 비교하여, 선택적으로 상기 현재메타데이터를 상기 저장장치에 저장하는 저장부를 포함한다.According to another aspect of the present invention, there is provided a data recording apparatus to which a method of storing metadata in a journaling file system according to an exemplary embodiment of the present invention is applied. The data recording apparatus includes metadata, including file change time information, A data recording apparatus to which a journaling file system for storing a file change time is applied, comprising: a receiving unit for receiving journaling information including information on a time update interval, which is an interval for updating the file change time; A calculating unit for calculating the file modification time included in the current metadata to be stored in the storage device based on the time update interval included in the journaling information according to the change of the file; And a storage unit for comparing the file change time of each of the current metadata with the past metadata stored last in the storage unit and selectively storing the current metadata in the storage device.

바람직하게는, 상기 산출부는 상기 저널링 파일 시스템이 탑재된 데이터 기록 장치로부터 현재의 시간을 나타내는 현재시간을 획득하고, 상기 현재시간 및 상기 시간갱신간격에 기초하여, 상기 파일변경시간을 산출할 수 있다.Preferably, the calculating unit may obtain a current time indicating a current time from a data recording apparatus on which the journaling file system is mounted, and calculate the file change time based on the current time and the time update interval .

바람직하게는, 상기 산출부는 상기 현재시간 및 상기 시간갱신간격에 기초하여, 상기 파일변경시간을 산출할 때, 상기 현재시간에서 상기 현재시간을 상기 시간갱신간격으로 나눈 나머지를 감산한 결과로부터 상기 파일변경시간을 산출할 수 있다.Preferably, the calculating unit calculates the file change time based on the current time and the time update interval from the result of subtracting the remainder obtained by dividing the current time by the time update interval at the current time, The change time can be calculated.

바람직하게는, 상기 저장부는 상기 과거메타데이터의 상기 파일변경시간과 상기 현재메타데이터의 상기 파일변경시간이 상호 일치하지 않는 경우에만, 상기 현재메타데이터를 상기 저장장치에 저장할 수 있다.The storage unit may store the current metadata in the storage device only when the file change time of the past metadata does not coincide with the file change time of the current metadata.

바람직하게는, 상기 산출부 및 상기 저장부는 상기 저널링 파일 시스템에 포함된 복수의 파일 중에서 선별된 적어도 하나의 저널링대상파일에 대하여만 동작할 수 있다.Preferably, the calculating unit and the storing unit may operate only on at least one journaling target file selected from among a plurality of files included in the journaling file system.

바람직하게는, 상기 파일변경시간은 상기 파일의 내용 및 속성 중 적어도 하나가 변경된 시간일 수 있다.Preferably, the file modification time may be a time at which at least one of contents and attributes of the file are changed.

바람직하게는, 상기 파일변경시간은 상기 파일의 내용이 변경된 시간인 파일내용수정시간(mtime) 또는 상기 파일의 내용 및 속성 중 적어도 하나가 변경된 시간인 파일내용변경시간(ctime)일 수 있다.
Preferably, the file change time may be a file content modification time (mtime), which is a time at which the content of the file is changed, or a file content modification time (ctime), at which at least one of the content and attributes of the file is changed.

본 발명은 저널링 파일 시스템에서 반복적인 동기화 쓰기 명령에 따른 저널링 오버헤드를 줄여 파일 시스템의 성능 저하를 최소화할 수 있는 효과가 있다.
The present invention has the effect of reducing the journaling overhead according to the repeated synchronous write command in the journaling file system, thereby minimizing the performance degradation of the file system.

도 1은 본 발명의 일 실시예에 따른 저널링 파일 시스템에서의 메타데이터 저장 방법을 설명하기 위한 흐름도이다.
도 2는 본 발명의 다른 실시예에 따른 파일변경시간을 산출하는 방법을 설명하기 위한 흐름도이다.
도 3은 본 발명의 일 실시예에 따른 저널링 파일 시스템에서의 메타데이터 저장 방법이 적용된 데이터 기록 장치를 설명하기 위한 도면이다.
도 4는 종래의 기술에 따른 메타데이터 저장 방법을 설명하기 위한 도면이다.
도 5는 본 발명의 일 실시예에 따른 메타데이터 저장 방법을 설명하기 위한 도면이다.
도 6은 본 발명의 다른 실시예에 따른 메타데이터 저장 방법을 설명하기 위한 도면이다.
도 7은 본 발명의 일 실시예에 따른 파일변경시간 산출 방법을 설명하기 위한 의사코드이다.
도 8은 본 발명의 일 실시예에 따른 메타데이터 저장 방법에서 오버헤드의 감소에 따라 파일 쓰기량이 감소한 결과를 설명하기 위한 도면이다.
도 9는 본 발명의 일 실시예에 따른 메타데이터 저장 방법에서 오버헤드의 감소에 따라 파일 쓰기 성능이 향샹된 결과를 설명하기 위한 도면이다.
도 10은 본 발명의 일 실시예에 따른 메타데이터 저장 방법에서 오버헤드의 감소에 따라 DBMS의 파일 쓰기량이 감소한 결과를 설명하기 위한 도면이다.
도 11은 본 발명의 일 실시예에 따른 메타데이터 저장 방법에서 오버헤드의 감소에 따라 DBMS의 파일 쓰기 성능이 향샹된 결과를 설명하기 위한 도면이다.
1 is a flowchart illustrating a method for storing metadata in a journaling file system according to an embodiment of the present invention.
2 is a flowchart illustrating a method of calculating a file change time according to another embodiment of the present invention.
FIG. 3 is a view for explaining a data recording apparatus to which a metadata storage method in a journaling file system according to an embodiment of the present invention is applied.
FIG. 4 is a diagram for explaining a metadata storing method according to the related art.
5 is a diagram for explaining a metadata storing method according to an embodiment of the present invention.
6 is a view for explaining a metadata storing method according to another embodiment of the present invention.
7 is a pseudo code for explaining a file change time calculating method according to an embodiment of the present invention.
FIG. 8 is a view for explaining a result of a decrease in file write amount as the overhead decreases in the metadata storage method according to an embodiment of the present invention.
FIG. 9 is a diagram for explaining a result of improving file writing performance as the overhead decreases in the metadata storing method according to an embodiment of the present invention.
10 is a diagram for explaining a result of a decrease in file write amount of a DBMS according to a decrease in overhead in a metadata storing method according to an embodiment of the present invention.
FIG. 11 is a diagram for explaining a result of improving the file writing performance of the DBMS according to the reduction of overhead in the metadata storing method according to an embodiment of the present invention.

본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세한 설명에 상세하게 설명하고자 한다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 각 도면을 설명하면서 유사한 참조부호를 유사한 구성요소에 대해 사용하였다.While the invention is susceptible to various modifications and alternative forms, specific embodiments thereof are shown by way of example in the drawings and will herein be described in detail. It should be understood, however, that the invention is not intended to be limited to the particular embodiments, but includes all modifications, equivalents, and alternatives falling within the spirit and scope of the invention. Like reference numerals are used for like elements in describing each drawing.

제1, 제2, A, B 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. 예를 들어, 본 발명의 권리 범위를 벗어나지 않으면서 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다. 및/또는 이라는 용어는 복수의 관련된 기재된 항목들의 조합 또는 복수의 관련된 기재된 항목들 중의 어느 항목을 포함한다.The terms first, second, A, B, etc. may be used to describe various elements, but the elements should not be limited by the terms. The terms are used only for the purpose of distinguishing one component from another. For example, without departing from the scope of the present invention, the first component may be referred to as a second component, and similarly, the second component may also be referred to as a first component. And / or < / RTI > includes any combination of a plurality of related listed items or any of a plurality of related listed items.

어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어" 있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어" 있다거나 "직접 접속되어" 있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다.It is to be understood that when an element is referred to as being "connected" or "connected" to another element, it may be directly connected or connected to the other element, . On the other hand, when an element is referred to as being "directly connected" or "directly connected" to another element, it should be understood that there are no other elements in between.

본 출원에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terminology used in this application is used only to describe a specific embodiment and is not intended to limit the invention. The singular expressions include plural expressions unless the context clearly dictates otherwise. In the present application, the terms "comprises" or "having" and the like are used to specify that there is a feature, a number, a step, an operation, an element, a component or a combination thereof described in the specification, But do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, or combinations thereof.

다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가지고 있다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥 상 가지는 의미와 일치하는 의미를 가지는 것으로 해석되어야 하며, 본 출원에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.Unless defined otherwise, all terms used herein, including technical or scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. Terms such as those defined in commonly used dictionaries are to be interpreted as having a meaning consistent with the contextual meaning of the related art and are to be interpreted as either ideal or overly formal in the sense of the present application Do not.

이하, 본 발명에 따른 바람직한 실시예를 첨부된 도면을 참조하여 상세하게 설명한다.Hereinafter, preferred embodiments according to the present invention will be described in detail with reference to the accompanying drawings.

도 1은 본 발명의 일 실시예에 따른 저널링 파일 시스템에서의 메타데이터 저장 방법을 설명하기 위한 흐름도이다.1 is a flowchart illustrating a method for storing metadata in a journaling file system according to an embodiment of the present invention.

저널링 파일 시스템(journaling file system)은 파일 시스템의 변경사항을 반영(commit)하기 전에, 저널 영역에 그 변경사항을 기록하는 파일 시스템이다. 그렇게 함으로써, 시스템 충돌이나 전원 문제가 발생하였을 때, 저널 영역에 기록된 변경사항을 이용하여 빠르게 복구할 수 있으며, 데이터가 손상될 가능성을 낮출 수 있다.A journaling file system is a file system that writes changes to the journal area before committing changes to the file system. By doing so, when a system crash or a power problem occurs, it can be quickly recovered using the changes recorded in the journal area, and the possibility of data corruption can be reduced.

이때, 메타데이터(metadata)는 변경된 파일의 크기, 블록 할당 정보, 소유권, 파일접근시간(atime), 파일내용수정시간(mtime) 및 파일내용변경시간(ctime) 등의 정보를 포함할 수 있다.At this time, the metadata may include information such as the changed file size, block allocation information, ownership, file access time (atime), file content modification time (mtime), and file content modification time (ctime).

리눅스(linux) 또는 안드로이드(android) 시스템 등에서 가장 널리 이용되는 저널링 파일 시스템인 ext4의 순서(ordered) 모드 저널링 메커니즘은 메타데이터만 온전하게 존재하면 복구가 가능하므로, 변경된 데이터는 저널링 없이 저장장치에 곧바로 저장하고, 메타데이터만을 저널 영역에 저장하게 된다.The ordered mode journaling mechanism of ext4, the most widely used journaling file system on linux or android systems, allows restoration if only the metadata is fully present, so that the changed data can be immediately And stores only the metadata in the journal area.

이때, 동기화 쓰기 함수(fsync(), fdatasync()) 또는 5초 간격의 트리거가 호출되는 경우, 데이터 기록 장치는 데이터의 연속성을 유지하기 위하여 저장장치에 그 변경된 데이터를 기록(flush)할 수 있다. 보다 구체적으로, 데이터 기록 장치가 4KB 크기의 데이터 블록 하나에 대하여 write 명령을 수행하는 경우, 4KB의 데이터 블록을 메모리 버퍼에 쓰고(write), 페이지 캐시(page cache)에 inode, timestamp, inode bitmap 등의 메타데이터가 변경되면 별도의 체크(dirty mark)를 수행한다. 그리고, fsync()가 호출되면, 데이터 기록 장치가 4KB의 데이터 블록과 메타데이터를 모두 저장장치에 기록(flush)할 수 있다. 또한, 데이터 기록 장치가 메타데이터를 기록하면서 4KB의 저널링 헤더(header)와 4KB의 저널 반영 신호(commit mark)를 추가로 더 기록할 수 있다.At this time, when the synchronous write function (fsync (), fdatasync ()) or the trigger of 5 seconds interval is called, the data recording device can flush the changed data to the storage device to maintain the continuity of the data . More specifically, when a data recording apparatus executes a write command for a data block of 4 KB size, a 4 KB data block is written to a memory buffer and an inode, a timestamp, and an inode bitmap And performs a separate check (dirty mark) when the metadata of the metadata is changed. When fsync () is called, the data recording apparatus can flush the 4 KB data blocks and the metadata to the storage device. Further, the data recording apparatus can additionally record a 4-KB journaling header and a 4-KB journal reflection signal while recording the meta data.

따라서, 데이터 기록 장치가 4KB의 데이터 블록을 저장장치에 기록하기 위하여, 최소 16KB에 이르는 데이터를 저장장치에 기록해야 하는 오버헤드가 발생하게 된다. 즉, 데이터 기록 장치는 4KB의 데이터 블록, 4KB의 헤더, 4KB의 메타데이터 및 4KB의 저널 반영 신호를 기록해야 하는 것이다. 그리고, 이러한 오버헤드는, 동기화 쓰기가 많이 발생하는 응용프로그램(예, DBMS)을 사용하는 경우 더 두드러지게 된다.Therefore, in order for the data recording apparatus to record the data block of 4 KB in the storage device, an overhead is required to record data of at least 16 KB in the storage device. That is, the data recording apparatus should record a data block of 4 KB, a header of 4 KB, meta data of 4 KB, and a journal reflection signal of 4 KB. This overhead becomes more noticeable when an application program (e.g., DBMS) in which synchronization writing is frequently generated is used.

단계 S110에서는, 데이터 기록 장치가 파일변경시간을 갱신하는 간격인 시간갱신간격의 정보를 포함하는 저널링정보를 수신한다.In step S110, the data recording apparatus receives journaling information including information of a time update interval, which is an interval for updating the file change time.

여기서, 파일변경시간은 어떤 파일에 변경사항이 발생된 시간을 의미한다. 즉, 파일변경시간은 저널링 파일 시스템에 포함된 어떤 파일에 변경사항이 발생하였을 때, 그 발생한 시점의 시간을 의미할 수 있다.Here, the file change time means a time at which a change is made to a certain file. That is, the file change time may refer to the time at which a change occurred in a file included in the journaling file system.

한편, 시간갱신간격은 파일변경시간이 갱신되는 시간 간격을 의미한다. 예컨대, 시간갱신간격이 100ms인 경우, 파일변경시간은 100ms 단위로 갱신되어 증가할 수 있다. 따라서, 파일변경시간은 정확한 파일의 변경 시간과 비교하여 100ms 단위로 버림(truncate) 연산이 수행된 결과와 동일할 수 있다.On the other hand, the time update interval means a time interval at which the file change time is updated. For example, if the time update interval is 100 ms, the file change time can be updated and increased in units of 100 ms. Thus, the file modification time may be the same as the result of performing a truncation operation in units of 100 ms in comparison with the modification time of the correct file.

보다 구체적으로, 100ms 단위로 나누어 떨어지는 t0시간에 파일 변경이 이루어진 경우와 (t0 + 10ms)시간에 파일 변경이 이루어진 경우를 비교하면, 버림 연산이 수행된 결과 그 2가지 경우는 모두 동일한 파일변경시간(t0)을 메타데이터에 포함할 수 있다.More specifically, when the file change is made at time t 0 divided by 100 ms and when the file change is made at (t 0 + 10 ms), the result of the truncation operation is that both cases are the same file The change time t 0 may be included in the metadata.

다른 실시예에서는, 파일변경시간은 파일의 내용 및 속성 중 적어도 하나가 변경된 시간일 수 있다.In another embodiment, the file modification time may be the time at which at least one of the content and attributes of the file has changed.

한편, 파일변경시간은 저널링 파일 시스템에 포함된 파일에 대하여, i) 파일의 내용이 변경된 경우, ii) 파일의 속성(permission, owner 등)이 변경된 경우, iii) 파일의 내용 및 속성이 모두 변경된 경우에 대한 시간일 수 있다.On the other hand, the file change time refers to the time when the file included in the journaling file system is changed, i) the contents of the file are changed, ii) the attributes (permission, owner, etc.) of the file are changed, and iii) It can be time for case.

또 다른 실시예에서는, 파일변경시간은 파일의 내용이 변경된 시간인 파일내용수정시간(mtime) 또는 파일의 내용 및 속성 중 적어도 하나가 변경된 시간인 파일내용변경시간(ctime)일 수 있다.In another embodiment, the file modification time may be a file content modification time (mtime), which is the time at which the contents of the file are changed, or a file contents modification time (ctime), at which at least one of the contents and attributes of the file is changed.

이때, 파일내용수정시간(data modification time, mtime)은 파일이 생성된 이후에, 실제로 그 파일의 내용이 변경되었을 때 그 변경된 시간을 의미한다. 예컨대, 파일이 copy 또는 move된 경우, 파일의 실제 내용이 변경된 것이 아니기 때문에 mtime은 갱신되지 않을 수 있다.In this case, the data modification time (mtime) refers to the time when the contents of the file are actually changed after the file is created. For example, when a file is copied or moved, mtime may not be updated because the actual contents of the file are not changed.

한편, 파일내용변경시간(inode change time, ctime)은 파일의 inode가 가지고 있는 정보가 변경되었을 때, 그 변경된 시간이다. 예를 들어, 파일의 소유권, 허가 권한, 블록 할당 정보 및 timestamp가 변경된 경우, ctime이 갱신될 수 있다. 또한, ctime은 timestamp를 변경시키는 atime 및 mtime의 갱신에 의해 함께 발생할 수 있어서, mtime의 갱신되는 경우에 ctime도 역시 갱신될 수 있다.On the other hand, the file change time (inode change time, ctime) is the time when the information of the file inode is changed. For example, if file ownership, permissions, block allocation information, and timestamp are changed, ctime can be updated. Also, ctime can occur together with update of atime and mtime which change the timestamp, so that when mtime is updated, ctime can also be updated.

또 다른 실시예에서는, 시간갱신간격은 저널링 파일 시스템이 탑재된 데이터 기록 장치의 중앙처리장치(CPU)의 성능, 메모리(RAM)의 용량 및 저장장치의 입출력속도 중 적어도 하나에 대한 성능정보에 기초하여 결정될 수 있다.In another embodiment, the time update interval may be based on performance information for at least one of performance of a central processing unit (CPU) of a data recording apparatus equipped with a journaling file system, capacity of a memory (RAM) ≪ / RTI >

예컨대, 상술한 저널링 파일 시스템의 오버헤드로 인한 파일 시스템의 성능 저하는 데이터 기록 장치의 성능에 따라 더 크게 발생할 수 있다. 즉, CPU의 성능이 낮거나, 메모리 용량이 부족하거나, 저장장치의 입출력속도가 느릴수록 저널링 파일 시스템의 오버헤드가 데이터 기록 장치의 성능에 더 크게 영향을 미칠 수 있다.For example, the performance degradation of the file system due to the overhead of the above-described journaling file system may occur more depending on the performance of the data recording apparatus. That is, as the performance of the CPU is low, the memory capacity is insufficient, and the input / output speed of the storage device is slow, the overhead of the journaling file system may affect the performance of the data recording device more.

따라서, 시간갱신간격은 CPU의 성능이 낮거나, 메모리 용량이 부족하거나, 저장장치의 입출력속도가 느릴수록 더 크게 설정되어, 저널링 파일 시스템의 오버헤드를 감소시킬 수 있다. 이때, 시간갱신간격이 저널링 파일 시스템의 오버헤드에 미치는 영향에 대하여는 단계 S130에서 자세하게 후술한다.Therefore, the time update interval can be set to be larger as the performance of the CPU is low, the memory capacity is insufficient, or the input / output speed of the storage device is slower, thereby reducing the overhead of the journaling file system. At this time, the influence of the time update interval on the overhead of the journaling file system will be described later in detail in step S130.

단계 S120에서는, 데이터 기록 장치가 파일의 변경에 따라, 그 저널링정보에 포함된 시간갱신간격에 기초하여 저장장치에 저장하려는 현재메타데이터에 포함된 파일변경시간을 산출한다.In step S120, the data recording apparatus calculates a file modification time included in the current metadata to be stored in the storage device based on the time update interval included in the journaling information, in accordance with the change of the file.

예컨대, 시간갱신간격이 100ms인 경우, 데이터 기록 장치는 현재메타데이터에 포함되는 파일변경시간을 그 100ms 단위로 버림 연산하여 산출할 수 있다.For example, when the time update interval is 100 ms, the data recording apparatus can calculate the file change time included in the current meta data by subtracting the file change time in units of 100 ms.

한편, 파일변경시간을 산출하는 구체적인 방법에 대하여는 도 2에 대한 설명에서 구체적으로 후술한다.A specific method of calculating the file change time will be described later in detail with reference to FIG.

마지막으로 단계 S130에서는, 데이터 기록 장치가 그 저장장치에 마지막으로 저장된 과거메타데이터와 그 현재메타데이터 각각의 파일변경시간을 비교하여, 선택적으로 현재메타데이터를 그 저장장치에 저장한다.Finally, in step S130, the data recording device compares the file change time of each of the current metadata with the past metadata last stored in the storage device, and selectively stores the current metadata in the storage device.

즉, 데이터 기록 장치가 과거메타데이터의 파일변경시간과 현재메타데이터의 파일변경시간을 비교하여, 그 비교 결과가 소정의 조건을 만족하는 경우에만, 선택적으로 현재메타데이터를 저장장치에 저장할 수 있다.That is, the data recording apparatus compares the file change time of the past metadata with the file change time of the current metadata, and may selectively store the current metadata in the storage device only when the comparison result satisfies a predetermined condition .

예컨대, 데이터 기록 장치는 하나의 시간갱신간격(예, 100ms)이내인 파일변경시간을 포함하는 2개 이상의 메타데이터가 생성된 경우에, 동일한 파일변경시간을 갖는 그 2개 이상의 메타데이터 중에서 오직 하나의 메타데이터만을 저장장치에 저장할 수 있다. 다시 말하면, 데이터 기록 장치는 생성순서 및 생성시간 상으로 첫번째인 메타데이터를 제외한 나머지 메타데이터를 저장장치에 기록하지 않을 수 있다. 그렇게 함으로써, 데이터 기록 장치는 저널링 기능을 유지하면서도, 저널링 파일 시스템의 반복적인 메타데이터 쓰기에 기인하는 오버헤드를 감소시킬 수 있는 효과를 얻을 수 있다.For example, if the data recording apparatus has generated two or more metadata including a file change time that is within one time update interval (e.g., 100 ms), only one of the two or more metadata having the same file change time Only the meta data of the user can be stored in the storage device. In other words, the data recording apparatus may not record the remaining metadata except for the first metadata in the generation order and the generation time in the storage device. By doing so, the data recording apparatus can obtain the effect of reducing the overhead due to the repeated writing of metadata in the journaling file system while maintaining the journaling function.

한편, 도 4 내지 도 6을 참조하여, 오버헤드의 감소 과정을 설명하면 다음과 같다.Referring to FIGS. 4 to 6, a process of reducing the overhead will be described.

우선, 도 4는 종래의 기술에 따른 메타데이터 저장 방법을 설명하기 위한 것으로, 메모리 버퍼(memory)에 위치한 데이터의 변경사항(401, 402, 403, 404)과 그에 대응되는 메타데이터(411, 412, 413, 414)가 데이터 기록 장치의 write 명령(421, 422, 423, 424) 및 fsync()과 같은 동기화 쓰기 명령(431, 432, 433, 434)에 따라 빠짐없이 모두 저장장치(storage)에 기록될 수 있다.4 is a view for explaining a method of storing metadata according to the related art. The metadata 401 includes data 401, 402, 403, and 404 of a memory located in a memory and metadata 411 and 412 413 and 414 are all stored in the storage in accordance with the write command 421, 422, 423 and 424 of the data recording apparatus and the synchronous write command 431, 432, 433 and 434 such as fsync Lt; / RTI >

또한, 본 발명의 일 실시예에 따른 도 5는, 메모리 버퍼(memory)에 위치한 데이터의 변경사항(501, 502, 503, 504)과 그에 대응되는 메타데이터(511, 512, 513, 514)가 데이터 기록 장치의 write 명령(521, 522, 523, 524) 및 fsync()과 같은 동기화 쓰기 명령(531, 532, 533, 534)에 따라서 저장장치(storage)에 기록될 때, 일부의 메타데이터(512, 514)를 제외한 나머지만이 저장장치에 기록될 수 있다.5 according to an embodiment of the present invention includes a change 501 of data located in a memory and a corresponding metadata 511 512 513 and 514 When data is written to a storage according to synchronous write commands 531, 532, 533 and 534 such as write commands 521, 522, 523 and 524 of the data recording apparatus and fsync 512, 514) may be recorded in the storage device.

그 이유는, 동일한 파일변경시간(t1)을 갖는 511과 512의 메타데이터 중에 511만이 저장장치에 기록되고, 역시 동일한 파일변경시간(t3)을 갖는 513과 514의 메타데이터 중에 513만이 저장장치에 기록되기 때문이다. 이와 같은 결과가 발생한 것은, 시간갱신간격이 도 4에서보다 도 5에서 증가하였기 때문일 것이다.The reason is that only 511 of metadata 511 and 512 having the same file change time t 1 are recorded in the storage device and only 513 of metadata 513 and 514 having the same file change time t 3 are stored Is recorded in the device. This is because the time update interval has increased in FIG. 5 as compared with FIG.

마지막으로, 도 6는 본 발명의 다른 실시예에 따른 것으로, 데이터 기록 장치의 타이머 인터럽트 간격 자체를 조정한 것이다. 이 경우, 동일한 파일변경시간(t1)을 갖는 611과 612의 메타데이터 중에 611만이 저장장치에 기록되고, 역시 동일한 파일변경시간(t3)을 갖는 613과 614의 메타데이터 중에 613만이 저장장치에 기록되기 때문에, 도 5에서와 동일한 효과를 얻을 수 있다. 그러나, 시스템의 타이머 인터럽트는 일반적으로 시스템의 다른 스케쥴링 등의 다른 기능에도 영향을 미치게 되므로 다른 문제을 야기할 가능성이 있다.Finally, FIG. 6 shows another embodiment of the present invention in which the timer interrupt interval itself of the data recording apparatus is adjusted. In this case, only 611 among metadata 611 and 612 having the same file modification time t 1 are recorded in the storage device, and 613 and metadata 613 having the same file modification time t 3 , The same effect as in Fig. 5 can be obtained. However, the timer interrupt of the system generally affects other functions of the system, such as other scheduling, and thus may cause other problems.

한편, 도 8 내지 도 11을 참조하여, 오버헤드의 감소 효과를 설명하면 다음과 같다.The effect of reducing the overhead will be described with reference to FIGS. 8 to 11. FIG.

우선, 도 8을 참조하면, 본 발명의 일 실시예에 따른 메타데이터 저장 방법의 쓰기량 감소 효과를 설명하기 위한 도면이다. 이때, SW(sequential write), RW(random write), Base(default 시간갱신간격 = 타이머 인터럽트 간격), CG(100ms 시간갱신간격), Ideal(무한대 시간갱신간격)이며, (a) mobile deivce 일 때와, (b) desktop PC 일 때 모두, Base와 비교하여 CG와 Ideal의 순서로 쓰기량이 감소하는 것을 확인할 수 있다. 구체적으로, mobile device에서 CG일 때, 메타데이터의 쓰기량이 최대 87% 감소하였으며, desktop PC환경에서는 mobile device보다 훨씬 더 큰 폭의 쓰기량 감소효과가 있는 것을 알 수 있다. 한편, 이와 같이 desktop PC환경에서 더 효과가 큰 것은 기본 타이머 인터럽트 간격이 PC(4ms)와 mobile(10ms)에서 차이가 나기 때문일 수 있다.8 is a diagram for explaining an effect of reducing a write amount of a metadata storing method according to an embodiment of the present invention. At this time, sequential write (SW), random write (RW), Base (default time update interval = timer interrupt interval), CG (100 ms time update interval), Ideal (infinity time update interval) And (b) desktop PC, we can confirm that the amount of writing decreases in order of CG and Ide compared with Base. Specifically, when using CG on a mobile device, the amount of metadata to be written is reduced by up to 87%, and on a desktop PC environment, it is seen that the write amount is much larger than a mobile device. On the other hand, the more effective in the desktop PC environment is that the basic timer interrupt interval differs between PC (4 ms) and mobile (10 ms).

또한, 도 9를 참조하면, (a) mobile deivce 일 때와, (b) desktop PC 일 때 모두, Ideal에서 가장 퍼포먼스가 우수하며, 그 다음은 CG, 그 다음은 Base인 것을 알 수 있다. 또한, CG는 Ideal의 퍼포먼스에 매우 근접한 것을 알 수 있다.Referring to FIG. 9, it can be seen that (a) in the mobile deivce and (b) in the desktop PC, the performance is the best in Ideal, the next is CG, and the next is Base. Also, CG is very close to Ideal's performance.

또한, 도 10을 참조하면, 본 발명의 일 실시예에 따른 메타데이터 저장 방법에 의한 DBMS에서의 쓰기량 감소 효과를 설명하기 위한 도면이다. 이때, PERSIST와 WAL모드는 DBMS인 SQLite의 모드이고, OLTP는 DBMS인 MySQL의 모드이다. 도 8과 유사하게, Base, CG, Ideal의 순서로 쓰기량이 감소하는 것을 확인할 수 있다.10 is a diagram for explaining an effect of reducing a write amount in a DBMS by a metadata storing method according to an embodiment of the present invention. In this case, PERSIST and WAL modes are DBMS SQLite mode and OLTP DBMS MySQL mode. Similar to FIG. 8, it can be seen that the amount of writing decreases in the order of Base, CG, Ideal.

또한, 도 11을 참조하면, (a) mobile deivce 일 때와, (b) desktop PC 일 때 모두, Ideal에서 가장 퍼포먼스가 우수하며, 그 다음은 CG, 그 다음은 Base인 것을 알 수 있다. 또한, CG는 Ideal의 퍼포먼스에 매우 근접한 것을 알 수 있다.Referring to FIG. 11, it can be seen that (a) in the case of mobile deivce and (b) in the case of desktop PC, the performance is the best in Ideal, the next is CG, and the next is Base. Also, CG is very close to Ideal's performance.

다른 실시예에서는, 데이터 기록 장치가 현재메타데이터를 그 저장장치에 저장할 때, 과거메타데이터의 파일변경시간과 현재메타데이터의 파일변경시간이 상호 일치하지 않는 경우에만, 현재메타데이터를 그 저장장치에 저장할 수 있다.In another embodiment, when the data recording device stores the current metadata in its storage device, only when the file change time of the past metadata and the file change time of the current metadata do not coincide with each other, Lt; / RTI >

예컨대, 데이터 기록 장치가 과거메타데이터의 파일변경시간과 현재메타데이터의 파일변경시간이 서로 일치하는 경우에는, 현재메타데이터를 저장장치에 저장하지 않을 수 있다. 반대로, 과거메타데이터의 파일변경시간과 현재메타데이터의 파일변경시간이 서로 일치하지 않는 경우에는, 현재메타데이터를 저장장치에 저장할 수 있다.For example, if the data recording device matches the file change time of the past metadata with the file change time of the current metadata, the current metadata may not be stored in the storage device. In contrast, when the file change time of the past metadata does not match the file change time of the current metadata, the current metadata can be stored in the storage device.

또 다른 실시예에서는, 단계 S120 및 단계 S130은 적어도 하나의 저널링대상파일에 대하여만 수행될 수 있다.In another embodiment, steps S120 and S130 may be performed only for at least one journaling target file.

이때, 저널링대상파일은 쓰기 명령이 빈번하게 수행되는 파일일 수 있다. 예컨대, 안드로이드 시스템에서 많이 사용되는 DBMS인 SQLite의 파일 및 PC 및 서버 시스템에서 많이 사용되는 DBMS인 MySQL의 파일 등이 저널링대상파일로 선별될 수 있으며, 데이터 기록 장치가 그 저널링대상파일의 변경에 따라 단계 S120 및 단계 S130을 수행할 수 있다.At this time, the file to be journalled may be a file in which a write command is frequently executed. For example, files of SQLite, which is a DBMS commonly used in an Android system, and files of MySQL, which is a DBMS commonly used in a PC and a server system, can be selected as a journaling target file, and when the data recording apparatus changes its journaling target file Steps S120 and S130 may be performed.

즉, 데이터 기록 장치가 선별된 저널링대상파일에 대하여만 저널링 동작을 수행함으로써, 저널링 기능을 필요로 하지 않는 대부분의 파일들에 대한 쓰기 성능을 향상시키면서도, 저널링 기능을 필요로 하는 저널링대상파일 대하여는 저널링 기능을 유지할 수 있는 장점을 가질 수 있다.That is, by performing the journaling operation only on the selected journaling target file, the data recording apparatus improves the write performance of most files that do not require the journaling function, while the journaling target file that requires the journaling function is journaling It can have the advantage of maintaining the function.

이와 같이, 본 발명의 일 실시예에 따른 저널링 파일 시스템에서의 메타데이터 저장 방법은, 반복적인 동기화 쓰기 명령에 따른 저널링 오버헤드를 줄여 파일 시스템의 쓰기 성능 저하를 최소화할 수 있는 효과가 있다.As described above, the metadata storage method in the journaling file system according to an embodiment of the present invention can reduce the journaling overhead according to the repeated synchronization write command, thereby minimizing the write performance degradation of the file system.

도 2는 본 발명의 다른 실시예에 따른 파일변경시간을 산출하는 방법을 설명하기 위한 도면이다.2 is a diagram for explaining a method of calculating a file change time according to another embodiment of the present invention.

단계 S210에서는, 데이터 기록 장치가 저널링 파일 시스템이 탑재된 데이터 기록 장치로부터 현재의 시간을 나타내는 현재시간을 획득한다.In step S210, the data recording apparatus acquires the current time indicating the current time from the data recording apparatus on which the journaling file system is mounted.

예컨대, 데이터 기록 장치가 내부에 포함된 운영체제(OS)로부터 현재의 시간을 나타내는 현재시간의 정보를 획득할 수 있다. 이때, 현재 시간은 UNIX 또는 LINUX의 기준 시간인 1970년 1월 1일을 기준으로 하는 상대적인 시간일 수 있다.For example, the data recording apparatus can acquire information on the current time from the operating system (OS) included therein, which represents the current time. At this time, the current time may be a relative time based on January 1, 1970, which is the reference time of UNIX or LINUX.

단계 S220에서는, 데이터 기록 장치가 그 현재시간 및 시간갱신간격에 기초하여, 파일변경시간을 산출한다.In step S220, the data recording apparatus calculates the file change time based on the current time and the time update interval.

예컨대, 데이터 기록 장치는 소정의 기준에 의해 그 현재시간을 시간갱신간격 단위로 나눈 나머지를 그 현재시간으로부터 뺀 값을 파일변경시간으로 산출할 수 있다.For example, the data recording apparatus may calculate a value obtained by subtracting the remainder obtained by dividing the current time by the unit of time update interval by a predetermined criterion from the current time as a file change time.

다른 실시예에서는, 데이터 기록 장치가 파일변경시간을 산출할 때, 현재시간에서 현재시간을 시간갱신간격으로 나눈 나머지를 감산한 결과로부터 파일변경시간을 산출할 수 있다.In another embodiment, when the data recording apparatus calculates the file change time, the file change time can be calculated from the result obtained by subtracting the remainder obtained by dividing the current time from the current time by the time update interval.

즉, 도 7을 참조하면, 3번째 줄에서, 파일변경시간(now)은 현재시간(fs_time)에서 현재시간(fs_time)을 시간갱신간격(interval)로 나눈 나머지를 뺀 값으로부터 산출될 수 있다.That is, referring to FIG. 7, in the third line, the file change time (now) can be calculated from a value obtained by subtracting the remainder obtained by dividing the current time (fs_time) by the time update interval (interval) at the current time (fs_time).

또한, 5번째 내지 7번째 줄에서, 그 파일변경시간(now)이 가장 마지막에 갱신된 파일변경시간(mtime)과 다른 경우에만, 별도의 체크(dirty를 1로 표시)한다.Also, in the fifth to seventh lines, a separate check (dirty is indicated by 1) is performed only when the file change time now differs from the file change time (mtime) last updated.

또한, 8번째 내지 10번째 줄에서, 체크가 1로 설정된 경우에만, 가장 마지막에 갱신된 파일변경시간(mtime)을 새로 산출된 파일변경시간(now)으로 갱신한다.Also, in the eighth through tenth lines, only when the check is set to 1, the latest updated file change time (mtime) is updated to the newly calculated file change time (now).

도 3은 본 발명의 일 실시예에 따른 저널링 파일 시스템에서의 메타데이터 저장 방법이 적용된 데이터 기록 장치를 설명하기 위한 도면이다.FIG. 3 is a view for explaining a data recording apparatus to which a metadata storage method in a journaling file system according to an embodiment of the present invention is applied.

도 3을 참조하면, 본 발명의 일 실시예에 따른 저널링 파일 시스템에서의 메타데이터 저장 방법이 적용된 데이터 기록 장치(300)는 수신부(310), 산출부(320) 및 저장부(330)를 포함한다.3, a data recording apparatus 300 to which a metadata storage method in a journaling file system according to an embodiment of the present invention is applied includes a receiving unit 310, a calculating unit 320, and a storing unit 330 do.

한편, 데이터 기록 장치(300)는 스마트폰, 웨어러블기기, 태블릿PC, 노트북 및 PC 등에 탑재될 수 있다.Meanwhile, the data recording apparatus 300 may be mounted on a smart phone, a wearable device, a tablet PC, a notebook PC, or the like.

수신부(310)는 파일변경시간을 갱신하는 간격인 시간갱신간격의 정보를 포함하는 저널링정보를 수신한다.The receiving unit 310 receives journaling information including information of a time update interval, which is an interval for updating the file change time.

다른 실시예에서는, 파일변경시간은 파일의 내용 및 속성 중 적어도 하나가 변경된 시간일 수 있다.In another embodiment, the file modification time may be the time at which at least one of the content and attributes of the file has changed.

또 다른 실시예에서는, 파일변경시간은 파일의 내용이 변경된 시간인 파일내용수정시간(mtime) 또는 파일의 내용 및 속성 중 적어도 하나가 변경된 시간인 파일내용변경시간(ctime)일 수 있다.In another embodiment, the file modification time may be a file content modification time (mtime), which is the time at which the contents of the file are changed, or a file contents modification time (ctime), at which at least one of the contents and attributes of the file is changed.

산출부(320)는 파일의 변경에 따라, 그 저널링정보에 포함된 시간갱신간격에 기초하여 저장장치에 저장하려는 현재메타데이터에 포함된 파일변경시간을 산출한다.The calculating unit 320 calculates the file change time included in the current metadata to be stored in the storage device based on the time update interval included in the journaling information, according to the change of the file.

다른 실시예에서는, 산출부(320)는 저널링 파일 시스템이 탑재된 데이터 기록 장치로부터 현재의 시간을 나타내는 현재시간을 획득하고, 그 현재시간 및 시간갱신간격에 기초하여, 파일변경시간을 산출할 수 있다.In another embodiment, the calculating unit 320 can obtain the current time indicating the current time from the data recording apparatus on which the journaling file system is mounted, and calculate the file change time based on the current time and the time update interval have.

또 다른 실시예에서는, 산출부(320)는 그 현재시간 및 시간갱신간격에 기초하여, 파일변경시간을 산출할 때, 그 현재시간에서 그 현재시간을 그 시간갱신간격으로 나눈 나머지를 감산한 결과로부터 파일변경시간을 산출할 수 있다.In yet another embodiment, the calculating unit 320 calculates the file change time based on the current time and the time update interval, subtracting the remainder obtained by dividing the current time by the time update interval at the present time The file change time can be calculated.

저장부(330)는 저장장치에 마지막으로 저장된 과거메타데이터와 현재메타데이터 각각의 파일변경시간을 비교하여, 선택적으로 현재메타데이터를 저장장치에 저장한다.The storage unit 330 compares the file change time of each of the current metadata and the past metadata stored last in the storage device, and selectively stores the current metadata in the storage device.

다른 실시예에서는, 저장부(330)는 과거메타데이터의 파일변경시간과 현재메타데이터의 파일변경시간이 상호 일치하지 않는 경우에만, 현재메타데이터를 저장장치에 저장할 수 있다.In another embodiment, the storage unit 330 may store the current metadata in the storage device only when the file change time of the past metadata does not coincide with the file change time of the current metadata.

또 다른 실시예에서는, 산출부(320) 및 저장부(330)는 저널링 파일 시스템에 포함된 복수의 파일 중에서 선별된 적어도 하나의 저널링대상파일에 대하여만 동작할 수 있다.In yet another embodiment, the calculating unit 320 and the storing unit 330 may operate only for at least one journaling target file selected from a plurality of files included in the journaling file system.

한편, 상술한 본 발명의 실시예들은 컴퓨터에서 실행될 수 있는 프로그램으로 작성가능하고, 컴퓨터로 읽을 수 있는 기록매체를 이용하여 상기 프로그램을 동작시키는 범용 디지털 컴퓨터에서 구현될 수 있다.The above-described embodiments of the present invention can be embodied in a general-purpose digital computer that can be embodied as a program that can be executed by a computer and operates the program using a computer-readable recording medium.

상기 컴퓨터로 읽을 수 있는 기록매체는 마그네틱 저장매체(예를 들면, 롬, 플로피 디스크, 하드디스크 등), 광학적 판독 매체(예를 들면, 시디롬, 디브이디 등) 를 포함한다.The computer readable recording medium includes a magnetic storage medium (e.g., ROM, floppy disk, hard disk, etc.), optical reading medium (e.g., CD ROM, DVD, etc.).

이제까지 본 발명에 대하여 그 바람직한 실시예들을 중심으로 살펴보았다. 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자는 본 발명이 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 변형된 형태로 구현될 수 있음을 이해할 수 있을 것이다. 그러므로 개시된 실시예들은 한정적인 관점이 아니라 설명적인 관점에서 고려되어야 한다. 본 발명의 범위는 전술한 설명이 아니라 특허청구범위에 나타나 있으며, 그와 동등한 범위 내에 있는 모든 차이점은 본 발명에 포함된 것으로 해석되어야 할 것이다.The present invention has been described with reference to the preferred embodiments. It will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. Therefore, the disclosed embodiments should be considered in an illustrative rather than a restrictive sense. The scope of the present invention is defined by the appended claims rather than by the foregoing description, and all differences within the scope of equivalents thereof should be construed as being included in the present invention.

Claims (15)

저널링 파일 시스템(journaling file system)에서 파일이 변경된 시간인 파일변경시간의 정보를 포함하는 메타데이터(metadata)를 저장장치에 저장하는 방법에 있어서,
상기 파일변경시간을 갱신하는 간격인 시간갱신간격의 정보를 포함하는 저널링정보를 수신하는 단계;
상기 파일의 변경에 따라, 상기 저널링정보에 포함된 시간갱신간격에 기초하여 상기 저장장치에 저장하려는 현재메타데이터에 포함된 상기 파일변경시간을 산출하는 단계; 및
상기 저장장치에 마지막으로 저장된 과거메타데이터와 상기 현재메타데이터 각각의 상기 파일변경시간을 비교하여, 상기 과거메타데이터의 상기 파일변경시간과 상기 현재메타데이터의 상기 파일변경시간이 상호 일치하지 않는 경우에 상기 현재메타데이터를 상기 저장장치에 저장하는 단계를 포함하는 것을 특징으로 하는 저널링 파일 시스템에서의 메타데이터 저장 방법.
A method for storing metadata in a storage device, the metadata including information on a file change time, which is a time at which a file is changed in a journaling file system,
Receiving journaling information including information of a time update interval which is an interval for updating the file change time;
Calculating the file modification time included in the current metadata to be stored in the storage device based on the time update interval included in the journaling information according to the modification of the file; And
Comparing the file change time of each of the past metadata stored last in the storage with the file change time of each of the current metadata and if the file change time of the past metadata does not coincide with the file change time of the current metadata And storing the current metadata in the storage device. ≪ Desc / Clms Page number 20 >
제1항에 있어서,
상기 파일변경시간을 산출하는 단계는
상기 저널링 파일 시스템이 탑재된 데이터 기록 장치로부터 현재의 시간을 나타내는 현재시간을 획득하는 단계; 및
상기 현재시간 및 상기 시간갱신간격에 기초하여, 상기 파일변경시간을 산출하는 단계
를 포함하는 것을 특징으로 하는 저널링 파일 시스템에서의 메타데이터 저장 방법.
The method according to claim 1,
The step of calculating the file change time
Obtaining a current time indicating a current time from a data recording apparatus on which the journaling file system is mounted; And
Calculating the file modification time based on the current time and the time update interval
And storing the meta data in the journaling file system.
제2항에 있어서,
상기 파일변경시간을 산출하는 단계는
상기 현재시간에서 상기 현재시간을 상기 시간갱신간격으로 나눈 나머지를 감산한 결과로부터 상기 파일변경시간을 산출하는 것을 특징으로 하는 저널링 파일 시스템에서의 메타데이터 저장 방법.
3. The method of claim 2,
The step of calculating the file change time
Wherein the file change time is calculated from a result obtained by subtracting a remainder obtained by dividing the current time by the time update interval at the current time.
삭제delete 제1항에 있어서,
상기 파일변경시간을 결정하는 단계와 상기 현재메타데이터를 상기 저장장치에 저장하는 단계는
상기 저널링 파일 시스템에 포함된 복수의 파일 중에서 선별된 적어도 하나의 저널링대상파일에 대하여만 수행되는 것을 특징으로 하는 저널링 파일 시스템에서의 메타데이터 저장 방법.
The method according to claim 1,
Determining the file modification time and storing the current metadata in the storage device
Wherein the at least one journaling target file is selected from a plurality of files included in the journaling file system.
제1항에 있어서,
상기 파일변경시간은
상기 파일의 내용 및 속성 중 적어도 하나가 변경된 시간인 것을 특징으로 하는 저널링 파일 시스템에서의 메타데이터 저장 방법.
The method according to claim 1,
The file modification time
Wherein at least one of contents and attributes of the file is changed.
제6항에 있어서,
상기 파일변경시간은
상기 파일의 내용이 변경된 시간인 파일내용수정시간(mtime) 또는 상기 파일의 내용 및 속성 중 적어도 하나가 변경된 시간인 파일내용변경시간(ctime)인 것을 특징으로 하는 저널링 파일 시스템에서의 메타데이터 저장 방법.
The method according to claim 6,
The file modification time
Wherein the file content modification time (ctime) is a time at which at least one of contents and attributes of the file are changed, the file content modification time (ctime) being a time at which the content of the file is changed .
제1항에 있어서,
상기 시간갱신간격은
상기 저널링 파일 시스템이 탑재된 데이터 기록 장치의 중앙처리장치(CPU)의 성능, 메모리(RAM)의 용량 및 저장장치의 입출력속도 중 적어도 하나에 대한 성능정보에 기초하여 결정되는 것을 특징으로 하는 저널링 파일 시스템에서의 메타데이터 저장 방법.
The method according to claim 1,
The time update interval
The performance of at least one of a performance of a central processing unit (CPU) of a data recording apparatus on which the journaling file system is mounted, a capacity of a memory (RAM), and an input / output speed of the storage device, A method for storing metadata in a system.
파일이 변경된 시간인 파일변경시간의 정보를 포함하는 메타데이터를 저장장치에 저장하는 저널링 파일 시스템이 적용된 데이터 기록 장치에 있어서,
상기 파일변경시간을 갱신하는 간격인 시간갱신간격의 정보를 포함하는 저널링정보를 수신하는 수신부;
상기 파일의 변경에 따라, 상기 저널링정보에 포함된 시간갱신간격에 기초하여 상기 저장장치에 저장하려는 현재메타데이터에 포함된 상기 파일변경시간을 산출하는 산출부; 및
상기 저장장치에 마지막으로 저장된 과거메타데이터와 상기 현재메타데이터 각각의 상기 파일변경시간을 비교하여,
상기 과거메타데이터의 상기 파일변경시간과 상기 현재메타데이터의 상기 파일변경시간이 상호 일치하지 않는 경우에 상기 현재메타데이터를 상기 저장장치에 저장하는 저장부
를 포함하는 것을 특징으로 하는 저널링 파일 시스템이 적용된 데이터 기록 장치.
A data recording apparatus to which a journaling file system is applied that stores metadata including information of a file change time, which is a time at which a file is changed, in a storage device,
A receiving unit for receiving journaling information including information of a time update interval which is an interval for updating the file change time;
A calculating unit for calculating the file modification time included in the current metadata to be stored in the storage device based on the time update interval included in the journaling information according to the change of the file; And
Comparing the past metadata stored last in the storage device with the file modification time of each of the current metadata,
And storing the current metadata in the storage device when the file change time of the past metadata does not match the file change time of the current metadata,
Wherein the journaling file system is a data recording apparatus to which a journaling file system is applied.
제9항에 있어서,
상기 산출부는
상기 저널링 파일 시스템이 탑재된 데이터 기록 장치로부터 현재의 시간을 나타내는 현재시간을 획득하고,
상기 현재시간 및 상기 시간갱신간격에 기초하여, 상기 파일변경시간을 산출하는 것을 특징으로 하는 저널링 파일 시스템이 적용된 데이터 기록 장치.
10. The method of claim 9,
The calculating unit
Acquiring a current time indicating a current time from a data recording apparatus equipped with the journaling file system,
Wherein the file change time is calculated based on the current time and the time update interval.
제10항에 있어서,
상기 산출부는
상기 현재시간 및 상기 시간갱신간격에 기초하여, 상기 파일변경시간을 산출할 때,
상기 현재시간에서 상기 현재시간을 상기 시간갱신간격으로 나눈 나머지를 감산한 결과로부터 상기 파일변경시간을 산출하는 것을 특징으로 하는 저널링 파일 시스템이 적용된 데이터 기록 장치.
11. The method of claim 10,
The calculating unit
When calculating the file change time based on the current time and the time update interval,
Wherein the file change time is calculated from a result obtained by subtracting a remainder obtained by dividing the current time by the time update interval at the current time.
삭제delete 제9항에 있어서,
상기 산출부 및 상기 저장부는
상기 저널링 파일 시스템에 포함된 복수의 파일 중에서 선별된 적어도 하나의 저널링대상파일에 대하여만 동작하는 것을 특징으로 하는 저널링 파일 시스템이 적용된 데이터 기록 장치.
10. The method of claim 9,
The calculation unit and the storage unit
Wherein the journaling file system is operated only for at least one journaling target file selected from a plurality of files included in the journaling file system.
제9항에 있어서,
상기 파일변경시간은
상기 파일의 내용 및 속성 중 적어도 하나가 변경된 시간인 것을 특징으로 하는 저널링 파일 시스템이 적용된 데이터 기록 장치.
10. The method of claim 9,
The file modification time
Wherein at least one of contents and attributes of the file is changed.
제14항에 있어서,
상기 파일변경시간은
상기 파일의 내용이 변경된 시간인 파일내용수정시간(mtime) 또는 상기 파일의 내용 및 속성 중 적어도 하나가 변경된 시간인 파일내용변경시간(ctime)인 것을 특징으로 하는 저널링 파일 시스템이 적용된 데이터 기록 장치.

15. The method of claim 14,
The file modification time
Wherein the file content modification time (ctime) is a time at which at least one of contents and attributes of the file is changed, the file content modification time (mtime) being a time at which the contents of the file are changed.

KR1020160172390A 2016-12-16 2016-12-16 Method for flushing metadata in journaling file system and apparatus for writing data using the method KR101932967B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020160172390A KR101932967B1 (en) 2016-12-16 2016-12-16 Method for flushing metadata in journaling file system and apparatus for writing data using the method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020160172390A KR101932967B1 (en) 2016-12-16 2016-12-16 Method for flushing metadata in journaling file system and apparatus for writing data using the method

Publications (2)

Publication Number Publication Date
KR20180070102A KR20180070102A (en) 2018-06-26
KR101932967B1 true KR101932967B1 (en) 2018-12-27

Family

ID=62788749

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020160172390A KR101932967B1 (en) 2016-12-16 2016-12-16 Method for flushing metadata in journaling file system and apparatus for writing data using the method

Country Status (1)

Country Link
KR (1) KR101932967B1 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014153872A (en) 2013-02-07 2014-08-25 Canon Inc Information processing device, information processing method, and program
JP2015043178A (en) * 2013-08-26 2015-03-05 キヤノン株式会社 Information processing device, information processing method, and program

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014153872A (en) 2013-02-07 2014-08-25 Canon Inc Information processing device, information processing method, and program
JP2015043178A (en) * 2013-08-26 2015-03-05 キヤノン株式会社 Information processing device, information processing method, and program

Also Published As

Publication number Publication date
KR20180070102A (en) 2018-06-26

Similar Documents

Publication Publication Date Title
US9892045B1 (en) Methods to select segments of an evicted cache unit for reinsertion into the cache
US10564850B1 (en) Managing known data patterns for deduplication
US7035881B2 (en) Organization of read-write snapshot copies in a data storage system
US9892136B2 (en) Method and system for scrubbing data within a data storage subsystem
US8738845B2 (en) Transaction-safe fat file system improvements
KR101921365B1 (en) Nonvolatile media dirty region tracking
US8548948B2 (en) Methods and apparatus for a fine grained file data storage system
US8255371B2 (en) Methods and apparatuses for data protection
US9959053B2 (en) Method for constructing NVRAM-based efficient file system
KR101870521B1 (en) Methods and systems for improving storage journaling
US7979401B2 (en) Time based file system for continuous data protection
US8250035B1 (en) Methods and apparatus for creating a branch file in a file system
US9720835B1 (en) Methods to efficiently implement coarse granularity cache eviction based on segment deletion hints
US9921963B1 (en) Method to decrease computation for cache eviction using deferred calculations
WO2016115217A1 (en) Data backup method and apparatus
US9003228B2 (en) Consistency of data in persistent memory
US20150193463A1 (en) Systems and methods for durable database operations in a memory-mapped environment
CN107506466B (en) Small file storage method and system
US8117160B1 (en) Methods and apparatus for creating point in time copies in a file system using reference counts
US10430115B2 (en) System and method for optimizing multiple packaging operations in a storage system
US11860840B2 (en) Update of deduplication fingerprint index in a cache memory
CN112912853B (en) Anytime point copy to the cloud
KR101932967B1 (en) Method for flushing metadata in journaling file system and apparatus for writing data using the method
EP4002148A1 (en) Cloud-native object storage for page-based relational database
US11593352B2 (en) Cloud-native object storage for page-based relational database

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
AMND Amendment
E601 Decision to refuse application
AMND Amendment
X701 Decision to grant (after re-examination)
GRNT Written decision to grant