KR101984495B1 - Removable storage device and system comprising the same - Google Patents
Removable storage device and system comprising the same Download PDFInfo
- Publication number
- KR101984495B1 KR101984495B1 KR1020120115531A KR20120115531A KR101984495B1 KR 101984495 B1 KR101984495 B1 KR 101984495B1 KR 1020120115531 A KR1020120115531 A KR 1020120115531A KR 20120115531 A KR20120115531 A KR 20120115531A KR 101984495 B1 KR101984495 B1 KR 101984495B1
- Authority
- KR
- South Korea
- Prior art keywords
- transaction
- metadata
- log
- storage device
- log information
- Prior art date
- Legal status (The legal status 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 status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1458—Management of the backup or restore process
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0614—Improving the reliability of storage systems
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Quality & Reliability (AREA)
- Human Computer Interaction (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
이동식 저장 장치 및 시스템이 제공된다. 상기 이동식 저장 장치는 메타데이터의 업데이트 관련 정보를 포함하는 로그 정보(log information)를 제공받는 입력부; 상기 로그 정보를 저장하는 로그 저장부; 및 트랜잭션(transaction)에 포함되는 적어도 하나의 메타데이터의 업데이트 작업을 수행하되, 상기 트랜잭션이 중단된 경우 상기 로그 정보를 이용하여 상기 중단된 트랜잭션을 복구(recovery)하는 트랜잭션 매니저(transaction manager)를 포함한다.Removable storage devices and systems are provided. The portable storage device includes an input unit for receiving log information including update related information of metadata; A log storage unit for storing the log information; And a transaction manager for performing at least one update of the metadata included in the transaction and recovering the interrupted transaction using the log information when the transaction is interrupted do.
Description
본 발명은 이동식 저장 장치 및 이를 포함하는 시스템에 관한 것이다.The present invention relates to a removable storage device and a system including the same.
이동식 저장 장치는 호스트에 장착되어 동작되고, 호스트로부터 분리 가능하다. 이러한 이동식 저장 장치는 호스트에서 지시한 작업(operation), 예를 들어, 파일 생성 동작, 데이터 라이트 동작, 데이터 리드 동작 등을 수행할 수 있다.
The removable storage device is mounted on and operated by the host and is detachable from the host. Such a removable storage device can perform an operation designated by the host, for example, a file creation operation, a data write operation, a data read operation, and the like.
그런데, 이동식 저장 장치가 호스트에서 지시한 작업을 수행하고 있는 동안에, 이동식 저장 장치가 호스트로부터 분리되거나, 갑작스런 파워 오프(power off)가 발생하면, 오류가 발생할 수 있다. 왜냐 하면, 이동식 저장 장치는 작업의 일부만을 진행하다가 중단되었기 때문에, 부분적인 메타데이터의 업데이트(partial updating of metadata)만이 이루어졌기 때문이다.However, if the removable storage device is disconnected from the host or sudden power-off occurs while the portable storage device is performing the operation indicated by the host, an error may occur. This is because partial storage of metadata has been done because the removable storage device has only been part of the work and has been interrupted.
따라서, 이동식 저장 장치의 오류 발생을 줄이고, 동작 신뢰성(reliability)과 견고성(robustness)를 향상시킬 방안을 개발해야 한다.Therefore, it is necessary to develop measures to reduce the occurrence of errors in the portable storage device and to improve the operational reliability and robustness.
본 발명이 해결하려는 과제는, 동작 신뢰성과 견고성이 향상된 이동식 저장 장치를 제공하는 것이다.It is an object of the present invention to provide a portable storage device with improved operational reliability and robustness.
본 발명이 해결하려는 다른 과제는, 동작 신뢰성과 견고성이 향상된 시스템을 제공하는 것이다.Another object to be solved by the present invention is to provide a system with improved operational reliability and robustness.
본 발명이 해결하려는 과제들은 이상에서 언급한 과제들로 제한되지 않으며, 언급되지 않은 또 다른 과제들은 아래의 기재로부터 당업자에게 명확하게 이해될 수 있을 것이다. The problems to be solved by the present invention are not limited to the above-mentioned problems, and other matters not mentioned can be clearly understood by those skilled in the art from the following description.
상기 과제를 해결하기 위한 본 발명의 저장 장치의 일 태양은 메타데이터의 업데이트 관련 정보를 포함하는 로그 정보(log information)를 제공받는 입력부; 상기 로그 정보를 저장하는 로그 저장부; 및 트랜잭션(transaction)에 포함되는 적어도 하나의 메타데이터의 업데이트 작업을 수행하되, 상기 트랜잭션이 중단된 경우 상기 로그 정보를 이용하여 상기 중단된 트랜잭션을 복구(recovery)하는 트랜잭션 매니저(transaction manager)를 포함한다.According to an aspect of the present invention, there is provided a storage apparatus comprising: an input unit for receiving log information including update related information of metadata; A log storage unit for storing the log information; And a transaction manager for performing at least one update of the metadata included in the transaction and recovering the interrupted transaction using the log information when the transaction is interrupted do.
상기 다른 과제를 해결하기 위한 본 발명의 시스템의 일 태양은 동일한 트랜잭션에 포함되는 적어도 하나의 메타데이터의 업데이트 작업을 생성하고, 상기 각 작업에 대응되는 메타데이터의 업데이트 관련 정보를 포함하는 로그 정보를 생성하는 호스트; 및 상기 각 메타데이터의 업데이트 작업에 대응되는 로그 정보를 저장하고, 상기 각 메타데이터의 업데이트 작업을 수행하는 이동식 저장 장치를 포함한다. According to another aspect of the present invention, there is provided a system for creating an update job of at least one metadata included in the same transaction, Host to generate; And a portable storage device for storing log information corresponding to the update operation of each metadata and performing an update operation of each metadata.
본 발명의 기타 구체적인 사항들은 상세한 설명 및 도면들에 포함되어 있다.Other specific details of the invention are included in the detailed description and drawings.
도 1a은 본 발명의 일 실시예에 따른 시스템을 설명하기 위한 블록도이다.
도 1b는 도 1a의 이동식 저장 장치를 설명하기 위한 블록도이다.
도 2는 본 발명의 일 실시예에 따른 시스템의 동작 방법을 설명하기 위한 흐름도이다.
도 3은 본 발명의 일 실시예에 따른 시스템의 동작 방법을 설명하기 위한 흐름도이다.
도 4는 본 발명의 일 실시예에 따른 시스템의 동작 방법을 설명하기 위한 흐름도이다.
도 5는 본 발명의 다른 실시예에 따른 시스템의 동작 방법을 설명하기 위한 흐름도이다.
도 6은 본 발명의 또 다른 실시예에 따른 시스템의 동작 방법을 설명하기 위한 흐름도이다.
도 7는 본 발명의 다른 실시예에 따른 시스템을 설명하기 위한 블록도이다.
도 8은 본 발명의 또 다른 실시예에 따른 시스템을 설명하기 위한 블록도이다.
도 9는 도 5의 트랜잭션의 완성 전후의 LBA, PBA 매핑에 관한 것을 설명하기 위한 것이다.FIG. 1A is a block diagram illustrating a system according to an embodiment of the present invention.
1B is a block diagram illustrating the mobile storage device of FIG. 1A.
2 is a flowchart illustrating an operation method of a system according to an embodiment of the present invention.
3 is a flowchart illustrating an operation method of a system according to an embodiment of the present invention.
4 is a flowchart illustrating an operation method of a system according to an embodiment of the present invention.
5 is a flowchart illustrating an operation method of a system according to another embodiment of the present invention.
6 is a flowchart illustrating an operation method of a system according to another embodiment of the present invention.
7 is a block diagram illustrating a system according to another embodiment of the present invention.
8 is a block diagram illustrating a system according to another embodiment of the present invention.
FIG. 9 is intended to explain the LBA and PBA mapping before and after completion of the transaction of FIG.
본 발명의 이점 및 특징, 그리고 그것들을 달성하는 방법은 첨부되는 도면과 함께 상세하게 후술되어 있는 실시예들을 참조하면 명확해질 것이다. 그러나 본 발명은 이하에서 개시되는 실시예들에 한정되는 것이 아니라 서로 다른 다양한 형태로 구현될 것이며, 단지 본 실시예들은 본 발명의 개시가 완전하도록 하며, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 발명의 범주를 완전하게 알려주기 위해 제공되는 것이며, 본 발명은 청구항의 범주에 의해 정의될 뿐이다. 명세서 전체에 걸쳐 동일 참조 부호는 동일 구성 요소를 지칭한다.BRIEF DESCRIPTION OF THE DRAWINGS The advantages and features of the present invention and the manner of achieving them will become apparent with reference to the embodiments described in detail below with reference to the accompanying drawings. The present invention may, however, be embodied in many different forms and should not be construed as being limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art. Is provided to fully convey the scope of the invention to those skilled in the art, and the invention is only defined by the scope of the claims. Like reference numerals refer to like elements throughout the specification.
하나의 소자(elements)가 다른 소자와 "접속된(connected to)" 또는 "커플링된(coupled to)" 이라고 지칭되는 것은, 다른 소자와 직접 연결 또는 커플링된 경우 또는 중간에 다른 소자를 개재한 경우를 모두 포함한다. 반면, 하나의 소자가 다른 소자와 "직접 접속된(directly connected to)" 또는 "직접 커플링된(directly coupled to)"으로 지칭되는 것은 중간에 다른 소자를 개재하지 않은 것을 나타낸다. 명세서 전체에 걸쳐 동일 참조 부호는 동일 구성 요소를 지칭한다. "및/또는"은 언급된 아이템들의 각각 및 하나 이상의 모든 조합을 포함한다. One element is referred to as being " connected to " or " coupled to " another element, either directly connected or coupled to another element, One case. On the other hand, when one element is referred to as being " directly connected to " or " directly coupled to " another element, it does not intervene another element in the middle. Like reference numerals refer to like elements throughout the specification. &Quot; and / or " include each and every combination of one or more of the mentioned items.
비록 제1, 제2 등이 다양한 소자, 구성요소 및/또는 섹션들을 서술하기 위해서 사용되나, 이들 소자, 구성요소 및/또는 섹션들은 이들 용어에 의해 제한되지 않음은 물론이다. 이들 용어들은 단지 하나의 소자, 구성요소 또는 섹션들을 다른 소자, 구성요소 또는 섹션들과 구별하기 위하여 사용하는 것이다. 따라서, 이하에서 언급되는 제1 소자, 제1 구성요소 또는 제1 섹션은 본 발명의 기술적 사상 내에서 제2 소자, 제2 구성요소 또는 제2 섹션일 수도 있음은 물론이다.Although the first, second, etc. are used to describe various elements, components and / or sections, it is needless to say that these elements, components and / or sections are not limited by these terms. These terms are only used to distinguish one element, element or section from another element, element or section. Therefore, it goes without saying that the first element, the first element or the first section mentioned below may be the second element, the second element or the second section within the technical spirit of the present invention.
본 명세서에서 사용된 용어는 실시예들을 설명하기 위한 것이며 본 발명을 제한하고자 하는 것은 아니다. 본 명세서에서, 단수형은 문구에서 특별히 언급하지 않는 한 복수형도 포함한다. 명세서에서 사용되는 "포함한다(comprises)" 및/또는 "포함하는(comprising)"은 언급된 구성요소, 단계, 동작 및/또는 소자는 하나 이상의 다른 구성요소, 단계, 동작 및/또는 소자의 존재 또는 추가를 배제하지 않는다.The terminology used herein is for the purpose of illustrating embodiments and is not intended to be limiting of the present invention. In the present specification, the singular form includes plural forms unless otherwise specified in the specification. It is noted that the terms "comprises" and / or "comprising" used in the specification are intended to be inclusive in a manner similar to the components, steps, operations, and / Or additions.
다른 정의가 없다면, 본 명세서에서 사용되는 모든 용어(기술 및 과학적 용어를 포함)는 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 공통적으로 이해될 수 있는 의미로 사용될 수 있을 것이다. 또 일반적으로 사용되는 사전에 정의되어 있는 용어들은 명백하게 특별히 정의되어 있지 않는 한 이상적으로 또는 과도하게 해석되지 않는다. Unless defined otherwise, all terms (including technical and scientific terms) used herein may be used in a sense commonly understood by one of ordinary skill in the art to which this invention belongs. Also, commonly used predefined terms are not ideally or excessively interpreted unless explicitly defined otherwise.
도 1a은 본 발명의 일 실시예에 따른 시스템을 설명하기 위한 블록도이다. 도 1b는 도 1a의 이동식 저장 장치를 설명하기 위한 블록도이다.FIG. 1A is a block diagram illustrating a system according to an embodiment of the present invention. 1B is a block diagram illustrating the mobile storage device of FIG. 1A.
본 발명의 일 실시예에 따른 시스템(1) 및 이동식 저장 장치(30)는, 트랜잭션(transaction) 기능을 채택한다. 여기서, 트랜잭션은 논리적 기능을 수행하는 단위를 의미한다. 즉, 트랜잭션은 깨질 수 없는 업무처리의 단위이다. The
이러한 트랜잭션은 ACID(Atomicity, Consistency, Isolation, Durability)를 보장한다. 우선, 원자성(atomicity)이란, 트랜잭션은 전부 실행 또는 전부 미실행만 있을 뿐, 일부 실행은 없음을 의미한다. 또한, 일관성(consistency)이란, 트랜잭션이 성공적으로 완료되면, 언제나 일관된 데이터베이스 상태가 유지된다는 의미이다. 즉, 트랜잭션의 실행으로, 일관성이 깨지지 않는다는 것을 의미한다. 또한, 격리성(isolation)은 트랜잭션 실행 중 생성되는 연산의 중간결과에, 다른 트랜잭션이나 작업이 접근할 수 없다는 의미이다. 또한, 영속성(durability)은 성공적으로 완료된 트랜잭션의 결과는 어떠한 경우에라도 보장받는다는 의미이다.These transactions guarantee ACID (Atomicity, Consistency, Isolation, Durability). First, atomicity means that the transaction is all executed or not executed at all, but not executed at all. In addition, consistency means that a consistent database state is maintained whenever a transaction completes successfully. That is, the execution of the transaction means that the consistency is not broken. Also, isolation means that other transactions or operations can not access the intermediate result of an operation that is created during transaction execution. Also, durability means that the result of a successfully completed transaction is guaranteed in any case.
예를 들어, 특정한 커맨드를 수행하기 위해서 3개의 작업을 연속적으로 수행해야 한다면, 3개의 작업은 하나의 트랜잭션으로 취급될 수 있다. 3개의 작업이 모두 수행되지 않으면, 전술한 특정한 커맨드를 수행하지 않은 것으로 취급된다. 예를 들어, 3개의 작업 중 2개의 작업만 수행하다가 중단되면, 추후에 선택적으로 이미 수행된 2개의 작업을 롤백(roll back)하거나, 나머지 1개의 작업을 커미트(commit)해야 한다.For example, if you need to perform three jobs in succession to perform a specific command, the three jobs can be treated as a single transaction. If all three operations are not performed, it is regarded that the above-mentioned specific command is not executed. For example, if you perform only two of the three tasks and then break them, you can optionally roll back two of the previously performed jobs, or commit the remaining one job.
우선 도 1a을 참조하면, 본 발명의 일 실시예에 따른 시스템(1)은 호스트(10), 어플리케이션(20), 이동식 저장 장치(30) 등을 포함할 수 있다. 또한, 호스트(10)는 파일시스템(12)과 드라이버(14)를 포함할 수 있다.Referring first to FIG. 1A, a
이동식 저장 장치(30)는 호스트(10)에 장착/접속되어 있다.The
어플리케이션(20)은 소정의 동작을 수행하기 위해서, 동작 커맨드(CMD)를 파일 시스템(20)에 지시한다. The
호스트(10)은 동작 커맨드(CMD)에 관련된 적어도 하나의 작업을 순차적으로 생성한다. 예를 들어, 어플리케이션(20)이 파일A에 데이터를 라이트하라는 동작 커맨드(CMD)를 지시하였다면, 호스트(10)는 라이트 동작과 관련된 작업, 즉, 데이터의 업데이트 작업과, 메타데이터(예를 들어, 비트맵(bitmap), 디렉토리 엔트리(directory entry), FAT 테이블)의 업데이트 작업(META_OP)을 생성한다. The
여기서, 메타데이터의 업데이트 작업(META_OP)은 트랜잭션(transaction)으로 처리될 수 있다. 전술한 라이트 동작을 예로 들면, 라이트 동작과 관련된 메타데이터의 업데이트 작업(META_OP), 즉, 비트맵의 업데이트 작업, 디렉토리 엔트리의 업데이트 작업, FAT 테이블의 업데이트 작업은, 트랜잭션으로 처리될 수 있다. Here, the update operation (META_OP) of the metadata can be processed in a transaction. Taking the above write operation as an example, the update operation (META_OP) of the metadata related to the write operation, that is, the update operation of the bitmap, the update operation of the directory entry, and the update operation of the FAT table, can be processed as transactions.
또한, 트랜잭션에 포함되는 적어도 하나의 메타데이터의 업데이트 작업(META_OP)은, 동일한 트랜잭션 아이디(T_id)를 가질 수 있다. 전술한 예에서, 비트맵의 업데이트 작업, 디렉토리 엔트리의 업데이트 작업, FAT 테이블의 업데이트 작업, 즉 3개의 작업 모두의 트랜잭션 아이디는 T_id=1 일 수 있다. Also, the update operation (META_OP) of at least one metadata included in the transaction may have the same transaction ID (T_id). In the above example, the update ID of the bitmap, the update of the directory entry, and the update operation of the FAT table, that is, the transaction IDs of all three operations, may be T_id = 1.
또한, 호스트(10)는 메타데이터의 업데이트 관련 정보를 포함하는 로그 정보(log information)(LOG_INFO)을 생성한다.In addition, the
여기서, 로그 정보(LOG_INFO)는 작업의 종류, 상기 메타데이터의 업데이트의 종류, 메타데이터의 위치, 메타데이터의 변화량, 구 메타데이터 관련 정보 중 적어도 하나를 포함할 수 있다. 작업의 종류는 예를 들어, create, rename, truncate, write 등일 수 있고, 메타데이터의 업데이트의 종류는 예를 들어, 비트맵의 업데이트, 디렉토리 엔트리의 업데이트, FAT 테이블의 업데이트일 수 있다. 또한, 구(old) 메타데이터 관련 정보는 예를 들어, 구 메타데이터의 내용뿐만 아니라 구 메타데이터의 위치를 포함할 수 있다.Here, the log information LOG_INFO may include at least one of a job type, an update type of the metadata, a location of the metadata, a change amount of the metadata, and information related to the old metadata. The type of operation may be, for example, create, rename, truncate, write, etc., and the type of update of the metadata may be, for example, update of bitmap, update of directory entry, update of FAT table. In addition, the old metadata related information may include, for example, the location of the old metadata as well as the contents of the old metadata.
또한, 트랜잭션이 완료되면(즉, 트랜잭션에 포함되는 적어도 하나의 메타데이터 업데이트 작업(META_OP)이 완료되면), 호스트(10)는 트랜잭션 완료를 알리는 완료신호를 제공한다. 뿐만 아니라, 호스트(10)는 트랜잭션이 시작함을 알리는 시작신호를 제공할 수도 있다. 트랜잭션의 시작과 완료를 알리는 것은, 어떠한 형태(예를 들어, 플래그(flag) 이용)라도 무방하다.Further, when the transaction is completed (that is, when at least one metadata update task (META_OP) included in the transaction is completed), the
한편, 예를 들어, 어플리케이션(20)에서 제공한 동작 커맨드(CMD)에 대응되는 적어도 하나의 작업을 생성하는 것은 파일 시스템(12)에서 수행되고, 트랜잭션 아이디(T_id)를 부여하는 것과 로그 정보(LOG_INFO)를 생성하는 것은 드라이버(14)에서 수행될 수 있으나, 이에 한정되는 것은 아니다. 예를 들어, 트랜잭션 아이디를 부여하는 것을 파일 시스템(12)에서 수행하여도 무방하다. On the other hand, for example, generating at least one job corresponding to the operation command CMD provided by the
파일 시스템(file system)은 TFS4, BTFS, ext2/3, NTFS 등일 수 있으나, 이에 한정되는 것은 아니다.The file system may be TFS4, BTFS, ext2 / 3, NTFS, and the like, but is not limited thereto.
이동식 저장 장치(30)는 호스트(10)가 지시한 적어도 하나의 작업을 수행한다. 이동식 저장 장치는 호스트에 장착되어 동작하고, 호스트로부터 분리 가능한 저장 장치라면 어떤 것이든 가능하다. 예를 들어, 이동식 저장 장치(30)는 외장형 하드 디스크(external hard disk), SD 카드, MMC 카드, UFS 카드, UHS II 카드, USB 매스(mass) 저장 장치 등일 수 있다.The
도 1b에 도시된 것과 같이, 이러한 이동식 저장 장치(30)는 입력부(32), 로그 저장부(34), 트랜잭션 매니저(36) 등을 포함한다. 1B, the
또한, 이동식 저장 장치(30)는 로그 정보(LOG_INFO)를 저장하고, 트랜잭션에 포함되는 적어도 하나의 메타데이터의 업데이트 작업을 수행한다.In addition, the
즉, 입력부(32)는 호스트(10)로부터 로그 정보(LOG_INFO)를 제공받고, 로그 저장부(34)는 로그 정보(LOG_INFO)를 저장한다. That is, the
여기서, 트랜잭션이 중단되지 않고 완료되면, 트랜잭션 매니저(36)는 완료된 트랜잭션과 관련된 모든 로그 정보(LOG_INFO)를 삭제한다. 로그 정보(LOG_INFO)를 삭제하는 것은, 호스트(10)와 독립적으로(independent) 수행할 수도 있고, 종속적으로(dependent) 수행될 수도 있다. 종속적으로 수행할 경우에는, 트랜잭션이 완료되었을 때, 호스트(10)는 완료신호를 제공하고, 이동식 저장 장치(30)(즉, 트랜잭션 매니저(36))는 완료신호에 응답하여 로그 정보(LOG_INFO)를 삭제할 수도 있다. 이러한 동작에 대해서는 도 3을 이용하여 자세히 후술한다.Here, if the transaction is completed without interruption, the
그런데, 트랜잭션이 중단되면, 트랜잭션 매니저(36)는 저장된 로그 정보(LOG_INFO)를 이용하여 중단된 트랜잭션을 복구(recovery)한다. 여기서, 트랜잭션이 중단되는 것은, 이동식 저장 장치(30)가 호스트(10)에서 지시한 작업을 수행하고 있는 동안에, 이동식 저장 장치(30)가 호스트로부터 분리되거나, 갑작스런 파워 오프(power off)가 발생하는 경우 등일 수 있으나, 이에 한정되는 것은 아니다. 중단된 트랜잭션을 복구하는 것은, 중단된 트랜잭션과 관련된 메타데이터를 롤백(roll back)하거나, 커미트(commit)할 수 있다. 이러한 동작에 대해서는 도 4을 이용하여 자세히 후술한다.However, when the transaction is interrupted, the
또한, 파워업(power-up) 구간에서, 트랜잭션 매니저(36)는 중단된 트랜잭션을 복구할 수 있다. 예를 들어, 이동식 저장 장치(30)가 다시 호스트(10)(이전에 분리된 호스트(10)가 아니어도 무방함)에 접속하면, 이동식 저장 장치(30)는 파워업된다. 이 때, 중단된 트랜잭션을 복구한다. 여기서, 트랜잭션 매니저(36)는 파워업 구간에서 로그 정보(LOG_INFO)의 존재 여부를 검출한다. 로그 정보(LOG_INFO)가 존재할 경우 중단된 트랜잭션을 복구한다. 트랜잭션이 완료되면 로그 정보(LOG_INFO)를 삭제하기 때문에, 로그 정보(LOG_INFO)가 존재한다는 뜻은, 트랜잭션이 완료되지 않았다는 의미이다. 트랜잭션 매니저(36)의 복구 동작은 호스트(10)와 독립적으로 수행할 수도 있고, 종속적으로 수행될 수도 있다. In addition, in the power-up period, the
도 2는 본 발명의 일 실시예에 따른 시스템의 동작 방법을 설명하기 위한 흐름도이다.2 is a flowchart illustrating an operation method of a system according to an embodiment of the present invention.
도 2에서, 호스트 장치는 라이트 커맨드와 로그 정보를 이동식 메모리 장치에 전송하고, 트랜잭션을 초기화한다(2201). 라이트 커맨드에 따라서, 호스트 장치는 로그 정보 또는 로그 레코드를 전송한다. 로그 레코드(로그 정보)는 동작 종류(create, rename, truncate, write), 메타데이터 업데이트 종류(bitmap update, FAT update 등), 미디어 내에서 메타데이터의 위치, 메타데이터의 변경, 오래된 메타데이터의 자세한 내용과 같은 트랜잭션에 대한 자세한 내용을 포함할 수 있다. 이동식 메모리 장치는 로그 정보를 받아서, 미디어를 업데이트하기 전에, 비휘발성 메모리 영역(로그 영역) 상의 특별한 로그 영역 또는 로그 파일에 저장한다. 받은 커맨드는 로그 정보를 포함한다. 로그 정보는 롤백 또는 트랜잭션을 완성할 수 있는 어떤 정보를 포함할 수 있다. In Figure 2, the host device sends a write command and log information to the removable memory device and initializes the transaction (2201). In accordance with the write command, the host device transmits log information or log records. The log record (log information) is composed of the type of operation (create, rename, truncate, write), the kind of metadata update (bitmap update, FAT update), the location of metadata in the media, You can include details about transactions such as content. The removable memory device receives the log information and stores it in a special log area or log file on the non-volatile memory area (log area) before updating the media. The received command contains log information. The log information may include any information that can complete a rollback or transaction.
예를 들어, 정보는 다음과 같을 수 있다. For example, the information may be:
Transaction id= 1Transaction id = 1
Transaction type = create fileTransaction type = create file
Metadata type = FAT UpdateMetadata type = FAT Update
Location of metadata in the Logical Block address and Location of metadata in the Logical Block address and
Index = location within the blockIndex = location within the block
어플리케이션은 전에 말한 내용에 한정되지 않고, 데이터 구조도 다양하게 변경될 수 있다. 정보는 이동식 메모리의 로그 파일 내에 저장된다. 디렉토리 엔트리와 같은 메타데이터 업데이트, 비트맵 업데이트, FAT는 특정한 태스크 아이디(task ID)와 관련된다(2203). 리커버리 동안에, 이동식 메모리는 로그 파일을 체크하고 미디어에 변화를 업데이트할 수 있다. 만약, 다수의 메타데이터 업데이트가 하나의 파일 시스템과 관련된다면, 모든 메타데이터 업데이트는 하나의 태스트 아이디와 관련될 수 있다. 예를 들어, 이전 트랜잭션은 비트맵 업데이트와 FAT 모디피케이션(modification)을 포함하고, 오직 비트맵 변화가 미디어 내에서 업데이트된다고 가정하자. 이후 에러가 발생한다. 에러 상태는 파워 페일, 시스템 페일, 메모리 장치 제거, 프로세스의 급작스런 종료 등 중 어느 하나일 수 있다. 어떤 케이스에서, 트랜잭션의 자세한 내용은, 이동식 메모리 장치의 로그 파일에 저장되어 있다. 페일 이후에, 시스템이 파워업되면, 체크가 이루어진다(2204). 그렇지 않다면, 노말 트랜잭션 동작이 수행된다(2205). 반면에, 페일 후에, 시스템은 파워업된 것이라면, 이동식 메모리 장치는 이전 동작에 대한 자세한 내용을 위한 로그 파일을 참조한다(2206). 페일이 발생한 후에, 불완전한 트랜잭션이 있는지 여부가 체크된다(2207). 만약 불완전한 트랜잭션이 없다면, 2209 스텝으로 넘어간다. 만약, 불완전한 트랜잭션이 있다면, 트랜잭션이 완성된다(2208). 이러한 경우에, 장치는 로그 영역 정보를 리드하고, 끝나지 않은 트랜잭션을 결정하고, 이동식 메모리 장치는 비트맵 내의 변화를 롤백할 것이다. 트랜잭션이 수행된 후, 로그 영역은 깨끗하게 된다(2209).The application is not limited to what has been mentioned before, and the data structure can be variously changed. The information is stored in the log file of the removable memory. Update of metadata, such as a directory entry, bitmap update, FAT, is associated with a particular task ID (2203). During recovery, the removable memory can check the log file and update the changes to the media. If multiple metadata updates are associated with one file system, all metadata updates may be associated with a single test ID. For example, suppose the previous transaction includes bitmap updates and FAT modifications, and only bitmap changes are updated in the media. Then an error occurs. The error conditions can be either power fail, system fail, memory device removal, abrupt termination of the process, and the like. In some cases, the details of the transaction are stored in the log file of the removable memory device. After the fail, if the system is powered up, a check is made (2204). Otherwise, a normal transaction operation is performed (2205). On the other hand, after failing, if the system is powered up, the removable memory device refers to the log file for details of the previous operation (2206). After the fail occurs, it is checked whether there is an incomplete transaction (2207). If there are no incomplete transactions, go to
도 3은 본 발명의 일 실시예에 따른 시스템의 동작 방법을 설명하기 위한 흐름도이다. 도 3은 트랜잭션이 중단되지 않고 완료되는 경우를 설명하기 위한 도면이다.3 is a flowchart illustrating an operation method of a system according to an embodiment of the present invention. 3 is a diagram for explaining a case where a transaction is completed without interruption.
도 3을 참조하면, 호스트(10)는 이동식 저장 장치(30)에 트랜잭션에 포함되는 제1 메타데이터 업데이트 작업(META_OP1)을 지시하고, 제1 메타데이터 업데이트 작업(META_OP1)에 대응되는 제1 로그 정보(LOG_INFO1)을 제공한다(S108). 3, the
이동식 저장 장치(30)는 먼저, 제1 로그 정보(LOG_INFO1)를 저장한다(S110). 이어서, 이동식 저장 장치(30)는 제1 메타데이터 업데이트 작업(META_OP1)을 수행한다(S120). The
이어서, 호스트(10)는 이동식 저장 장치(30)에 트랜잭션에 포함되는 제2 메타데이터 업데이트 작업(META_OP2)을 지시하고, 제2 메타데이터 업데이트 작업(META_OP2)에 대응되는 제2 로그 정보(LOG_INFO2)를 제공한다(S128). Subsequently, the
이동식 저장 장치(30)는 제2 로그 정보(LOG_INFO2)를 저장한다(S130). 이어서, 이동식 저장 장치(30)는 제2 메타데이터 업데이트 작업(META_OP2)을 수행한다(S140). The
트랜잭션에 포함되는 모든 메타데이터 업데이트 작업(META_OP1, META_OP2)이 완료되면, 호스트(10)는 완료신호(COMMIT_TRANSACTION)를 이동식 저장 장치(30)에 제공한다(S148).When all the metadata update operations (META_OP1, META_OP2) included in the transaction are completed, the
그러면, 이동식 저장 장치(30)는 트랜잭션에 대응되는 모든 로그 정보(LOG_INFO1, LOG_INFO2)를 제거한다(S150). 즉, 트랜잭션이 완료되면, 로그 정보(LOG_INFO1, LOG_INFO2)는 이동식 저장 장치(30) 내에 남겨지지 않는다.Then, the
도 4는 본 발명의 일 실시예에 따른 시스템의 동작 방법을 설명하기 위한 흐름도이다. 도 4는 트랜잭션이 중단되는 경우를 설명하기 위한 도면이다.4 is a flowchart illustrating an operation method of a system according to an embodiment of the present invention. 4 is a diagram for explaining a case where a transaction is interrupted.
도 4를 참조하면, 제1 호스트(10_1)는 이동식 저장 장치(30)에 트랜잭션에 포함되는 제1 메타데이터 업데이트 작업(META_OP1)을 지시하고, 제1 메타데이터 업데이트 작업(META_OP1)에 대응되는 제1 로그 정보(LOG_INFO1)을 제공한다(S108). Referring to FIG. 4, the first host 10_1 instructs the
이동식 저장 장치(30)는 먼저, 제1 로그 정보(LOG_INFO1)를 저장한다(S110). 이어서, 이동식 저장 장치(30)는 제1 메타데이터 업데이트 작업(META_OP1)을 수행한다(S120).The
이동식 저장 장치(30)는 트랜잭션에 포함되는 모든 메타데이터 업데이트 작업을 수행하지 못하였음에도 불구하고, 이동식 저장 장치(30)는 호스트(10)로부터 분리된다(S122).The
그 후, 이동식 저장 장치(30)는 다시 제2 호스트(10_2)에 장착/접속된다(S158). 제2 호스트(10_2)는 제1 호스트(10_1)와 다른 것일 수 있다.Thereafter, the
이동식 저장 장치(30)는 파워업된다(S160). 호스트(10)는 복구 신호를 이동식 저장 장치(30)에 제공한다(S168). 이동식 저장 장치(30)는 복구 신호를 제공받은 후, 이동식 저장 장치(30) 내에 로그 정보(LOG_INFO1)가 남겨져 있는지를 체크한다. 로그 정보(LOG_INFO1)가 남겨져 있으면, 중단된 트랜잭션을 복구한다(S170).The
도시하지 않았으나, 이동식 저장 장치(30)는 호스트(10)의 복구 신호를 받지 않고, 독립적으로 로그 정보(LOG_INFO)가 남겨져 있는지 체크하여, 중단된 트랜잭션을 복구할 수도 있다. Although not shown, the
본 발명의 일 실시예에 따른 시스템(1) 및 이동식 저장 장치(30)는 트랜잭션 기능을 채택하였기 때문에, 이동식 저장 장치(30)가 호스트(10)로부터 분리되거나, 갑작스런 파워 오프(power off)가 발생하는 경우에도, 에러가 발생하지 않는다. 따라서, 동작의 신뢰성 및 견고성이 향상된다.The
또한, 전술한 트랜잭션 기능은, 어떠한 파일 시스템(12)에도 적용할 수 있다. 드라이버(14)를 트랜잭션을 지원하도록(예를 들어, 로그 정보를 생성하는 것, 트랜잭션 아이디를 생성하는 것 등) 수정하면, 어떠한 파일 시스템(12)에도 적용할 수 있다. 따라서, 호환성이 매우 높다.In addition, the transaction function described above can be applied to any
도 5는 본 발명의 다른 실시예에 따른 시스템의 동작 방법을 설명하기 위한 흐름도이다. 5 is a flowchart illustrating an operation method of a system according to another embodiment of the present invention.
도 5를 참조하면, 호스트는 트랜잭션 아이디와 함께 라이트 커맨드를 전송한다(501). 시스템은 트랜잭션 아이디가 0인지 여부를 체크한다(502). 트랜잭션 아이디가 0인 경우, 그것은 로깅(logging)이 불필요함을 의미하고, 즉, 트랜잭션 서포트(transaction support)가 특정한 동작(예를 들어, 데이터 라이트)를 위해서 필요하지 않음을 의미한다. 시스템은 미디어에 라이트한다(503). 만약 트랜잭션 아이디가 0이 아닌 경우, 시스템은 완전한 로지컬 블록을 로그 영역에 라이트한다(504). 그 후, 시스템은 트랜잭션이 완성되었는지 여부를 체크하고, 이는 커미트 트랜잭션 커맨드(commit transaction command)를 받았는지를 나타낸다(505). 만약 커미트 트랜잭션 커맨드가 없다면, 시스템은 커미트 트랜잭션 커맨드를 기다린다(506). 만약, 커미트 트랜잭션 커맨드를 받았다면, 시스템은 로그 섹터(물리적 블록 어드레스)를 메타데이터의 로지컬 블록 어드레스에 매핑한다(507). 시스템은 현재의 트랜잭션 아이디(T_id)를 위한 커미트 플래그를 세팅한다(508). Referring to FIG. 5, the host transmits a write command together with a transaction ID (501). The system checks whether the transaction ID is 0 (502). When the transaction ID is 0, it means that no logging is required, i.e., transaction support is not needed for a particular operation (e.g., a data write). The system writes to the media (503). If the transaction ID is not 0, the system writes the complete logical block into the log area (504). The system then checks whether the transaction is complete, indicating whether it received a commit transaction command (505). If there is no commit transaction command, the system waits for a commit transaction command (506). If a commit transaction command is received, the system maps the log sector (physical block address) to the logical block address of the metadata (507). The system sets a commit flag for the current transaction ID (T_id) (508).
도 6은 본 발명의 또 다른 실시예에 따른 시스템의 동작 방법을 설명하기 위한 흐름도이다.6 is a flowchart illustrating an operation method of a system according to another embodiment of the present invention.
도 6을 참조하면, 메모리 장치는 파워온(power on) 또는 리셋 후에 초기화된다. 파워 페일(power failure) 이후에, 이동식 메모리 장치는 동일 또는 다른 호스트에 플러그인된다. 이동식 메모리 장치에 한정되지 않고, 호스트에 연결된 임베디드 메모리에 적용가능하다. 시스템은 로그 파일 내에 엔트리가 있는지 확인한다(602). 만약 로그 파일에 엔트리가 없다면, 종료된다. 만약, 로그 파일에 엔트리를 찾을 수 있으면, 시스템은 다음 로그 엔트리를 리드한다(603). 시스템은 커미트 트랜잭션 플래그가 세팅되었는지 체크한다(604). 만약, 시스템이, 아무런 커미트 트랜잭션 플래그가 세팅되지 않았다고 확인하면, 시스템은 현재의 로그 엔트리를 깨끗이 하고, 이전 스텝으로 돌아간다(605). 만약, 시스템이 커미트 트랜잭션 플래그가 세팅되었다고 확인하면, 매핑에 의한 트랜잭션은 섹터(물리적 블록 어드레스)를 로지컬 블록 어드레스로 로깅하고, 리커버리 동작을 완성한다(606). 이하에서, 도 7 및 도 8을 이용하여, 2개 이상의 어플리케이션이 호스트를 통해서 동작 커맨드를 보낼 경우의 동작을 설명하도록 한다.Referring to FIG. 6, the memory device is initialized after power on or reset. After a power failure, the removable memory device is plugged into the same or another host. It is not limited to a removable memory device but is applicable to an embedded memory connected to a host. The system checks if there is an entry in the log file (602). If there is no entry in the log file, it is terminated. If an entry is found in the log file, the system reads the next log entry (603). The system checks if the commit transaction flag is set (604). If the system determines that no commit transaction flag has been set, the system clears the current log entry and returns to the previous step (605). If the system determines that the commit transaction flag is set, the transaction by mapping logs the sector (physical block address) to the logical block address and completes the recovery operation (606). Hereinafter, with reference to FIG. 7 and FIG. 8, the operation when two or more applications send an operation command through the host will be described.
도 7는 본 발명의 다른 실시예에 따른 시스템을 설명하기 위한 블록도이다.7 is a block diagram illustrating a system according to another embodiment of the present invention.
도 7를 참조하면, 제1 어플리케이션(20_1)은 라이트 커맨드, 예를 들어, write(file1, *pBuff, size)(210)를 호스트(10)에 제공한다. Referring to FIG. 7, the first application 20_1 provides the
호스트(10)는 우선, 데이터의 업데이트 작업, 예를 들어, write(data, T_id=0)(220)를 이동식 저장 장치(30)에 지시한다. 여기서, 트랜잭션 아이디(T_id)가 0인 것은, 트랜잭션이 아님을 나타낸다.The
한편, 제2 어플리케이션(20_2)은 파일 생성 커맨드, 예를 들어, create(file2, *pBuff, size)(250)를 호스트(10)에 제공한다.Meanwhile, the second application 20_2 provides a file creation command, for example, create (file2, * pBuff, size) 250 to the
이어서, 호스트(10)는 파일 생성 커맨드에 대한 메타데이터의 업데이트 작업, 예를 들어, write(bitmap_sector, T_id=2)(260)를 이동식 저장 장치(30)에 지시한다. 트랜잭션 아이디(T_id)가 2이고, 2번째 트랜잭션이 시작되었음을 알 수 있다. 이 때, 호스트(10)는 write(bitmap_sector, T_id=2)(260)작업과 관련된 로그 정보를 생성하여 이동식 저장 장치(30)에 제공한다. 그러면, 이동식 저장 장치(30)의 로그 영역(32)(즉, T_id=2에 대응되는 영역) 내에, 로그 정보(32_1)가 저장된다. 이동식 저장 장치(30)는 비트맵 업데이트를 수행한다. Then, the
이어서, 호스트(10)는 write(FAT_sector, T_id=2)(262)를 이동식 저장 장치(30)에 지시한다. 호스트(10)는 write(FAT_sector, T_id=2)(262) 작업과 관련된 로그 정보를 생성하여 이동식 저장 장치(30)에 제공한다. 그러면, 이동식 저장 장치(30)의 로그 영역(32)(즉, T_id=2에 대응되는 영역) 내에, 로그 정보(32_2)가 저장된다. 이동식 저장 장치(30)는 FAT 업데이트를 수행한다.Subsequently, the
이어서, 호스트(10)는 write(DE_sector, T_id=2)(264)를 이동식 저장 장치(30)에 지시한다. 호스트(10)는 write(DE_sector, T_id=2)(264) 작업과 관련된 로그 정보를 생성하여 이동식 저장 장치(30)에 제공한다. 그러면, 이동식 저장 장치(30)의 로그 영역(32) (즉, T_id=2에 대응되는 영역) 내에, 로그 정보(32_3)가 저장된다. 이동식 저장 장치(30)는 디렉토리 엔트리 업데이트를 수행한다. Subsequently, the
또한, 호스트(10)는 라이트 커맨드에 대한 메타데이터의 업데이트 작업, 예를 들어, write(bitmap_sector, T_id=1)(230)를 이동식 저장 장치(30)에 지시한다. 트랜잭션 아이디(T_id)가 1이고, 1번째 트랜잭션이 시작되었음을 알 수 있다. 이 때, 호스트(10)는 write(bitmap_sector, T_id=1)(230) 작업과 관련된 로그 정보를 생성하여 이동식 저장 장치(30)에 제공한다. 그러면, 이동식 저장 장치(30)의 로그 영역(32) (즉, T_id=1에 대응되는 영역) 내에, 로그 정보(32_4)가 저장된다. 이동식 저장 장치(30)는 비트맵 업데이트를 수행한다. Further, the
이어서, 호스트(10)는 write(FAT_sector, T_id=1)(232)를 이동식 저장 장치(30)에 지시한다. 호스트(10)는 write(FAT_sector, T_id=1)(232) 작업과 관련된 로그 정보를 생성하여 이동식 저장 장치(30)에 제공한다. 그러면, 이동식 저장 장치(30)의 로그 영역(32) (즉, T_id=1에 대응되는 영역) 내에, 로그 정보(32_5)가 저장된다. 이동식 저장 장치(30)는 FAT 업데이트를 수행한다.Then, the
이어서, 호스트(10)는 write(DE_sector, T_id=1)(234)를 이동식 저장 장치(30)에 지시한다. 호스트(10)는 write(DE_sector, T_id=1)(234) 작업과 관련된 로그 정보를 생성하여 이동식 저장 장치(30)에 제공한다. 그러면, 이동식 저장 장치(30)의 로그 영역(32) (즉, T_id=1에 대응되는 영역) 내에, 로그 정보(32_6)가 저장된다. 이동식 저장 장치(30)는 디렉토리 엔트리 업데이트를 수행한다.Subsequently, the
이어서, 호스트(10)는 트랜잭션 완료 신호 CommitTransaction(T_id=2)(270)를 제공한다. 이에 따라, 이동식 저장 장치(30)는 2번째 트랜잭션과 관련된 로그 정보(32_1, 32_2, 32_3), 즉, T_id=2를 갖는 메타데이터 업데이트에 대응되는 로그 정보(32_1, 32_2, 32_3)는 모두 삭제한다. Subsequently, the
호스트(10)는 트랜잭션 완료 신호 CommitTransaction(T_id=1)(240)를 제공한다. 이에 따라, 이동식 저장 장치(30)는 1번째 트랜잭션과 관련된 로그 정보(32_4, 32_5, 32_6), 즉, T_id=1를 갖는 메타데이터 업데이트에 대응되는 로그 정보(32_4, 32_5, 32_6)는 모두 삭제한다.The
정리하면, 제1 어플리케이션(20)은 제1 동작 커맨드를 파일 시스템(12)에 지시하고, 호스트(10)는 제1 동작 커맨드에 관련된 작업에 제1 트랜잭션 아이디(T_id=1)를 부여하고, 제1 동작 커맨드에 관련된 작업이 모두 종료된 후, 제1 동작 커맨드에 관련된 작업에 관련된 로그 정보(32_4, 32_5, 32_6)를 모두 삭제한다. To summarize, the
또한, 제2 어플리케이션(20)은 제2 동작 커맨드를 파일 시스템(12)에 지시하고, 호스트(10)는 제2 동작 커맨드에 관련된 작업에 제1 트랜잭션 아이디(T_id=1)와 다른 제2 트랜잭션 아이디(T_id=2)를 부여하고, 제2 동작 커맨드에 관련된 작업이 모두 종료된 후, 제2 동작 커맨드에 관련된 작업에 관련된 로그 정보(32_1, 32_2, 32_3)를 모두 삭제한다.Further, the
도 8은 본 발명의 또 다른 실시예에 따른 시스템을 설명하기 위한 블록도이다. 8 is a block diagram illustrating a system according to another embodiment of the present invention.
도 8에서는, 서로 다른 제1 및 제2 어플리케이션(20_1, 20_2)에서 제1 및 제2 동작 커맨드를 지시하더라도, 호스트(10)에서 제1 및 제2 동작 커맨드를 제공받아 하나의 통합된 트랜잭션을 만들 수도 있음을 설명한다. 통합된 트랜잭션을 만들기 위해서, 제1 및 제2 동작 커맨드에 관련된 작업에 동일한 트랜잭션 아이디(예를 들어, T_id=1)를 부여한다. 구체적인 동작 과정을 설명하면 다음과 같다.In FIG. 8, even if the first and second application 20_1 and 20_2 instruct the first and second operation commands, the
도 8을 참조하면, 제1 어플리케이션(20_1)은 라이트 커맨드, 예를 들어, write(file1, *pBuff, size)(210)를 호스트(10)에 제공한다. 호스트(10)는 우선, 데이터의 업데이트 작업, 예를 들어, write(data, T_id=0)(220)를 이동식 저장 장치(30)에 지시한다. Referring to FIG. 8, the first application 20_1 provides the
한편, 제2 어플리케이션(20_2)은 파일 생성 커맨드, 예를 들어, create(file2, *pBuff, size)(250)를 호스트(10)에 제공한다.Meanwhile, the second application 20_2 provides a file creation command, for example, create (file2, * pBuff, size) 250 to the
이어서, 호스트(10)는 파일 생성 커맨드에 대한 메타데이터의 업데이트 작업, 예를 들어, write(bitmap_sector, T_id=1)(261)를 이동식 저장 장치(30)에 지시한다. 트랜잭션 아이디(T_id)가 1이고, 1번째 트랜잭션이 시작되었음을 알 수 있다. 이 때, 호스트(10)는 write(bitmap_sector, T_id=1)(261)작업과 관련된 로그 정보를 생성하여 이동식 저장 장치(30)에 제공한다. 그러면, 이동식 저장 장치(30)의 로그 영역(32) (즉, T_id=1에 대응되는 영역) 내에, 로그 정보(32_1)가 저장된다. 이동식 저장 장치(30)는 비트맵 업데이트를 수행한다. Then, the
이어서, 호스트(10)는 write(FAT_sector, T_id=1)(263)를 이동식 저장 장치(30)에 지시한다. 호스트(10)는 write(FAT_sector, T_id=1)(263) 작업과 관련된 로그 정보를 생성하여 이동식 저장 장치(30)에 제공한다. 그러면, 이동식 저장 장치(30)의 로그 영역(32) (즉, T_id=1에 대응되는 영역) 내에, 로그 정보(32_2)가 저장된다. 이동식 저장 장치(30)는 FAT 업데이트를 수행한다.Subsequently, the
이어서, 호스트(10)는 write(DE_sector, T_id=1)(265)를 이동식 저장 장치(30)에 지시한다. 호스트(10)는 write(DE_sector, T_id=1)(265) 작업과 관련된 로그 정보를 생성하여 이동식 저장 장치(30)에 제공한다. 그러면, 이동식 저장 장치(30)의 로그 영역(32) (즉, T_id=1에 대응되는 영역) 내에, 로그 정보(32_3)가 저장된다. 이동식 저장 장치(30)는 디렉토리 엔트리 업데이트를 수행한다.Subsequently, the
또한, 호스트(10)는 라이트 커맨드에 대한 메타데이터의 업데이트 작업, 예를 들어, write(bitmap_sector, T_id=1)(230)를 이동식 저장 장치(30)에 지시한다. 이 때, 호스트(10)는 write(bitmap_sector, T_id=1)(230) 작업과 관련된 로그 정보를 생성하여 이동식 저장 장치(30)에 제공한다. 그러면, 이동식 저장 장치(30)의 로그 영역(32) (즉, T_id=1에 대응되는 영역) 내에, 로그 정보(32_4)가 저장된다. 이동식 저장 장치(30)는 비트맵 업데이트를 수행한다. Further, the
이어서, 호스트(10)는 write(FAT_sector, T_id=1)(232)를 이동식 저장 장치(30)에 지시한다. 호스트(10)는 write(FAT_sector, T_id=1)(232) 작업과 관련된 로그 정보를 생성하여 이동식 저장 장치(30)에 제공한다. 그러면, 이동식 저장 장치(30)의 로그 영역(32) (즉, T_id=1에 대응되는 영역) 내에, 로그 정보(32_5)가 저장된다. 이동식 저장 장치(30)는 FAT 업데이트를 수행한다.Then, the
이어서, 호스트(10)는 write(DE_sector, T_id=1)(234)를 이동식 저장 장치(30)에 지시한다. 호스트(10)는 write(DE_sector, T_id=1)(234) 작업과 관련된 로그 정보를 생성하여 이동식 저장 장치(30)에 제공한다. 그러면, 이동식 저장 장치(30)의 로그 영역(32) (즉, T_id=1에 대응되는 영역) 내에, 로그 정보(32_6)가 저장된다. 이동식 저장 장치(30)는 디렉토리 엔트리 업데이트를 수행한다.Subsequently, the
이어서, 호스트(10)는 트랜잭션 완료 신호 CommitTransaction(T_id=1)(240)를 제공한다. 이에 따라, 이동식 저장 장치(30)는 1번째 트랜잭션과 관련된 로그 정보(32_1, 32_2, 32_3, 32_4, 32_5, 32_6), 즉, T_id=1를 갖는 메타데이터 업데이트에 대응되는 로그 정보(32_1, 32_2, 32_3, 32_4, 32_5, 32_6)는 모두 삭제한다. Subsequently, the
정리하면, 호스트(10)는 서로 다른 제1 및 제2 어플리케이션(20)에서 지시한 제1 및 제2 동작 커맨드에 관련된 작업에 하나의 트랜잭션 아이디(T_id=1)를 부여하고, 제1 및 제2 동작 커맨드에 관련된 작업이 모두 종료된 후, 제1 및 제2 동작 커맨드에 관련된 작업에 관련된 로그 정보(32_1, 32_2, 32_3, 32_4, 32_5, 32_6)를 모두 삭제한다.In summary, the
도 9는 도 5의 트랜잭션의 완성 전후의 LBA, PBA 매핑에 관한 것을 설명하기 위한 것이다.FIG. 9 is intended to explain the LBA and PBA mapping before and after completion of the transaction of FIG.
도 9는 LBA(Logical Block Address)와 PBA(Physical Block Address) 매핑을 보여준다. 테이블은 트랜잭션 리커버리 전후의, 오리지날 메타데이터 섹터와 로그 섹터를 보여준다. 이러한 케이스에서, 에러 상태(예를 들어, 파워 페일)에서조차도, 테이블은 로그 파일 내에 저장된다. 시스템이 파워업될 때, 이동식 메모리 장치는, 단지 물리적 어드레스 블록을 로지컬 블록 어드레스에 맵핑함으로써, 로그 파일로부터 직접 메타데이터 맵핑을 리커버리할 수 있다. 이상 첨부된 도면을 참조하여 본 발명의 실시예를 설명하였지만, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자는 본 발명이 그 기술적 사상이나 필수적인 특징을 변경하지 않고서 다른 구체적인 형태로 실시될 수 있다는 것을 이해할 수 있을 것이다. 그러므로 이상에서 기술한 실시예들은 모든 면에서 예시적인 것이며 한정적이 아닌 것으로 이해해야만 한다. FIG. 9 shows a logical block address (LBA) mapping and a physical block address (PBA) mapping. The table shows the original metadata sectors and log sectors before and after transaction recovery. In this case, even in an error condition (e.g., power fail), the table is stored in the log file. When the system is powered up, the removable memory device can recover the metadata mappings directly from the log file by simply mapping the physical address block to the logical block address. 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, but, on the contrary, You will understand. It is therefore to be understood that the above-described embodiments are illustrative in all aspects and not restrictive.
10: 호스트 12: 파일 시스템
14: 드라이버 20: 어플리케이션
30: 이동식 저장 장치10: Host 12: File System
14: Driver 20: Application
30: Removable Storage
Claims (10)
상기 로그 정보를 저장하는 로그 저장부; 및
트랜잭션(transaction)에 포함되는 적어도 하나의 메타데이터의 업데이트 작업을 수행하되, 상기 트랜잭션이 중단된 경우 상기 로그 정보를 상기 로그 저장부에 유지하고, 상기 트랜 잭션이 완료된 경우 상기 로그 정보를 상기 로그 저장부에서 삭제하도록 상기 로그 저장부를 제어하는 트랜잭션 매니저(transaction manager)를 포함하되,
상기 트랜잭션 매니저는,
파워업 구간에서, 상기 로그 정보의 존재 여부를 검출하고, 상기 로그 정보가 존재할 경우 상기 중단된 트랜잭션을 복구(recovery)하는 이동식 저장 장치.An input unit for receiving log information including update related information of the metadata;
A log storage unit for storing the log information; And
A method of updating at least one metadata included in a transaction, the method comprising: maintaining the log information in the log storage unit when the transaction is aborted; And a transaction manager for controlling the log storage unit to delete the log storage unit,
The transaction manager,
The portable storage device detects whether or not the log information exists in a power-up interval, and recovers the suspended transaction when the log information exists.
상기 중단된 트랜잭션을 복구하는 것은, 상기 중단된 트랜잭션에 포함되는 메타데이터를 롤백(roll back)하거나 커미트(commit)하는 이동식 저장 장치.The method according to claim 1,
And wherein recovering the interrupted transaction rolls back or commits the metadata contained in the interrupted transaction.
상기 트랜잭션에 포함되는 적어도 하나의 메타데이터의 업데이트 작업은, 동일한 트랜잭션 아이디를 갖는 이동식 저장 장치. The method according to claim 1,
Wherein the update operation of at least one metadata included in the transaction has the same transaction ID.
상기 로그 정보는 작업의 종류, 상기 메타데이터의 업데이트의 종류, 메타데이터의 위치, 메타데이터의 변화량, 구 메타데이터 관련 정보 중 적어도 하나를 포함하는 이동식 저장 장치.The method according to claim 1,
Wherein the log information includes at least one of a job type, an update type of the metadata, a location of the metadata, a change amount of the metadata, and information related to the old metadata.
상기 각 메타데이터의 업데이트 작업에 대응되는 로그 정보를 저장하고, 상기 각 메타데이터의 업데이트 작업을 수행하는 이동식 저장 장치를 포함하되,
상기 호스트는, 상기 제1 및 제2 동작 커맨드와 관련된 작업이 모두 종료된 후, 상기 제1 및 제2 동작 커맨드와 관련된 로그 정보를 모두 삭제하는 시스템.Receive a first operation command and a second operation command, respectively, from a first application and a second application different from the first application, grant the same transaction ID to a job associated with the first and second operation commands, A host that generates an update job of at least one meta data included in an ID and generates log information including update related information of the metadata corresponding to each job; And
And a portable storage device for storing log information corresponding to an update operation of each of the metadata and performing an update operation of each of the metadata,
Wherein the host deletes all of the log information associated with the first and second operation commands after all operations associated with the first and second operation commands are completed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US13/798,947 US9075758B2 (en) | 2012-03-19 | 2013-03-13 | Removable storage device with transactional operation support and system including same |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
IN1005CH2012 | 2012-03-19 | ||
IN1005/CHE/2012 | 2012-03-19 |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20130106258A KR20130106258A (en) | 2013-09-27 |
KR101984495B1 true KR101984495B1 (en) | 2019-05-31 |
Family
ID=49454282
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020120115531A Active KR101984495B1 (en) | 2012-03-19 | 2012-10-17 | Removable storage device and system comprising the same |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR101984495B1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102184841B1 (en) * | 2019-06-27 | 2020-11-30 | 전북대학교산학협력단 | Method and device for recovering transaction in hybrid transactional memory |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100390853B1 (en) | 2000-06-07 | 2003-07-10 | 차상균 | A Logging Method and System for Highly Parallel Recovery Operation in Main-Memory Transaction Processing Systems |
KR100857036B1 (en) | 2007-04-20 | 2008-09-05 | (주)엔텔스 | Failure recovery method and device using transaction log file in billing system |
JP2009282752A (en) * | 2008-05-22 | 2009-12-03 | Hitachi Systems & Services Ltd | Storage device and recording method of file system |
US8452734B2 (en) | 2009-04-30 | 2013-05-28 | Texas Instruments Incorporated | FAT file in reserved cluster with ready entry state |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100501414B1 (en) * | 2003-11-28 | 2005-07-18 | 한국전자통신연구원 | Method of and apparatus for logging and restoring the meta data in file system |
-
2012
- 2012-10-17 KR KR1020120115531A patent/KR101984495B1/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100390853B1 (en) | 2000-06-07 | 2003-07-10 | 차상균 | A Logging Method and System for Highly Parallel Recovery Operation in Main-Memory Transaction Processing Systems |
KR100857036B1 (en) | 2007-04-20 | 2008-09-05 | (주)엔텔스 | Failure recovery method and device using transaction log file in billing system |
JP2009282752A (en) * | 2008-05-22 | 2009-12-03 | Hitachi Systems & Services Ltd | Storage device and recording method of file system |
US8452734B2 (en) | 2009-04-30 | 2013-05-28 | Texas Instruments Incorporated | FAT file in reserved cluster with ready entry state |
Also Published As
Publication number | Publication date |
---|---|
KR20130106258A (en) | 2013-09-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9075758B2 (en) | Removable storage device with transactional operation support and system including same | |
US11550675B2 (en) | Remote data replication method and system | |
US8566282B2 (en) | Creating a buffer point-in-time copy relationship for a point-in-time copy function executed to create a point-in-time copy relationship | |
JP5208368B2 (en) | System and method for automatically backing up a file as a generation file using the file system | |
JP4800056B2 (en) | Storage system and control method thereof | |
JP3737741B2 (en) | Method and apparatus for creating backup copy | |
US7991749B2 (en) | Database recovery method applying update journal and database log | |
US8140790B2 (en) | Failure management method in thin provisioning technology for storage | |
CN104166605B (en) | Data backup method and system based on incremental data files | |
US20140317369A1 (en) | Snapshot creation from block lists | |
US7587562B2 (en) | Data duplication system, data duplication method and program | |
CN100429628C (en) | Method for rebuilding directory structure and recovering data in NTFS volume | |
US20150301758A1 (en) | Metadata for data storage array | |
JP5386111B2 (en) | File system recording method | |
US7146526B2 (en) | Data I/O system using a plurality of mirror volumes | |
CN101441582A (en) | Backup and recovery method of computer data object and system and program product for implementing the same | |
US20070233753A1 (en) | Database system management method, database system, database device, and backup program | |
WO2012081058A1 (en) | Storage subsystem and its logical unit processing method | |
CN106096447A (en) | A kind of document protection method and device | |
CN119248197B (en) | Data processing method, device, equipment and medium | |
KR101984495B1 (en) | Removable storage device and system comprising the same | |
KR102277731B1 (en) | Method for operating storage system and storage controller | |
US9665310B2 (en) | Storage control apparatus, storage control system, and control method | |
JP5290938B2 (en) | Copy control apparatus and method | |
JP2004220472A (en) | External storage device data recovery method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PA0109 | Patent application |
Patent event code: PA01091R01D Comment text: Patent Application Patent event date: 20121017 |
|
PG1501 | Laying open of application | ||
A201 | Request for examination | ||
PA0201 | Request for examination |
Patent event code: PA02012R01D Patent event date: 20170907 Comment text: Request for Examination of Application Patent event code: PA02011R01I Patent event date: 20121017 Comment text: Patent Application |
|
E902 | Notification of reason for refusal | ||
PE0902 | Notice of grounds for rejection |
Comment text: Notification of reason for refusal Patent event date: 20181116 Patent event code: PE09021S01D |
|
E701 | Decision to grant or registration of patent right | ||
PE0701 | Decision of registration |
Patent event code: PE07011S01D Comment text: Decision to Grant Registration Patent event date: 20190517 |
|
GRNT | Written decision to grant | ||
PR0701 | Registration of establishment |
Comment text: Registration of Establishment Patent event date: 20190527 Patent event code: PR07011E01D |
|
PR1002 | Payment of registration fee |
Payment date: 20190528 End annual number: 3 Start annual number: 1 |
|
PG1601 | Publication of registration | ||
PR1001 | Payment of annual fee |
Payment date: 20220420 Start annual number: 4 End annual number: 4 |
|
PR1001 | Payment of annual fee |
Payment date: 20230426 Start annual number: 5 End annual number: 5 |
|
PR1001 | Payment of annual fee |
Payment date: 20240424 Start annual number: 6 End annual number: 6 |