KR102033323B1 - Method for storing metadata of log-structured file system for flash memory - Google Patents

Method for storing metadata of log-structured file system for flash memory Download PDF

Info

Publication number
KR102033323B1
KR102033323B1 KR1020140026166A KR20140026166A KR102033323B1 KR 102033323 B1 KR102033323 B1 KR 102033323B1 KR 1020140026166 A KR1020140026166 A KR 1020140026166A KR 20140026166 A KR20140026166 A KR 20140026166A KR 102033323 B1 KR102033323 B1 KR 102033323B1
Authority
KR
South Korea
Prior art keywords
record
checkpoint
segment
information
file system
Prior art date
Application number
KR1020140026166A
Other languages
Korean (ko)
Other versions
KR20150104434A (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 KR1020140026166A priority Critical patent/KR102033323B1/en
Priority to US14/609,058 priority patent/US9563375B2/en
Publication of KR20150104434A publication Critical patent/KR20150104434A/en
Application granted granted Critical
Publication of KR102033323B1 publication Critical patent/KR102033323B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • G06F3/0619Improving the reliability of storage systems in relation to data integrity, e.g. data losses, bit errors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1847File system types specifically adapted to static storage, e.g. adapted to flash memory or SSD
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • G06F3/0617Improving the reliability of storage systems in relation to availability
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]

Abstract

본 발명은 로그 구조 파일시스템(LFS; Log-structured File System)의 데이터 저장 방법에 관한 것으로, 세그먼트 요약 정보(SS)와 세그먼트 사용 정보(SU)를 별도로 저장하지 않고 체크포인트를 기록시 체크포인트 레코드에 포함시켜 기록함으로써 플래시 페이지에 기록해야 하는 메타데이터의 개수를 줄여 플래시 메모리에 대한 쓰기 성능을 높일 수 있는 방법에 관한 것이다.The present invention relates to a method for storing data in a Log-structured File System (LFS), and includes a checkpoint record when recording a checkpoint without separately storing segment summary information (SS) and segment usage information (SU). The present invention relates to a method of improving the write performance of a flash memory by reducing the number of metadata that must be written to a flash page by writing the data in a recorded file.

Description

플래시 메모리에서 사용하는 로그 구조 파일시스템의 메타데이터 저장 방법{Method for storing metadata of log-structured file system for flash memory}Method for storing metadata of log-structured file system for flash memory}

본 발명은 로그 구조 파일시스템(LFS; Log-structured File System)의 데이터 저장 방법에 관한 것으로, 보다 상세하게는 플래시 페이지에 기록해야 하는 메타데이터의 개수를 줄여 플래시 메모리에 대한 쓰기 성능을 높일 수 있는 방법에 관한 것이다.The present invention relates to a data storage method of a log-structured file system (LFS), and more particularly, to improve the write performance of a flash memory by reducing the number of metadata to be written to a flash page. It is about a method.

플래시 메모리는 가격이 저렴하고 소비전력이 적으며 크기가 작기 때문에 다양한 임베디드 시스템에서 저장장치로 널리 사용되고 있다.Flash memory is widely used as a storage device in various embedded systems because of its low cost, low power consumption and small size.

특히, 널리 사용되는 플래시 메모리의 종류 중 하나인 NAND 플래시 메모리는 여러 개의 삭제 단위 블록(erase block)으로 구성되며, 각 삭제 단위 블록은 여러 개의 페이지(page)로 구성된다. 또한, 최근 그 사용이 증가하는 라지 블록(Large Block) NAND 플래시 메모리의 경우, 페이지 하나의 크기는 2KB이며 64개의 페이지가 모여 1개의 삭제 단위 블록을 구성한다.In particular, the NAND flash memory, which is one of the widely used types of flash memory, is composed of several erase unit blocks, and each erase unit block is composed of several pages. In addition, in the case of a large block NAND flash memory, which has recently increased in use, one page is 2KB in size and 64 pages are collected to form one erase unit block.

플래시 메모리에는 읽기(Read), 쓰기(Write), 삭제(Erase) 3가지 동작 수행이 가능하다. 읽기/쓰기는 페이지 단위로 이루어지는데 쓰기를 프로그램(program)이라고 한다. 한번 프로그램 된 페이지를 다시 프로그램하기 위해서는 먼저 그 페이지가 속한 삭제 단위 블록 전체를 삭제(erase)해야 하는데, 삭제 동작은 읽기/쓰기에 비해 매우 많은 시간이 걸린다. 또한 각 삭제 단위 블록은 삭제 가능한 횟수에 제한이 있어 삭제 횟수가 한계에 도달하면 해당 삭제 단위 블록은 사용할 수 없게 된다. 더 이상 쓸 수 없게 된 삭제 단위 블록은 배드 블록(bad block)에 해당한다. 따라서 각 삭제 단위 블록들이 골고루 이용되도록 하는 웨어 레벨링(wear-leveling)이 이루어져야 플래시 메모리의 충분한 수명을 확보할 수 있다.Flash memory can perform three operations: Read, Write, and Erase. Read / write is made up of pages, and writing is called a program. To reprogram a page once programmed, the entire erase unit block to which the page belongs must be erased, which takes much longer than read / write. In addition, each deletion unit block has a limit on the number of times that can be deleted, and when the number of deletions reaches the limit, the corresponding deletion unit block cannot be used. Delete unit blocks that are no longer usable correspond to bad blocks. Therefore, wear-leveling to ensure that each erase unit block is used evenly can ensure sufficient lifespan of the flash memory.

이처럼, 플래시 메모리는 한번 데이터가 기록된 영역에 다시 기록하려면 처리 시간이 오래 소모되는 문제와 플래시 메모리의 블록은 사용될수록 점점 마모되어 한계에 다다르면 쓸 수 없게 되는 문제점이 존재한다. 따라서, 플래시 메모리의 상위의 계층에 해당하는 파일 시스템에서 특정 동작을 수행하여 데이터를 처리함으로써 위와 같은 문제점을 해결하는 방식이 제시되었다.As described above, there is a problem in that a flash memory requires a long processing time to rewrite the data once recorded, and a block of the flash memory becomes more worn as it is used and becomes unusable when the limit is reached. Accordingly, a method of solving the above problem by processing a data by performing a specific operation in a file system corresponding to a higher layer of a flash memory has been proposed.

플래시 메모리에 사용되는 대표적인 파일 시스템으로는 로그 구조 파일시스템(Log-structured File System)이 있다. 로그 구조 파일시스템은 저장 공간을 하나의 로그로 보고 파일시스템의 메타데이터와 데이터를 모두 로그에 순차적으로 기록하는 방식으로 데이터를 저장한다.The typical file system used for flash memory is the Log-structured File System. Log Structure The file system stores data in a way that sees the storage space as a single log and records both the metadata and data of the file system in a log.

이러한 로그 구조 파일시스템으로는 로그 구조 파일시스템(LFS)을 Sprite 운영체제에서 구현한 Sprite LFS, Sprite LFS의 구조를 FTL(Flash Translation Layer) 기반 플래시 저장장치에 사용하기 적합하도록 개량한 F2FS(Flash-Friendly File System), 스냅샵(snapshot) 기능을 제공하는 NILFS2(New Implementation of a Log-structured File System) 등이 있다.These log structure file systems include the Sprite LFS, which implements the Log Structure File System (LFS) in the Sprite operating system, and the F2FS (Flash-Friendly), which is adapted to use the Sprite LFS structure for FTL (Flash Translation Layer) based flash storage. File System) and the New Implementation of a Log-structured File System (NILFS2), which provides snapshot capabilities.

한국공개특허 10-2012-0072228Korea Patent Publication 10-2012-0072228

본 발명의 실시 예는 파일시스템을 일관성 있는 상태로 만들기 위해 필요한 쓰기 횟수를 줄여줌으로써 파일시스템의 쓰기 성능을 높일 수 있는 방법을 제공하고자 한다.An embodiment of the present invention is to provide a method that can increase the write performance of the file system by reducing the number of writes required to make the file system a consistent state.

본 발명의 일 실시 예에 따른 파일시스템의 메타데이터 저장 방법은 기록해야 할 정보가 저장될 블록을 할당하는 단계, 할당된 블록에 대한 세그먼트 요약 정보(SS) 레코드를 생성하여 임시 리스트에 기록하는 단계, 상기 세그먼트 요약 정보 레코드가 생성된 블록들이 위치하는 세그먼트에 대한 세그먼트 사용 정보(SU) 레코드를 생성하여 상기 임시 리스트에 기록하는 단계, 상기 임시 리스트에 기록된 상기 세그먼트 요약 정보 레코드와 상기 세그먼트 사용 정보 레코드 중 적어도 어느 하나를 체크포인트 레코드에 포함시키는 단계 및 상기 체크포인트 레코드를 할당된 위치에 기록하는 단계를 포함할 수 있다.The metadata storage method of the file system according to an embodiment of the present invention comprises the steps of: allocating a block to store information to be recorded, generating a segment summary information (SS) record for the allocated block, and recording the temporary list; Generating a segment usage information (SU) record for the segment in which the blocks in which the segment summary information record is generated are recorded in the temporary list, the segment summary information record and the segment usage information recorded in the temporary list; And including at least one of the records in a checkpoint record and recording the checkpoint record at an assigned location.

본 발명의 다른 실시 예에 따른 파일시스템의 메타데이터 저장 방법은 기록해야 할 정보가 저장될 블록을 할당하는 단계, 할당된 블록에 대한 세그먼트 요약 정보(SS) 레코드 및 상기 세그먼트 요약 정보 레코드가 생성된 블록들이 위치하는 세그먼트에 대한 세그먼트 사용 정보(SU) 레코드를 생성하는 단계 및 상기 세그먼트 요약 정보 레코드와 상기 세그먼트 사용 정보 레코드를 중 적어도 어느 하나를 체크포인트 레코드에 포함시켜 기 할당된 위치에 기록하는 단계를 포함할 수 있다.According to another aspect of the present invention, there is provided a method of storing metadata in a file system, the method comprising: allocating a block to store information to be recorded, a segment summary information (SS) record for the allocated block, and the segment summary information record. Generating a segment usage information (SU) record for the segment in which the blocks are located; and including at least one of the segment summary information record and the segment usage information record in a checkpoint record and recording it in a pre-assigned position It may include.

본 발명의 실시 예는 파일시스템을 일관성 있는 상태로 만들기 위해 필요한 쓰기 횟수를 줄여줌으로써 파일시스템의 쓰기 성능을 높일 수 있다.The embodiment of the present invention can increase the write performance of the file system by reducing the number of writes necessary to bring the file system to a consistent state.

도 1은 본 발명의 일 실시 예에 따른 저장 공간의 구조를 나타내는 도면.
도 2a는 본 발명의 일 실시 예에 따른 블록별 세그먼트 요약 정보(SS) 엔트리의 구조를 나타내는 도면.
도 2b는 도 1a의 SS 엔트리들이 테이블 형태로 구성된 모습을 보여주는 도면.
도 3a는 본 발명의 일 실시 예에 따른 세그먼트 사용 정보(SU) 엔트리의 구조를 나타내는 도면.
도 3b는 도 3a의 SU 엔트리들이 테이블 형태로 구성된 모습을 보여주는 도면.
도 4a는 본 발명의 일 실시 예에 따른 체크포인트 레코드의 구조를 나타내는 도면.
도 4b와 도 4c는 각각 체크포인트 레코드의 SS/SU 레코드 리스트에 포함되는 SS 레코드 및 SU 레코드의 구조를 나타내는 도면.
도 5는 파일시스템이 체크포인트 레코드를 기록하는 과정을 설명하기 위한 순서도.
도 6 및 도 7은 복수의 체크포인트 세그먼트들을 이용하여 체크포인트 레코드를 기록하는 방법을 설명하기 위한 도면들.
도 8은 구 버전의 체크포인트 레코드를 지울 때 지워질 체크포인트 레코드에 포함된 SS 레코드와 SU 레코드들을 세그먼트 요약 정보와 세그먼트 사용 정보에 반영하는 과정을 설명하기 위한 순서도.
도 9는 본 발명의 일 실시 예로서 NILFS2 파일시스템에서 메타데이터 파일의 구조를 나타내는 도면.
도 10은 본 발명의 일 실시 예로서 NILFS2 파일시스템에서 저장 공간의 구조를 나타내는 도면.
도 11은 본 발명의 일 실시 예에 따른 메타데이터 동기화 과정을 나타내는 도면.
도 12는 본 발명의 다른 실시 예로서 F2FS 파일시스템에서 저장 공간의 구조를 나타내는 도면.
도 13은 본 발명의 다른 실시 예에 따른 메타데이터 동기화 과정을 나타내는 도면.
1 is a view showing the structure of a storage space according to an embodiment of the present invention.
FIG. 2A is a diagram illustrating a structure of block-by-block segment summary information (SS) entries according to an embodiment of the present invention. FIG.
FIG. 2B is a diagram illustrating the SS entries of FIG. 1A configured in a table form. FIG.
3A is a diagram illustrating a structure of a segment usage information (SU) entry according to an embodiment of the present invention.
FIG. 3B is a diagram showing the SU entries of FIG. 3A configured in a table form. FIG.
4A illustrates the structure of a checkpoint record in accordance with one embodiment of the present invention.
4B and 4C are diagrams illustrating structures of an SS record and an SU record included in the SS / SU record list of the checkpoint record, respectively.
5 is a flowchart for explaining a process in which a file system writes a checkpoint record.
6 and 7 illustrate a method of recording a checkpoint record using a plurality of checkpoint segments.
FIG. 8 is a flowchart illustrating a process of reflecting SS records and SU records included in a checkpoint record to be deleted in segment summary information and segment usage information when the old version of the checkpoint record is deleted.
9 illustrates a structure of a metadata file in a NILFS2 file system as an embodiment of the present invention.
FIG. 10 illustrates a structure of a storage space in a NILFS2 file system as an embodiment of the present invention. FIG.
11 illustrates a metadata synchronization process according to an embodiment of the present invention.
12 illustrates a structure of a storage space in an F2FS file system as another embodiment of the present invention.
13 is a diagram illustrating a metadata synchronization process according to another embodiment of the present invention.

이하, 첨부된 도면들을 참조하여 본 발명의 바람직한 실시 예를 보다 상세하게 설명한다. 이에 앞서, 본 명세서 및 청구범위에 사용된 용어나 단어는 통상적이거나 사전적인 의미로 한정해서 해석되어서는 아니 되며, 발명자는 그 자신의 발명을 가장 최선의 방법으로 설명하기 위해 용어의 개념을 적절하게 정의할 수 있다는 원칙에 입각하여 본 발명의 기술적 사상에 부합하는 의미와 개념으로 해석되어야만 한다. 따라서, 본 명세서에 기재된 실시 예와 도면에 도시된 구성은 본 발명의 가장 바람직한 일 실시 예에 불과할 뿐이고 본 발명의 기술적 사상을 모두 대변하는 것은 아니므로, 본 출원시점에 있어서 이들을 대체할 수 있는 다양한 균등물과 변형 예들이 있을 수 있음을 이해하여야 한다.Hereinafter, with reference to the accompanying drawings will be described in detail a preferred embodiment of the present invention. Prior to this, terms or words used in the present specification and claims should not be construed as being limited to the common or dictionary meanings, and the inventors should properly explain the concept of terms in order to best explain their own invention. Based on the principle that can be defined, it should be interpreted as meaning and concept corresponding to the technical idea of the present invention. Therefore, the embodiments described in the specification and the drawings shown in the drawings are only the most preferred embodiments of the present invention and do not represent all of the technical idea of the present invention, various modifications that can be replaced at the time of the present application It should be understood that there may be equivalents and variations.

도 1은 본 발명의 일 실시 예에 따른 저장 공간의 구조를 나타내는 도면이다.1 is a view showing the structure of a storage space according to an embodiment of the present invention.

본 발명의 일 실시 예에 따른 파일시스템은 데이터와 데이터에 대응되는 메타데이터를 저장 공간에 저장한다. 이때, 메타데이터는 아이노드 정보와 체크포인트 정보를 포함하며, 가비지 콜렉션(garbage collection)을 위한 세그먼트 요약 정보(SS; Segment Summary)와 세그먼트 사용 정보(SU; Segment Usage)를 포함한다.The file system according to an embodiment of the present invention stores data and metadata corresponding to the data in a storage space. In this case, the metadata includes inode information and checkpoint information, and includes segment summary information (SS) and segment usage information (SU) for garbage collection.

저장 공간은 세그먼트 단위로 구분되며 각 세그먼트는 블록 단위로 나뉜다. 이때, 세그먼트/블록의 크기는 플래시 메모리의 제거 블록/페이지(Erase block/page) 크기에 맞추는 것이 바람직하다. 예컨대, 페이지 크기는 2KB이고 제거 블록(erase block) 크기는 128KB인 라지 블록(Large Block) NAND 플래시 메모리의 경우, 블록 크기는 2KB로 할 수 있으며 세그먼트 크기는 128KB로 할 수 있다.Storage space is divided into segments, and each segment is divided into blocks. In this case, the size of the segment / block is preferably matched to the size of an erase block / page of the flash memory. For example, a large block NAND flash memory having a page size of 2 KB and an erase block size of 128 KB may have a block size of 2 KB and a segment size of 128 KB.

메타데이터 중 아이노드 정보는 파일을 나타내는 아이노드에 접근하기 위한 정보들로, 종래의 파일시스템에서 사용된 아이노드 정보들 중 어떤 것을 사용하여도 무방하다. 예컨대, 본 실시 예에서의 아이노드 정보는 Sprite LFS의 inode map, F2FS의 NAT 또는 NILFS2의 IFILE 중 어떤 것을 사용해도 상관없다.Inode information in metadata is information for accessing an inode representing a file, and any of inode information used in a conventional file system may be used. For example, the inode information in this embodiment may use any of an inode map of a Sprite LFS, a NAT of F2FS, or an IFILE of NILFS2.

도 2a는 본 발명의 일 실시 예에 따른 블록별 세그먼트 요약 정보(SS) 엔트리의 구조를 나타내는 도면이며, 도 2b는 도 2a의 SS 엔트리들이 테이블(SS 테이블) 형태로 구성된 모습을 보여주는 도면이다.FIG. 2A is a diagram illustrating a structure of segment summary information (SS) entries for each block according to an embodiment of the present invention, and FIG. 2B is a diagram illustrating SS entries of FIG. 2A configured in a table (SS table) form.

세그먼트 요약 정보(SS)는 세그먼트 내 각 블록마다 하나씩 존재하는 블록별 SS 엔트리를 포함한다. 각 블록별 SS 엔트리는 아이노드 번호 및 파일 블록 번호를 포함한다. 이때, 파일 블록 번호는 해당 블록이 파일의 어느 부분을 구성하는지 예컨대 파일 내에서 몇 번째 블록인지를 나타내는 정보이다. 즉 파일 블록 번호는 세그먼트를 구성하는 각 블록의 번호를 의미하는 것이 아니다. 세그먼트 요약 정보(SS)는 이러한 블록별 SS 엔트리들이 모여서 도 2b에서와 같이 테이블을 이룬 것이다. 이때, 테이블에서 순서를 나타내는 인덱스가 블록 번호에 해당한다. 따라서, 본 실시 예에서의 SS 엔트리는 블록 번호를 별도로 포함하지 않는다.Segment summary information (SS) includes a block-specific SS entry, one for each block in the segment. The SS entry for each block includes an inode number and a file block number. At this time, the file block number is information indicating which part of the file the block constitutes, for example, the number of blocks within the file. That is, the file block number does not mean the number of each block constituting the segment. Segment summary information (SS) is a group of these SS entries for each block to form a table as shown in Figure 2b. At this time, the index indicating the order in the table corresponds to the block number. Therefore, the SS entry in this embodiment does not include the block number separately.

도 3a는 본 발명의 일 실시 예에 따른 세그먼트 사용 정보(SU) 엔트리의 구조를 나타내는 도면이며, 도 3b는 도 3a의 SU 엔트리들이 테이블(SU 테이블) 형태로 구성된 모습을 보여주는 도면이다.FIG. 3A is a diagram illustrating a structure of a segment usage information (SU) entry according to an embodiment of the present invention, and FIG. 3B is a diagram illustrating the SU entries of FIG. 3A configured in a table (SU table) form.

세그먼트 사용 정보(SU)는 각 세그먼트마다 하나씩 존재하는 SU 엔트리를 포함한다. SU 엔트리는 세그먼트 내 유효 블록 수 및 세그먼트에 마지막으로 기록한 시간에 대한 정보를 포함한다. 이때, 세그먼트 내 유효 블록 수는 말 그대로 세그먼트 내에서 유효한 블록의 수를 나타낸다. 예컨대, 어떤 파일이 변경되어 예전 블록이 유효하지 않게 되었다면, 해당 블록이 포함된 세그먼트의 이 필드(세그먼트 내 유효 블록 수) 값이 감소하게 된다. 세그먼트 사용 정보는 이러한 SU 엔트리들이 모여서 도 3b에서와 같이 테이블을 이룬 것이다. 이때, 테이블에서 순서를 나타내는 인덱스가 세그먼트 번호에 해당한다. 따라서, 본 실시 예에서의 SU 엔트리는 세그먼트 번호를 별도로 포함하지 않는다.The segment usage information SU includes one SU entry that exists for each segment. The SU entry contains information about the number of valid blocks in the segment and the last time recorded in the segment. At this time, the effective number of blocks in the segment literally represents the number of valid blocks in the segment. For example, if a file is changed and the old block becomes invalid, the value of this field (the number of valid blocks in the segment) of the segment including the block is decreased. Segment usage information is a collection of these SU entries to form a table as in FIG. 3B. At this time, the index indicating the order in the table corresponds to the segment number. Therefore, the SU entry in this embodiment does not include the segment number separately.

도 4a는 본 발명의 일 실시 예에 따른 체크포인트 레코드의 구조를 나타내는 도면이며, 도 4b와 도 4c는 각각 체크포인트 레코드의 SS/SU 레코드 리스트에 포함되는 SS 레코드 및 SU 레코드의 구조를 나타내는 도면이다.4A is a diagram illustrating a structure of a checkpoint record according to an embodiment of the present invention, and FIGS. 4B and 4C are diagrams illustrating structures of an SS record and a SU record included in an SS / SU record list of a checkpoint record, respectively. to be.

체크포인트의 기록 단위는 체크포인트 레코드이며, 체크포인트 레코드 하나는 이를 저장하기 위한 저장 공간으로 블록 하나를 차지한다. 각 체크포인트 레코드는 체크포인트 정보 및 SS/SU 레코드 리스트를 포함한다.The record unit of a checkpoint is a checkpoint record, and one checkpoint record occupies one block as storage space for storing it. Each checkpoint record includes checkpoint information and a list of SS / SU records.

체크포인트 정보는 어느 레코드가 최신의 것인지 구별할 수 있도록 체크포인트 기록 시간 또는 버전(version) 정보(예컨대, 버전 넘버)를 포함한다. 버전 넘버는 매 기록시마다 하나씩 증가하는 카운터이다.The checkpoint information includes checkpoint write time or version information (e.g., version number) to distinguish which record is up to date. The version number is a counter that increments by one for each record.

SS/SU 레코드 리스트는 SS 레코드와 SU 레코드들이 리스트에 도착한 순서대로 하나씩 저장되어 리스트화된 정보이다. 이때, SS 레코드는 도 4b와 같이 레코드 타입, 블록 번호, 아이노드 번호 및 파일 블록 번호를 포함하며, SU 레코드는 도 4c와 같이 레코드 타입, 세그먼트 번호, 세그먼트 내 유효 블록 수 및 세그먼트 기록 시간을 포함한다. 즉, SS 레코드는 도 2a의 SS 엔트리에 레코드 타입과 블록 번호를 추가한 구조를 가지며, SU 레코드는 도 3a의 SU 엔트리에 레코드 타입과 세그먼트 번호를 추가한 구조를 갖는다. 레코드 타입은 SS 레코드와 SU 레코드를 구분하기 위한 정보이다. 따라서, SS/SU 레코드 리스트 필드에 SS 레코드와 SU 레코드가 모두 포함되는 경우에는 레코드 타입에 대한 정보가 필요하나, SS 레코드 또는 SU 레코드 중 어느 하나만 포함된다면 레코드 타입에 대한 정보는 필요하지 않다. The SS / SU record list is information stored and listed one by one in the order in which the SS records and the SU records arrive in the list. In this case, the SS record includes a record type, a block number, an inode number, and a file block number, as shown in FIG. 4B, and the SU record includes a record type, a segment number, an effective number of blocks in a segment, and a segment recording time, as shown in FIG. 4C. do. That is, the SS record has a structure in which a record type and a block number are added to the SS entry of FIG. 2A, and the SU record has a structure in which a record type and segment number are added to the SU entry of FIG. 3A. The record type is information for distinguishing the SS record and the SU record. Therefore, when both the SS record and the SU record are included in the SS / SU record list field, information about the record type is required. However, if only one of the SS record and the SU record is included, the information about the record type is not necessary.

도 5는 파일시스템이 체크포인트 레코드를 기록하는 과정을 설명하기 위한 순서도이다.5 is a flowchart illustrating a process in which a file system records a checkpoint record.

사용자 응용 프로그램 등의 입출력(I/O) 요청에 따라 기록해야 할 데이터가 발생하면 운영체제 내부의 별도의 프로세스는 파일시스템에 해당 데이터를 저장장치에 기록해달라고 요청한다(단계 402).When data to be recorded occurs in response to an input / output (I / O) request of a user application program, a separate process in the operating system requests the file system to record the data in the storage device (step 402).

파일시스템은 프로세스의 요청에 따라 해당 데이터를 저장할 저장 위치를 결정한다(단계 404). 즉, 파일시스템은 블록 번호를 할당한다.The filesystem determines a storage location to store the data at the request of the process (step 404). That is, the file system allocates a block number.

블록 번호가 할당되면, 파일시스템은 도 4b와 같은 SS 레코드를 생성(단계 406)한 후 이를 임시 SS/SU 레코드 리스트의 끝에 추가한다(단계 408).If a block number is assigned, the file system generates an SS record as shown in FIG. 4B (step 406) and adds it to the end of the temporary SS / SU record list (step 408).

다음에, 파일시스템은 SS 레코드가 생성된 블록들이 위치한 세그먼트를 파악하여 도 4c와 같은 SU 레코드를 생성(단계 410)한 후 생성된 SU 레코드를 임시 SS/SU 레코드 리스트의 끝에 추가한다(단계 412).Next, the file system identifies the segment in which the blocks in which the SS record is generated are located and generates a SU record as shown in FIG. 4C (step 410), and then adds the generated SU record to the end of the temporary SS / SU record list (step 412). ).

SS 레코드와 SU 레코드를 생성한 블록들은 저장장치에 기록된다. The blocks that generate the SS record and the SU record are written to storage.

다음에 사용자 응용 프로그램이 sync() 시스템 콜을 호출하는 등 체크포인트를 기록해야 하는 상황이 발생하면(단계 414), 파일시스템은 임시 SS/SU 레코드 리스트의 크기와 체크포인트 레코드 안에서 SS/SU 레코드 리스트로 사용 가능한 공간(블록 크기에서 체크포인트 정보를 제외한 나머지 공간)의 크기를 확인하여 임시 SS/SU 레코드 리스트에 있는 레코드들을 모두 체크포인트 레코드에 기록할 수 있는지 여부를 확인한다(단계 416).The next time a user application needs to write a checkpoint, such as by calling the sync () system call (step 414), the filesystem will determine the size of the temporary SS / SU record list and the SS / SU record within the checkpoint record. The size of the space available as a list (space except the checkpoint information in the block size) is checked to determine whether all records in the temporary SS / SU record list can be recorded in the checkpoint record (step 416).

단계 416에서, SS/SU 레코드 리스트로 사용 가능한 공간이 임시 SS/SU 레코드 리스트의 크기보다 크면, 파일시스템은 임시 SS/SU 레코드 리스트에 있는 레코드들을 모두 체크포인트 레코드에 포함시킨다(단계 418).In step 416, if the space available for the SS / SU record list is larger than the size of the temporary SS / SU record list, the filesystem includes all records in the temporary SS / SU record list in the checkpoint record (step 418).

그러나 단계 416에서, SS/SU 레코드 리스트로 사용 가능한 공간이 임시 SS/SU 레코드 리스트의 크기보다 크지 않으면, 파일시스템은 기록할 수 없는 양 즉 체크포인트 레코드에 포함시킬 수 없는 양만큼 임시 SS/SU 레코드 리스트의 앞 부분에서 떼어내어 세그먼트 요약 정보(SS) 및 세그먼트 사용 정보(SU)에 직접 반영하고 나머지 부분을 체크포인트 레코드에 포함시킨다(단계 420).However, in step 416, if the space available for the SS / SU record list is not larger than the size of the temporary SS / SU record list, the file system cannot write the temporary SS / SU by an amount that cannot be included in the checkpoint record. It is removed from the beginning of the record list and directly reflected in the segment summary information SS and the segment usage information SU, and the remaining part is included in the checkpoint record (step 420).

다음에, 파일시스템은 체크포인트 레코드의 체크포인트 정보 필드에 버전 넘버 또는 현재 시간(기록 시간)을 기입한다(단계 422).Next, the file system writes the version number or the current time (recording time) in the checkpoint information field of the checkpoint record (step 422).

다음에, 파일시스템은 체크포인트 레코드를 할당된 위치에 기록(단계 424)한 후 임시 SS/SU 레코드 리스트를 초기화한다(단계 426).Next, the file system writes the checkpoint record to the assigned location (step 424) and then initializes the temporary SS / SU record list (step 426).

도 6 및 도 7은 복수의 체크포인트 세그먼트들을 이용하여 체크포인트 레코드를 기록하는 방법을 설명하기 위한 도면들이다.6 and 7 are diagrams for describing a method of recording a checkpoint record using a plurality of checkpoint segments.

파일시스템은 체크포인트 저장 공간으로 최소 2개 이상의 세그먼트들을 사용할 수 있다. 즉, 체크포인트는 파일시스템 마운트를 위해 매우 중요한 정보이기 때문에, 파일시스템은 2개 이상의 NAND 플래시 메모리 제거 블록(erase block)에 체크포인트 정보가 기록되도록 하여 하나의 제거 블록에 문제가 생기더라도 다른 제거 블록에 기록된 체크포인트를 사용할 수 있도록 할 수 있다.The filesystem can use at least two segments for checkpoint storage. In other words, because checkpoints are very important information for filesystem mounts, the filesystem ensures that checkpoint information is written to two or more NAND flash memory erase blocks so that even if one erase block fails, the other removes it. You can use checkpoints written in blocks.

체크포인트 레코드를 저장하기 위해 사용되는 세그먼트는 체크포인트 세그먼트라고 부른다. 체크포인트 기록 단위인 체크포인트 레코드는 블록 하나를 차지한다. 파일시스템은 체크포인트 기록이 필요할 때 마다 선택된 체크포인트 세그먼트의 첫 번째 블록부터 차례대로 체크포인트 레코드가 기록된다. 이때, 각 체크포인트 레코드에는 어느 것이 최신의 레코드인지 구별할 수 있도록 버전 넘버(매 기록 시마다 하나씩 증가하는 카운터) 또는 체크포인트 기록 시간이 반드시 포함된다.The segment used to store the checkpoint record is called the checkpoint segment. A checkpoint record, which is a checkpoint record unit, occupies one block. Whenever a checkpoint record is required, the filesystem writes the checkpoint record in order, starting with the first block of the selected checkpoint segment. At this time, each checkpoint record must include a version number (counter that increments by one for each write) or checkpoint write time to distinguish which is the latest record.

그런데, 체크포인트 세그먼트를 위해 예약된 공간은 한계가 있으므로 사용하다 보면 사용 가능 공간이 고갈될 수 있다. 따라서, 파일시스템은 구 버전의 체크포인트 레코드를 삭제하면서 사용해야 한다. 그러나 구 버전의 레코드를 그냥 삭제하면 SS 레코드와 SU 레코드에 대한 변경 내용들이 소실되므로, 파일시스템은 삭제하기 전에 해당 체크포인트 레코드에 포함된 SS 레코드와 SU 레코드들의 내용을 각각 도 2b의 세그먼트 요약 정보(SS)와 도 3b의 세그먼트 사용 정보(SU)에 반영한다.However, since the space reserved for the checkpoint segment is limited, the available space may be exhausted when used. Therefore, the filesystem should be used while deleting older versions of checkpoint records. However, if you simply delete the old version of the record, the changes you made to the SS and SU records are lost, so the filesystem will display the contents of the SS and SU records contained in that checkpoint record before deleting them. (SS) and the segment usage information SU of FIG. 3B.

파일시스템이 구 버전의 레코드를 삭제(제거)하는 방법으로는 다음과 같은 2가지 방법이 사용될 수 있다.There are two ways that the filesystem deletes (removes) older versions of records.

도 6은 본 발명의 일 실시 예에 따른 구 버전의 체크포인트 레코드를 삭제하는 방법을 설명하기 위한 도면이다.6 is a diagram for describing a method of deleting an old version of a checkpoint record according to an embodiment of the present invention.

파일시스템은 사용하던 체크포인트 세그먼트 내 블록이 바닥나면 다른 세그먼트에 기록하기 시작한다. 이때, 파일시스템은 새로 기록을 시작한 체크포인트용 세그먼트의 블록이 바닥나기 전에 이전에 사용했던 세그먼트들을 모두 비운다.The filesystem starts writing to another segment when the block in the checkpoint segment in use runs out. At this point, the filesystem flushes all previously used segments before the block of the checkpoint segment that has just started recording runs out.

예컨대, 도 6에서와 같이, 체크포인트 레코드를 저장하기 위해 2개의 세그먼트들이 사용되고 각 세그먼트는 4개의 블록으로 구성된 경우, 파일시스템은 첫 번째 세그먼트(Segment 1)의 블록이 모두 바닥나면 두 번째 세그먼트(Segment 2)에 기록을 시작한다. 이때, 도 6에서 박스(블록) 안의 숫자는 버전 넘버를 의미한다.For example, as shown in FIG. 6, when two segments are used to store a checkpoint record and each segment is composed of four blocks, the file system is configured to have a second segment (if the first segment (segment 1) runs out of blocks). Start recording in Segment 2). In this case, the number in the box (block) in FIG. 6 means a version number.

파일시스템은 두 번째 세그먼트의 블록이 모두 사용되기 전에 첫 번째 세그먼트를 모두 비운 후 두 번째 세그먼트가 모두 차면 다시 첫 번째 세그먼트에 기록을 시작한다.The filesystem empties all of the first segment before all the blocks in the second segment are used up, and then starts writing back to the first segment when the second segment fills up.

마찬가지로, 파일시스템은 첫 번째 세그먼트의 블록이 모두 사용되기 전에 다시 두 번째 세그먼트를 모두 삭제한다.Similarly, the filesystem deletes all the second segment again before all the blocks of the first segment are used up.

도 7은 본 발명의 다른 실시 예에 따른 구 버전의 체크포인트 레코드를 삭제하는 방법을 설명하기 위한 도면이다.7 is a diagram for describing a method of deleting an old version of a checkpoint record according to another embodiment of the present invention.

도 7의 실시 예에서는 도 6의 실시 예에서와 같이 이전에 사용했던 세그먼트의 레코드들을 모두 미리 삭제하는 것이 아니라 오래된 레코드부터 차례대로 덮어쓰기를 하는 방법이다. 즉, 파일시스템은 두 번째 세그먼트도 모두 차게 되면, 첫 번째 세그먼트에서 제일 오래된 레코드부터 덮어쓰기를 시작한다. 본 실시 예는 덮어쓰기를 하기 때문에 파일시스템 하위에 FTL이 있는 경우에만 사용이 가능한 방법이다.In the embodiment of FIG. 7, as in the embodiment of FIG. 6, the records of the previously used segments are not deleted beforehand, but the old records are sequentially overwritten. In other words, if the filesystem fills up the second segment, it will start overwriting the oldest record in the first segment. In this embodiment, since the overwrite is performed, the method can be used only when there is an FTL under the file system.

도 8은 도 6 또는 도 7에서와 같이 구 버전의 체크포인트 레코드를 삭제할 때 삭제될 체크포인트 레코드에 포함된 SS 레코드와 SU 레코드를 세그먼트 요약 정보(SS)와 세그먼트 사용 정보(SU)에 반영하는 과정을 설명하기 위한 순서도이다.FIG. 8 reflects the SS record and the SU record included in the checkpoint record to be deleted when the old version of the checkpoint record is deleted in the segment summary information SS and the segment usage information SU, as shown in FIG. 6 or 7. This is a flowchart to explain the process.

삭제 대상 체크포인트 레코드들에 대해 기록된 순서대로 예컨대 레코드 안의 버전 넘버나 기록 시간을 기준으로 먼저 기록된 것부터 차례대로 다음 단계들을 진행한다.For the checkpoint records to be deleted, the following steps are performed in order from the first recorded based on the version number or the recording time in the record, for example.

먼저, 파일시스템은 각 체크포인트 레코드를 준비한다(단계 802).First, the file system prepares each checkpoint record (step 802).

이를 위해, 파일시스템은 상술한 체크포인트 레코드 기록 과정에서 기록 후에 체크포인트 레코드를 메모리상에 따로 두었다면 그것을 가져오고 그렇지 않았다면 해당 체크포인트 레코드를 저장장치에서 읽어 들인다.To do this, the file system imports a checkpoint record in memory after writing in the above-described checkpoint record writing process, and reads the checkpoint record from storage if it does not.

다음에, 파일시스템은 각 체크포인트 레코드의 SS/SU 레코드 리스트 필드에 있는 SS 레코드와 SU 레코드를 동기화 리스트의 끝에 추가한다(단계 804).The file system then adds the SS record and the SU record in the SS / SU record list field of each checkpoint record to the end of the synchronization list (step 804).

다음에, 파일시스템은 동기화 리스트의 앞부분에서 부터 차례대로 SS 레코드 또는 SU 레코드에 포함된 레코드 타입과 블록 번호 또는 세그먼트 번호를 확인한다(단계 806).The file system then checks the record type and block number or segment number included in the SS record or SU record in order from the beginning of the synchronization list (step 806).

즉, 파일시스템은 해당 레코드가 SS 레코드인 경우에는 레코드 타입과 블록 번호를 확인하고, SU 레코드인 경우에는 레코드 타입과 세그먼트 번호를 확인한다. 이를 통해, 파일시스템은 해당 SS 레코드 또는 SU 레코드가 도 2b 또는 도 3b의 테이블 상에서 몇 번째 엔트리에 대한 것인지 알 수 있다.In other words, if the record is an SS record, the file system checks the record type and block number. If the record is an SU record, the file system checks the record type and the segment number. Through this, the file system can know what number of entries the corresponding SS record or SU record is in the table of FIG. 2B or 3B.

다음에, 파일시스템은 기록할 레코드의 엔트리 정보를 SS 테이블 또는 SU 테이블에서 해당 블록 번호 또는 세그먼트 번호에 대응되는 엔트리에 덮어쓴다(단계 808).Next, the file system overwrites the entry information of the record to be recorded with the entry corresponding to the corresponding block number or segment number in the SS table or the SU table (step 808).

예컨대, 해당 레코드가 SS 레코드인 경우, 파일시스템은 SS 레코드의 아이노드 번호와 파일 블록 번호를 도 2b의 SS 테이블에서 해당 블록 번호(단계 806에서 확인된 블록 번호)에 대응되는 아이노드 번호와 파일 블록 번호에 덮어쓴다.
For example, if the record is an SS record, the file system assigns the inode number and file block number of the SS record to the inode number and file corresponding to the corresponding block number (block number identified in step 806) in the SS table of FIG. 2B. Overwrite the block number.

<실시 예 1><Example 1>

상술한 본 발명의 실시 예를 아이노드 정보, 체크포인트 정보, 세그먼트 요약 정보, 세그먼트 사용 정보를 가지는 로그 구조 파일시스템(LFS)에 적용할 경우 어떻게 동작할지를 간단한 시나리오에 기반하여 설명하면 다음과 같다.When the above-described embodiment of the present invention is applied to a log structure file system (LFS) having inode information, checkpoint information, segment summary information, and segment usage information, it will be described based on a simple scenario as follows.

이때, 대상 환경과 가상의 LFS의 구조는 다음과 같다.At this time, the structure of the target environment and the virtual LFS is as follows.

- 저장장치: NAND 플래시 메모리(FTL이 없는)Storage: NAND flash memory (no FTL)

- 파일 인덱스: 아이노드 포인터 구조File index: inode pointer structure

- 아이노드 정보: 아이노드 테이블/비트맵-Inode Information: Inode Table / Bitmap

- 전체 메타데이터 구성: NILFS2와 같이 파일에 메타데이터를 포함시키며, 메타데이터 파일은 도 9와 같이 IFILE, SUFILE 2개로 나누어 사용됨-Complete Metadata Configuration: Metadata is included in the file like NILFS2, and metadata file is divided into IFILE and SUFILE as shown in FIG.

저장 공간은 도 10와 같이 구분되며, 상자 안의 번호는 세그먼트 번호를 의미한다.The storage space is divided as shown in FIG. 10, and the number in the box means the segment number.

이때, 슈퍼블록은 체크포인트 영역에 대한 정보, SUFILE 아이노드 영역에 대한 정보, 로그 영역에 대한 정보(로그 영역이 시작되는 위치)를 저장하는 영역으로, 파일시스템 포맷 시에 기록되며 일반적인 파일시스템 사용 중에는 사용되지 않는 그렇지만 중요한 정보들을 담는 영역이다. 이러한 슈퍼블록은 1개 세그먼트가 할당된다.In this case, the superblock stores information about the checkpoint area, information about the SUFILE inode area, and information about the log area (where the log area starts). Is an area that contains important information that is not used. This superblock is allocated one segment.

체크포인트 영역은 본 발명에서 체크포인트 세그먼트로 사용되는 영역이다. 메타데이터가 파일로 기록되기 때문에 체크포인트 레코드의 체크포인트 정보에는 IFILE에 대한 아이노드를 포함한다. 체크포인트 영역은 2개의 세그먼트가 할당된다.The checkpoint area is an area used as a checkpoint segment in the present invention. Because the metadata is written to a file, the checkpoint information in the checkpoint record includes the inode for the IFILE. The checkpoint area is allocated two segments.

SUFILE 체크포인트 영역은 SUFILE에 대한 체크포인트가 기록되는 영역이다. 본 실시 예에서는 세그먼트 사용 정보를 IFILE에서 분리해 별도의 파일로 만들기 때문에 SUFILE도 체크포인트가 필요한 것이다. SUFILE의 아이노드 자체에 버전 넘버 또는 기록 시간을 포함하면 그게 바로 SUFILE 체크포인트 레코드가 된다. 이 영역의 운용도 체크포인트 저장 공간 운용 방식에 따라 운용하면 된다. SUFILE 체크포인트 영역은 2개 세그먼트가 할당된다.The SUFILE checkpoint area is an area where a checkpoint for SUFILE is recorded. In this embodiment, since the segment usage information is separated from the IFILE into a separate file, SUFILE also needs a checkpoint. If you include a version number or record time in the SUFILE's inode itself, that's the SUFILE checkpoint record. This area can be operated according to the checkpoint storage method. The SUFILE checkpoint area is allocated two segments.

로그는 메타데이터 파일 및 일반 파일을 구성하는 블록들이 쓰여지는 공간으로, 앞의 3개의 영역(슈퍼블록, 체크포인트 영역, SUFILE 체크포인트 영역)에 쓰이는 것들을 제외한 나머지 공간을 포함한다.The log is a space in which the blocks constituting the metadata file and the general file are written, and includes the remaining space except those used in the first three areas (super block, checkpoint area, and SUFILE checkpoint area).

아래의 설명에서는, 설명의 편의를 위해 체크포인트 레코드에 세그먼트 사용 정보(SU) 만을 포함시키는 경우에 대해 설명하며, 세그먼트는 4개의 블록들로 구성되었다고 가정한다. 또한, 파일시스템 포맷이 완료되어 도 10과 같이 저장 공간이 배분되고, 메타데이터 파일이 이미 로그에 다 기록된 후 정상적으로 일반 파일들이 기록된 상황을 가정한다. 이러한 상황에서 이미 존재하는 파일들의 내용이 일부 변경되는 경우에 대해 설명한다.In the following description, for convenience of description, a case in which only the segment usage information SU is included in the checkpoint record will be described. It is assumed that the segment is composed of four blocks. In addition, it is assumed that the file system format is completed and the storage space is allocated as shown in FIG. 10, and the normal files are normally recorded after the metadata file has already been recorded in the log. In this situation, the contents of the existing files are partially changed.

단계 1.Step 1.

파일 A에 대한 변경 내역을 저장장치에 쓰도록 요청이 수신되면, 이로 인해 도 11a에서와 같이 4개의 데이터 블록과 1개 인덱스 블록을 써야 하는 상황이 발생하게 된다. 도 11a에서, A'가 기록된 블록들 중 점으로 표시된 블록이 데이터 블록을 나타내며, 일 방향의 빗금으로 표시된 블록이 인덱스 블록을 나타낸다.When a request is received to write the change history of the file A to the storage device, this causes a situation in which four data blocks and one index block need to be written as shown in FIG. 11A. In FIG. 11A, a block indicated by a dot among blocks in which A ′ is written represents a data block, and a block indicated by hatching in one direction represents an index block.

이에 따라, 세그먼트 요약 정보(SS)에 대한 변경 사항 4개와 아이노드 A에 대한 변경 사항이 발생하지만, 파일시스템은 이를 일단 메모리 상에만 표시해 둔다.As a result, four changes to the segment summary information (SS) and four changes to Inode A occur, but the file system displays them in memory only once.

단계 2.Step 2.

다음에 파일 B에 대한 변경 내역을 저장장치에 쓰도록 요청이 수신되면, 이로 인해 도 11b에서와 같이 2개의 데이터 블록과 1개 인덱스 블록을 써야 하는 상황이 발생하게 된다. 도 11b에서, B'가 기록된 블록들 중 점으로 표시된 블록이 데이터 블록을 나타내며, 일 방향의 빗금으로 표시된 블록이 인덱스 블록을 나타낸다.Next, when a request is received to write the change history for the file B to the storage device, this causes a situation in which two data blocks and one index block need to be written as shown in FIG. 11B. In FIG. 11B, a block indicated by a dot among blocks in which B 'is written represents a data block, and a block indicated by hatching in one direction represents an index block.

이에 따라 세그먼트 요약 정보(SS)에 대한 변경 사항 2개와 아이노드 B에 대한 변경 사항이 발생하지만, 파일시스템은 마찬가지로 이를 일단 메모리 상에만 표시해 둔다.This results in two changes to the SSS and two changes to Inode B, but the filesystem likewise only displays them in memory once.

단계 3.Step 3.

파일시스템의 일관성(consistency)을 유지하기 위한 전체 동기화 요청이 수신되면, 도 11c에서와 같이 파일시스템은 앞서 발생한 파일 A와 B에 대한 아이노드 변경 내역 2건을 IFILE의 아이노드 테이블에 반영하기 위해 IFILE의 블록 2개를 사용한다. 또한 앞서 발생한 세그먼트 요약 정보(SS)에 대한 변경 내역 8건을 IFILE의 세그먼트 요약 정보(SS) 부분에 반영하기 위해 IFILE의 블록 1개를 사용한다.When the entire synchronization request is received to maintain the consistency of the file system, as shown in FIG. 11C, the file system reflects the two inode changes for the files A and B previously generated in the inode table of the IFILE. Use two blocks of IFILE. In addition, one block of the IFILE is used to reflect eight changes in the segment summary information (SS) that occurred earlier in the segment summary information (SS) portion of the IFILE.

도 11c의 Segment X+2에서, 첫 번째와 두 번째 블록 부분은 아이노드 테이블 변경 부분을 의미하며, 세 번째 블록 부분은 세그먼트 사용 정보 변경 부분을 의미한다.In Segment X + 2 of FIG. 11C, the first and second block parts mean an inode table change part, and the third block part means segment use information change part.

임시 SU 레코드 리스트의 SU 레코드 2건은 체크포인트 레코드 안에 삽입되어 체크포인트 기록 시에 저장된다. 이를 위해 체크포인트 영역에는 도 11d에서와 같이 변경사항이 생긴다.Two SU records in the temporary SU record list are inserted into the checkpoint record and stored at checkpoint write. To this end, changes are made to the checkpoint region as shown in FIG. 11D.

도 11d에서, 숫자 5는 버전 넘버를 의미하는 것으로, 해당 블록에 5번 버전 체크포인트 레코드가 기록된다.In FIG. 11D, the number 5 means the version number, and a version 5 checkpoint record is recorded in the block.

상술한 실시 예에서, 단계 1 ~ 3을 수행하면서 메타데이터 동기화를 위해 총 4개의 블록이 사용되었다. 만약, 세그먼트 사용 정보(SU) 변경에 대해 본 발명을 적용하지 않았다면 SUFILE에 반영하느라 블록 1개가 소모되고, SUFILE 아이노드를 저장하기 위해 세그먼트 3, 4번에서 1개 블록을 또 사용하여야 하므로 2개 블록을 더 기록하게 되었을 것이다. 특정 응용 프로그램들은 이런 동기화 요청을 자주하는데 그럴수록 본 발명을 적용한 경우와 그렇지 않은 경우는 쓰기 성능에서 큰 차이를 보이게 될 것이다.
In the above-described embodiment, a total of four blocks are used for metadata synchronization while performing steps 1 to 3. If the present invention is not applied to the change of the segment usage information (SU), one block is consumed to reflect in the SUFILE, and two blocks must be used again in segments 3 and 4 to store the SUFILE inode. You might have written more blocks. Certain applications frequently make these synchronization requests, so the difference between the application of this invention and the case of non-application will be a big difference.

<실시 예 2><Example 2>

상술한 실시 예 1에서는 FTL이 없는 NAND 플래시 메모리를 사용하는 상황을 대상으로 본 발명을 적용할 경우 어떻게 되는지를 보였다. 본 실시 예(실시 예 2)에서는 FTL이 있는 경우를 상정한 또 다른 가상의 LFS에 적용한 예를 보여준다.In Example 1 described above, it is shown what happens when the present invention is applied to a situation of using a NAND flash memory without FTL. In the present embodiment (Example 2), an example in which an FTL is present is applied to another virtual LFS.

FTL이 있을 경우에는 덮어쓰기가 가능하기 때문에, 메타데이터 구성 및 기록 방식은 실시 예 1에서와 같이 FTL이 없는 경우를 대상으로 만들어진 경우와 차이가 난다. 그런 경우에도 본 발명을 적용하여 개선 효과를 낼 수 있다는 것을 보여주는 것이 본 실시 예의 목적이다.Since the FTL can be overwritten, the metadata configuration and recording method is different from the case where the FTL is not made as in the first embodiment. In such a case, it is an object of the present embodiment to show that the present invention can be applied to improve the effect.

본 실시 예에서의 대상 환경과 가상의 LFS의 구조는 다음과 같다.The structure of the target environment and the virtual LFS in this embodiment is as follows.

- 저장장치: eMMC 혹은 SD 카드(FTL을 탑재한 NAND 플래시 메모리 기반 저장장치)Storage: eMMC or SD card (NAND flash memory based storage with FTL)

- 파일 인덱스: 아이노드 포인터 구조File index: inode pointer structure

- 아이노드 정보: 아이노드 맵(Sprite LFS에서 사용하는 방식)Inode Information: Inode Map (as used by Sprite LFS)

- 전체 메타데이터 구성: FTL로 인해 덮어쓰기가 가능하므로 메타데이터를 파일로 다루지 않음, 대신 각 메타데이터 항목마다 저장 위치를 지정해주고 변경 사항은 그곳에 덮어씀Full Metadata Configuration: FTLs can be overwritten so metadata is not treated as a file, instead specify a storage location for each metadata item and changes are overwritten there

저장 공간은 도 12에서와 같이 구분되며, 상자 안의 번호는 세그먼트 번호를 의미한다.The storage space is divided as shown in FIG. 12, and the number in the box means the segment number.

이때, 슈퍼블록은 각 메타데이터 항목들(체크포인트, IMAP, SU, SS)이 저장된 위치 등의 중요한 정보가 포함되는 영역이다. 이러한 슈퍼블록은 1개의 세그먼트가 할당된다.In this case, the superblock is an area including important information such as a location where each metadata item (checkpoint, IMAP, SU, SS) is stored. This superblock is allocated one segment.

체크포인트 영역은 본 발명에서 체크포인트 세그먼트로 사용되는 영역이다. 본 발명에 따른 체크포인트 저장 공간 운용 방법을 사용하기 위해서는 최소 2개의 세그먼트가 필요하기 때문에 본 실시 예에서는 2개의 세그먼트를 할당한다.The checkpoint area is an area used as a checkpoint segment in the present invention. In order to use the checkpoint storage space operating method according to the present invention, since at least two segments are required, the present embodiment allocates two segments.

IMAP 영역은 아이노드 맵을 저장하는 영역으로, 각 아이노드의 위치가 테이블 형태로 기록된다.The IMAP area is an area for storing the inode map. The location of each inode is recorded in a table form.

SU 영역은 세그먼트 사용 정보가 저장되는 영역이다. 세그먼트 마다 테이블 엔트리가 하나씩 존재하기 때문에, 세그먼트 사용 정보를 저장하는데 필요한 크기는 전체 저장 공간의 크기에 비례하여 달라지지만 본 실시 예에서는 편의상 1개의 세그먼트만 필요하다고 가정한다.The SU area is an area in which segment usage information is stored. Since there is one table entry for each segment, the size required to store segment usage information varies in proportion to the size of the entire storage space. However, in the present embodiment, it is assumed that only one segment is needed for convenience.

SS 영역은 세그먼트 요약 정보가 저장되는 영역이다. SU 영역과 마찬가지로 필요한 크기는 전체 저장 공간의 크기에 비례하여 달라지지만 편의상 2개 세그먼트만 필요하다고 가정한다.The SS area is an area in which segment summary information is stored. Like the SU area, the required size varies in proportion to the size of the total storage space, but for convenience, it is assumed that only two segments are required.

로그 영역은 메타데이터가 아닌 일반 데이터들이 기록되는 공간으로, 메타데이터용으로 사용하고 남는 나머지 공간을 사용한다.The log area is a space where general data, not metadata, is recorded. It is used for metadata and uses the remaining space.

아래의 설명에서도 실시 예 1에서와 같이, 설명의 편의를 위해 체크포인트 레코드에 세그먼트 사용 정보(SU) 만을 포함시키는 경우에 대해 설명하며, 세그먼트는 4개의 블록들로 구성되었다고 가정한다.In the following description, as in the first embodiment, a case in which only the segment usage information SU is included in the checkpoint record is described for convenience of explanation, and it is assumed that the segment is composed of four blocks.

단계 1.Step 1.

파일 A에 대한 변경 내역을 저장장치에 쓰도록 요청이 수신되면, 이로 인해 도 13a에서와 같이 4개의 데이터 블록과 1개 인덱스 블록을 써야 하는 상황이 발생하게 된다. 도 13a에서, A'가 기록된 블록들 중 점으로 표시된 블록이 데이터 블록을 나타내며, 일 방향의 빗금으로 표시된 블록이 인덱스 블록을 나타낸다.When a request is received to write the change history of the file A to the storage device, this causes a situation in which four data blocks and one index block need to be written as shown in FIG. 13A. In FIG. 13A, a block indicated by a dot among blocks in which A ′ is written represents a data block, and a block indicated by hatching in one direction represents an index block.

이에 따라, 세그먼트 요약 정보(SS)에 대한 변경 사항 4개와 아이노드 A에 대한 변경 사항이 발생하지만, 파일시스템은 이를 일단 메모리 상에만 표시해 둔다.As a result, four changes to the segment summary information (SS) and four changes to Inode A occur, but the file system displays them in memory only once.

단계 2.Step 2.

다음에 파일 B에 대한 변경 내역을 저장장치에 쓰도록 요청이 수신되면, 이로 인해 도 13b에서와 같이 2개의 데이터 블록과 1개 인덱스 블록을 써야 하는 상황이 발생하게 된다. 도 13b에서, B'가 기록된 블록들 중 점으로 표시된 블록이 데이터 블록을 나타내며, 일 방향의 빗금으로 표시된 블록이 인덱스 블록을 나타낸다.Next, when a request is received to write the change history of the file B to the storage device, this causes a situation in which two data blocks and one index block need to be written as shown in FIG. 13B. In FIG. 13B, a block indicated by a dot among blocks in which B ′ is written represents a data block, and a block indicated by hatching in one direction represents an index block.

이에 따라 세그먼트 요약 정보(SS)에 대한 변경 사항 2개와 아이노드 B에 대한 변경 사항이 발생하지만, 파일시스템은 마찬가지로 이를 일단 메모리 상에만 표시해 둔다.This results in two changes to the SSS and two changes to Inode B, but the filesystem likewise only displays them in memory once.

단계 3.Step 3.

파일시스템의 일관성(consistency)을 유지하기 위한 전체 동기화 요청이 수신되면, 파일시스템은 앞의 단계 1, 2에서 변경된 2개 파일(A, B)의 새 아이노드들을 각각 블록 하나를 할당하여 로그에 기록해야 한다. 이로 인해 로그가 변경된 모습은 도 13c와 같다. 도 13c에서, IA'는 파일 A의 새 아이노드를 나타내며, IB'는 파일 B의 새 아이노드를 나타낸다.When a full synchronization request is received to maintain the consistency of the filesystem, the filesystem allocates a block to each new inode of the two files (A, B) that were changed in steps 1 and 2 above. It should be recorded. As a result, the log is changed as shown in FIG. 13C. In FIG. 13C, IA 'represents the new inode of file A and IB' represents the new inode of file B. In FIG.

다음에, 파일시스템은 위치가 변경된 새 아이노드들(IA', IB')의 위치를 아이노드 맵에 반영하고, 단계 1, 2에서 메모리 상에 표시만 해두었던 SS에 대한 변경 내역 8건을 도 12의 SS 영역에 반영한다. 이를 위해, 도 13d에서와 같이 아이노드 맵이 위치한 3번 세그먼트의 블록 1개가 변경되고, SS가 위치한 5번 세그먼트의 블록 1개가 변경된다.The filesystem then reflects the location of the new inodes (IA ', IB') that have been relocated in the inode map, and records eight changes to the SS that were only displayed in memory in steps 1 and 2. Reflected in the SS region of FIG. To this end, as shown in FIG. 13D, one block of the third segment in which the inode map is located is changed, and one block of the fifth segment in which the SS is located is changed.

다음에, 파일시스템은 임시 SU 레코드 리스트의 SU 레코드들을 체크포인트 레코드 안에 삽입하여 체크포인트 기록 시에 저장한다. 이를 위해, 도 13e에서와 같이 체크포인트 영역에서 블록 1개가 기록된다.Next, the file system inserts the SU records of the temporary SU record list into the checkpoint record and stores them at checkpoint write. For this purpose, one block is recorded in the checkpoint area as shown in FIG. 13E.

본 실시 예의 단계 3에서, 본 발명을 적용하지 않을 경우, 파일시스템은 SU 변경 사항의 반영을 위해 SU 저장 영역인 '4번 세그먼트'에 위치한 블록들 중 적어도 1개는 추가로 기록해야 한다. 만약, 단계 1, 2에서 수행한 것에 대한 SU 변경 사항이 기록되어야 할 위치가 여러 개의 블록들에 해당되면 각각의 블록에 대해 기록을 수행해야 한다.
In step 3 of the present embodiment, when the present invention is not applied, the file system must additionally record at least one of the blocks located in the segment 4, which is the SU storage area, in order to reflect the SU change. If the location where the SU change for the steps 1 and 2 is to be recorded corresponds to several blocks, recording should be performed for each block.

발명의 내용을 간략히 요약하면 다음과 같다.Briefly summarized the contents of the invention as follows.

메타데이터가 4가지 항목, 즉 아이노드 정보, 체크포인트 정보, 세그먼트 요약 정보, 세그먼트 사용 정보로 구성되는 로그 구조 파일시스템에서 메타데이터를 동기화를 할 때는 아무리 각 항목별 수정된 사항의 크기가 작더라도 4가지 각각 별개로 기록해야 하기 때문에 최소한 4번을 기록해야 한다. 그런데, 파일시스템의 일관성 복원에 필수적인 체크포인트 정보는 그 크기가 통상적인 블록(보통 플래시 메모리의 페이지 크기의 배수에 맞추게 되는) 크기보다 작다. 따라서, 본 발명에서는 체크포인트 레코드에서 남는 공간에 세그먼트 요약 정보, 세그먼트 사용 정보에 대한 변경 사항을 '식별할 수 있는 레코드화'하여 포함시킴으로써 동기화에 필요한 기록 횟수를 줄이는 것이다.
When synchronizing metadata in the log structure file system, which consists of four items of metadata: inode information, checkpoint information, segment summary information, and segment usage information, no matter how small each item is modified You must record at least four times, because each of the four must be recorded separately. By the way, the checkpoint information necessary for restoring file system consistency is smaller than the size of a typical block (usually a multiple of the page size of flash memory). Accordingly, in the present invention, the number of recordings required for synchronization is reduced by 'identifying and recording' the segment summary information and the change of the segment usage information in the space left in the checkpoint record.

상술한 본 발명의 바람직한 실시 예는 예시의 목적을 위한 것으로, 당업자라면 첨부된 특허청구범위의 기술적 사상과 범위를 통해 다양한 수정, 변경, 대체 및 부가가 가능할 것이며, 이러한 수정 변경 등은 이하의 특허청구범위에 속하는 것으로 보아야 할 것이다.
Preferred embodiments of the present invention described above are intended for purposes of illustration, and those skilled in the art will be able to make various modifications, changes, substitutions and additions through the spirit and scope of the appended claims, and such modifications may be made by the following patents. It should be regarded as belonging to the claims.

Claims (17)

파일시스템이 플래시메모리에 데이터를 저장하는 방법에 있어서,
기록해야 할 정보가 저장될 블록을 할당하는 단계;
할당된 블록에 대한 세그먼트 요약 정보(SS) 레코드를 생성하여 임시 리스트에 기록하는 단계;
상기 세그먼트 요약 정보 레코드가 생성된 블록들이 위치하는 세그먼트에 대한 세그먼트 사용 정보(SU) 레코드를 생성하여 상기 임시 리스트에 기록하는 단계;
상기 임시 리스트에 기록된 상기 세그먼트 요약 정보 레코드와 상기 세그먼트 사용 정보 레코드 중 적어도 어느 하나를 체크포인트 레코드에 포함시키는 단계; 및
상기 체크포인트 레코드를 할당된 위치에 기록하는 단계를 포함하고,
상기 체크포인트 레코드에 포함시키는 단계는
상기 임시 리스트의 크기와 상기 체크포인트 레코드에서 기 예약된 공간의 크기를 확인하는 단계; 및
상기 기 예약된 공간의 크기가 상기 임시 리스트 크기보다 작은 경우, 상기 체크포인트 레코드에 포함시킬 수 없는 양만큼을 상기 임시 리스트의 앞 부분에서 떼어내어 기 저장된 세그먼트 요약 정보(SS) 및 세그먼트 사용 정보(SU)에 직접 반영하고 나머지 부분을 상기 체크포인트 레코드에 포함시키는 파일시스템의 메타데이터 저장 방법.
In the way the file system stores data in flash memory,
Allocating a block in which information to be recorded is to be stored;
Generating segment summary information (SS) records for the allocated blocks and writing them to a temporary list;
Generating a segment usage information (SU) record for a segment in which blocks in which the segment summary information record is generated are recorded and recorded in the temporary list;
Including at least one of the segment summary information record and the segment usage information record recorded in the temporary list in a checkpoint record; And
Recording the checkpoint record at an assigned location;
Including in the checkpoint record
Checking the size of the temporary list and the size of the reserved space in the checkpoint record; And
If the size of the pre-booked space is smaller than the temporary list size, the segment summary information (SS) and the segment usage information which are stored in advance by removing an amount not included in the checkpoint record from the beginning of the temporary list. SU) directly reflects and the rest of the file system metadata storage method for including the remaining part in the checkpoint record.
제 1항에 있어서, 상기 세그먼트 요약 정보 레코드는
아이노드 번호 및 파일 블록 번호를 포함하는 것을 특징으로 하는 파일시스템의 메타데이터 저장 방법.
The method of claim 1, wherein the segment summary information record is
A method for storing metadata of a file system, comprising an inode number and a file block number.
제 2항에 있어서, 상기 파일 블록 번호는
해당 블록이 파일의 어느 부분을 구성하는지를 나타내는 번호인 것을 특징으로 하는 파일시스템의 메타데이터 저장 방법.
The method of claim 2, wherein the file block number is
A method for storing metadata of a file system, wherein the block is a number indicating which part of the file.
제 1항에 있어서, 상기 세그먼트 사용 정보 레코드는
해당 세그먼트 내 유효 블록 수 및 해당 세그먼트에 마지막으로 기록한 시간에 대한 정보를 포함하는 것을 특징으로 하는 파일시스템의 메타데이터 저장 방법.
The method of claim 1, wherein the segment usage information record is
A method of storing metadata of a file system, comprising information on the number of valid blocks in a segment and the last time recorded in the segment.
제 1항에 있어서,
상기 체크포인트 레코드를 할당된 위치에 기록하기 전에,
체크포인트 정보를 상기 체크포인트 레코드에 기입하는 단계를 더 포함하는 것을 특징으로 하는 파일시스템의 메타데이터 저장 방법.
The method of claim 1,
Before writing the checkpoint record to the assigned location,
And writing checkpoint information to the checkpoint record.
제 5항에 있어서, 상기 체크포인트 정보는
버전(version) 정보 또는 체크포인트 기록 시간을 포함하는 것을 특징으로 하는 파일시스템의 메타데이터 저장 방법.
The method of claim 5, wherein the checkpoint information is
A method for storing metadata of a file system, including version information or checkpoint write time.
삭제delete 제 1항에 있어서, 상기 체크포인트 레코드를 할당된 위치에 기록하는 단계는
상기 체크포인트 레코드를 기 설정된 체크포인트 세그먼트의 첫 번째 블록부터 순차적으로 기록하는 것을 특징으로 하는 파일시스템의 메타데이터 저장 방법.
2. The method of claim 1, wherein recording the checkpoint record at an assigned location
And storing the checkpoint record sequentially from the first block of the preset checkpoint segment.
제 8항에 있어서, 상기 체크포인트 레코드를 할당된 위치에 기록하는 단계는
상기 체크포인트 레코드를 제 1 체크포인트 세그먼트에 순차적으로 기록하는 단계;
상기 제 1 체크포인트 세그먼트가 모두 사용되면, 제 2 체크포인트 세그먼트에 상기 체크포인트 레코드를 순차적으로 기록하는 단계;
상기 제 2 체크포인트 세그먼트가 모두 사용되기 전에 상기 제 1 체크포인트 세그먼트에 기록된 체크포인트 레코드를 모두 삭제하는 단계; 및
상기 제 2 체크포인트 세그먼트가 모두 사용되면, 상기 제 1 체크포인트 세그먼트에 상기 체크포인트 레코드를 다시 기록하는 단계를 포함하는 것을 특징으로 하는 파일시스템의 메타데이터 저장 방법.
9. The method of claim 8, wherein recording the checkpoint record at an assigned location
Sequentially writing the checkpoint record to a first checkpoint segment;
Sequentially recording the checkpoint record in a second checkpoint segment when the first checkpoint segment is exhausted;
Deleting all checkpoint records recorded in the first checkpoint segment before the second checkpoint segment is exhausted; And
And if the second checkpoint segment is exhausted, rewriting the checkpoint record in the first checkpoint segment.
제 9항에 있어서,
상기 제 1 체크포인트 세그먼트에 기록된 체크포인트 레코드를 모두 삭제하기 전에, 삭제될 체크포인트 레코드에 포함된 세그먼트 요약 정보 레코드 및 세그먼트 사용 정보 레코드의 내용을 기 저장된 세그먼트 요약 정보(SS) 및 세그먼트 사용 정보(SU)에 반영하는 것을 특징으로 하는 파일시스템의 메타데이터 저장 방법.
The method of claim 9,
Before deleting all the checkpoint records recorded in the first checkpoint segment, the contents of the segment summary information record and the segment usage information record included in the checkpoint record to be deleted are stored in the segment summary information (SS) and the segment usage information. Meta data storage method of the file system, characterized in that reflected in (SU).
제 8항에 있어서, 상기 체크포인트 레코드를 할당된 위치에 기록하는 단계는
상기 체크포인트 레코드를 제 1 체크포인트 세그먼트에 순차적으로 기록하는 단계;
상기 제 1 체크포인트 세그먼트가 모두 사용되면, 제 2 체크포인트 세그먼트에 상기 체크포인트 레코드를 순차적으로 기록하는 단계; 및
상기 제 2 체크포인트 세그먼트가 모두 사용되면, 상기 제 1 체크포인트 세그먼트에서 가장 오래전에 기록된 체크포인트 레코드를 새로 기록할 체크포인트 레코드로 덮어쓰기 하는 단계를 포함하는 것을 특징으로 하는 파일시스템의 메타데이터 저장 방법.
9. The method of claim 8, wherein recording the checkpoint record at an assigned location
Sequentially writing the checkpoint record to a first checkpoint segment;
Sequentially recording the checkpoint record in a second checkpoint segment when the first checkpoint segment is exhausted; And
And when the second checkpoint segment is used up, overwriting the oldest checkpoint record in the first checkpoint segment with a checkpoint record to be newly recorded. Storage method.
제 11항에 있어서,
상기 덮어쓰기 전에, 삭제될 체크포인트 레코드에 포함된 세그먼트 요약 정보 레코드 및 세그먼트 사용 정보 레코드의 내용을 기 저장된 세그먼트 요약 정보(SS) 및 세그먼트 사용 정보(SU)에 반영하는 것을 특징으로 하는 파일시스템의 메타데이터 저장 방법.
The method of claim 11,
Before the overwriting, the contents of the segment summary information record and the segment usage information record included in the checkpoint record to be deleted are reflected in the previously stored segment summary information (SS) and the segment usage information (SU). How metadata is stored.
파일시스템이 플래시메모리에 데이터를 저장하는 방법에 있어서,
기록해야 할 정보가 저장될 블록을 할당하는 단계;
할당된 블록에 대한 세그먼트 요약 정보(SS) 레코드 및 상기 세그먼트 요약 정보 레코드가 생성된 블록들이 위치하는 세그먼트에 대한 세그먼트 사용 정보(SU) 레코드를 생성하는 단계; 및
상기 세그먼트 요약 정보 레코드와 상기 세그먼트 사용 정보 레코드 중 적어도 어느 하나를 체크포인트 레코드에 포함시켜 기 할당된 위치에 기록하는 단계를 포함하고,
상기 기록하는 단계는
상기 세그먼트 요약 정보 레코드와 상기 세그먼트 사용 정보 레코드 중 상기 체크포인트 레코드에 포함될 적어도 하나의 레코드의 크기와 상기 기 할당된 위치의 크기를 비교하고, 상기 기 할당된 위치의 크기가 상기 체크포인트 레코드에 포함될 적어도 하나의 레코드의 크기보다 작은 경우, 상기 체크포인트 레코드에 포함시킬 수 없는 양만큼을 상기 체크포인트 레코드에 포함될 적어도 하나의 레코드의 앞 부분에서 떼어내어 기 저장된 세그먼트 요약 정보(SS) 및 세그먼트 사용 정보(SU)에 직접 반영하고 나머지 부분을 상기 체크포인트 레코드에 포함시키는 파일시스템의 메타데이터 저장 방법.
In the way the file system stores data in flash memory,
Allocating a block in which information to be recorded is to be stored;
Generating a segment summary information (SS) record for the assigned block and a segment usage information (SU) record for the segment in which the blocks where the segment summary information record is generated are located; And
Including at least one of the segment summary information record and the segment usage information record in a checkpoint record to record at a pre-assigned location,
The recording step
Comparing the size of at least one record to be included in the checkpoint record and the size of the pre-allocated position among the segment summary information record and the segment usage information record, and the size of the pre-allocated position is included in the checkpoint record. When smaller than the size of at least one record, the segment summary information (SS) and the segment usage information which are previously stored by removing an amount which cannot be included in the checkpoint record from the front of the at least one record to be included in the checkpoint record. Metadata storage method of the file system to reflect directly to the SU and include the remaining part in the checkpoint record.
제 13항에 있어서, 상기 세그먼트 요약 정보 레코드는
아이노드 번호 및 파일 블록 번호를 포함하는 것을 특징으로 하는 파일시스템의 메타데이터 저장 방법.
The method of claim 13, wherein the segment summary information record is
A method for storing metadata of a file system, comprising an inode number and a file block number.
제 13항에 있어서, 상기 세그먼트 사용 정보 레코드는
해당 세그먼트 내 유효 블록 수 및 해당 세그먼트에 마지막으로 기록한 시간에 대한 정보를 포함하는 것을 특징으로 하는 파일시스템의 메타데이터 저장 방법.
The method of claim 13, wherein the segment usage information record is
A method of storing metadata of a file system, comprising information on the number of valid blocks in a segment and the last time recorded in the segment.
제 13항에 있어서,
상기 체크포인트 레코드를 할당된 위치에 기록하기 전에,
체크포인트 정보를 상기 체크포인트 레코드에 기입하는 단계를 더 포함하는 것을 특징으로 하는 파일시스템의 메타데이터 저장 방법.
The method of claim 13,
Before writing the checkpoint record to the assigned location,
And writing checkpoint information to the checkpoint record.
제 16항에 있어서, 상기 체크포인트 정보는
버전(version) 정보 또는 체크포인트 기록 시간을 포함하는 것을 특징으로 하는 파일시스템의 메타데이터 저장 방법.
The method of claim 16, wherein the checkpoint information is
A method for storing metadata of a file system, including version information or checkpoint write time.
KR1020140026166A 2014-03-05 2014-03-05 Method for storing metadata of log-structured file system for flash memory KR102033323B1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
KR1020140026166A KR102033323B1 (en) 2014-03-05 2014-03-05 Method for storing metadata of log-structured file system for flash memory
US14/609,058 US9563375B2 (en) 2014-03-05 2015-01-29 Method for storing metadata of log-structured file system for flash memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020140026166A KR102033323B1 (en) 2014-03-05 2014-03-05 Method for storing metadata of log-structured file system for flash memory

Publications (2)

Publication Number Publication Date
KR20150104434A KR20150104434A (en) 2015-09-15
KR102033323B1 true KR102033323B1 (en) 2019-10-17

Family

ID=54017418

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020140026166A KR102033323B1 (en) 2014-03-05 2014-03-05 Method for storing metadata of log-structured file system for flash memory

Country Status (2)

Country Link
US (1) US9563375B2 (en)
KR (1) KR102033323B1 (en)

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8671265B2 (en) 2010-03-05 2014-03-11 Solidfire, Inc. Distributed data storage system providing de-duplication of data using block identifiers
US9838269B2 (en) 2011-12-27 2017-12-05 Netapp, Inc. Proportional quality of service based on client usage and system metrics
US9054992B2 (en) 2011-12-27 2015-06-09 Solidfire, Inc. Quality of service policy sets
US20150244795A1 (en) 2014-02-21 2015-08-27 Solidfire, Inc. Data syncing in a distributed system
KR102545067B1 (en) * 2016-03-02 2023-06-20 한국전자통신연구원 Method, system and computer-readable recording medium for storing metadata of log-structured file system
US10929022B2 (en) 2016-04-25 2021-02-23 Netapp. Inc. Space savings reporting for storage system supporting snapshot and clones
CN107766354A (en) * 2016-08-17 2018-03-06 阿里巴巴集团控股有限公司 A kind of method and apparatus for being used to ensure data correctness
US10642763B2 (en) 2016-09-20 2020-05-05 Netapp, Inc. Quality of service policy sets
US10256981B2 (en) * 2016-09-27 2019-04-09 International Business Machines Corporation Secure logging for host security module
US10452608B2 (en) * 2016-10-17 2019-10-22 Netapp, Inc. Log-structured file system
CN108090168B (en) * 2017-12-14 2021-01-12 厦门市美亚柏科信息股份有限公司 Universal F2FS file system parsing method, terminal device and storage medium
CN110945486B (en) * 2018-06-30 2022-06-10 华为技术有限公司 Storage fragment management method and terminal
WO2020006771A1 (en) * 2018-07-06 2020-01-09 华为技术有限公司 File system adjustment method and device
KR102167167B1 (en) * 2018-08-09 2020-10-16 넵코어스 주식회사 SSD device and method for managing the SSD device
CN109669640B (en) * 2018-12-24 2023-05-23 浙江大华技术股份有限公司 Data storage method, device, electronic equipment and medium
CN111913924B (en) * 2020-07-21 2024-03-19 华中科技大学 Log structure file system data management method based on heat

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100199042A1 (en) * 2009-01-30 2010-08-05 Twinstrata, Inc System and method for secure and reliable multi-cloud data replication

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8452929B2 (en) * 2005-04-21 2013-05-28 Violin Memory Inc. Method and system for storage of data in non-volatile media
US9286198B2 (en) * 2005-04-21 2016-03-15 Violin Memory Method and system for storage of data in non-volatile media
US9043555B1 (en) * 2009-02-25 2015-05-26 Netapp, Inc. Single instance buffer cache method and system
KR20110070656A (en) * 2009-12-18 2011-06-24 한국전자통신연구원 Method and apparatus for processing data of flash memory
KR20120072228A (en) 2010-12-23 2012-07-03 한국전자통신연구원 File system of flash memory
KR20130075018A (en) 2011-12-27 2013-07-05 한국전자통신연구원 Data update apparatus for flash memory file system and method thereof
US9411717B2 (en) * 2012-10-23 2016-08-09 Seagate Technology Llc Metadata journaling with error correction redundancy
US9251064B2 (en) * 2014-01-08 2016-02-02 Netapp, Inc. NVRAM caching and logging in a storage system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100199042A1 (en) * 2009-01-30 2010-08-05 Twinstrata, Inc System and method for secure and reliable multi-cloud data replication

Also Published As

Publication number Publication date
US20150254013A1 (en) 2015-09-10
KR20150104434A (en) 2015-09-15
US9563375B2 (en) 2017-02-07

Similar Documents

Publication Publication Date Title
KR102033323B1 (en) Method for storing metadata of log-structured file system for flash memory
CN110678836B (en) Persistent memory for key value storage
KR101270807B1 (en) Controller, data storage device, and computer readable recording medium
US10007468B2 (en) Method and apparatus for erasing data in data section in flash memory
EP2163988B1 (en) Snapshot system and method
US8612719B2 (en) Methods for optimizing data movement in solid state devices
US8838875B2 (en) Systems, methods and computer program products for operating a data processing system in which a file delete command is sent to an external storage device for invalidating data thereon
US7747664B2 (en) Storage system format for transaction safe file system
US8402202B2 (en) Input/output control method and apparatus optimized for flash memory
KR102252419B1 (en) System and method for efficient address translation on Flash memory device
JP2011039805A5 (en)
KR20070096429A (en) Fast mounting for a file system on nand flash memory
KR20130075018A (en) Data update apparatus for flash memory file system and method thereof
KR102545067B1 (en) Method, system and computer-readable recording medium for storing metadata of log-structured file system
KR20140038110A (en) Method for managing file system and apparatus using the same
KR101077901B1 (en) Apparatus and method for managing flash memory using log block level mapping algorithm
KR101153688B1 (en) Nand flash memory system and method for providing invalidation chance to data pages
KR101995460B1 (en) System and method for defragmenting of file with ext file structure
CN111597066A (en) SSD (solid State disk) repairing method and device, computer equipment and storage medium
US11455255B1 (en) Read performance of log-structured file system (LFS)-based storage systems that support copy-on-write (COW) snapshotting
US20220091772A1 (en) Memory system
CN107562642B (en) Checkpoint elimination method and device
JP2008134777A (en) Caching method of file allocation table
JP6644427B2 (en) FAT file system and its program
US20190384527A1 (en) Data storage system and control method for non-volatile memory

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right