KR101077500B1 - Log Data Storage Method for Journaling FAT File System - Google Patents

Log Data Storage Method for Journaling FAT File System Download PDF

Info

Publication number
KR101077500B1
KR101077500B1 KR1020090060144A KR20090060144A KR101077500B1 KR 101077500 B1 KR101077500 B1 KR 101077500B1 KR 1020090060144 A KR1020090060144 A KR 1020090060144A KR 20090060144 A KR20090060144 A KR 20090060144A KR 101077500 B1 KR101077500 B1 KR 101077500B1
Authority
KR
South Korea
Prior art keywords
file system
fat
area
log data
journaling
Prior art date
Application number
KR1020090060144A
Other languages
Korean (ko)
Other versions
KR20110002603A (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 KR1020090060144A priority Critical patent/KR101077500B1/en
Publication of KR20110002603A publication Critical patent/KR20110002603A/en
Application granted granted Critical
Publication of KR101077500B1 publication Critical patent/KR101077500B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1805Append-only file systems, e.g. using logs or journals to store data
    • G06F16/1815Journaling file systems
    • 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]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44536Selecting among different versions
    • G06F9/44542Retargetable
    • G06F9/44547Fat binaries

Landscapes

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

Abstract

본 개시는 저널링이 적용된 FAT 파일 시스템에서 로그 데이터를 저장하는 방법에 관한 것으로, 예약 영역, FAT 영역, 및 데이터 영역을 포함하는 FAT 파일 시스템에서의 로그 데이터 저장 방법에서, 상기 예약 영역의 비어 있는 섹터에 로그 데이터를 기록하도록 하는 로그 데이터 기록 단계를 포함하여 구성되어, 기존 FAT 파일 시스템에 영향을 미치지 않으면서 로그에 대한 빠른 접근이 가능하다.The present disclosure relates to a method for storing log data in a FAT file system to which journaling has been applied, and to a method of storing log data in a FAT file system including a reserved area, a FAT area, and a data area, wherein an empty sector of the reserved area is provided. It is configured to include a log data recording step to record the log data in a file, allowing quick access to the log without affecting the existing FAT file system.

파일 시스템, FAT, 로그, 저널링 File system, FAT, log, journaling

Description

저널링이 적용된 FAT 파일 시스템의 로그 데이터 저장 방법{Log Data Storage Method for Journaling FAT File System}Log Data Storage Method for Journaling FAT File System

본 개시는 저널링이 적용된 FAT 파일 시스템에 관한 것으로, 보다 상세하게는 저널링이 적용된 FAT 파일 시스템에서 로그 데이터를 저장하는 방법에 관한 것이다.The present disclosure relates to a FAT file system with journaling applied, and more particularly, to a method of storing log data in a FAT file system with journaling applied.

일반적으로, 효율적인 데이터 저장을 위해 필요한 파일 시스템은 운영체제에 따라 다양한 형태를 갖고 있다.  근래에 들어 휴대 기기 등의 발달로 기존의 파일 시스템들의 문제점인 순간적인 전원 인가 및 이동성 디스크 착탈 시 파일 시스템의 무결성 및 안정성에 대한 문제가 대두되고 있다.  이에 대한 안으로서 저널링 기반의 파일 시스템들이 제안되어 사용되고 있다. In general, the file system required for efficient data storage has various forms depending on the operating system. In recent years, with the development of portable devices, problems such as the integrity and stability of the file system during instantaneous power supply and removable disk removal, which are problems of the existing file systems, are emerging. As a proposal for this, journaling based file systems have been proposed and used.

저널링은 데이터베이스에서 일관성 체크를 위해 사용되는 방법을 파일 시스템에 적용한 것으로서, 파일 시스템 업데이터 시(파일을 쓰거나 메타 데이터를 수정하는 경우)에 로그를 기록하고, 문제가 발생할 경우 해당 로그를 참조하여 업데이트를 취소하거나 업데이트 내용을 파일시스템에 적용완료(Commit)할 수 있도록 하는 것이다.  이로써 일관성 체크를 위해 파일 시스템 전체 영역을 검색하지 않고 해당 로그만을 찾아 작업을 수행하면 되므로 일관성 체크에 소요되는 시간을 현저하게 단축시킬 수 있는 장점이 있다. Journaling applies the method used by the database for consistency checks to the file system. It records the log at the time of the file system updater (when writing files or modifying metadata). You can either cancel or commit the update to the filesystem. As a result, it is possible to significantly reduce the time required for the consistency check because only the log needs to be performed without searching the entire file system area for consistency check.

이러한 저널링은 리눅스 계열의 운영체제에는 대부분 적용되고 있으나, 윈도우 계열의 운영체제 중에는 NTFS(New Technology File System)만이 저널링이 적용되고 가장 널리 사용되고 있는 FAT 파일 시스템은 저널링 기반이 아니므로 항상 데이터의 무결성과 안정성에 문제를 안고 있는 실정이다. This journaling is applied to most Linux-based operating systems. However, among the Windows-based operating systems, only New Technology File System (NTFS) is journaled and FAT file system, which is the most widely used, is not journaling-based. I have a problem.

FAT 파일 시스템은 예약 영역, FAT 영역, 디렉토리 엔트리 영역을 포함하는 메타 데이터 영역과 실제 데이터가 저장되는 영역인 데이터 영역으로 이루어진다. The FAT file system includes a metadata area including a reserved area, a FAT area, a directory entry area, and a data area that is an area in which actual data is stored.

여기서, FAT 영역은 제 1 FAT 영역과 제 1 FAT 영역에 기록된 데이터의 복사본인 제 2 FAT 영역으로 나누어지며, 제 1 FAT 영역 중 어느 하나에 오류가 발생하는 경우 나머지 제 2 FAT 영역에 기록된 백업 데이터를 이용하여 파일 시스템을 복구하도록 설계되어 있다.  하지만, FAT 영역과 디렉토리 정보에 대한 쓰기 동작 중에 전원 중단 및 미디어 탈착 등으로 쓰기 동작이 중단될 경우 파일 시스템에 심각한 오류가 발생하고, 오류를 복구하기 위한 동작에 오랜 시간이 소요되거나 복구가 불가능한 상태가 될 수 있는 문제점이 있다. Here, the FAT area is divided into a first FAT area and a second FAT area which is a copy of data recorded in the first FAT area, and when an error occurs in any one of the first FAT areas, the FAT area is recorded in the remaining second FAT area. It is designed to recover a file system using backup data. However, if the write operation is interrupted due to power interruption or media removal while writing to the FAT area and directory information, a serious error occurs in the file system, and the operation to recover the error takes a long time or is impossible to recover. There is a problem that can be.

이러한 문제점을 해결하기 위한 방안으로서, 국내등록특허 제10-775141호에는 파일 생성에 따른 변화를 기록하는 로그 데이터를 제 2 FAT 영역에 기록하였다가 FAT 파일 시스템에 문제가 발생하면 제 2 FAT 영역에 기록된 로그 데이터를 참조하여 시스템 복구가 이루어지도록 하는 기술이 제안된 바 있다. In order to solve this problem, Korean Patent No. 10-775141 records log data recording a change resulting from file generation in a second FAT area, but if a problem occurs in the FAT file system, There has been proposed a technique for system recovery by referring to the recorded log data.

그러나, 상기 등록특허는 로그 데이터가 제 2 FAT 영역에 기록되므로 제 1 FAT 영역과 제 2 FAT 영역에 기록되어 있는 데이터가 동일하지 않고, 그에 따라 제 1 FAT 영역에 오류가 발생하는 경우 백업 기능이 정상적으로 수행되지 못하는 문제점이 있다. However, in the registered patent, since the log data is recorded in the second FAT area, the data recorded in the first FAT area and the second FAT area are not the same, and accordingly, a backup function is performed when an error occurs in the first FAT area. There is a problem that cannot be performed normally.

또한, 제 2 FAT 영역에 기존 FAT 파일 시스템의 규격과 다른 데이터 구조가 저장되므로 다른 버전의 운영체제에서는 호환이 되지 않는 문제점이 발생할 수 있다. In addition, since a data structure different from the standard of the existing FAT file system is stored in the second FAT area, a problem of incompatibility with other versions of the operating system may occur.

본 개시의 목적은 위와 같은 종래의 문제점을 해결하기 위한 것으로, 기존 FAT 파일 시스템에 영향을 미치지 않으면서 로그에 대한 빠른 접근이 가능하도록 하는, 저널링이 적용된 FAT 파일 시스템의 로그 데이터 저장 방법을 제공하고자 하는 것이다.An object of the present disclosure is to solve the above-mentioned conventional problems, to provide a log data storage method of a journaled FAT file system to enable fast access to the log without affecting the existing FAT file system. It is.

본 개시의 다른 목적은 NAND 플래시 메모리를 사용하는 FAT 파일 시스템의 신뢰성을 향상시키기 위한, 저널링이 적용된 FAT 파일 시스템의 로그 데이터 저장 방법을 제공하고자 하는 것이다.Another object of the present disclosure is to provide a log data storage method of a FAT file system to which journaling is applied to improve the reliability of a FAT file system using a NAND flash memory.

전술한 목적을 달성하기 위해 본 발명의 일 측면에 따른 저널링이 적용된 FAT 파일 시스템의 로그 데이터 저장 방법은, 예약 영역, FAT 영역, 및 데이터 영역을 포함하는 FAT 파일 시스템에서의 로그 데이터 저장 방법에 있어서, 상기 예약 영역의 비어 있는 섹터에 로그 데이터를 기록하는 로그 데이터 기록 단계를 포함할 수 있다.In order to achieve the above object, a log data storage method of a FAT file system to which journaling is applied according to an aspect of the present invention is a log data storage method in a FAT file system including a reserved area, a FAT area, and a data area. The method may include a log data recording step of recording log data in an empty sector of the reserved area.

상기 FAT 파일 시스템의 상기 예약 영역의 섹터는 가변적으로 확장할 수 있으며, 상기 FAT 파일 시스템은 적어도 FAT 16 파일 시스템 또는 FAT 32 파일 시스템을 포함할 수 있다. 또한, 상기 기록된 로그 데이터의 크기는 NAND 플래시 메모리의 페이지 단위에 대응하도록 할 수 있다.A sector of the reserved area of the FAT file system may be variably expanded, and the FAT file system may include at least a FAT 16 file system or a FAT 32 file system. In addition, the size of the recorded log data may correspond to a page unit of the NAND flash memory.

이상에서 설명한 바와 같이 본 발명의 일 측면에 따르면, 예약 영역의 비어 있는 섹터에 로그 데이터를 기록하므로 기존 FAT 파일 시스템에 영향을 미치지 않으면서 로그에 대한 빠른 접근이 가능하며, NAND 플래시 메모리의 특성에 맞게 FAT 파일 시스템의 신뢰성을 향상시키는 효과가 발생한다.As described above, according to an aspect of the present invention, since log data is written to an empty sector of the reserved area, fast access to the log is possible without affecting the existing FAT file system, and the characteristics of the NAND flash memory are limited. In order to effect the effect of improving the reliability of the FAT file system takes place.

이하, 본 발명의 실시예를 첨부된 도면들을 참조하여 상세히 설명한다. 우선 각 도면의 구성요소들에 참조부호를 부가함에 있어서, 동일한 구성요소들에 대해서는 비록 다른 도면상에 표시되더라도 가능한 한 동일한 부호를 가지도록 하고 있음에 유의해야 한다. 또한, 본 발명을 설명함에 있어, 관련된 공지 구성 또는 기능에 대한 구체적인 설명이 본 발명의 요지를 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명은 생략한다.Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. First of all, in adding reference numerals to the components of each drawing, it should be noted that the same reference numerals are used as much as possible even if displayed on different drawings. In the following description of the present invention, a detailed description of known functions and configurations incorporated herein will be omitted when it may make the subject matter of the present invention rather unclear.

또한, 본 발명의 구성 요소를 설명하는 데 있어서, 제 1, 제 2, A, B, (a), (b) 등의 용어를 사용할 수 있다. 이러한 용어는 그 구성 요소를 다른 구성 요소와 구별하기 위한 것일 뿐, 그 용어에 의해 해당 구성 요소의 본질이나 차례 또는 순서 등이 한정되지 않는다. 어떤 구성 요소가 다른 구성요소에 "연결", "결합" 또는 "접속"된다고 기재된 경우, 그 구성 요소는 그 다른 구성요소에 직접적으로 연결되거나 또는 접속될 수 있지만, 각 구성 요소 사이에 또 다른 구성 요소가 "연결", "결합" 또는 "접속"될 수도 있다고 이해되어야 할 것이다. In addition, in describing the component of this invention, terms, such as 1st, 2nd, A, B, (a), (b), can be used. These terms are only for distinguishing the components from other components, and the nature, order or order of the components are not limited by the terms. If a component is described as being "connected", "coupled" or "connected" to another component, that component may be directly connected to or connected to that other component, but there may be another configuration between each component. It is to be understood that the elements may be "connected", "coupled" or "connected".

도 1은 본 발명의 실시예가 적용되는 FAT 파일 시스템의 구조를 나타낸 도면이다.1 is a diagram showing the structure of a FAT file system to which an embodiment of the present invention is applied.

FAT 파일 시스템은, 도 1에 도시된 바와 같이, 미래를 위해 예약 되어 있는 예약 영역(Reserved area)(110), 클러스터들을 관리하는 FAT 영역(FAT area)(120), 및 디렉토리와 데이터가 저장되는 데이터 영역(Data area)(130)을 포함한다. 또한, FAT 영역(120)은 제 1 FAT 영역(FAT1) 및 제 2 FAT 영역(FAT2)을 포함한다.The FAT file system, as shown in FIG. 1, includes a reserved area 110 reserved for the future, a FAT area 120 for managing clusters, and directories and data stored therein. Data area 130 is included. The FAT area 120 also includes a first FAT area FAT1 and a second FAT area FAT2.

예약 영역(110)은 미래를 위해 예약해 놓은 영역으로서 보통 FAT 16의 경우 1섹터를 FAT 32인 경우에는 32섹터를 할당하며 임의적으로 늘릴 수도 있다. 이 영역에 부팅을 위한 기계어와 FAT 파일시스템의 여러 설정 값들이 있는 부트 섹터(Boot Sector)가 오게 된다. FAT 영역(120)은 클러스터들을 관리하는 테이블이 모여 있는 공간이다. FAT 영역(120)을 통해서 어떤 클러스터가 비어 있는지, 어떤 파일에 어떤 클러스터가 연결되어 있는지를 알 수 있게 된다. 따라서 이 영역이 손상되면 작게는 파일, 크게는 파일시스템 전체가 손상될 수 있다. 따라서 FAT1, FAT2로 두개의 클론 형태를 취하고 있다. 데이터 영역(130)은 파일 또는 디렉토리가 저장되어 있다. 이 영역들은 클러스터라고 불리는 논리적인 단위로 읽기/쓰기가 된다. 클러스터는 섹터(Sector)들의 집합으로써 FAT 파일시스템 포맷 시 저장장치의 용량에 의해서 정해지게 된다. 본 발명의 실시예에 따른 로그 데이터 기록 방법은 예약 영역(110)을 이용하는 방식이다. FAT32의 경우 32개의 섹터를 가지고 있지만 실제로 사용되는 것은 0, 2, 6 번 섹터가 사용되고 있으며 나머지는 비어 있다. 따라서, 이 영역을 사용하면 기존의 FAT 파일 시스템의 변화 없이 로그 데이터를 기록할 수 있다. FAT16의 경우에는 로그 데이터를 기록하기 위하여 예약 영역(110)을 확장하여 기록할 수 있도록 한다. The reserved area 110 is a reserved area for the future. In general, one sector for FAT 16 is allocated to 32 sectors for FAT 32, and may be arbitrarily increased. This area contains the boot sector, which contains the machine language for booting and the various settings of the FAT file system. The FAT area 120 is a space in which tables for managing clusters are collected. Through the FAT area 120, it is possible to know which cluster is empty and which cluster is connected to which file. Therefore, if this area is damaged, the file may be damaged at the smallest level and the entire file system at large. Therefore, it takes two clone forms, FAT1 and FAT2. The data area 130 stores files or directories. These areas are read / written in logical units called clusters. A cluster is a collection of sectors, which are determined by the storage capacity when formatting a FAT file system. The log data recording method according to an exemplary embodiment of the present invention uses a reserved area 110. FAT32 has 32 sectors, but in practice, sectors 0, 2, and 6 are used, and the rest are empty. Thus, using this area, log data can be recorded without changing the existing FAT file system. In the case of FAT16, the reservation area 110 can be extended to record the log data.

이하, 본 발명의 실시예에 따른 로그 데이터 기록 방법에 대해 보다 구체적으로 설명한다.Hereinafter, a log data recording method according to an embodiment of the present invention will be described in more detail.

도 2 및 도 3은 도 1의 예약 영역(110)의 상세 구조를 나타낸 도면으로서, 도 2는 FAT 16 파일 시스템일 경우의 예약 영역(110)의 구조를 나타내고, 도 3은 FAT 32 파일 시스템일 경우의 예약 영역(110)의 구조를 나타낸다.2 and 3 show the detailed structure of the reserved area 110 of FIG. 1, FIG. 2 shows the structure of the reserved area 110 in the case of the FAT 16 file system, and FIG. 3 shows the FAT 32 file system. The structure of the reservation area 110 in the case is shown.

도 2에 도시된 바와 같이, FAT 16 파일 시스템의 예약 영역(110)은 1개의 섹터로 이루어져 있으며, 이 1개의 섹터는 부팅을 위한 기계어와 FAT 파일 시스템의 설정들이 저장되어 있는 Boot Record 영역(0번 섹터)으로 사용된다. As shown in FIG. 2, the reserved area 110 of the FAT 16 file system is composed of one sector, which is a boot record area in which machine language for booting and settings of the FAT file system are stored. Burn sector).

도 3에 도시된 바와 같이, FAT 32 파일 시스템의 예약 영역(110)은 32개의 섹터로 이루어져 있으며, 이 32개의 섹터 중 부팅을 위한 기계어와 FAT 파일 시스템이 설정들이 저장되어 있는 Boot Record 영역(0번 섹터), 파일 시스템의 정보를 가지고 있는 FSInfo(File System Information) 영역(2번 섹터), 및 Boot Record를 백업해 놓은 Boot Record Backup 영역(6번 섹터)의 3개 섹터만이 사용되고 있으며, 나머지 29개의 섹터들은 사용되지 않고 비어 있다. As shown in FIG. 3, the reserved area 110 of the FAT 32 file system is composed of 32 sectors, and among the 32 sectors, a boot record area (0) in which the machine language and the FAT file system for booting are stored are stored. Sector 3), the FSInfo (File System Information) area (sector 2) that contains the file system information, and the boot record backup area (sector 6) that backs up the boot record. 29 sectors are not used and are empty.

도 2의 FAT 16 파일 시스템의 예약 영역(110)은 1개의 섹터로 이루어져 있고, 도 3의 FAT 32 파일 시스템의 예약 영역(110)은 32개의 섹터로 이루어져 있으나, 이에 한정되지 않고 해당 예약 영역(110)은 가변적으로 섹터의 수를 늘릴 수 있다.The reserved area 110 of the FAT 16 file system of FIG. 2 is composed of one sector, and the reserved area 110 of the FAT 32 file system of FIG. 3 is composed of 32 sectors, but is not limited thereto. 110 may variably increase the number of sectors.

도 4는 본 발명의 일 실시예에 따른 저널링이 적용된 FAT 32 파일 시스템의 로그 데이터 저장 방법을 설명하는 도면이다.4 is a diagram illustrating a log data storage method of a FAT 32 file system to which journaling is applied according to an embodiment of the present invention.

본 발명의 일 실시예에 따른 저널링이 적용된 FAT 32 파일 시스템의 로그 데이터 저장 방법은, 도 4에 도시된 바와 같이, FAT 32 파일 시스템의 예약 영역(110)의 32개의 섹터 중 사용되고 있는 3개의 섹터(0, 2, 6번 섹터)를 제외한 29개의 비어 있는 섹터에 로그 데이터(Log Data)를 기록한다. 예컨대, 6번 섹터와 31번 섹터 사이에 로그 데이터를 기록할 충분한 공간이 있다. 따라서, FAT 파일 시스템은 예약 영역(110)내의 비어 있는 섹터들의 공간을 로그 데이터 영역으로 확보하고서, 로그를 기록해야 할 경우에는 예약 영역(110)내의 로그 데이터 영역의 해당 섹터를 순차적으로 순환해가면서 로그를 기록하며, 복구 시에는 FAT 파일 시스템의 로그 데이터 영역의 해당 섹터로 이동하여 로그를 분석한 뒤 로그에 맞는 복구를 수행한다. 도 4의 실시예에서 로그 데이터의 크기는 NAND 플래시 메모리의 페이지 단위에 대응하도록 한다.In the log data storage method of the FAT 32 file system to which journaling is applied according to an embodiment of the present invention, as shown in FIG. 4, three sectors being used among 32 sectors of the reserved area 110 of the FAT 32 file system. Log data is recorded in 29 empty sectors except for sectors 0, 2, and 6. For example, there is sufficient space to record log data between sectors 6 and 31. Therefore, the FAT file system secures the space of the empty sectors in the reserved area 110 as the log data area, and sequentially rotates the sectors of the log data area in the reserved area 110 when the log is to be recorded. The log is recorded. When recovering, the log is moved to the corresponding sector in the log data area of the FAT file system. In the embodiment of FIG. 4, the size of log data corresponds to the page unit of the NAND flash memory.

도 5는 본 발명의 다른 실시예에 따른 저널링이 적용된 FAT 16 파일 시스템의 로그 데이터 저장 방법을 설명하는 도면이다.5 is a diagram illustrating a log data storage method of a FAT 16 file system to which journaling is applied according to another embodiment of the present invention.

본 발명의 다른 실시예에 따른 저널링이 적용된 FAT 16 파일 시스템의 로그 데이터 저장 방법은, 도 5에 도시된 바와 같이, FAT 16 파일 시스템의 예약 영역(110)을 기존의 1개의 섹터에서 예를 들어 9개 이상의 섹터로 확장하여 최소 8개의 확장된 섹터를 로그 데이터 영역으로 가진다. 따라서, FAT 파일 시스템은 예약 영역(110)내의 비어 있는 확장 섹터들의 공간을 로그 데이터 영역으로 확보하고서, 로그를 기록해야 할 경우에는 예약 영역(110)내의 로그 데이터 영역의 해당 섹터를 순차적으로 순환해가면서 로그를 기록하며, 복구 시에는 FAT 파일 시스템의 로그 데이터 영역의 해당 섹터로 이동하여 로그를 분석한 뒤 로그에 맞는 복구를 수행한다. 도 5의 실시예에서 로그 데이터의 크기는 NAND 플래시 메모리의 페이지 단위에 대응하도록 한다.In the log data storage method of the FAT 16 file system to which journaling is applied according to another embodiment of the present invention, as shown in FIG. 5, the reserved area 110 of the FAT 16 file system may be stored in one existing sector. It extends to nine or more sectors and has at least eight extended sectors as log data areas. Therefore, the FAT file system secures the space of the empty extended sectors in the reserved area 110 as the log data area, and sequentially rotates the corresponding sectors of the log data area in the reserved area 110 when a log is to be recorded. Logs are recorded as they go.In case of recovery, they move to the corresponding sectors of the log data area of the FAT file system, analyze the logs, and then perform the appropriate recovery. In the embodiment of FIG. 5, the size of log data corresponds to the page unit of the NAND flash memory.

도 6은 본 발명의 실시예에 따른 FAT 파일 시스템에서의 저널링 방법을 설명하기 위한 도면이다.6 is a diagram illustrating a journaling method in a FAT file system according to an embodiment of the present invention.

저널링 방식에는 메타 데이터에 대해서만 저널링 하는 방식과 메타 데이터와 일반 데이터 모두에 대해서 저널링 하는 방식이 있다. 일반 데이터까지 저널링 할 경우 방대한 양의 로그가 필요하기 때문에 본 발명의 실시예에서는 메타 데이터에 대해서만 저널링하는 것을 일 예로 설명한다. NAND 플래시 메모리의 환경에서 일반적인 크래시 상황은 전원차단상황(power failure)이다. 메타 데이터 혹은 데이터를 기록 중에 전원이 차단되면 메타 데이터는 기록이 되었는데 실제 데이터는 기록되지 않아 일종의 손상된 파일이 만들어지게 된다. 따라서, 본 실시예에서는 도 6과 같이 메타 데이터를 기록 혹은 변경하기 전에 해당 오퍼레이션에 대한 로그를 남기고 해당 오퍼레이션이 정상적으로 끝났을 때 OK 로그를 남겨서 로그와 OK 로그 사이에 크래시 상황이 생겼을 경우 해당 로그를 가지고 일관성 문제를 해결해 나갈 수 있도록 한다.There are two methods of journaling: journaling only for metadata and journaling for both metadata and general data. In the embodiment of the present invention, journaling only metadata is described as an example. A common crash situation in the environment of NAND flash memory is power failure. If the power is cut off while recording the metadata or data, the metadata is recorded, but the actual data is not recorded, resulting in a kind of damaged file. Therefore, in the present embodiment, before recording or changing the metadata as shown in FIG. 6, a log of the operation is left and an OK log is left when the operation is normally completed. Ensure consistency issues are addressed.

이상 설명된 본 발명의 실시예에서는 임베디드 환경에서 널리 사용되고 있는 FAT 파일시스템을 NAND 플래시 메모리의 특성에 맞게 신뢰성을 추가한 저널링 FAT 파일시스템에서의 로그 데이터 기록 방법에 관해 설명하였다. 본 발명의 실시예에 따른 저널링 FAT 파일시스템은 예약 영역을 이용하며 기존 FAT 파일시스템에 영향 을 미치지 않으면서 로그에 대한 빠른 접근이 가능하도록 한다. 또한 로그의 크기를 NAND 플래시 메모리의 페이지 단위로 맞추어 로그 기록 시 생길 수 있는 오버헤드를 줄인다. 이러한 로그 기록 환경을 이용하여 FAT 파일시스템에 저널링 기능을 추가하고 NAND 플래시 메모리를 사용하는 FAT파일 시스템의 신뢰성을 높인다. In the above-described embodiments of the present invention, a method of writing log data in a journaling FAT file system in which reliability is added to a FAT file system widely used in an embedded environment according to the characteristics of a NAND flash memory has been described. The journaling FAT file system according to an embodiment of the present invention uses a reserved area and enables quick access to logs without affecting the existing FAT file system. It also reduces the overhead of log writing by adjusting the log size in pages of NAND flash memory. Using this logging environment, the journaling function is added to the FAT file system and the reliability of the FAT file system using NAND flash memory is improved.

이상에서, 본 발명의 실시예를 구성하는 모든 구성 요소들이 하나로 결합되거나 결합되어 동작하는 것으로 설명되었다고 해서, 본 발명이 반드시 이러한 실시예에 한정되는 것은 아니다. 즉, 본 발명의 목적 범위 안에서라면, 그 모든 구성 요소들이 하나 이상으로 선택적으로 결합하여 동작할 수도 있다. 또한, 그 모든 구성 요소들이 각각 하나의 독립적인 하드웨어로 구현될 수 있지만, 각 구성 요소들의 그 일부 또는 전부가 선택적으로 조합되어 하나 또는 복수 개의 하드웨어에서 조합된 일부 또는 전부의 기능을 수행하는 프로그램 모듈을 갖는 컴퓨터 프로그램으로서 구현될 수도 있다. 그 컴퓨터 프로그램을 구성하는 코드들 및 코드 세그먼트들은 본 발명의 기술 분야의 당업자에 의해 용이하게 추론될 수 있을 것이다. 이러한 컴퓨터 프로그램은 컴퓨터가 읽을 수 있는 저장매체(Computer Readable Media)에 저장되어 컴퓨터에 의하여 읽혀지고 실행됨으로써, 본 발명의 실시예를 구현할 수 있다. 컴퓨터 프로그램의 저장매체로서는 자기 기록매체, 광 기록매체, 캐리어 웨이브 매체 등이 포함될 수 있다. In the above description, all elements constituting the embodiments of the present invention are described as being combined or operating in combination, but the present invention is not necessarily limited to the embodiments. In other words, within the scope of the present invention, all of the components may be selectively operated in combination with one or more. In addition, although all of the components may be implemented in one independent hardware, each or all of the components may be selectively combined to perform some or all functions combined in one or a plurality of hardware. It may be implemented as a computer program having a. Codes and code segments constituting the computer program may be easily inferred by those skilled in the art. Such a computer program may be stored in a computer readable storage medium and read and executed by a computer, thereby implementing embodiments of the present invention. The storage medium of the computer program may include a magnetic recording medium, an optical recording medium, a carrier wave medium, and the like.

또한, 이상에서 기재된 "포함하다", "구성하다" 또는 "가지다" 등의 용어는, 특별히 반대되는 기재가 없는 한, 해당 구성 요소가 내재될 수 있음을 의미하는 것이므로, 다른 구성 요소를 제외하는 것이 아니라 다른 구성 요소를 더 포함할 수 있는 것으로 해석되어야 한다. 기술적이거나 과학적인 용어를 포함한 모든 용어들은, 다르게 정의되지 않는 한, 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가진다. 사전에 정의된 용어와 같이 일반적으로 사용되는 용어들은 관련 기술의 문맥 상의 의미와 일치하는 것으로 해석되어야 하며, 본 발명에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다. In addition, the terms "comprise", "comprise" or "having" described above mean that the corresponding component may be included, unless otherwise stated, and thus excludes other components. It should be construed that it may further include other components instead. All terms, including technical and scientific terms, have the same meanings as commonly understood by one of ordinary skill in the art unless otherwise defined. Terms commonly used, such as terms defined in a dictionary, should be interpreted to coincide with the contextual meaning of the related art, and shall not be construed in an ideal or excessively formal sense unless explicitly defined in the present invention.

이상의 설명은 본 발명의 기술 사상을 예시적으로 설명한 것에 불과한 것으로서, 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자라면 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 다양한 수정 및 변형이 가능할 것이다. 따라서, 본 발명에 개시된 실시예들은 본 발명의 기술 사상을 한정하기 위한 것이 아니라 설명하기 위한 것이고, 이러한 실시예에 의하여 본 발명의 기술 사상의 범위가 한정되는 것은 아니다. 본 발명의 보호 범위는 아래의 청구범위에 의하여 해석되어야 하며, 그와 동등한 범위 내에 있는 모든 기술 사상은 본 발명의 권리범위에 포함되는 것으로 해석되어야 할 것이다.The foregoing description is merely illustrative of the technical idea of the present invention, and various changes and modifications may be made by those skilled in the art without departing from the essential characteristics of the present invention. Therefore, the embodiments disclosed in the present invention are not intended to limit the technical idea of the present invention but to describe the present invention, and the scope of the technical idea of the present invention is not limited by these embodiments. The protection scope of the present invention should be interpreted by the following claims, and all technical ideas within the equivalent scope should be interpreted as being included in the scope of the present invention.

이상 설명한 바와 같이, 본 발명의 실시예에 따른 저널링이 적용된 FAT 파일 시스템의 로그 데이터 저장 방법은 저널링 FAT 파일 시스템에 적용되어 예약 영역의 비어 있는 섹터에 로그 데이터를 기록하므로 기존 FAT 파일 시스템에 영향을 미치지 않으면서 로그에 대한 빠른 접근이 가능하며, 또한 NAND 플래시 메모리의 특성에 맞게 FAT 파일 시스템의 신뢰성을 향상시키는 효과가 발생하는 매우 유용한 발명이다.As described above, the log data storage method of the FAT file system to which the journaling is applied according to the embodiment of the present invention is applied to the journaling FAT file system so that log data is written to empty sectors in the reserved area, thereby affecting the existing FAT file system. It is a very useful invention that enables fast access to the log without insane, and also improves the reliability of the FAT file system according to the characteristics of the NAND flash memory.

도 1은 본 발명의 실시예가 적용되는 FAT 파일 시스템의 구조를 나타낸 도면,1 is a diagram showing the structure of a FAT file system to which an embodiment of the present invention is applied;

도 2 및 도 3은 도 1의 예약 영역의 상세 구조를 나타낸 도면,2 and 3 are views showing the detailed structure of the reserved area of FIG.

도 4는 본 발명의 일 실시예에 따른 저널링이 적용된 FAT 파일 시스템의 로그 데이터 저장 방법을 설명하는 도면,4 is a view illustrating a log data storage method of a FAT file system to which journaling is applied according to an embodiment of the present invention;

도 5는 본 발명의 다른 실시예에 따른 저널링이 적용된 FAT 파일 시스템의 로그 데이터 저장 방법을 설명하는 도면,5 is a diagram illustrating a log data storage method of a FAT file system to which journaling is applied according to another embodiment of the present invention;

도 6은 본 발명의 실시예에 따른 FAT 파일 시스템에서의 저널링 방법을 설명하기 위한 도면이다.6 is a diagram illustrating a journaling method in a FAT file system according to an embodiment of the present invention.

< 도면의 주요 장면에 대한 부호의 설명 ><Description of Symbols for Main Scenes in Drawings>

110: 예약 영역 120: FAT 영역110: reserved area 120: FAT area

130: 데이터 영역130: data area

Claims (5)

예약 영역, FAT 영역, 및 데이터 영역을 포함하는 FAT 파일 시스템에서의 로그 데이터 저장 방법에 있어서, A method of storing log data in a FAT file system including a reserved area, a FAT area, and a data area, 상기 예약 영역의 비어 있는 섹터에 로그 데이터를 기록하는 로그 데이터 기록 단계를 포함하는 것을 특징으로 하는 저널링이 적용된 FAT 파일 시스템의 로그 데이터 저장 방법.And a log data recording step of recording log data in an empty sector of the reserved area. 제 1 항에 있어서,The method of claim 1, 상기 FAT 파일 시스템은 적어도 FAT 16 파일 시스템 또는 FAT 32 파일 시스템을 포함하는 것을 특징으로 하는 저널링이 적용된 FAT 파일 시스템의 로그 데이터 저장 방법.And the FAT file system comprises at least a FAT 16 file system or a FAT 32 file system. 제 1 항에 있어서,The method of claim 1, 상기 예약 영역의 섹터를 가변적으로 확장하는 단계를 더 포함하는 것을 특징으로 하는 저널링이 적용된 FAT 파일 시스템의 로그 데이터 저장 방법.And variably expanding the sector of the reserved area. 제 1 항에 있어서,The method of claim 1, 상기 기록된 로그 데이터의 크기는 NAND 플래시 메모리의 페이지 단위에 대응하는 것을 특징으로 하는 저널링이 적용된 FAT 파일 시스템의 로그 데이터 저장 방법.And the size of the recorded log data corresponds to a page unit of a NAND flash memory. 제 1 항에 있어서, 상기 로그 데이터 기록 단계는,The method of claim 1, wherein the log data recording step, 메타데이터를 기록 또는 변경하기 전에 오퍼레이션에 대한 로그를 기록하는 단계; 및Recording a log for the operation before recording or changing the metadata; And 상기 메타데이터를 기록 또는 변경한 후 OK 로그를 기록하는 단계Recording the OK log after recording or changing the metadata 를 포함하는 것을 특징으로 하는 저널링이 적용된 FAT 파일 시스템의 로그 데이터 저장 방법.Log data storage method of the FAT file system to which the journaling is applied, comprising a.
KR1020090060144A 2009-07-02 2009-07-02 Log Data Storage Method for Journaling FAT File System KR101077500B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020090060144A KR101077500B1 (en) 2009-07-02 2009-07-02 Log Data Storage Method for Journaling FAT File System

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020090060144A KR101077500B1 (en) 2009-07-02 2009-07-02 Log Data Storage Method for Journaling FAT File System

Publications (2)

Publication Number Publication Date
KR20110002603A KR20110002603A (en) 2011-01-10
KR101077500B1 true KR101077500B1 (en) 2011-10-27

Family

ID=43610783

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020090060144A KR101077500B1 (en) 2009-07-02 2009-07-02 Log Data Storage Method for Journaling FAT File System

Country Status (1)

Country Link
KR (1) KR101077500B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20220086986A (en) * 2020-12-17 2022-06-24 주식회사 앤씨앤 Method and apparatus for managing data of storage device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20220086986A (en) * 2020-12-17 2022-06-24 주식회사 앤씨앤 Method and apparatus for managing data of storage device

Also Published As

Publication number Publication date
KR20110002603A (en) 2011-01-10

Similar Documents

Publication Publication Date Title
EP1739535B1 (en) File system storing transaction records in flash-like media
US8412752B2 (en) File system having transaction record coalescing
US7809777B2 (en) File system having deferred verification of data integrity
CA2818472C (en) Optimized startup verification of file system integrity
CA2550871C (en) File system having inverted hierarchical structure
US20110010496A1 (en) Method for management of data objects
US20150301758A1 (en) Metadata for data storage array
WO2018171296A1 (en) File merging method and controller
CN111797058B (en) Universal file system and file management method
CN101169705B (en) Method for implementing file class mirror-image under multiple hard disk based on nude file system
KR101077500B1 (en) Log Data Storage Method for Journaling FAT File System
KR101413985B1 (en) Method for file management using file system adapted to non-volatile memory
CN105630692A (en) File storage system storing file directory by using MRAM
CN100389396C (en) FAT file system error treating method and device
KR20070069295A (en) An implementation method of fat file system which the journaling is applied method

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
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20140814

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20151020

Year of fee payment: 5