KR101474285B1 - Fat file system and log data storage method of the same - Google Patents

Fat file system and log data storage method of the same Download PDF

Info

Publication number
KR101474285B1
KR101474285B1 KR1020130006487A KR20130006487A KR101474285B1 KR 101474285 B1 KR101474285 B1 KR 101474285B1 KR 1020130006487 A KR1020130006487 A KR 1020130006487A KR 20130006487 A KR20130006487 A KR 20130006487A KR 101474285 B1 KR101474285 B1 KR 101474285B1
Authority
KR
South Korea
Prior art keywords
cluster
area
log data
reserved
fat
Prior art date
Application number
KR1020130006487A
Other languages
Korean (ko)
Other versions
KR20140094706A (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 KR1020130006487A priority Critical patent/KR101474285B1/en
Publication of KR20140094706A publication Critical patent/KR20140094706A/en
Application granted granted Critical
Publication of KR101474285B1 publication Critical patent/KR101474285B1/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

Landscapes

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

Abstract

본 발명에 따른 FAT 파일 시스템은 로그 데이터의 주소 정보를 저장하는 예약 영역, 상기 로그 데이터를 저장하는 데이터 영역 및 상기 로그 데이터가 저장된 클러스터에 상응하는 예약 클러스터를 나타내는 값이 각각 할당된 복수의 FAT 엔트리들을 포함하는 FAT 영역을 포함하고, 상기 예약 클러스터를 나타내는 값은 상기 예약 클러스터의 시작을 나타내는 적어도 하나의 시작 번호 및 상기 예약 클러스터의 종료를 나타내는 적어도 하나의 종료 번호 사이의 번호로 설정된다. 따라서, 본 발명은 FAT 영역에서 시작 클러스터를 여러 개 정의하고 종료 클러스터로 마무리함으로써 여러 개의 파일을 동적으로 할당하여 사용할 수 있다.The FAT file system according to the present invention includes a plurality of FAT entries each having a reserved area for storing address information of log data, a data area for storing the log data, and a value indicating a reserved cluster corresponding to the cluster where the log data is stored Wherein the value indicating the reserved cluster is set to a number between at least one starting number indicating the start of the reserved cluster and at least one ending number indicating the end of the reserved cluster. Accordingly, the present invention can dynamically allocate a plurality of files by defining a plurality of starting clusters in the FAT area and finishing the end clusters.

Description

FAT 파일 시스템 및 이의 로그 데이터 저장 방법{FAT FILE SYSTEM AND LOG DATA STORAGE METHOD OF THE SAME}FAT FILE SYSTEM AND METHOD OF THE SAME [0002]

본 발명은 FAT 파일 시스템 및 이의 로그 데이터 저장 방법에 관한 것이다.
The present invention relates to a FAT file system and a method for storing log data.

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

저널링은 데이터베이스에서 일관성 체크를 위해 사용되는 방법을 파일 시스템에 적용한 것으로서, 파일 시스템 업데이터 시(파일을 쓰거나 메타 데이터를 수정하는 경우)에 로그를 기록하고, 문제가 발생할 경우 해당 로그를 참조하여 업데이트를 취소하거나 업데이트 내용을 파일시스템에 적용완료(Commit)할 수 있도록 하는 것이다.Journaling is the application of the method used for consistency checking in the database to the file system. It logs the file system updates (when writing files or modifying metadata), and when problems occur, Or to commit the update to the file system.

이로써 일관성 체크를 위해 파일 시스템 전체 영역을 검색하지 않고 해당 로그만을 찾아 작업을 수행하면 되므로 일관성 체크에 소요되는 시간을 현저하게 단축시킬 수 있는 장점이 있다.Thus, there is an advantage in that the time required for the consistency check can be remarkably shortened because it is required to search only the relevant log without searching the whole area of the file system for the consistency check.

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

FAT 파일 시스템은 예약 영역, FAT 영역, 디렉토리 엔트리 영역을 포함하는 메타 데이터 영역과 실제 데이터가 저장되는 영역인 데이터 영역으로 이루어진다.The FAT file system includes a metadata area including a reserved area, a FAT area, and a directory entry area, and a data area as an area where 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. When an error occurs in any one of the first FAT areas, It is designed to recover the file system using backup data. However, if the write operation is interrupted due to a power interruption or a media detachment during the write operation of the FAT area and the directory information, a serious error occurs in the file system, a long time is required to recover the error, There are many problems.

국내 공개특허 제10-2007-0069295호(2007. 07. 03. 공개)Korean Patent Laid-Open No. 10-2007-0069295 (published on 07.03.2007) 국내 공개특허 제10-2010-0030700호(2010. 03. 19. 공개)Korean Patent Laid-Open No. 10-2010-0030700 (published on Mar. 19, 2010) 국내 공개특허 제10-2011-0002603호(2011. 01. 10. 공개)Korean Patent Laid-Open No. 10-2011-0002603 (disclosed on Jan. 10, 2011)

본 발명은 데이터 영역에 저장되는 로그 데이터의 주소 정보를 예약 영역에 저장함으로써 신속하게 로그 데이터의 위치를 알 수 있도록 하는데 그 목적이 있다.An object of the present invention is to quickly locate log data by storing address information of log data stored in a data area in a reserved area.

또한 본 발명은 로그 데이터를 데이터 영역에 기록하고, FAT 영역에는 로그 데이터가 저장된 클러스터에 상응하는 예약 클러스터를 나타내는 값을 저장함으로써 사용자의 접근이 원천적으로 봉쇄되어 사용중에 로그 데이터 유실될 염려가 없고 기존 FAT 파일 시스템과의 호환성에도 전혀 영향을 주지 않도록 하는데 그 목적이 있다.In addition, the present invention records log data in a data area and stores a value indicating a reserved cluster corresponding to the cluster in which log data is stored in the FAT area. Thus, there is no fear that log data will be lost during user's access, The purpose of this is to ensure that compatibility with the FAT file system is not affected at all.

또한 본 발명은 FAT 영역에는 로그 데이터가 저장된 클러스터에 상응하는 예약 클러스터의 개수를 미리 지정하지 않고 동적으로 할당함으로써 여러 개의 파일을 사용할 수 있도록 하는데 그 목적이 있다.Another object of the present invention is to dynamically allocate a number of reserved clusters corresponding to clusters in which log data is stored in the FAT area, without specifying the number of reserved clusters in advance, so that a plurality of files can be used.

또한 본 발명은 FAT 영역에서 시작 클러스터를 여러 개 정의하고 종료 클러스터로 마무리함으로써 여러 개의 파일을 동적으로 할당하여 사용할 수 있도록 하는데 그 목적이 있다.
In addition, the present invention aims at defining a plurality of starting clusters in the FAT area and finalizing the starting clusters in the FAT area, thereby dynamically allocating and using a plurality of files.

상기한 본 발명에 의한 FAT 파일 시스템은 로그 데이터의 주소 정보를 저장하는 예약 영역, 상기 로그 데이터를 저장하는 데이터 영역 및 상기 로그 데이터가 저장된 클러스터에 상응하는 예약 클러스터를 나타내는 값이 각각 할당된 복수의 FAT 엔트리들을 포함하는 FAT 영역을 포함하고, 상기 예약 클러스터를 나타내는 값은 상기 예약 클러스터의 시작을 나타내는 적어도 하나의 시작 번호 및 상기 예약 클러스터의 종료를 나타내는 적어도 하나의 종료 번호 사이에 있는 번호로 설정된다.The FAT file system according to the present invention includes a reserved area for storing address information of log data, a data area for storing the log data, and a plurality of And a FAT area containing FAT entries, wherein the value indicating the reserved cluster is set to a number between at least one starting number indicating the start of the reserved cluster and at least one ending number indicating the end of the reserved cluster .

본 발명의 하나의 측면에 의하면, 상기 예약 클러스터를 나타내는 값은 상기 시작 번호에 연속한 번호 또는 상기 종료 번호보다 작은 번호 중 상기 시작 번호에 불연속한 번호 중 어느 하나의 번호로 설정될 수 있다.According to an aspect of the present invention, a value indicating the reserved cluster may be set to any one of a number consecutive to the start number or a number discontinuous to the start number among the numbers less than the end number.

본 발명의 하나의 측면에 의하면, 상기 예약 영역은 상기 로그 데이터가 기록된 데이터 영역을 지시하는 클러스터 정보를 저장할 수 있다.According to an aspect of the present invention, the reserved area may store cluster information indicating a data area in which the log data is recorded.

본 발명의 하나의 측면에 의하면, 상기 로그 데이터는 상기 예약 영역에 기록된 클러스터 정보에 따라 획득될 수 있다. According to one aspect of the present invention, the log data may be acquired according to the cluster information recorded in the reserved area.

또한 본 발명에 의한 로그 데이터 저장 방법은 예약 영역에 로그 데이터를 저장할 공간이 존재하면 상기 예약 영역에 로그 데이터의 주소 정보가 존재하는지 여부를 판단하는 단계, 상기 예약 영역에 로그 데이터의 주소 정보가 존재하지 않는 경우 데이터 영역 상에 로그 데이터가 저장될 클러스터를 결정하는 단계 및 상기 결정된 클러스터에 상응하는 FAT 엔트리에 예약 클러스터를 나타내는 값을 기록하는 단계를 포함하고, 상기 예약 클러스터를 나타내는 값은 상기 예약 클러스터의 시작을 나타내는 적어도 하나의 시작 번호 및 상기 예약 클러스터의 종료를 나타내는 적어도 하나의 종료 번호 사이에 있는 번호로 설정된다.According to another aspect of the present invention, there is provided a method of storing log data, the method comprising: determining whether address information of log data exists in the reserved area if there is space for storing log data in the reserved area; Determining a cluster to which log data is to be stored on a data area if the FAT entry does not exist, and writing a value indicating a reserved cluster in a FAT entry corresponding to the determined cluster, At least one start number indicating the start of the reserved cluster and at least one end number indicating the end of the reserved cluster.

본 발명의 하나의 측면에 의하면, 상기 로그 데이터 저장 방법은 FAT 엔트리들 중 예약 클러스터의 시작을 지시하는 시작 번호가 할당된 FAT 엔트리가 존재하는지 여부를 판단하는 단계를 포함할 수 있다.According to an aspect of the present invention, the log data storing method may include determining whether there is a FAT entry to which a start number indicating a start of a reserved cluster among the FAT entries is allocated.

본 발명의 하나의 측면에 의하면, 상기 FAT 엔트리에 예약 클러스터를 나타내는 값을 기록하는 단계는 상기 예약 클러스터의 시작을 지시하는 시작 번호가 할당된 FAT 엔트리가 존재하면 상기 시작 번호에 연속한 번호 또는 상기 종료 번호보다 작은 번호 중 상기 시작 번호에 불연속한 번호 중 어느 하나의 번호를 예약 클러스터를 나타내는 값으로서 FAT 엔트리에 기록하는 단계를 포함할 수 있다.According to an aspect of the present invention, the step of writing a value indicating a reserved cluster in the FAT entry may include: if a FAT entry to which a start number indicating the start of the reserved cluster exists, And recording the number of any one of the numbers less than the ending number discontinuous to the start number as a value indicating the reserved cluster in the FAT entry.

본 발명의 하나의 측면에 의하면, 상기 로그 데이터 저장 방법은 상기 예약 영역에 로그 데이터의 주소 정보가 존재하는 경우 상기 주소 정보를 참조하여 데이터 영역에 기록된 로그 데이터를 독출하는 단계를 포함할 수 있다.According to an aspect of the present invention, the log data storing method may include reading log data recorded in a data area by referring to the address information when address information of log data exists in the reserved area have.

본 발명의 하나의 측면에 의하면, 상기 주소 정보는 상기 로그 데이터가 기록된 데이터 영역을 지시하는 클러스터 정보일 수 있다.
According to an aspect of the present invention, the address information may be cluster information indicating a data area in which the log data is recorded.

본 발명의 일 실시예에 따르면, 데이터 영역에 저장되는 로그 데이터의 주소 정보를 예약 영역에 저장함으로써 신속하게 로그 데이터의 위치를 알 수 있도록 한다.According to an embodiment of the present invention, the address information of the log data stored in the data area is stored in the reserved area so that the location of the log data can be known quickly.

본 발명의 일 실시예에 따르면, 로그 데이터를 데이터 영역에 기록하고, FAT 영역에는 로그 데이터가 저장된 클러스터에 상응하는 예약 클러스터를 나타내는 값을 저장함으로써 사용자의 접근이 원천적으로 봉쇄되어 사용중에 로그 데이터 유실될 염려가 없고 기존 FAT 파일 시스템과의 호환성에도 전혀 영향을 주지 않도록 한다.According to an embodiment of the present invention, log data is recorded in a data area, and a value indicating a reserved cluster corresponding to a cluster in which log data is stored is stored in the FAT area so that the user's access is fundamentally blocked, And does not affect compatibility with existing FAT file systems at all.

본 발명의 일 실시예에 따르면, FAT 영역에는 로그 데이터가 저장된 클러스터에 상응하는 예약 클러스터의 개수를 미리 지정하지 않고 동적으로 할당함으로써 여러개의 파일을 사용할 수 있도록 한다.According to an embodiment of the present invention, a plurality of files can be used by dynamically allocating a number of reserved clusters corresponding to clusters in which log data is stored in the FAT area without specifying them in advance.

본 발명의 일 실시예에 따르면, FAT 영역에서 시작 클러스터를 여러 개 정의하고 종료 클러스터로 마무리함으로써 여러 개의 파일을 동적으로 할당하여 사용할 수 있다.
According to an embodiment of the present invention, a plurality of start clusters are defined in the FAT area, and a plurality of files are dynamically allocated by finishing the end clusters.

도 1은 일반적인 FAT 파일 시스템을 설명하는 도면이다.
도 2는 본 발명의 일 실시예에 따른 FAT 파일 시스템을 설명하는 도면이다.
도 3은 본 발명에 따른 FAT 파일 시스템의 로그 데이터 저장 방법의 일 실시예를 설명하는 흐름도이다.
1 is a view for explaining a general FAT file system.
2 is a diagram illustrating a FAT file system according to an embodiment of the present invention.
3 is a flowchart illustrating an embodiment of a log data storing method of the FAT file system according to the present invention.

이하, 본 발명의 바람직한 실시예를 첨부도면을 참조하여 상세히 설명하기로 한다.Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings.

도 1은 일반적인 FAT 파일 시스템을 설명하는 도면이다.1 is a view for explaining a general FAT file system.

도 1을 참조하면, FAT 파일 시스템은 예약 영역(101), FAT 영역(102) 및 데이터 영역(103)을 포함한다. Referring to FIG. 1, the FAT file system includes a reserved area 101, a FAT area 102, and a data area 103.

예약 영역(101)은 로그 영역(3)에 저장되는 로드 데이터의 저장 주소 정보를 저장한다. The reserved area 101 stores the storage address information of the load data stored in the log area 3.

FAT 영역(102)은 다른 영역들처럼 특별한 구조체가 존재하는 것이 아니라 단순히 클러스터의 상태 값을 담고 있는 공간이 연속되는 단순한 형태를 띠고 있다. FAT 영역(102)은 각각의 파일이나 디렉토리가 데이터영역 내에 저장된 위치를 단일 연결 리스트로 표현하고 있다. FAT 영역(102)에 있는 각각의 FAT 엔트리들(105)은 자신의 다음 클러스터 번호를 담고 있게 된다. The FAT area 102 has a simple structure in which a space including a state value of a cluster is continuous rather than a special structure like other areas. The FAT area 102 represents a location where each file or directory is stored in the data area as a single linked list. Each FAT entry 105 in the FAT area 102 will contain its next cluster number.

FAT 엔트리들(105)에는 다음 클러스터의 번호정보 외에 비어 있음을 나타내는 값(0x?0000000), 예약된 클러스터임을 나타내는 값(0x?FFFFFF0 ~ 0x?FFFFFF6), 불량 클러스터임을 나타내는 값(0x?FFFFFF7) 및 파일의 마지막 클러스터임을 나타내는 값(0x?FFFFFF8 ~ 0x?FFFFFFF)이 저장될 수 있다. FAT 엔트리들(105) 중 예약 클러스터는 0x0FFFFFFF3으로만 특정하여 0x0FFFFFFF3이라고 저장된 클러스터의 위치를 로그 데이터의 영역으로 간주하였다. FFFFFF0 to 0xFFFFF6 indicating that the cluster is reserved, a value (0xFFFFF7) indicating that the cluster is a bad cluster, And a value (0x? FFFFFF8 ~ 0x? FFFFFFF) indicating that this is the last cluster of the file. Among the FAT entries 105, the reserved cluster is specified as 0x0FFFFFFF3, and the location of the cluster stored as 0x0FFFFFFF3 is regarded as the area of the log data.

하지만, 로그 데이터의 크기를 미리 정해야하며 연속적인 구간만을 사용할 수 있다는 문제점이 있다. 예를 들어, 로그 데이터의 크기를 10개 클러스터로 정의하고, 로그 데이터의 시작 클러스터를 0x1000번으로 정하면 0x1000번 클러스터부터 0x1009번 클러스터까지 연속된 클러스터 10개를 사용해야 한다.However, there is a problem that the size of the log data must be determined in advance and only a continuous section can be used. For example, if the size of log data is defined as 10 clusters and the start cluster of log data is set to 0x1000, 10 clusters from 0x1000 cluster to 0x1009 cluster should be used.

데이터 영역(103)은 로그 데이터가 저장되는 로그 영역(104)을 할당한다. 보다 구체적으로, 데이터 영역(103)은 파일과 디렉토리, 2가지 형태의 데이터가 저장된다. 파일은 클러스터 시작부터 끝까지 파일의 내용만이 저장되어 있다. 디렉토리는 디렉토리 엔트리라는 구조체들의 집합이다. 디렉토리에 포함되어 있는 내용은 디렉토리 엔트리라는 것만 빼고는 파일과 형태와 접근 방법이 동일하다.
The data area 103 allocates a log area 104 in which log data is stored. More specifically, the data area 103 stores two types of data, that is, a file and a directory. The file contains only the contents of the file from start to end of the cluster. A directory is a collection of structures called directory entries. The contents of a directory are the same as the file and its type and access method, except that it is a directory entry.

도 2는 본 발명의 일 실시예에 따른 FAT 파일 시스템을 설명하는 도면이다.2 is a diagram illustrating a FAT file system according to an embodiment of the present invention.

도 2를 참조하면, FAT 파일 시스템은 도 1의 FAT 파일 시스템과 동일하게 예약 영역(101), FAT 영역(102) 및 데이터 영역(103)으로 구성되며, 디렉토리 엔트리 영역(105)은 데이터 영역(103) 내의 일부 영역에 할당되는 것으로 도시를 생략하였다.2, the FAT file system is composed of a reserved area 101, a FAT area 102, and a data area 103 in the same manner as the FAT file system of FIG. 1, and the directory entry area 105 is a data area 103, which are not shown.

예약 영역(101)은 FAT32의 경우 32개의 섹터가 할당되는데, 첫 번째 섹터(106)는 부트 레코드(Boot Record)로 할당되고 두 번째 섹터(107)는 FSinfo 구조체가 저장되며, 나머지 섹터들은 사용되지 않지만 '0'으로 초기화되어 있다. 따라서, 본원발명에서는 사용되지 않는 섹터 중 일부를 로그 데이터 주소 정보 영역(108)에 저장되는 로그 데이터의 주소 정보를 저장한다.In the case of the FAT 32, 32 sectors are allocated to the reserved area 101. The first sector 106 is allocated as a boot record, the second sector 107 is stored as an FSinfo structure, and the remaining sectors are not used It is initialized to '0'. Accordingly, in the present invention, the address information of the log data stored in the log data address information area 108 is stored in a part of unused sectors.

예약 영역(101)은 로그 영역(104)에 저장되는 로드 데이터의 저장 주소 정보를 저장한다. 보다 구체적으로, 예약 영역(101)은 미래를 위해 예약해 놓은 영역으로서 보통 FAT 16의 경우 1섹터를 FAT 32인 경우에는 32섹터를 할당하며 임의적으로 늘릴 수도 있다. 이 영역에 부팅을 위한 기계어와 FAT 파일시스템의 여러 설정 값들이있는 부트 섹터(Boot Sector)가 오게 된다.The reserved area 101 stores the storage address information of the load data stored in the log area 104. More specifically, the reserved area 101 is reserved for future use. In general, one sector is allocated for FAT 16, and 32 sectors are allocated for FAT 32, and the number of sectors is arbitrarily increased. In this area, the boot sector (boot sector) comes with the machine language for booting and various settings of the FAT file system.

FAT 영역(102)은 클러스터들을 관리하는 테이블이 모여 있는 공간이다. FAT 영역(102)을 통해서 어떤 클러스터가 비어 있는지, 어떤 파일에 어떤 클러스터가 연결되어 있는지를 알 수 있게 된다. 따라서 이 영역이 손상되면 작게는 파일, 크게는 파일시스템 전체가 손상될 수 있다. The FAT area 102 is a space where tables for managing clusters are gathered. Through the FAT area 102, it is possible to know which cluster is empty and which cluster is connected to which file. Therefore, if this area is damaged, a smaller file can be damaged, or a larger file system can be damaged entirely.

일 실시예에서, FAT 영역(102)은 로그 데이터가 저장된 클러스터에 상응하는 예약 클러스터를 나타내는 값이 각각 할당된다. 보다 구체적으로, FAT 영역(102)은 4 Byte(FAT16의 경우에는 2Byte)단위의 FAT 엔트리들(105)로 구획되어 있다. FAT 엔트리들(105) 각각의 번호는 데이터 영역(103) 상에서 로그 데이터가 저장된 클러스터에 상응하는 예약 클러스터를 나타내는 값이고, FAT 엔트리들(105)에는 통상 자신의 다음에 연결되는 클러스터의 번호 값을 담고 있다.In one embodiment, the FAT area 102 is assigned a value indicating a reserved cluster corresponding to the cluster in which the log data is stored, respectively. More specifically, the FAT area 102 is divided into FAT entries 105 in units of 4 Bytes (2 bytes in the case of FAT16). The number of each of the FAT entries 105 is a value indicating a reserved cluster corresponding to the cluster in which the log data is stored in the data area 103. The FAT entries 105 usually have a number value .

FAT 엔트리들(105)에는 다음 클러스터의 번호정보 외에 비어 있음을 나타내는 값(0x?0000000), 예약된 클러스터임을 나타내는 값(0x?FFFFFF0 ~ 0x?FFFFFF6), 불량 클러스터임을 나타내는 값(0x?FFFFFF7) 및 파일의 마지막 클러스터임을 나타내는 값(0x?FFFFFF8 ~ 0x?FFFFFFF)이 저장될 수 있다.FFFFFF0 to 0xFFFFF6 indicating that the cluster is reserved, a value (0xFFFFF7) indicating that the cluster is a bad cluster, And a value (0x? FFFFFF8 ~ 0x? FFFFFFF) indicating that this is the last cluster of the file.

로그 영역(104)에 대응되는 FAT 엔트리들(105)에는 예약 클러스터의 시작을 지시하는 시작 번호(0x00)부터 예약 클러스터의 종료를 지시하는 종료번호(0x6F) 사이에 있는 번호가 기록될 수 있다. 여기에서, FAT 엔트리들(105)에 기록되는 예약 클러스터를 나타내는 값은 시작 번호에 연속된 번호 또는 시작 번호에 불연속된 번호 중 어느 하나의 번호로 설정될 수 있다.The FAT entries 105 corresponding to the log area 104 may be recorded with a number between the start number (0x00) indicating the start of the reserved cluster and the end number (0x6F) indicating the end of the reserved cluster. Here, the value indicating the reserved cluster to be recorded in the FAT entries 105 may be set to either a number consecutive to the start number or a number discontinued to the start number.

예를 들어, 도 2와 같은 FAT 시스템에서 예약 클러스터의 시작을 지시하는 시작 번호가 0x00번으로 사용하고, 예약 클러스터의 종료를 지시하는 종료 번호가 0x6?인 경우, 0x1FFFFFF0(0x01), 0x3FFFFFF0(0x03), 0x0FFFFFF6(0x06)의 순으로 예약 클러스터를 나타내는 값이 FAT 엔트리들(105)에 기록될 수 있다. For example, in the FAT system shown in FIG. 2, when the start number for instructing the start of the reserved cluster is 0x00 and the end number for indicating the end of the reserved cluster is 0x6 ?, 0x1FFFFFF0 (0x01), 0x3FFFFFF0 ), And 0x0FFFFFF6 (0x06) may be recorded in the FAT entries 105 indicating the reserved cluster.

여기에서, 0x1FFFFFF0(0x01)와 0x3FFFFFF0(0x03)의 중간에 있는 0x02번을 예약 클러스터를 나타내는 값으로 FAT 엔트리들(105)에 기록될 수 있고, 기록하지 않을 수 있다. 또한, 0x00번에서 0x5F 번 사이에 있는 클러스터 번호는 연속 번호(예를 들어,0x01, 0x02, 0x03) 또는 불연속 번호(0x01, 0x03, 0x06) 중 어느 하나의 번호이며, 예약 클러스터를 나타내는 값으로 FAT 엔트리들(105)에 기록될 수 있다.Here, 0x02 in the middle of 0x1FFFFFF0 (0x01) and 0x3FFFFFF0 (0x03) may be recorded in the FAT entries 105 as a value indicating the reserved cluster, and may not be recorded. The cluster number between 0x00 and 0x5F is any one of a serial number (for example, 0x01, 0x02, 0x03) or a discontinuity number (0x01, 0x03, 0x06) Entries 105 may be recorded.

데이터 영역(103)은 파일 또는 디렉토리가 저장되어 있다. 데이터 영역(103)은 클러스터라고 불리는 논리적인 단위로 읽기/쓰기가 된다. 클러스터는 섹터(Sector)들의 집합으로써 FAT 파일시스템 포맷 시 저장장치의 용량에 의해서 정해지게 된다. 본 발명의 실시예에 따른 로그 데이터 기록 방법은 예약 영역(101)을 이용하는 방식이다.
The data area 103 stores a file or a directory. The data area 103 is read / written in a logical unit called a cluster. The cluster is a set of sectors, which is determined by the capacity of the storage device when formatting the FAT file system. The log data recording method according to the embodiment of the present invention is a method using the reserved area 101.

도 3은 본 발명에 따른 FAT 파일 시스템의 로그 데이터 저장 방법의 일 실시예를 설명하는 흐름도이다.3 is a flowchart illustrating an embodiment of a log data storing method of the FAT file system according to the present invention.

도 3을 참조하면, FAT 파일 시스템은 예약 영역에 로그 데이터를 저장할 공간이 존재하면 예약 영역에 로그 데이터의 주소 정보가 존재하는지 여부를 판단한다(단계 S310). FAT 파일 시스템은 예약 영역에 로그 데이터의 주소 정보가 존재하지 않는 경우(단계 S320) 데이터 영역 상에 로그 데이터가 저장될 클러스터를 결정한다(단계 S330). FAT 파일 시스템은 로그 데이터가 저장될 클러스터에 상응하는 FAT 엔트리에 예약 클러스터를 나타내는 값을 기록한다(단계 S340). 여기에서, 예약 클러스터를 나타내는 값은 적어도 하나의 시작 번호 및 적어도 하나의 종료 번호를 포함하고, 시작 번호부터 종료 번호 사이의 번호는 연속 번호 또는 불연속 번호 중 어느 하나의 번호로 설정될 수 있다. Referring to FIG. 3, the FAT file system determines whether address information of log data exists in a reserved area if there is space for storing log data in the reserved area (step S310). If there is no address information of the log data in the reserved area (step S320), the FAT file system determines a cluster in which the log data is to be stored on the data area (step S330). The FAT file system writes a value indicating the reserved cluster in the FAT entry corresponding to the cluster where the log data is to be stored (step S340). Here, the value indicating the reserved cluster includes at least one start number and at least one end number, and the number between the start number and the end number may be set to any one of a serial number or a discontinuity number.

도 3에는 도시되어 있지 않지만, FAT 파일 시스템은 FAT 엔트리들 중 예약 클러스터의 시작을 지시하는 시작 번호가 할당된 FAT 엔트리가 존재하는지 여부를 판단할 수 있다. FAT 파일 시스템은 예약 클러스터의 시작을 지시하는 시작 번호가 할당된 FAT 엔트리가 존재하면 시작 번호에 연속 번호 또는 종료 번호보다 작은 불연속 번호 중 어느 하나의 번호를 예약 클러스터를 나타내는 값으로서 FAT 엔트리에 기록될 수 있다. 예를 들어, 도 2와 같은 FAT 시스템에서 예약 클러스터의 시작을 지시하는 시작 번호가 0x00번으로 사용하고, 예약 클러스터의 종료를 지시하는 종료 번호가 0x6?인 경우, 0x1FFFFFF0(0x01), 0x3FFFFFF0(0x03), 0x0FFFFFF6(0x06)의 순으로 예약 클러스터를 나타내는 값이 기록될 수 있다. 여기에서, 0x1FFFFFF0(0x01)와 0x3FFFFFF0(0x03)의 중간에 있는 0x02번을 예약 클러스터를 나타내는 값으로 기록될 수 있고, 0x00번에서 0x5F 번 사이에 있는 클러스터 번호는 연속 번호 또는 불연속 번호 중 어느 하나의 번호가 예약 클러스터를 나타내는 값으로 기록될 수 있다. Although not shown in FIG. 3, the FAT file system can determine whether there is a FAT entry assigned a start number indicating the start of a reserved cluster among the FAT entries. The FAT file system records either a serial number in the start number or a discontinuity number smaller than the end number in the FAT entry as a value indicating the reserved cluster if there is a FAT entry assigned a start number indicating the start of the reserved cluster . For example, in the FAT system shown in FIG. 2, when the start number for instructing the start of the reserved cluster is 0x00 and the end number for indicating the end of the reserved cluster is 0x6 ?, 0x1FFFFFF0 (0x01), 0x3FFFFFF0 ), And a value indicating 0x0FFFFFF6 (0x06) in the order of reserved cluster can be recorded. Here, 0x02 in the middle of 0x1FFFFFF0 (0x01) and 0x3FFFFFF0 (0x03) can be recorded as a value indicating the reserved cluster, and cluster numbers in the range of 0x00 to 0x5F can be recorded as either a serial number or a discontinuity number The number may be recorded as a value indicating the reserved cluster.

FAT 파일 시스템은 예약 영역에 로그 데이터의 주소 정보가 존재하는 경우 상기 주소 정보를 참조하여 데이터 영역에 기록된 로그 데이터를 독출할 수 있다. 여기에서, 주소 정보는 로그 데이터가 기록된 데이터 영역을 지시하는 클러스터 정보일 수 있다.
The FAT file system can read the log data recorded in the data area by referring to the address information when the address information of the log data exists in the reserved area. Here, the address information may be cluster information indicating a data area in which log data is recorded.

지금까지 본 발명에 따른 구체적인 실시예에 관하여 설명하였으나, 본 발명의 범위에서 벗어나지 않는 한도 내에서는 여러 가지 변형이 가능함은 물론이다. 그러므로, 본 발명의 범위는 설명된 실시예에 국한되어 정해져서는 안 되며, 후술하는 특허 청구의 범위뿐 아니라 이 특허 청구의 범위와 균등한 것들에 의해 정해져야 한다.While the present invention has been described in connection with what is presently considered to be practical exemplary embodiments, it is to be understood that the invention is not limited to the disclosed embodiments. Therefore, the scope of the present invention should not be limited to the described embodiments, but should be determined by the scope of the appended claims and equivalents thereof.

이상과 같이 본 발명은 비록 한정된 실시예와 도면에 의해 설명되었으나, 본 발명은 상기의 실시예에 한정되는 것은 아니며, 이는 본 발명이 속하는 분야에서 통상의 지식을 가진 자라면 이러한 기재로부터 다양한 수정 및 변형이 가능하다. 따라서, 본 발명 사상은 아래에 기재된 특허청구범위에 의해서만 파악되어야 하고, 이의 균등 또는 등가적 변형 모두는 본 발명 사상의 범주에 속한다고 할 것이다.
While the present invention has been particularly shown and described with reference to exemplary embodiments thereof, it is to be understood that the invention is not limited to the disclosed exemplary embodiments, but, on the contrary, Modification is possible. Accordingly, the spirit of the present invention should be understood only in accordance with the following claims, and all equivalents or equivalent variations thereof are included in the scope of the present invention.

101 : 예약 영역 102 : FAT 영역
103 : 데이터 영역 104 : 로그 영역
105 : 엔트리 영역 106 : 부트 레코드
107 : Fsinfo 108 : 로그 데이터 주소 공간
109 : 자유 공간
101: reserved area 102: FAT area
103: data area 104: log area
105: entry area 106: boot record
107: Fsinfo 108: Log data address space
109: free space

Claims (9)

로그 데이터의 주소 정보를 저장하는 예약 영역;
상기 로그 데이터를 저장하는 데이터 영역; 및
상기 로그 데이터가 저장된 클러스터에 상응하는 예약 클러스터를 나타내는 값이 각각 할당된 복수의 FAT 엔트리들을 포함하는 FAT 영역을 포함하고,
상기 복수의 FAT 엔트리들 각각에는 상기 예약 클러스터의 시작을 나타내는 적어도 하나의 시작 번호 및 상기 예약 클러스터의 종료를 나타내는 종료 번호가 기록되며, 상기 로그 데이터가 상기 데이터 영역에 저장될 때 마다 상기 적어도 하나의 시작 번호 및 상기 종료 번호 사이의 번호 중 특정 번호에 연속한 번호 또는 불연속한 번호가 상기 로그 데이터가 저장된 클러스터에 상응하는 예약 클러스터를 나타내는 값으로 기록되는 FAT 파일 시스템.
A reservation area for storing address information of log data;
A data area for storing the log data; And
And a FAT area including a plurality of FAT entries each assigned a value indicating a reserved cluster corresponding to the cluster where the log data is stored,
Wherein each of the plurality of FAT entries is recorded with at least one start number indicating the start of the reserved cluster and an end number indicating an end of the reserved cluster and wherein each time the log data is stored in the data area, Wherein a consecutive number or a discontinuous number of a specific number among the numbers between the start number and the end number is recorded as a value indicating a reserved cluster corresponding to the cluster where the log data is stored.
삭제delete 제1항에 있어서,
상기 예약 영역은
상기 로그 데이터가 기록된 데이터 영역을 지시하는 클러스터 정보를 저장하는 것을 특징으로 하는 FAT 파일 시스템.
The method according to claim 1,
The reserved area
And cluster information indicating a data area in which the log data is recorded is stored.
제3항에 있어서,
상기 로그 데이터의 저장 위치는
상기 예약 영역에 기록된 클러스터 정보에 따라 획득되는 것을 특징으로 하는 FAT 파일 시스템.
The method of claim 3,
The storage location of the log data is
And the cluster information is acquired in accordance with the cluster information recorded in the reserved area.
FAT 파일 시스템에서 실행되는 로그 데이터 저장 방법에 있어서,
예약 영역에 로그 데이터를 저장할 공간이 존재하면 상기 예약 영역에 로그 데이터의 주소 정보가 존재하는지 여부를 판단하는 단계;
상기 예약 영역에 로그 데이터의 주소 정보가 존재하지 않는 경우 데이터 영역 상에 로그 데이터가 저장될 클러스터를 결정하는 단계; 및
상기 결정된 클러스터에 상응하는 복수의 FAT 엔트리들 각각에 예약 클러스터의 시작을 나타내는 적어도 하나의 시작 번호 및 상기 예약 클러스터의 종료를 나타내는 종료 번호가 기록하는 단계를 포함하고,
상기 로그 데이터가 상기 데이터 영역에 저장될 때마다 상기 적어도 하나의 시작 번호 및 상기 종료 번호 사이의 번호 중 특정 번호에 연속한 번호 또는 불연속한 번호가 상기 로그 데이터가 저장된 클러스터에 상응하는 예약 클러스터를 나타내는 값으로 기록되는 단계를 더 포함하는 FAT 파일 시스템의 로그 데이터 저장 방법.
A method for storing log data to be executed in a FAT file system,
Determining whether address information of log data exists in the reserved area if there is space for storing log data in the reserved area;
Determining a cluster in which log data is to be stored in the data area when the address information of the log data does not exist in the reserved area; And
Recording at least one start number indicating the start of the reserved cluster and an end number indicating the end of the reserved cluster in each of the plurality of FAT entries corresponding to the determined cluster,
Each time the log data is stored in the data area, a consecutive number or a discontinuous number in a specific number among the numbers between the at least one start number and the end number indicates a reserved cluster corresponding to the cluster in which the log data is stored Value of the FAT file system.
제5항에 있어서,
상기 복수의 FAT 엔트리들 중 예약 클러스터의 시작을 지시하는 시작 번호가 할당된 FAT 엔트리가 존재하는지 여부를 판단하는 단계를 포함하는 FAT 파일 시스템의 로그 데이터 저장 방법.
6. The method of claim 5,
Determining whether there is a FAT entry to which a start number indicating a start of a reserved cluster among the plurality of FAT entries is allocated.
삭제delete 제5항에 있어서,
상기 예약 영역에 로그 데이터의 주소 정보가 존재하는 경우 상기 주소 정보를 참조하여 데이터 영역에 기록된 로그 데이터를 독출하는 단계를 포함하는 것을 특징으로 하는 FAT 파일 시스템의 로그 데이터 저장 방법.
6. The method of claim 5,
If the address information of the log data exists in the reserved area, reading the log data recorded in the data area by referring to the address information.
제8항에 있어서,
상기 주소 정보는
상기 로그 데이터가 기록된 데이터 영역을 지시하는 클러스터 정보인 것을 특징으로 하는 FAT 파일 시스템의 로그 데이터 저장 방법.
9. The method of claim 8,
The address information
Wherein the log data is cluster information indicating a data area in which the log data is recorded.
KR1020130006487A 2013-01-21 2013-01-21 Fat file system and log data storage method of the same KR101474285B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020130006487A KR101474285B1 (en) 2013-01-21 2013-01-21 Fat file system and log data storage method of the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020130006487A KR101474285B1 (en) 2013-01-21 2013-01-21 Fat file system and log data storage method of the same

Publications (2)

Publication Number Publication Date
KR20140094706A KR20140094706A (en) 2014-07-31
KR101474285B1 true KR101474285B1 (en) 2014-12-23

Family

ID=51740242

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020130006487A KR101474285B1 (en) 2013-01-21 2013-01-21 Fat file system and log data storage method of the same

Country Status (1)

Country Link
KR (1) KR101474285B1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20220102489A (en) * 2021-01-13 2022-07-20 삼성전자주식회사 Electronic device and method for updating database based on reserve space
US11907166B2 (en) 2021-01-13 2024-02-20 Samsung Electronics Co., Ltd. Electronic device and method for updating database based on reserved space

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20100030700A (en) * 2008-09-11 2010-03-19 엠진 (주) Log data storage structure for fat file system adopting journaling and method for journaling in fat file system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20100030700A (en) * 2008-09-11 2010-03-19 엠진 (주) Log data storage structure for fat file system adopting journaling and method for journaling in fat file system

Also Published As

Publication number Publication date
KR20140094706A (en) 2014-07-31

Similar Documents

Publication Publication Date Title
JP4749255B2 (en) Storage system control device having multiple types of storage devices
JP4388078B2 (en) Method for generating symbolic link maintaining compatibility with file system, method and apparatus for accessing file / directory using symbolic link
US8095752B2 (en) Storage access device issuing I/O requests, in an associated logical unit environment
US7861311B2 (en) Apparatus and method of managing hidden area
US7694105B2 (en) Data storage systems that implement sector sets
US9678672B2 (en) Selective erasure of expired files or extents in deduplicating virutal media for efficient file reclamation
US8719533B2 (en) Storage apparatus, computer system, and data migration method
US8977802B2 (en) Access device, information recording device, controller, real time information recording system, access method, and program
JP6095012B2 (en) Meta information writing method, meta information reading method, file management system, computer system, program, and data structure
JP2012243385A (en) Storage device with inline address indirection metadata storage
CN107678981A (en) Data processing method and device
KR20140060308A (en) Efficient access to storage devices with usage bitmaps
CN111143285A (en) Small file storage file system and small file processing method
CN101853275A (en) Data management method of FAT file system and system
CN102541969B (en) File protection method and system based on file allocation table (FAT) file system, and memory
KR101474285B1 (en) Fat file system and log data storage method of the same
US20090112951A1 (en) Apparatus and method of managing files and memory device
KR100954603B1 (en) A log file of file system and method for recovering file system
KR102094786B1 (en) File system and method of storing files based on the file system
KR101413985B1 (en) Method for file management using file system adapted to non-volatile memory
US10936231B2 (en) Allocating snapshot group identifiers
CN102117316B (en) FAT (file allocation table) file system formatting method and device
KR100939814B1 (en) Method of managing and writing log file for flash memory
KR20110002603A (en) Log data storage method for journaling fat file system
JP4480592B2 (en) File system

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: 20170921

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20181002

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20191203

Year of fee payment: 6