KR20170002848A - Apparatus and method for journaling based on garbage collection - Google Patents

Apparatus and method for journaling based on garbage collection Download PDF

Info

Publication number
KR20170002848A
KR20170002848A KR1020150092703A KR20150092703A KR20170002848A KR 20170002848 A KR20170002848 A KR 20170002848A KR 1020150092703 A KR1020150092703 A KR 1020150092703A KR 20150092703 A KR20150092703 A KR 20150092703A KR 20170002848 A KR20170002848 A KR 20170002848A
Authority
KR
South Korea
Prior art keywords
block
journal
garbage collection
file system
storage
Prior art date
Application number
KR1020150092703A
Other languages
Korean (ko)
Other versions
KR101738965B1 (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 KR1020150092703A priority Critical patent/KR101738965B1/en
Publication of KR20170002848A publication Critical patent/KR20170002848A/en
Application granted granted Critical
Publication of KR101738965B1 publication Critical patent/KR101738965B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0253Garbage collection, i.e. reclamation of unreferenced memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0866Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches for peripheral storage systems, e.g. disk cache
    • G06F12/0868Data transfer between cache memory and other subsystems, e.g. storage devices or host systems

Abstract

According to one embodiment of the present invention, an apparatus for journaling garbage collection includes: a storage; a memory in which a garbage collection journaling program is stored; and a processor for executing the program. The processor copies a victim block to a free block if garbage collection with respect to at least one victim block occurs upon execution of the program, records an address of the victim block and an address of the free block in a journal area, and stores the free block in the storage after the copying to the free block is completed and stores the journal area in a storage device when the storing of the free block is completed. The storage includes a file system, and the file system includes a victim block, a free block, and a journal area.

Description

가비지 컬렉션 저널링 장치 및 방법{APPARATUS AND METHOD FOR JOURNALING BASED ON GARBAGE COLLECTION}[0001] APPARATUS AND METHOD FOR JOURNALING BASED ON GARBAGE COLLECTION [0002]

본 발명은 가비지 컬렉션 저널링 장치 및 방법에 관한 것이다.The present invention relates to a garbage collection journaling apparatus and method.

로그 구조 파일 시스템(log structured file system)은 사용자의 쓰기 요청을 순차적으로 스토리지에 처리한다. 로그 구조 파일 시스템은 이러한 특징에 따라 데이터를 덮어쓰지 않는 낸드 플래시 스토리지에 적합하다. 로그 구조 파일 시스템은 스토리지에 포함된 블록에 기록된 데이터가 수정될 때, 원래 수정된 데이터가 저장된 블록에 기록된 데이터를 무효화하고 데이터가 저장되지 않은 다른 블록에 기록하는 방식인 아웃-오버-업데이트(out-of-update)를 사용한다. 그러므로 로그 구조 파일 시스템은 사용자가 요청한 스토리지에 대한 임의 쓰기(random write)를 항상 순차적으로 처리할 수 있다. A log structured file system processes user write requests sequentially to storage. The log-structured file system is suitable for NAND flash storage that does not overwrite data according to these characteristics. The log-structured file system is an out-of-the-box update that is a way to invalidate data written to a block where originally modified data is stored and to write to another block in which data is not stored, (out-of-update). Therefore, the log-structured file system can always process random writes to the storage requested by the user in sequence.

대부분의 스토리지에서 순차 쓰기(sequential write)는 임의 쓰기에 비하여 쓰기 성능이 높다. 특히, 솔리드 스테이트 드라이브와 같은 쓰기 횟수가 정해진 낸드 플래시 스토리지에서 순차 쓰기는 쓰기 속도 개선뿐만 아니라 낸드 플래시 스토리지의 수명을 연장시킬 수 있다. In most storage, sequential write has higher write performance than random write. In particular, sequential writing in NAND flash storage with a fixed number of writes, such as a solid state drive, can improve the write speed and extend the life of NAND flash storage.

그러나 지속적인 순차 쓰기를 수행하기 위하여 로그 구조 파일 시스템은 가비지 컬렉션(garbage collection)을 수행해야 한다. 가비지 컬렉션은 유효 블록(valid block) 및 무효 블록(invalid block)이 섞여있는 공간에서 유효 블록을 다른 블록으로 복사하는 작업을 수행하여 덮어쓰기가 가능한 사용 가능 블록을 확보한다. 그러나 순차 쓰기는 가비지 컬렉션을 수행하는 동안 사용자의 쓰기 요청을 처리하지 못할 수 있으므로, 쓰기 지연이 발생할 수 있고, 이로 인하여, 쓰기 성능이 감소할 수 있다. 이와 같이, 로그 구조 파일 시스템은 가비지 컬렉션으로 인하여 쓰기 성능이 감소할 수 있고, 추가적인 비용이 소모될 수 있다.However, in order to perform continuous sequential writes, the log-structured file system must perform garbage collection. In garbage collection, a valid block is copied to another block in a space where a valid block and an invalid block are mixed, thereby obtaining a usable block that can be overwritten. However, since sequential writes may not be able to handle user write requests during garbage collection, write latency may occur, which may reduce write performance. As such, the log structure file system can reduce write performance due to garbage collection, and may incur additional costs.

또한, 가비지 컬렉션을 수행하지 않더라도 데이터가 저장되는 블록이 수시로 변경될 수 있으므로 로그 구조 파일 시스템은 해당 데이터를 가리키고 있는 메타데이터를 수정하여 저장해야 한다. 그러므로 로그 구조 파일 시스템은 메타데이터 수정을 위한 추가 비용이 발생할 수 있다. 이를 해결하기 위하여 로그 구조 파일 시스템은 메타데이터 수정 지연 기법을 사용할 수 있다. 그러나 메타데이터 수정 지연 기법은 가비지 컬렉션을 수행할 때, 스토리지와 파일 시스템 간의 일관성(consistency)이 깨지는 문제가 생길 수 있다. Also, even if garbage collection is not performed, a block in which data is stored may be changed from time to time. Therefore, the log structure file system must modify and store metadata indicating the data. Therefore, the log structure file system may incur additional costs for metadata modification. To solve this problem, the log structure file system can use the metadata modification delay technique. However, the metadata modification delay technique can cause garbage collection to break the consistency between storage and file systems.

이러한 문제를 해결하기 위한 종래의 기술로는 SSR-LFS(segment space recycling-log structured file system) 및 F2FS(flash friendly file system) 등과 같은 파일 시스템이 있다. SSR-LFS는 LIBU(lazy indirect block update) 기법에 기초하여 자주 수정되는 메타데이터인 인다이렉트 블록(indirect block)을 메인 메모리의 캐시로 유지함으로써 추가적인 쓰기 요청을 줄인다. SSR-LFS는 세그먼트 정보와 같은 메타데이터를 저장장치에 유지하므로, 가비지 컬렉션 수행 시 일관성이 깨지는 문제를 해결할 수 있다. 그러나 SSR-LFS는 모든 메타데이터를 메인 메모리에 유지하지 않으므로, 로그 구조 파일 시스템에서 메타데이터 쓰기 문제를 완전히 해결할 수 없다. Conventional techniques for solving such problems include file systems such as segment space recycling-log structured file system (SSR-LFS) and flash friendly file system (F2FS). SSR-LFS reduces the additional write requests by keeping indirect blocks, which are frequently modified metadata, in the cache of main memory based on the lazy indirect block update (LIBU) technique. Since SSR-LFS maintains metadata such as segment information in a storage device, it can solve the problem of inconsistency in garbage collection. However, since SSR-LFS does not keep all metadata in main memory, it can not completely solve the problem of writing metadata in a log-structured file system.

F2FS는 모든 메타데이터에 대해 수정 지연 기법을 사용하는 로그 구조 파일 시스템이다. F2FS는 가비지 컬렉션 수행 시 일관성 문제를 해결하기 위하여 체크포인트(checkpoint)를 사용한다. 체크포인트는 가비지 컬렉션 수행 이후 파일 시스템의 모든 수정된 메타데이터를 스토리지에 저장할 수 있다. 그러므로 F2FS는 일관성 문제를 해결할 수 있다. 그러나 F2FS는 스토리지에 기록되지 않은 수정된 메타데이터의 수가 많기 때문에 체크포인트 비용이 증가할 수 있다. 그리고 F2FS는 가비지 컬렉션을 수행할 때 체크포인트를 수행하면, 가비지 컬렉션과 관련이 없는 수정된 메타데이터가 기록될 수 있다. 그러므로 F2FS는 가비지 컬렉션 시간이 증가할 수 있으며, 쓰기 성능이 저하될 수 있다. F2FS is a log-structured file system that uses modification delay techniques for all metadata. F2FS uses checkpoints to resolve consistency problems when performing garbage collection. Checkpoints can store all the modified metadata of the file system in storage after garbage collection is done. Therefore, F2FS can solve the consistency problem. However, because F2FS has a large number of modified metadata that is not written to storage, checkpoint costs can increase. And when F2FS performs a checkpoint when performing garbage collection, modified metadata that is not related to garbage collection can be recorded. Therefore, F2FS can increase garbage collection time and may degrade write performance.

이러한 문제를 해결하기 위하여, 한국 공개특허공보 제10-2007-0061345호(발명 명칭: 이중 저널링을 이용한 데이터 저장 공간 확보 방법)는 플래시 메모리에서의 이중 저널링을 이용한 데이터 저장 공간 확보 방법을 개시하고 있다. 구체적으로 이 방법은 플래시 메모리에 대한 세그먼트의 프리 리스트(free list)를 중앙점을 설정하여 전반부 저널링 프리 리스트와 후반부 저널링 프리 리스트로 분리 작성하고, 전반부 프리 리스트로부터 프리 세그먼트가 충분히 확보되어 있는지 판단한다. 그리고 이 방법은 프리 세그먼트가 충분히 확보되지 않은 경우, 소정의 데이터가 이미 저장된 세그먼트에 설정된 지움 평준화의 한계치와 유효 데이터의 한계치를 참고하여, 가비지 컬렉션을 수행하여 데이터 저장 공간을 확보한다. In order to solve such a problem, Korean Patent Laid-Open Publication No. 10-2007-0061345 (entitled "Method for securing data storage space using double journaling") discloses a method for securing a data storage space using double journaling in a flash memory . Specifically, the method divides the free list of the segment for the flash memory into a first half journaling free list and a second half journaling free list by setting a center point, and judges whether a free segment is sufficiently secured from the first half free list . In this method, when the free segment is not sufficiently secured, garbage collection is performed by referring to the threshold value of the erasure leveling and the limit value of the effective data set in the segment in which the predetermined data is already stored, thereby securing the data storage space.

또한, 한국 공개특허공보 제10-2008-0016058호(발명 명칭: 자바 가상 머신의 메모리 관리 장치 및 방법)는 자바 가상 머신이 사용할 수 있는 메모리를 동적으로 확장할 수 있도록 하는 자바 가상 머신의 메모리 관리 장치 및 방법을 개시하고 있다. In addition, Korean Patent Laid-Open No. 10-2008-0016058 (entitled " Java virtual machine memory management device and method ") discloses a memory management method of a Java virtual machine Apparatus and method.

본 발명은 전술한 종래 기술의 문제점을 해결하기 위한 것으로서, 로그 구조 파일시스템에서 가비지 컬렉션 수행 시 가비지 컬렉션 저널링 장치 및 방법을 제공하는데 그 목적이 있다. SUMMARY OF THE INVENTION It is an object of the present invention to provide a garbage collection journaling apparatus and method for performing garbage collection in a log structure file system.

다만, 본 실시예가 이루고자 하는 기술적 과제는 상기된 바와 같은 기술적 과제로 한정되지 않으며, 또 다른 기술적 과제들이 존재할 수 있다.It should be understood, however, that the technical scope of the present invention is not limited to the above-described technical problems, and other technical problems may exist.

상술한 기술적 과제를 달성하기 위한 기술적 수단으로서, 본 발명의 제 1 측면에 따른 가비지 컬렉션 저널링 장치는 스토리지, 가비지 컬렉션 저널링 프로그램이 저장된 메모리 및 프로그램을 실행하는 프로세서를 포함하고, 프로세서는 프로그램의 실행에 따라, 하나 이상의 희생 블록에 대한 가비지 컬렉션이 발생하면, 희생 블록을 프리 블록에 복사하고, 희생 블록의 주소 및 프리 블록의 주소를 저널 영역에 기록하며, 프리 블록으로의 복사가 완료된 이후, 프리 블록을 스토리지에 저장하고, 프리 블록의 저장이 완료되면 저널 영역을 저장장치에 저장한다. 이때, 스토리지는 파일 시스템을 포함하고, 파일 시스템은 희생 블록, 프리 블록 및 저널 영역을 포함한다.According to a first aspect of the present invention, there is provided a garbage collection journaling apparatus including a storage unit, a memory for storing a garbage collection journaling program, and a processor for executing the program, When garbage collection for one or more victim blocks occurs, the victim block is copied to the free block, the address of the victim block and the address of the free block are written to the journal area, and after the copying to the free block is completed, And stores the journal area in the storage device when the storage of the free block is completed. At this time, the storage includes a file system, and the file system includes a sacrifice block, a free block, and a journal area.

본 발명의 제 2 측면에 따른 컴퓨팅 장치의 가비지 컬렉션 저널링 방법은 (a) 하나 이상의 희생 블록에 대한 가비지 컬렉션이 발생함에 따라, 희생 블록을 프리 블록으로 복사하는 단계; (b) 희생 블록의 주소 및 프리 블록의 주소를 저널 영역에 기록하는 단계; (c) (b) 단계 이후, 프리 블록을 스토리지에 저장하는 단계; 및 (d) (c) 단계 이후, 저널 영역을 저장장치에 저장하는 단계를 포함한다. 이때, 스토리지는 파일 시스템을 포함하고, 파일 시스템은 희생 블록, 프리 블록 및 저널 영역을 포함한다.A method for garbage collection of a computing device according to a second aspect of the present invention includes the steps of: (a) copying a victim block into a free block as garbage collection for one or more victim blocks occurs; (b) writing the address of the victim block and the address of the free block in the journal area; (c) after step (b), storing the free blocks in the storage; And (d) after step (c), storing the journal area in a storage device. At this time, the storage includes a file system, and the file system includes a sacrifice block, a free block, and a journal area.

전술한 과제 해결 수단 중 어느 하나에 의하면, 본 발명은 메타데이터 수정 지연 기법을 적용하는 로그 구조 파일 시스템에서 가비지 컬렉션이 수행될 때, 체크포인트 대신 가비지 컬렉션을 수행하므로 데이터의 일관성을 보장할 수 있다. 그리고 본 발명은 파일 시스템의 모든 수정된 메타데이터를 기록하는 종래의 체크포인트와 달리, 메타데이터에 포함된 선택된 몇 개의 저널 블록만 기록하므로, 가비지 컬렉션 수행 시 쓰기 비용을 줄일 수 있다. 그러므로 본 발명은 가비지 컬렉션이 수행되는 동안 지연될 수 있는 사용자의 쓰기 요청의 대기 시간이 감소할 수 있으며, 스토리지에 대한 쓰기 성능이 증가될 수 있다. According to any one of the above-mentioned problems, the present invention can ensure consistency of data by performing garbage collection instead of checkpoint when performing garbage collection in a log structure file system applying the metadata modification delay technique . Unlike the conventional checkpoint for recording all the modified metadata of the file system, the present invention records only a few selected journal blocks included in the metadata, thereby reducing writing costs in performing garbage collection. Therefore, the present invention can reduce the waiting time of the user's write request that can be delayed while garbage collection is performed, and the write performance to the storage can be increased.

도 1은 스토리지 및 파일 시스템 간의 일관성 문제에 대한 예시도이다.
도 2는 본 발명의 일 실시예에 따른 가비지 컬렉션 저널링 장치의 블록도이다.
도 3은 본 발명의 일 실시예에 따른 가비지 컬렉션의 예시도이다.
도 4는 본 발명의 일 실시예에 따른 파일 시스템의 저널 영역 및 저널 블록의 예시도이다.
도 5는 본 발명의 일 실시예에 따른 가비지 컬렉션 저널링 장치의 가비지 컬렉션 저널링 방법의 순서도이다.
도 6은 본 발명의 일 실시예에 따른 가비지 컬렉션 저널링 장치의 파일 시스템 복구 방법의 순서도이다.
Figure 1 is an example of a consistency problem between storage and file systems.
2 is a block diagram of a garbage collection journaling apparatus according to an embodiment of the present invention.
3 is an illustration of garbage collection according to an embodiment of the present invention.
4 is an exemplary view of a journal area and a journal block of a file system according to an embodiment of the present invention.
5 is a flowchart of a garbage collection journaling method of a garbage collection journaling apparatus according to an embodiment of the present invention.
6 is a flowchart of a method of recovering a file system of a garbage collection journaling apparatus according to an embodiment of the present invention.

아래에서는 첨부한 도면을 참조하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 본 발명의 실시예를 상세히 설명한다. 그러나 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시예에 한정되지 않는다. 그리고 도면에서 본 발명을 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였다.Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings, which will be readily apparent to those skilled in the art. The present invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. In order to clearly explain the present invention in the drawings, parts not related to the description are omitted.

명세서 전체에서, 어떤 부분이 다른 부분과 "연결"되어 있다고 할 때, 이는 "직접적으로 연결"되어 있는 경우뿐 아니라, 그 중간에 다른 소자를 사이에 두고 "전기적으로 연결"되어 있는 경우도 포함한다. 또한, 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있는 것을 의미한다.Throughout the specification, when a part is referred to as being "connected" to another part, it includes not only "directly connected" but also "electrically connected" with another part in between . Also, when a part is referred to as "including " an element, it does not exclude other elements unless specifically stated otherwise.

메타데이터 수정 지연 기법을 사용하는 종래의 로그 구조 파일시스템은 가비지 컬렉션을 수행할 때, 스토리지와 파일 시스템 간의 일관성(consistency)이 깨지는 문제가 발생할 수 있다. 일관성 문제는 도 1을 참조하여 설명한다. Conventional log-structured file systems that use the metadata modification delay technique may suffer from a break in consistency between storage and file systems when performing garbage collection. The consistency problem will be described with reference to FIG.

도 1은 스토리지 및 종래의 로그 구조 파일시스템 간의 일관성 문제에 대한 예시도이다. Figure 1 is an illustration of a consistency problem between storage and conventional logflex file systems.

도 1의 (a)는 가비지 컬렉션이 수행되기 전 체크포인트(checkpoint) 상태에 대한 예시도이다. 종래의 로그 구조 파일시스템에 포함된 '세그먼트 11'에는 '파일 A' 및 '파일 B'가 각각 할당되어 있다. 이때, '세그먼트 11'은 유효 블록과 무효 블록이 섞여있게 된다. 또한, 도 1 (a)의 '세그먼트 27'에는 파일이 할당된 블록이 없다. 이렇게 파일이 할당된 블록이 없는 무효 블록으로만 이루어진 세그먼트(segment)를 프리 세그먼트(free segment)라고 한다. FIG. 1 (a) is an example of a checkpoint state before garbage collection is performed. 'File A' and 'File B' are allocated to 'Segment 11' included in the conventional log structure file system. At this time, 'segment 11' is a mixture of valid blocks and invalid blocks. In Fig. 1 (a), there is no block to which a file is allocated in 'segment 27'. A segment made up of only invalid blocks that do not have a block allocated to such a file is called a free segment.

도 1의 (b)와 같이, 종래의 로그 구조 파일시스템은 '파일 A' 및 '파일 B'에 각각 할당된 블록을 '세그먼트 27'로 이동하는 가비지 컬렉션을 수행할 수 있다. 그리고 종래의 로그 구조 파일시스템은 기존에 '파일 A' 및 '파일 B'에 할당된 블록을 무효 블록으로 설정할 수 있다. 그러므로 종래의 로그 구조 파일시스템은 새로운 '파일 C'에 포함된 블록 'c1', 'c2' 및 'c3'를 '세그먼트 11'에 첫 번째부터 세 번째 블록에 할당할 수 있다. As shown in FIG. 1B, the conventional log structure file system can perform garbage collection for moving blocks allocated to 'file A' and 'file B', respectively, to 'segment 27'. In the conventional log structure file system, blocks assigned to 'file A' and 'file B' can be set as invalid blocks. Therefore, the conventional log structure file system can allocate the blocks 'c1', 'c2' and 'c3' included in the new 'file C' to the first to third blocks in the 'segment 11'.

이때, '세그먼트 27'로 이동된 메타데이터가 저장되기 전, '세그먼트 11'의 블록에 'c1', 'c2' 및 'c3'이 할당된 상태에서 복구가 요청되면, 기존의 메타데이터에 따라, 종래의 로그 구조 파일시스템은 기존에 할당되었던 '세그먼트 11'에 '파일 A' 및 '파일 B'의 복구를 시도할 수 있다. 이때, 종래의 로그 구조 파일시스템은 '세그먼트 27'이 아닌 이전에 '파일 A' 및 '파일 B'에게 할당되었던 '세그먼트 11'의 블록으로 복구를 수행하므로 복구가 실패하고, 일관성이 깨지게 된다. At this time, if restoration is requested in a state where 'c1', 'c2' and 'c3' are allocated to the block of 'segment 11' before the metadata moved to 'segment 27' is stored, , The conventional log structure file system may attempt to restore 'file A' and 'file B' to the previously allocated 'segment 11'. At this time, since the conventional log structure file system restores to a block of 'segment 11' previously allocated to 'file A' and 'file B' instead of 'segment 27', the recovery fails and the consistency is broken.

다음은 도 2 내지 도 4를 참조하여 본 발명의 일 실시예에 따른 가비지 컬렉션 저널링 장치(200)를 설명한다. Next, a garbage collection journaling apparatus 200 according to an embodiment of the present invention will be described with reference to FIG. 2 to FIG.

도 2는 본 발명의 일 실시예에 따른 가비지 컬렉션 저널링 장치(200)의 블록도이다. 2 is a block diagram of a garbage collection journaling apparatus 200 according to an embodiment of the present invention.

가비지 컬렉션 저널링 장치(200)는 가비지 컬렉션 저널링을 수행하는 파일 시스템을 지원한다. 이때, 파일 시스템은 가비지 컬렉션 저널링 장치(200)에 포함된 운영체제(operating system)에 의해서 실행될 수 있다. 예를 들어, 파일 시스템은 로그 구조 파일 시스템일 수 있다. The garbage collection journaling apparatus 200 supports a file system for performing garbage collection journaling. At this time, the file system may be executed by an operating system included in the garbage collection journaling apparatus 200. [ For example, the file system may be a log-structured file system.

또한, 가비지 컬렉션 저널링 장치(200)는 메모리(210), 스토리지(220) 및 프로세서(230)를 포함한다. In addition, the garbage collection journaling device 200 includes a memory 210, a storage 220, and a processor 230.

메모리(210)는 가비지 컬렉션 저널링 프로그램이 저장된다. 이때, 메모리(210)는 전원이 공급되지 않아도 저장된 정보를 계속 유지하는 비휘발성 저장장치 및 저장된 정보를 유지하기 위하여 전력이 필요한 휘발성 저장장치를 통칭하는 것이다. 메모리(210)에 저장되는 가비지 컬렉션 저널링 프로그램은 운영체제에서 실행하는 시스템 소프트웨어(system software) 또는 응용 소프트웨어(application software)일 수 있다. The memory 210 stores a garbage collection journaling program. At this time, the memory 210 collectively refers to a non-volatile storage device that keeps stored information even when power is not supplied, and a volatile storage device that requires power to maintain stored information. The garbage collection journaling program stored in the memory 210 may be system software or application software executing in the operating system.

스토리지(220)는 데이터를 저장할 수 있다. 이때, 스토리지(220)는 솔리드 스테이트 드라이버(solid state driver) 및 하드디스크 드라이버(hard disk driver) 등과 같은 저장장치(storage device)로 가비지 컬렉션 저널링 장치(200)에 내장될 수 있다. 또한, 스토리지(220)는 가비지 컬렉션 저널링 장치(200)에 컴퓨팅 버스(computing bus) 모듈을 통하여 연결된 저장장치일 수 있다. 또한, 스토리지(220)는 가비지 컬렉션 저널링 장치(200)에 포함된 통신 모듈(미도시)을 통하여 연결된 저장장치 또는 스토리지 서버일 수 있다.The storage 220 may store data. The storage 220 may be embedded in the garbage collection journaling apparatus 200 as a storage device such as a solid state driver and a hard disk driver. The storage 220 may also be a storage device connected to the garbage collection journaling device 200 via a computing bus module. In addition, the storage 220 may be a storage device or a storage server connected through a communication module (not shown) included in the garbage collection journaling device 200.

프로세서(230)는 메모리(210)에 저장된 가비지 컬렉션 저널링 프로그램의 실행에 따라, 파일 시스템에 저장된 희생 블록(victim block)에 대한 가비지 컬렉션이 발생하면, 희생 블록을 프리 블록에 복사한다. 이때, 파일 시스템은 하나 이상의 블록을 포함하는 하나 이상의 세그먼트 및 저널 영역(journal area)을 포함한다. 또한, 파일 시스템은 가비지 컬렉션이 발생할 때, 하나 이상의 희생 블록을 포함할 수 있다. Upon execution of the garbage collection journaling program stored in the memory 210, the processor 230 copies the victim block to the free block when garbage collection for the victim block stored in the file system occurs. At this time, the file system includes one or more segments including one or more blocks and a journal area. In addition, the file system may include one or more victim blocks when garbage collection occurs.

구체적으로 희생 블록은 유효 블록으로 가비지 컬렉션의 대상이 되는 블록을 의미한다. 즉, 희생 블록은 파일에 대하여 파일 시스템에 순차적이지 않게 임의로 할당된 하나 이상의 블록일 수 있다. 희생 블록은 파일 시스템에서 가비지 컬렉션을 수행하게 될 희생 세그먼트에 포함된다. 그리고 희생 블록은 파일 시스템에 포함된 프리 세그먼트의 무효 블록인 프리 블록으로 이동된다. 이때, 희생 블록이 복수개인 경우, 희생 블록이 이동하게 될 블록은 순차적으로 데이터의 이동이 가능한 프리 블록이 될 수 있다. Specifically, the victim block is a valid block, which is a target of garbage collection. That is, the victim block may be one or more blocks arbitrarily allocated to the file, not sequential to the file system. The victim block is included in the victim segment that will perform garbage collection in the file system. Then, the victim block is moved to the free block, which is an invalid block of the free segment included in the file system. In this case, if there are a plurality of sacrificial blocks, the block to which the sacrificial block is to be moved may be a free block capable of sequentially moving data.

희생 블록 및 프리 블록은 동일한 세그먼트에 포함될 수 있으며, 각각 다른 세그먼트에 위치할 수 있다. 또한, 희생 블록 및 프리 블록은 하나 이상의 세그먼트에 나누어져 위치할 수 있다.The sacrificial block and free block may be included in the same segment and may be located in different segments, respectively. Also, the sacrificial block and free block may be located in one or more segments.

그리고 프로세서(230)는 희생 블록을 프리 블록으로 이동한 다음, 희생 블록 및 프리 블록의 주소를 파일 시스템의 저널 영역에 기록한다. 이때, 파일 시스템의 저널 영역은 하나 이상의 저널 블록을 포함할 수 있다. 예를 들어, 프로세서(230)는 파일 시스템의 저널 영역에 포함된 저널 블록에 희생 블록 및 프리 블록의 주소의 쌍(pair)을 기록할 수 있다. 프로세서(230)는 희생 블록을 프리 블록에 모두 이동한 다음, 희생 블록이 이동된 프리 블록을 스토리지(220)에 저장한다. 그리고 스토리지(220)에 희생 블록이 이동된 프리 블록에 대한 저장이 완료되면, 프로세서(230)는 파일 시스템의 저널 영역을 스토리지(220)에 저장한다. 프로세서(230)는 파일 시스템의 저널 영역이 스토리지(220)에 저장된 이후, 희생 블록에 새로운 데이터를 저장할 수 있도록 희생 블록을 무효 블록으로 설정할 수 있다. Then, the processor 230 moves the victim block to the free block, and then writes the addresses of the victim block and the free block in the journal area of the file system. At this time, the journal area of the file system may include one or more journal blocks. For example, the processor 230 may write a pair of addresses of a victim block and a free block in a journal block included in a journal area of the file system. The processor 230 moves all of the victim block to the free block, and then stores the free block in which the victim block is moved in the storage 220. [ When the storage of the free block in which the sacrificial block is moved to the storage 220 is completed, the processor 230 stores the journal area of the file system in the storage 220. The processor 230 may set the victim block into an invalid block so that the journal area of the file system is stored in the storage 220 and the new data can be stored in the victim block.

이와 같이, 프로세서(230)는 희생 블록이 복사된 프리 블록을 스토리지(200)에 저장한 후 파일 시스템의 저널 영역을 스토리지(220)에 저장하고, 파일 시스템의 저널 영역이 스토리지에 저장된 이후 가비지 컬렉션을 수행한 블록에 새로운 데이터를 저장할 수 있다. 그러므로 프로세서(230)는 가비지 컬렉션의 수행 도중에 갑작스러운 정전이나 전원 종료 등에 의해 파일 시스템에 문제가 발생하여 파일 시스템을 복구하더라도 데이터의 일관성을 보장할 수 있다.In this manner, the processor 230 stores the free area in which the sacrificial block is copied in the storage 200, stores the journal area of the file system in the storage 220, and stores the journal area of the file system in the storage after the garbage collection The new data can be stored in the block in which < RTI ID = 0.0 > Therefore, the processor 230 can guarantee the consistency of the data even if the file system is recovered due to a problem in the file system due to sudden power failure or power shutdown during the execution of the garbage collection.

구체적인 가비지 컬렉션 수행 과정은 도 3을 참조하여 설명한다. A specific procedure of performing garbage collection will be described with reference to FIG.

도 3은 본 발명의 일 실시예에 따른 가비지 컬렉션의 예시도이다. 3 is an illustration of garbage collection according to an embodiment of the present invention.

먼저, 가비지 컬렉션을 수행하기 위하여, 프로세서(230)는 파일 시스템에서 희생 세그먼트에 포함된 희생 블록인 '3072', '3073' 및 '3083'에 각각 저장된 블록 'B1' 내지 'B3'을 프리 세그먼트의 무효 블록인 '1536' 내지 '1538' 블록에 순차적으로 할당(P300)할 수 있다. 또한, 프로세서(230)는 도 3과 같이, 파일 시스템의 저널 영역에 희생 블록의 기존 할당 정보 및 가비지 컬렉션 이후 할당 정보를 저장할 수 있다. First, in order to perform garbage collection, the processor 230 divides the blocks 'B1' to 'B3', which are respectively stored in the sacrifice blocks '3072', '3073' (P300) sequentially to the invalid blocks '1536' to '1538'. In addition, the processor 230 may store the existing allocation information of the victim block and the allocation information after the garbage collection in the journal area of the file system, as shown in FIG.

그리고 프로세서(230)는 각각 할당된 블록을 스토리지(220)의 메인 영역에 저장(P310)할 수 있다. 프로세서(230)는 블록이 스토리지(220)의 메인 영역에 저장되면, 스토리지(220)의 파일 시스템의 저널 영역을 스토리지(220)의 메타 영역에 저장(P320)할 수 있다. 예를 들어, 프로세서(230)는 스토리지(220)의 메타 영역에 포함된 저널 영역에 파일 시스템의 저널 영역을 저장할 수 있다. The processor 230 may then store each allocated block in the main area of the storage 220 (P310). The processor 230 may store the journal area of the file system of the storage 220 in the meta area of the storage 220 (P320), if the block is stored in the main area of the storage 220. [ For example, the processor 230 may store the journal area of the file system in the journal area included in the meta area of the storage 220. [

그리고 프로세서(230)는 파일 시스템의 저널 영역이 스토리지(220)의 메타 영역에 저장된 이후, 파일 시스템의 희생 블록을 무효 블록으로 설정할 수 있다. 그리고 프로세서(230)는 희생 블록이 포함되어 있던 희생 세그먼트를 프리 세그먼트로 설정한다. The processor 230 may then set the victim block of the file system to an invalid block after the journal area of the file system is stored in the meta area of the storage 220. [ Then, the processor 230 sets the sacrifice segment including the sacrifice block as a free segment.

또한, 프로세서(230)는 희생 블록 및 프리 블록의 주소를 파일 시스템의 저널 영역에 포함된 저널 블록에 저장한 이후, 희생 블록 및 프리 블록의 주소를 저장한 저널 블록에 체크포인트 버전을 기록할 수 있다. 이때, 체크포인트 버전은 체크포인트가 발생할 때 마다 변경되는 것이다. 즉, 파일 시스템의 저널 영역에 저장되는 체크포인트 버전은 가장 최근에 발생한 체크포인트의 버전이 될 수 있다. 그러므로 프로세서(230)는 파일 시스템의 저널 영역에 저장된 체크포인트 버전을 통하여, 희생 블록 및 프리 블록의 주소가 저장된 시기 및 체크포인트 수행 여부를 확인할 수 있다. In addition, the processor 230 may store the address of the victim block and the free block in the journal block included in the journal area of the file system, and then write the checkpoint version to the journal block storing the addresses of the victim block and the free block. have. At this time, the checkpoint version is changed every time a checkpoint occurs. That is, the version of the checkpoint stored in the journal area of the file system may be the version of the most recent checkpoint. Therefore, the processor 230 can check when the addresses of the victim block and the free block are stored and whether or not the checkpoint is performed through the checkpoint version stored in the journal area of the file system.

한편, 프로세서(230)는 파일 시스템의 저널 영역에 저장할 공간이 부족한 경우, 체크포인트를 수행할 수 있다. 또한, 프로세서(230)는 운영체제 또는 사용자의 요청에 따라, 체크포인트를 수행할 수 있다. 그리고 체크 포인트가 수행되면, 프로세서(230)는 체크포인트의 버전을 업데이트 할 수 있다. On the other hand, the processor 230 can perform a checkpoint when there is insufficient space to store in the journal area of the file system. The processor 230 may also perform a checkpoint at the request of the operating system or user. And when the checkpoint is performed, the processor 230 may update the version of the checkpoint.

프로세서(230)는 파일 시스템의 저널 영역에 복수 개의 저널 블록이 포함된 경우, 가장 처음에 위치한 저널 블록부터 순차적으로 저널 블록에 희생 블록 및 프리 블록의 주소와 체크포인트 버전을 저장할 수 있다. 이때, 저널 블록은 하나 이상의 희생 블록 및 프리 블록의 주소를 포함할 수 있다. 또한, 프로세서(230)는 체크포인트가 발생하면, 다시 복수 개의 저널 블록 중 가장 처음에 위치한 저널 블록부터 순차적으로 저널 블록에 희생 블록 및 프리 블록의 주소를 기록할 수 있다. 구체적인 파일 시스템의 저널 영역 및 저널 블록은 도 4를 참조하여 설명한다. When a plurality of journal blocks are included in the journal area of the file system, the processor 230 may store the addresses of the victim block and the free block and the checkpoint version in the journal block sequentially from the first located journal block. At this time, the journal block may include addresses of one or more of the victim block and the free block. In addition, when a checkpoint occurs, the processor 230 may record the addresses of the victim block and the free block in the journal block sequentially from the first journal block among the plurality of journal blocks. The journal area and journal block of the specific file system will be described with reference to FIG.

도 4는 본 발명의 일 실시예에 따른 파일 시스템의 저널 영역 및 저널 블록의 예시도이다. 4 is an exemplary view of a journal area and a journal block of a file system according to an embodiment of the present invention.

도 4에서 파일 시스템의 저널 영역은 저널 블록 1 내지 저널 블록 3을 포함할 수 있다. 이때, 체크포인트 버전 3에서 프로세스가 체크포인트를 수행하면, 체크포인트 버전은 3에서 4로 업데이트 될 수 있다. In FIG. 4, the journal area of the file system may include journal block 1 to journal block 3. At this time, when the process executes the checkpoint in the checkpoint version 3, the checkpoint version can be updated from 3 to 4.

체크포인트가 수행된 이후, 가비지 컬렉션을 수행하면, 프로세서(230)는 파일 시스템의 저널 영역에 포함된 첫 번째 저널 블록인 '저널 블록 0'에 가비지 컬렉션을 수행하는 희생 블록 및 프리 블록의 주소 쌍을 저장할 수 있다. 그리고 '저널 블록 0'에 현재의 체크포인트 버전인 '체크포인트 버전 4'를 기록할 수 있다. 다시 가비지 컬렉션이 수행되면, 프로세서(230)는 '저널 블록 0' 다음에 위치한 '저널 블록 1'에 희생 블록 및 프리 블록의 주소 쌍을 저장하고, 현재의 체크 포인트 버전인 '체크포인트 버전 4'를 기록할 수 있다. After the checkpoint is performed, when the garbage collection is performed, the processor 230 reads the address pair of the victim block and the free block, which performs garbage collection in 'Journal Block 0', which is the first journal block included in the journal area of the file system, Lt; / RTI > In addition, 'checkpoint version 4' which is the current checkpoint version can be recorded in 'journal block 0'. When the garbage collection is performed again, the processor 230 stores the address pair of the victim block and the free block in 'journal block 1' located after 'journal block 0', and updates the checkpoint version 4 ' Can be recorded.

그러므로 파일 시스템의 저널 영역을 확인하면, 가장 최근의 체크포인트 버전을 저장하는 '저널 블록 0' 및 '저널 블록 1'은 체크포인트가 수행된 이후 다시 기록된 것이며, '저널 블록 2'는 이전 체크포인트 수행 이후 기록된 것임을 확인할 수 있다. Therefore, when confirming the journal area of the file system, 'journal block 0' and 'journal block 1' storing the latest checkpoint version are recorded again after the checkpoint is performed, and 'journal block 2' It can be confirmed that it is recorded after the point execution.

한편, 프로세서(230)는 파일 시스템에 대한 복구 요청이 발생하면, 파일 시스템의 저널 영역에 포함된 하나 이상의 저널 블록 중 마지막에 기록된 체크포인트 버전과 동일한 체크포인트 버전이 기록된 저널 블록을 복구할 수 있다. 즉, 프로세서(230)는 가장 최근 체크포인트가 발생한 이후에 기록된 저널 블록에 기초하여 파일 시스템을 복구할 수 있다.On the other hand, when the recovery request for the file system occurs, the processor 230 recovers the journal block in which the checkpoint version identical to the checkpoint version recorded at the end of one or more journal blocks included in the journal area of the file system is recorded . That is, the processor 230 may recover the file system based on the journal block that was written after the most recent checkpoint occurred.

예를 들어, 다시 도 4를 참조하면, 파일 시스템에 대한 복구 요청이 발생하면 프로세서(230)는 파일 시스템의 저널 영역에 포함된 3개의 저널 블록에 대한 체크포인트 버전을 확인할 수 있다. 이때, 마지막으로 저장된 체크포인트 버전이 '체크포인트 버전 4'이라면, 프로세서(230)는 체크포인트 버전이 '체크포인트 버전 4'인 '저널 블록 0' 및 '저널 블록 1'을 복구 대상으로 선택할 수 있다. 그리고 프로세서(230)는 선택된 저널 블록에 기초하여 복구를 수행할 수 있다. For example, referring back to FIG. 4, when a recovery request for a file system occurs, the processor 230 can check the checkpoint version of three journal blocks included in the journal area of the file system. At this time, if the last stored checkpoint version is 'checkpoint version 4', the processor 230 can select 'journal block 0' and 'journal block 1' having checkpoint version 'checkpoint version 4' have. The processor 230 may then perform recovery based on the selected journal block.

다음은 도 5 및 도 6을 참조하여, 가비지 컬렉션 저널링 장치(200)의 가비지 컬렉션 저널링 방법을 설명한다. Next, a garbage collection journaling method of the garbage collection journaling apparatus 200 will be described with reference to FIGS. 5 and 6. FIG.

도 5는 본 발명의 일 실시예에 따른 가비지 컬렉션 저널링 장치(200)의 가비지 컬렉션 저널링 방법의 순서도이다. 5 is a flowchart of a garbage collection journaling method of the garbage collection journaling apparatus 200 according to an embodiment of the present invention.

가비지 컬렉션 저널링 장치(200)는 하나 이상의 희생 블록에 대한 가비지 컬렉션이 발생하면, 희생 블록을 프리 블록에 복사한다(S500). 이때, 희생 블록은 사용자의 파일이 할당된 블록이며, 순차적으로 할당되지 않은 블록이 될 수 있다. 그리고 프리 블록은 희생 블록을 순차적으로 할당할 수 있는 무효 블록을 의미할 수 있다. 또한, 희생 블록 및 프리 블록은 스토리지(220)의 파일 시스템에 포함될 수 있다. When the garbage collection for one or more sacrificial blocks occurs, the garbage collection journaling device 200 copies the sacrificial blocks to the free blocks (S500). At this time, the victim block is a block to which the user's file is allocated, and may be a block that is not sequentially allocated. And the free block may mean an invalid block that can sequentially allocate a victim block. In addition, the victim block and free block may be included in the file system of the storage 220.

가비지 컬렉션 저널링 장치(200)는 희생 블록의 주소 및 프리 블록의 주소를 파일 시스템의 저널 영역에 기록한다(S510). 그리고 가비지 컬렉션 저널링 장치(200)는 희생 블록의 주소 및 프리 블록의 주소를 파일 시스템의 저널 영역에 기록한 다음, 체크포인트 버전을 파일 시스템의 저널 영역에 기록할 수 있다(S520). 이때, 파일 시스템의 저널 영역은 하나 이상의 저널 블록을 포함할 수 있다. 저널 블록은 희생 블록의 주소 및 프리 블록의 주소를 쌍으로 기록할 수 있다. 또한, 저널 블록은 희생 블록의 주소 및 프리 블록의 주소를 저장한 이후, 체크포인트 버전을 기록할 수 있다. The garbage collection journaling apparatus 200 records the address of the victim block and the address of the free block in the journal area of the file system (S510). Then, the garbage collection journaling apparatus 200 may write the address of the victim block and the address of the free block in the journal area of the file system, and then write the check point version to the journal area of the file system (S520). At this time, the journal area of the file system may include one or more journal blocks. The journal block can record the address of the victim block and the address of the free block in pairs. Further, the journal block can record the checkpoint version after storing the address of the victim block and the address of the free block.

가비지 컬렉션 저널링 장치(200)는 희생 블록 및 프리 블록의 주소를 파일 시스템의 저널 영역에 기록한 이후, 희생 블록이 복사된 프리 블록을 스토리지(220)에 저장한다(S540). After the garbage collection journaling apparatus 200 records the addresses of the victim block and the free block in the journal area of the file system, the free block in which the victim block is copied is stored in the storage 220 (S540).

그리고 가비지 컬렉션 저널링 장치(200)는 희생 블록이 복사된 프리 블록을 스토리지(220)에 저장한 이후, 파일 시스템의 저널 영역을 스토리지(220)에 저장한다(S530). 그리고 가비지 컬렉션 저널 장치(200)는 파일 시스템의 저널 영역이 스토리지(220)에 저장된 이후, 가비지 컬렉션이 수행된 희생 블록에 새로운 데이터를 저장할 수 있다. The garbage collection journaling apparatus 200 stores the copied free block in the storage 220, and then stores the journal area of the file system in the storage 220 (S530). The garbage collection journal apparatus 200 may store new data in the victim block in which the garbage collection has been performed since the journal area of the file system is stored in the storage 220.

이러한 과정을 통하여 본 발명의 일 실시예에 따른 가비지 컬렉션 저널링 장치(200)는 희생 블록이 복사된 프리 블록을 스토리지(200)에 저장한 후 파일 시스템의 저널 영역을 스토리지에 저장하고, 파일 시스템의 저널 영역이 스토리지(220)에 저장된 이후 가비지 컬렉션을 수행한 블록에 새로운 데이터를 저장할 수 있다. 그러므로 가비지 컬렉션 저널링 장치(200)는 가비지 컬렉션의 수행 도중에 갑작스러운 정전이나 전원 종료 등에 의해 파일 시스템의 문제가 발생하여 복구하더라도 데이터의 일관성을 보장할 수 있다.Through the above process, the garbage collection journaling apparatus 200 according to an embodiment of the present invention stores the free block in which the victim block is copied in the storage 200, stores the journal area of the file system in the storage, After the journal area is stored in the storage 220, new data can be stored in the block in which garbage collection has been performed. Therefore, the garbage collection journaling apparatus 200 can guarantee the consistency of data even if a problem occurs in the file system due to abrupt power failure or power shutdown during garbage collection.

도 6은 본 발명의 일 실시예에 따른 가비지 컬렉션 저널링 장치(200)의 파일 시스템 복구 방법의 순서도이다. 6 is a flowchart of a file system recovery method of a garbage collection journaling apparatus 200 according to an embodiment of the present invention.

파일 시스템에 대한 복구 요청이 발생하면(S600), 가비지 컬렉션 저널링 장치(200)는 파일 시스템의 저널 영역에 포함된 하나 이상의 저널 블록에 대하여 파일 시스템에 마지막으로 기록된 체크 포인트의 버전과 동일한 체크포인트 버전의 저널 블록을 선택할 수 있다. If a recovery request for the file system occurs (S600), the garbage collection journaling device 200 checks the same checkpoint as the version of the last recorded checkpoint in the file system for one or more journal blocks included in the journal area of the file system Version of the journal block.

그리고 가비지 컬렉션 저널링 장치(200)는 선택된 저널 블록에 기초하여 복구를 수행할 수 있다(S610). Then, the garbage collection journaling apparatus 200 can perform restoration based on the selected journal block (S610).

본 발명의 일 실시예에 따른 가비지 컬렉션 저널링 장치(200) 및 방법은 메타데이터 수정 지연 기법을 적용하는 로그 구조 파일 시스템에서 가비지 컬렉션이 수행될 때, 체크포인트 대신 가비지 컬렉션을 수행하므로 일관성을 보장할 수 있다. 그리고 가비지 컬렉션 저널링 장치(200) 및 방법은 파일 시스템의 모든 수정된 메타데이터를 기록하는 종래의 체크포인트와 달리, 메타데이터에 포함된 선택된 몇 개의 저널 블록만 기록하므로, 가비지 컬렉션 수행 시 쓰기 비용을 줄일 수 있다. 그러므로 가비지 컬렉션 저널링 장치(200) 및 방법은 가비지 컬렉션이 수행되는 동안 지연될 수 있는 사용자의 쓰기 요청의 대기 시간이 감소할 수 있으므로, 스토리지(220)에 대한 쓰기 성능이 증가될 수 있다. The garbage collection journaling apparatus 200 and method according to an embodiment of the present invention perform garbage collection instead of a check point when performing garbage collection in a log structure file system applying the metadata modification delay technique, . Unlike the conventional checkpoint for recording all the modified metadata of the file system, the garbage collection journaling apparatus 200 and method record only a few selected journal blocks included in the metadata, Can be reduced. Thus, the garbage collection journaling device 200 and method may reduce the latency of a user's write request that may be delayed while garbage collection is performed, thereby increasing write performance for the storage 220. [

본 발명의 일 실시예는 컴퓨터에 의해 실행되는 프로그램 모듈과 같은 컴퓨터에 의해 실행가능한 명령어를 포함하는 기록 매체의 형태로도 구현될 수 있다. 컴퓨터 판독 가능 매체는 컴퓨터에 의해 액세스될 수 있는 임의의 가용 매체일 수 있고, 휘발성 및 비휘발성 매체, 분리형 및 비분리형 매체를 모두 포함한다. 또한, 컴퓨터 판독가능 매체는 컴퓨터 저장 매체 및 통신 매체를 모두 포함할 수 있다. 컴퓨터 저장 매체는 컴퓨터 판독가능 명령어, 데이터 구조, 프로그램 모듈 또는 기타 데이터와 같은 정보의 저장을 위한 임의의 방법 또는 기술로 구현된 휘발성 및 비휘발성, 분리형 및 비분리형 매체를 모두 포함한다. 통신 매체는 전형적으로 컴퓨터 판독가능 명령어, 데이터 구조, 프로그램 모듈, 또는 반송파와 같은 변조된 데이터 신호의 기타 데이터, 또는 기타 전송 메커니즘을 포함하며, 임의의 정보 전달 매체를 포함한다. One embodiment of the present invention may also be embodied in the form of a recording medium including instructions executable by a computer, such as program modules, being executed by a computer. Computer readable media can be any available media that can be accessed by a computer and includes both volatile and nonvolatile media, removable and non-removable media. In addition, the computer-readable medium can include both computer storage media and communication media. Computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Communication media typically includes any information delivery media, including computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave, or other transport mechanism.

본 발명의 방법 및 시스템은 특정 실시예와 관련하여 설명되었지만, 그것들의 구성 요소 또는 동작의 일부 또는 전부는 범용 하드웨어 아키텍쳐를 갖는 컴퓨터 시스템을 사용하여 구현될 수 있다.While the methods and systems of the present invention have been described in connection with specific embodiments, some or all of those elements or operations may be implemented using a computer system having a general purpose hardware architecture.

전술한 본 발명의 설명은 예시를 위한 것이며, 본 발명이 속하는 기술분야의 통상의 지식을 가진 자는 본 발명의 기술적 사상이나 필수적인 특징을 변경하지 않고서 다른 구체적인 형태로 쉽게 변형이 가능하다는 것을 이해할 수 있을 것이다. 그러므로 이상에서 기술한 실시예들은 모든 면에서 예시적인 것이며 한정적이 아닌 것으로 이해해야만 한다. 예를 들어, 단일형으로 설명되어 있는 각 구성 요소는 분산되어 실시될 수도 있으며, 마찬가지로 분산된 것으로 설명되어 있는 구성 요소들도 결합된 형태로 실시될 수 있다.It will be understood by those skilled in the art that the foregoing description of the present invention is for illustrative purposes only and that those of ordinary skill in the art can readily understand that various changes and modifications may be made without departing from the spirit or essential characteristics of the present invention. will be. It is therefore to be understood that the above-described embodiments are illustrative in all aspects and not restrictive. For example, each component described as a single entity may be distributed and implemented, and components described as being distributed may also be implemented in a combined form.

본 발명의 범위는 상기 상세한 설명보다는 후술하는 특허청구범위에 의하여 나타내어지며, 특허청구범위의 의미 및 범위 그리고 그 균등 개념으로부터 도출되는 모든 변경 또는 변형된 형태가 본 발명의 범위에 포함되는 것으로 해석되어야 한다.The scope of the present invention is defined by the appended claims rather than the detailed description and all changes or modifications derived from the meaning and scope of the claims and their equivalents are to be construed as being included within the scope of the present invention do.

200: 가비지 컬렉션 저널링 장치
210: 메모리
220: 스토리지
230: 프로세서
200: Garbage collection journaling device
210: memory
220: Storage
230: Processor

Claims (10)

가비지 컬렉션 저널링 장치에 있어서,
스토리지,
가비지 컬렉션 저널링 프로그램이 저장된 메모리 및
상기 프로그램을 실행하는 프로세서를 포함하고,
상기 프로세서는 상기 프로그램의 실행에 따라, 하나 이상의 희생 블록에 대한 가비지 컬렉션이 발생하면, 상기 희생 블록을 프리 블록에 복사하고,
상기 희생 블록의 주소 및 상기 프리 블록의 주소를 저널 영역에 기록하며,
상기 프리 블록으로의 복사가 완료된 이후, 상기 복사가 완료된 프리 블록을 상기 스토리지에 저장하고, 상기 복사가 완료된 프리 블록의 저장이 완료되면 상기 저널 영역을 상기 저장장치에 저장하되,
상기 스토리지는 파일 시스템을 포함하고,
상기 파일 시스템은 상기 희생 블록, 상기 프리 블록 및 상기 저널 영역을 포함하는, 가비지 컬렉션 저널링 장치.
A garbage collection journaling apparatus,
storage,
The memory in which the garbage collection journaling program is stored
And a processor for executing the program,
Wherein, when the garbage collection for one or more victim blocks occurs, the processor copies the victim block to a free block,
The address of the victim block and the address of the free block in the journal area,
Wherein the controller is configured to store the copied free block in the storage after the copying to the free block is completed and store the journal area in the storage when the copying of the completed free block is completed,
Wherein the storage comprises a file system,
Wherein the file system comprises the victim block, the free block and the journal area.
제 1 항에 있어서,
상기 프로세서는 상기 희생 블록의 주소 및 상기 프리 블록의 주소를 상기 저널 영역에 저장한 이후, 상기 저널 영역에 체크포인트 버전을 기록하는, 가비지 컬렉션 저널링 장치.
The method according to claim 1,
Wherein the processor records the address of the victim block and the address of the free block in the journal area and then writes the checkpoint version in the journal area.
제 1 항에 있어서,
상기 프로세서는 상기 저널 영역에 기록할 공간이 부족한 경우, 체크포인트를 수행하고, 체크포인트 버전을 업데이트하고, 상기 업데이트된 체크포인트 버전을 상기 파일 시스템에 기록하는, 가비지 컬렉션 저널링 장치.
The method according to claim 1,
Wherein the processor performs a checkpoint, updates a checkpoint version, and writes the updated checkpoint version to the file system if there is insufficient space to write to the journal area.
제 1 항에 있어서,
상기 저널 영역은 하나 이상의 저널 블록을 포함하는, 가비지 컬렉션 저널링 장치.
The method according to claim 1,
Wherein the journal area comprises one or more journal blocks.
제 4 항에 있어서,
상기 프로세서는 체크포인트를 수행한 이후에 가비지 컬렉션이 발생하면,
상기 하나 이상의 저널 블록 중 가장 처음에 위치한 저널 블록부터 순차적으로 상기 희생 블록의 주소 및 상기 프리 블록의 주소를 기록하는, 가비지 컬렉션 저널링 장치.
5. The method of claim 4,
If garbage collection occurs after performing the checkpoint,
Wherein the address of the victim block and the address of the free block are sequentially recorded sequentially from a journal block located at the beginning of the one or more journal blocks.
제 4 항에 있어서,
상기 프로세서는 상기 파일 시스템에 대한 복구 요청이 발생하면, 상기 하나 이상의 저널 블록 중 상기 파일 시스템에 마지막으로 기록된 체크포인트 버전과 동일한 체크포인트 버전이 기록된 저널 블록을 복구하는, 가비지 컬렉션 저널링 장치.
5. The method of claim 4,
Wherein the processor recovers, when a recovery request for the file system occurs, a journal block in which a checkpoint version identical to a checkpoint version lastly recorded in the file system of the one or more journal blocks is recorded.
가비지 컬렉션 저널링 장치의 가비지 컬렉션 저널링 방법에 있어서,
(a) 하나 이상의 희생 블록에 대한 가비지 컬렉션이 발생함에 따라, 상기 희생 블록을 프리 블록에 복사하는 단계;
(b) 상기 희생 블록의 주소 및 상기 프리 블록의 주소를 저널 영역에 기록하는 단계;
(c) 상기 (b) 단계 이후, 상기 희생 블록이 복사된 프리 블록을 상기 스토리지에 저장하는 단계; 및
(d) 상기 (c) 단계 이후, 상기 저널 영역을 상기 스토리지에 저장하는 단계를 포함하되,
상기 스토리지는 파일 시스템을 포함하고,
상기 파일 시스템은 상기 희생 블록, 상기 프리 블록 및 상기 저널 영역을 포함하는, 가비지 컬렉션 저널링 방법.
A garbage collection journaling method of a garbage collection journaling apparatus,
(a) copying the victim block to a free block as garbage collection for one or more victim blocks occurs;
(b) recording an address of the victim block and an address of the free block in a journal area;
(c) after the step (b), storing the copied free block in the storage; And
(d) after the step (c), storing the journal area in the storage,
Wherein the storage comprises a file system,
Wherein the file system comprises the victim block, the free block and the journal area.
제 7 항에 있어서,
상기 (b) 단계 이후, 상기 (c) 단계 이전에
(e) 상기 저널 영역에 체크포인트 버전을 기록하는 단계를 더 포함하는, 가비지 컬렉션 저널링 방법.
8. The method of claim 7,
After the step (b), before the step (c)
(e) recording a checkpoint version in the journal area.
제 7 항에 있어서,
(f) 상기 파일 시스템에 대한 복구 요청이 발생하면, 상기 저널 영역에 포함된 하나 이상의 저널 블록에 대하여 상기 파일 시스템에 마지막으로 기록된 체크포인트의 버전과 동일한 체크포인트 버전이 기록된 저널 블록을 복구하는 단계를 더 포함하는, 가비지 컬렉션 저널링 방법.
8. The method of claim 7,
(f) when a recovery request for the file system occurs, for a journal block included in the journal area, a journal block in which a checkpoint version identical to a version of a checkpoint lastly recorded in the file system is recorded, The garbage collection method further comprising:
제 7 항 내지 제 9 항 중 어느 한 항에 기재된 방법을 컴퓨터 상에서 수행하기 위한 프로그램을 기록한 컴퓨터 판독 가능한 기록 매체.A computer-readable recording medium recording a program for performing the method according to any one of claims 7 to 9 on a computer.
KR1020150092703A 2015-06-30 2015-06-30 Apparatus and method for journaling based on garbage collection KR101738965B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020150092703A KR101738965B1 (en) 2015-06-30 2015-06-30 Apparatus and method for journaling based on garbage collection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020150092703A KR101738965B1 (en) 2015-06-30 2015-06-30 Apparatus and method for journaling based on garbage collection

Publications (2)

Publication Number Publication Date
KR20170002848A true KR20170002848A (en) 2017-01-09
KR101738965B1 KR101738965B1 (en) 2017-05-23

Family

ID=57811380

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020150092703A KR101738965B1 (en) 2015-06-30 2015-06-30 Apparatus and method for journaling based on garbage collection

Country Status (1)

Country Link
KR (1) KR101738965B1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101863206B1 (en) * 2017-05-16 2018-05-31 성균관대학교산학협력단 Buffer pool management device and buffer pool mananging method
KR101880190B1 (en) 2017-03-20 2018-07-20 성균관대학교산학협력단 Solid state drive and block attribute indicating method performed by the same
US20220197862A1 (en) * 2020-12-17 2022-06-23 SK Hynix Inc. Journaling apparatus and method in a non-volatile memory system
US11449421B2 (en) 2019-12-20 2022-09-20 SK Hynix Inc. Memory system, memory controller and method for minimizing data loss using recovery operations in sudden power loss events

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102578191B1 (en) 2018-04-09 2023-09-14 에스케이하이닉스 주식회사 Data Storage Device and Operation Method Optimized for Recovery Performance, Storage System Having the Same

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101475483B1 (en) * 2013-06-27 2014-12-19 이화여자대학교 산학협력단 Apparatus and method for united data management for non-volatile buffer cache and non-volatile storage

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101880190B1 (en) 2017-03-20 2018-07-20 성균관대학교산학협력단 Solid state drive and block attribute indicating method performed by the same
KR101863206B1 (en) * 2017-05-16 2018-05-31 성균관대학교산학협력단 Buffer pool management device and buffer pool mananging method
US11449421B2 (en) 2019-12-20 2022-09-20 SK Hynix Inc. Memory system, memory controller and method for minimizing data loss using recovery operations in sudden power loss events
US20220197862A1 (en) * 2020-12-17 2022-06-23 SK Hynix Inc. Journaling apparatus and method in a non-volatile memory system
US11704281B2 (en) * 2020-12-17 2023-07-18 SK Hynix Inc. Journaling apparatus and method in a non-volatile memory system

Also Published As

Publication number Publication date
KR101738965B1 (en) 2017-05-23

Similar Documents

Publication Publication Date Title
US7650533B1 (en) Method and system for performing a restoration in a continuous data protection system
JP5346536B2 (en) Information backup / restore processing device and information backup / restore processing system
US9235524B1 (en) System and method for improving cache performance
US8627012B1 (en) System and method for improving cache performance
US7325159B2 (en) Method and system for data recovery in a continuous data protection system
US10599337B2 (en) Method and device for writing data and acquiring data in a distributed storage system
US10430285B2 (en) Backing up metadata
KR101738965B1 (en) Apparatus and method for journaling based on garbage collection
US8261030B2 (en) Using delete notifications to free related storage resources
US9335931B2 (en) System and method for making snapshots of storage devices
US7849257B1 (en) Method and apparatus for storing and retrieving data
US9740569B2 (en) Head start population of an image backup
US20040103104A1 (en) Snapshot creating method and apparatus
US20090216973A1 (en) Computer system, storage subsystem, and data management method
US9798623B2 (en) Using cache to manage errors in primary storage
US20140173226A1 (en) Logical object deletion
US8255641B2 (en) Modifying delete notifications in a storage stack
US8156300B2 (en) Delete notifications for an entire storage volume
JP4561168B2 (en) Data processing system and method, and processing program therefor
JP2006268139A (en) Data reproduction device, method and program and storing system
US8019953B2 (en) Method for providing atomicity for host write input/outputs (I/Os) in a continuous data protection (CDP)-enabled volume using intent log
JP2007249573A (en) Storage system for issuing optimum i/o command to automatically expandable volume and its control method
US8938641B2 (en) Method and apparatus for synchronizing storage volumes
US20090094299A1 (en) Apparatus and method for defragmenting files on a hydrid hard disk
US9053033B1 (en) System and method for cache content sharing

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20200217

Year of fee payment: 4