WO2009103181A1 - 在移动终端的非线性闪存上实现文件***的装置 - Google Patents

在移动终端的非线性闪存上实现文件***的装置 Download PDF

Info

Publication number
WO2009103181A1
WO2009103181A1 PCT/CN2008/000361 CN2008000361W WO2009103181A1 WO 2009103181 A1 WO2009103181 A1 WO 2009103181A1 CN 2008000361 W CN2008000361 W CN 2008000361W WO 2009103181 A1 WO2009103181 A1 WO 2009103181A1
Authority
WO
WIPO (PCT)
Prior art keywords
block
file system
address
mapping table
data
Prior art date
Application number
PCT/CN2008/000361
Other languages
English (en)
French (fr)
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 PCT/CN2008/000361 priority Critical patent/WO2009103181A1/zh
Priority to CN200880109716A priority patent/CN101809546A/zh
Publication of WO2009103181A1 publication Critical patent/WO2009103181A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0238Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
    • G06F12/0246Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0662Virtualisation aspects
    • G06F3/0664Virtualisation aspects at device level, e.g. emulation of a storage device or system

Definitions

  • the present invention relates to the field of mobile terminal technologies, and in particular, to a method for implementing a file system on a non-linear flash memory (NANDFLASH).
  • NANDFLASH non-linear flash memory
  • Traditional file systems for example: FAT file system
  • the processing mechanism of mapping and garbage collection therefore, cannot directly manage NANDFLASH.
  • the present invention proposes an improvement in the use of the FAT file system on NAND FLASH.
  • SUMMARY OF THE INVENTION The present invention has been made in view of the above problems, and it is a primary object of the present invention to provide an apparatus for implementing a file system on a non-linear flash memory of a mobile terminal, including a FAT file system, characterized in that it further includes : File System Transfer Unit, set between the FAT file system and non-linear flash for garbage collection, bad block management, and address mapping for non-linear flash.
  • the device may further include: an initialization module, configured to acquire related parameter information of the non-linear flash memory, and obtain state information and address mapping information of each block in the management area by scanning the management area of the entire file system to be in the memory A block state mapping table and a block address mapping table are formed.
  • the relevant parameter information includes the page size, the block size, and the size of the management area of the file system.
  • the apparatus may further comprise a garbage collection module for performing the following steps when there is data to be updated on the non-linear flash memory: obtaining the physical address of the data block to be updated by the address mapping table, and passing the file system
  • the transmission unit reads the data to be updated into the memory; performs data update in the memory, and writes the updated data to the new physical address through the file system transmission unit; And erasing the data block to be updated, and updating the state mapping table and the block address mapping table.
  • Bad block management package ⁇ "bad block detection and bad block flag.
  • the apparatus may further comprise: a bad block detection module for causing the file system transmission unit to scan the management area of the entire file system during initialization, by checking each The bad block flag of the redundant area of the first page and the second page of the block determines whether the block is a bad block. If the block is a bad block, the block is recorded as a bad block in the block state mapping table, if the block is not a bad block The block is then recorded as a valid block in the block state mapping table.
  • a bad block detection module for causing the file system transmission unit to scan the management area of the entire file system during initialization, by checking each The bad block flag of the redundant area of the first page and the second page of the block determines whether the block is a bad block. If the block is a bad block, the block is recorded as a bad block in the block state mapping table, if the block is not a bad block The block is then recorded as a valid block in the block state mapping table.
  • the apparatus may further include: a bad block flag module, configured to cause the file system transfer unit to write to the non-linear flash memory through the file system transfer unit, Determining whether the write operation is successful, if the write operation is successful, marking the bad block flag bit in the redundant area of the first page and the second page of the block in the non-linear flash memory as the used state, if the write operation fails The bad block flag is marked as a bad block, and then the block address mapping table is updated.
  • the file system transfer unit receives the logic when it performs the read operation and the write operation. The address is converted to a physical address.
  • the apparatus may further comprise a write module for performing the following steps when performing a write operation: buffering the data to be written in the file system transfer unit, when the write data reaches a logic In the block, the valid block is searched in the state mapping table, and the address in the address mapping table is mapped to the physical block address according to the address of the logical block; the data to be written is cyclically written to the physical block of the non-linear flash memory, and the last block of the physical block Recording the state and the address of the physical block in the redundant area of the page; and updating the state mapping table and the block address mapping table in the memory.
  • a write module for performing the following steps when performing a write operation: buffering the data to be written in the file system transfer unit, when the write data reaches a logic In the block, the valid block is searched in the state mapping table, and the address in the address mapping table is mapped to the physical block address according to the address of the logical block; the data to be written is cyclically written to the physical block of the non-linear flash
  • the apparatus may further include a reading module for performing the reading operation The following steps: mapping the physical block address of the read page by the block address mapping table, searching the physical page address by the physical block address; and reading the data of the read page from the non-linear flash memory according to the physical page address.
  • FAT file system to the next (FTL) is to initialize, read, write interface, read and write is a logical page, The FTL layer is converted into an actual physical address, and operations such as garbage collection, bad block management, address mapping, etc. are completed during the reading and writing process, and finally the function of storing the file on the NAND FLASH is realized.
  • FIG. 1 is a block diagram showing an apparatus for implementing a file system on a non-linear flash memory of a mobile terminal of the present invention
  • FIG. 2 is a diagram showing a file system for a NAND FLASH according to an embodiment of the present invention.
  • FIG. 3 is a flow chart showing the initialization of the FTL in the file system according to an embodiment of the present invention
  • Figure 4 is a flow chart showing the garbage collection according to the embodiment of the present invention
  • Figure 5 and Figure 6 shows a flow chart of bad block management according to an embodiment of the present invention
  • FIG. 7 shows a flow chart of address mapping according to an embodiment of the present invention.
  • an apparatus for implementing a file system on a non-linear flash memory of a mobile terminal comprising a FAT file system 101, further comprising: a file system transmission unit 102, disposed in the FAT file system 101 and non-linear Between the flash memories 103, it is used for garbage collection, bad block management, and address mapping of the non-linear flash memory 103.
  • the device according to the present invention may further include: an initialization module, configured to acquire related parameter information of the non-linear flash memory, and obtain state information and address mapping information of each block in the management area by performing a management area of the entire file system, to A block state mapping table and a block address mapping table are formed in the memory.
  • the relevant parameter information includes the page size, the block size, and the size of the management area of the file system.
  • the apparatus of the present invention may further comprise a garbage collection module for performing the following steps when there is data to be updated on the non-linear flash memory: obtaining a physical address of the data block to be updated by the address mapping table, and transmitting the unit through the file system Reading the data to be updated into the memory; updating the data in the memory and writing the updated data to the new physical address through the file system transfer unit; and erasing the data block to be updated, and updating the status map And block address mapping table.
  • Bad block management includes bad block detection and bad block flags.
  • the apparatus may further include: a bad block detecting module, configured to cause the file system transfer unit to scan a management area of the entire file system during initialization, by checking a redundant area of the first page and the second page of each block The bad block flag bit determines whether the block is a bad block. If the block is a bad block, the block is recorded as a bad block in the block state mapping table, and if the block is not a bad block, the block is recorded as a valid block in the block state mapping table.
  • a bad block detecting module configured to cause the file system transfer unit to scan a management area of the entire file system during initialization, by checking a redundant area of the first page and the second page of each block The bad block flag bit determines whether the block is a bad block. If the block is a bad block, the block is recorded as a bad block in the block state mapping table, and if the block is not a bad block, the block is recorded as a valid block in the block state mapping table.
  • the device of the present invention may further include: a bad block flag module, configured to enable the file system transmission unit to determine whether the write operation is successful when writing to the non-linear flash memory through the file system transfer unit, and if the write operation is successful, the non-linearity
  • the bad block flag bit in the redundant area of the first page and the second page of the block in the flash memory is marked as used, and if the write operation fails, the bad block flag is marked as a bad block, and then the block is updated.
  • Address mapping table The file system transfer unit converts the logical address it receives into a physical address when performing read operations and write operations.
  • the apparatus according to the present invention may further comprise a write module for performing the following steps when performing a write operation: buffering data to be written in the file system transfer unit, when the write data reaches a logical block, in the state map Finding a valid block in the table, mapping to the physical block address according to the address of the logical block in the address mapping table; writing the data to be written to the physical block of the non-linear flash memory, in the redundant area of the last page of the physical block Record the state and logical address of the physical block; and update the state map and block address map in memory.
  • the apparatus according to the invention may further comprise a reading module for performing the following steps when performing the reading operation: mapping ⁇ by the block address mapping table!
  • FIG. 2 is a flow chart showing an implementation method for a file system on a NAND FLASH in accordance with an embodiment of the present invention. As shown in FIG. 2, the method includes the following steps:
  • the FAT file system mainly organizes and manages files according to the FAT format, and presents them to the FTL layer in the form of logical sectors.
  • S204. FTL mainly performs logical address to physical address conversion, garbage collection, and bad block management.
  • FIG. 3 is a flow chart showing the initialization of an FTL in a file system in accordance with an embodiment of the present invention. As shown in Figure 3, the method package ⁇ " the following steps:
  • S304 Obtaining the state information and the address mapping information of each block by scanning the management area of the entire file system, and forming a block state mapping table and a block address mapping table in the memory.
  • 4 shows a flow chart of garbage collection in accordance with an embodiment of the present invention. As shown in Figure 4, the method packs the following steps:
  • S406 Update the data in the memory, and cover the data block that needs to be updated with the new data block.
  • garbage collection is mainly to recover those old invalid data blocks when there is data to be updated on NANDFLASH.
  • 4 is a flow chart of bad block management in accordance with the present invention.
  • Bad block management mainly includes bad block detection and bad block flags. As shown in Figure 5, bad block detection includes the following steps:
  • the bad block flag includes the following steps:
  • S606. Determine whether the writing is successful. S608. If it fails, the redundant areas of the first page and the second page of the block on the NANDFLASH are marked as bad blocks.
  • the method includes the following steps: S702.
  • the FAT file system organizes information about the file, calls the FTL layer interface, reads and writes the file, and reads and writes the logical address of the page.
  • S710 The data is cyclically written to the physical block of NANDFLASH, and the status and logical address of the block are recorded in the redundant area of the last page in the block.
  • S712. Update the status information and the address information of the block in the memory.
  • the FTL interface layer performs a read operation, and maps to the physical block address where the page is located through the address mapping table, and finds the physical page address through the physical block address.
  • File data is first cached in memory. When reading and writing files, it is first searched in memory, which improves the speed of reading and writing files;

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)
  • Memory System Of A Hierarchy Structure (AREA)
  • Memory System (AREA)

Description

在移动终端的非线性闪存上实现文件***的装置 技术领域 本发明涉及移动终端技术领域,尤其是涉及非线性闪存( NANDFLASH ) 上文件***的实现方法。 背景技术 随着现代信息社会的飞速发展, NANDFLASH 做为一种存储介质, 其 大容量、 低成本等优势越来越受到众多终端设备的青睐。 由于 NANDFLASH的物理特性的特殊性, 坏块管理, 地址映射, 垃圾 回收等问题, 对传统文件***提出了 4兆战, 传统文件*** (例如: FAT文件系 统)没有针对 NANDFLASH的坏块管理、 地址映射、 垃圾回收的处理机制, 因此, 无法直接管理 NANDFLASH。 本发明提出了一种 FAT 文件***在 NANDFLASH上使用的改进措施。 发明内容 考虑到上述问题而做出本发明, 为此, 本发明的主要目的在于, 提供一 种在移动终端的非线性闪存上实现文件***的装置, 包括 FAT文件***, 其 特征在于, 还包括: 文件***传输单元, 设置在 FAT 文件***与非线性闪存之间, 用于对 非线性闪存进行垃圾回收、 坏块管理、 以及地址映射。 根据本发明的装置还可以包括: 初始化模块, 用于获取非线性闪存的相 关参数信息, 并通过扫描整个文件***的管理区域来获取管理区域中每一块 的状态信息和地址映射信息,以在内存中形成块状态映射表和块地址映射表。 相关参数信息包括页面大小、 块大小、 和文件***的管理区域的大小。 才艮据本发明的装置还可以包括垃圾回收模块,用于当在非线性闪存上存 在待更新的数据时执行以下步骤: 通过地址映射表得到待更新的数据块的物 理地址, 并通过文件***传输单元将待更新的数据读取到内存中; 在内存中 进行数据更新,并通过文件***传输单元将更新的数据写入到新的物理地址; 以及擦除待更新的数据块, 并更新状态映射表和块地址映射表。 坏块管理包^ "坏块检测和坏块标志。 根据本发明的装置还可以包括: 坏块检测模块, 用于使文件***传输单 元在初始化期间扫描整个文件***的管理区域, 通过检查每一个块的第一页 和第二页的冗余区的坏块标志位来判断块是否为坏块, 如果块为坏块则在块 状态映射表中将块记录为坏块, 如果块不是坏块则在块状态映射表中将块记 录为有效块。 根据本发明的装置还可以包括: 坏块标志模块, 用于使文件***传输单 元在通过文件***传输单元对非线性闪存进行写操作时, 判断写操作是否成 功, 如果写操作成功则将非线性闪存中进行写入操作的块的第一页和第二页 的冗余区中的坏块标志位标志为已用状态, 如果写操作失败则将坏块标志位 标志为坏块, 然后更新块地址映射表。 文件***传输单元在进行读取操作和写入操作时,将其接收的逻辑地址 转换为物理地址。 根据本发明的装置还可以包括写入模块,用于在进行写操作时执行以下 步骤: 在文件***传输单元緩存将写入的数据, 当将写入的数据达到一个逻 辑块时, 在状态映射表中查找有效块, 在地址映射表中根据逻辑块的地址映 射到物理块地址; 将该将写入的数据循环写入非线性闪存的物理块, 物理块 的最后一页的冗余区内记录物理块的状态和 辑地址; 以及更新内存中的状 态映射表和块地址映射表。 根据本发明的装置还可以包括读取模块,用于在进行读取操作时执行以 下步骤: 通过块地址映射表来映射将读取页面的物理块地址, 通过物理块地 址查找物理页面地址; 以及 >据物理页面地址从非线性闪存中读取将读取页 面的数据。 通过上述技术方案, FAT文件***对下 (FTL ) 呈现的是初始化、 读、 写接口, 读写的是逻辑页面, 通过 FTL层转化成实际的物理地址, 并且在读 写过程中完成垃圾回收、 坏块管理, 地址映射等操作, 最终实现文件在 NANDFLASH上的存储的功能。 本发明的其它特征和优点将在随后的说明书中阐述, 并且, 部分地从说 明书中变得显而易见, 或者通过实施本发明而了解。 本发明的目的和其他优 点可通过在所写的说明书、 权利要求书、 以及附图中所特别指出的结构来实 现和获得。 附图说明 附图用来提供对本发明的进一步理解, 并且构成说明书的一部分, 与本 发明的实施例一起用于解释本发明, 并不构成对本发明的限制。 在附图中: 图 1 示出了 ^居本发明的在移动终端的非线性闪存上实现文件***的 装置的方框图; 图 2示出了才艮据本发明实施例的用于 NANDFLASH上文件***的实现 方法的流程图; 图 3示出了根据本发明实施例的文件***中 FTL的初始化的流程图; 图 4示出了 >据本发明实施例的垃圾回收的流程图; 图 5和图 6示出了根据本发明实施例的坏块管理的流程图; 以及 图 7示出了根据本发明实施例的地址映射的流程图。 具体实施方式 以下结合附图对本发明的优选实施例进行说明, 应当理解, 此处所描述 的优选实施例仅用于说明和解释本发明, 并不用于限定本发明。 图 1 示出了才艮据本发明的在移动终端的非线性闪存上实现文件***的 装置的方框图。 参照图 1 , 提供了一种在移动终端的非线性闪存上实现文件 ***的装置, 包括 FAT文件*** 101, 其特征在于, 还包括: 文件***传输单元 102, 设置在 FAT文件*** 101 与非线性闪存 103 之间, 用于对非线性闪存 103进行垃圾回收、 坏块管理、 以及地址映射。 根据本发明的装置还可以包括: 初始化模块, 用于获取非线性闪存的相 关参数信息, 并通过担描整个文件***的管理区域来获取管理区域中每一块 的状态信息和地址映射信息,以在内存中形成块状态映射表和块地址映射表。 相关参数信息包括页面大小、 块大小、 和文件***的管理区域的大小。 居本发明的装置还可以包括垃圾回收模块,用于当在非线性闪存上存 在待更新的数据时执行以下步骤: 通过地址映射表得到待更新的数据块的物 理地址, 并通过文件***传输单元将待更新的数据读取到内存中; 在内存中 进行数据更新,并通过文件***传输单元将更新的数据写入到新的物理地址; 以及擦除待更新的数据块, 并更新状态映射表和块地址映射表。 坏块管理包括坏块检测和坏块标志。 根据本发明的装置还可以包括: 坏块检测模块 , 用于使文件***传输单 元在初始化期间扫描整个文件***的管理区域, 通过检查每一个块的第一页 和第二页的冗余区的坏块标志位来判断块是否为坏块, 如果块为坏块则在块 状态映射表中将块记录为坏块, 如果块不是坏块则在块状态映射表中将块记 录为有效块。 居本发明的装置还可以包括: 坏块标志模块, 用于使文件***传输单 元在通过文件***传输单元对非线性闪存进行写操作时, 判断写操作是否成 功, 如果写操作成功则将非线性闪存中进行写入操作的块的第一页和第二页 的冗余区中的坏块标志位标志为已用状态, 如果写操作失败则将坏块标志位 标志为坏块, 然后更新块地址映射表。 文件***传输单元在进行读取操作和写入操作时,将其接收的逻辑地址 转换为物理地址。 根据本发明的装置还可以包括写入模块,用于在进行写操作时执行以下 步骤: 在文件***传输单元緩存将写入的数据, 当将写入的数据达到一个逻 辑块时, 在状态映射表中查找有效块, 在地址映射表中根据逻辑块的地址映 射到物理块地址; 将该将写入的数据循环写入非线性闪存的物理块, 物理块 的最后一页的冗余区内记录物理块的状态和逻辑地址; 以及更新内存中的状 态映射表和块地址映射表。 根据本发明的装置还可以包括读取模块,用于在进行读取操作时执行以 下步骤: 通过块地址映射表来映射 ^!夸读取页面的物理块地址, 通过物理块地 址查找物理页面地址; 以及 居物理页面地址从非线性闪存中读取将读取页 面的数据。 图 2示出了 居本发明实施例的用于 NANDFLASH上文件***的实现 方法的流程图。 如图 2所示, 该方法包括以下步骤:
S202. FAT文件***主要是按照 FAT格式对文件进行组织管理, 以逻辑 扇区的形式呈现给 FTL层。 S204. FTL主要是进行逻辑地址到物理地址的转化, 垃圾回收, 坏块管 理。
S206. NANDFLASH闪存, 通过驱动层接口完成文件的物理存储。 下面图 3-7主要介绍 FTL层的实现机制。 图 3示出了根据本发明实施例的文件***中 FTL的初始化的流程图。 如图 3所示, 该方法包^"以下步骤:
S302. 获取 NANDFLASH有关参数信息, 页面大小, 块大小, 以及文 件***管理区域大小。
S304. 通过扫描整个文件***的管理区域, 获取每一块的状态信息和地 址映射信息, 形成内存中的块状态映射表和块地址映射表。 图 4示出了根据本发明实施例的垃圾回收的流程图。 如图 4所示, 该方 法包 ί舌以下步骤:
S402, 当 NANDFLASH上有数据需要更新时候, 更新是按照块来进行 的, 需要把更新后的数据写道一个新的物理块上, 通过图 3中的状态映射表 和地址映射表获取可用的物理块地址。 S404, 通过内存中的地址映射表, 找到需要更新的老的数据块的物理地 址, 调用 NANDFLASH驱动层接口把数据读到内存当中。
S406, 在内存当中进行数据的更新, 用新的数据块覆盖需要更新的数据 块。
S408 , 通过调用 NANDFLASH驱动层接口, 4巴更新后的数据写到新的 物理块上。
S410, 被更新的数据块在 NANDFLASH上成为垃圾块, 调用驱动 4巴垃 圾块擦除。 S412, 更新内存中的块状态映射表和块地址映射表。 通过上述步骤可以看出: 垃圾回收主要是在 NANDFLASH上的有数据 需要更新时候, 回收那些老的无效数据块。 图 4是根据本发明的坏块管理的流程图。坏块管理主要包括坏块检测和 坏块标志。 如图 5所示, 坏块检测包括以下步骤:
S502. 坏块检测是在文件***初始化的时候进行的,扫描 NANDFLASH 所有块, 进行坏块检查。
S504. 通过每一块的第一页和第二页冗余区的坏块标志位, 判断此块是 否是坏块。
S506. 如果此块为坏块, 在内存中的块状态映射表中 4巴这一块记录为无 效块。
S508. 如果此块为正常块, 在内存中的块状态映射表中 4巴这一块记录为 有效块。 如图 6所示, 坏块标志包括以下步骤:
S602. 在向 NANDFLASH写数据的时候, 通过内存映射表找到可用的 物理块地址。
S604. 调用驱动层接口进行 NANDFLASH的写操作。
S606. 判断写入是否成功。 S608. 如果失败, 在 NANDFLASH上的这一块的第一页和第二页的冗 余区内标志为坏块。
S510. 更新内存中的映射表, 把这一块标志为坏块状态。
S512. 如果成功, 更新内存中的映射表, 把这一块标志为已使用状态。 地址映射是对 NANDFLASH进行读写操作的时候,上层传到 FTL的是 逻辑地址,通过 FTL层转化成物理地址。如图 7所示,该方法包括以下步骤: S702. FAT文件***组织文件的相关信息, 调用 FTL层接口, 对文件进 行读写操作, 读写的是页面的逻辑地址。
S704. 如果是写操作, 在 FTL层緩存文件的数据信息。
S706. 当緩存的数据是一块连续的逻辑页面, 会把整块数据写入 NANDFLASH物理介质上。
S708. 在状态映射表中查找没有使用过的有效块, 在地址映射表中, 根 据逻辑块地址映射到实际的物理块地址。
S710. 把数据按页循环写到 NANDFLASH的物理块中, 块中的最后一 页的冗余区内 i己录此块的状态和逻辑地址。 S712. 更新内存中此块的状态信息和 i£辑地址信息。
S714. FTL接口层进行的是读操作, 通过地址映射表映射到页面所在的 物理块地址, 通过物理块地址查找到物理页面地址。
S716. 4巴数据从 NANDFLASH读出来, 返回给上层。 通过以上几个部分, 实现了用于 NANDFLASH上的文件***, 此发明 方法解决了 FAT文件***无法直接使用在 NANDFLASH上这一弊端。 在 FTL层的实现上:
1 在内存当中建立映射表, 以块的状态和地址作为映射关系, 极大的提 高了物理地址的查找速度;
2 文件数据首先在内存中进行緩存,读写文件的时候,先在内存中查找, 提高了文件的读写速度;
3按照块来进行数据更新, 减少了对 NANDFLASH的物理读写次数, 从而增加了 NANDFLASH的使用寿命。 以上所述仅为本发明的优选实施例而已, 并不用于限制本发明, 对于本 领域的技术人员来说, 本发明可以有各种更改和变化。 凡在本发明的精神和 原则之内, 所作的任何修改、 等同替换、 改进等, 均应包含在本发明的保护 范围之内。

Claims

权 利 要 求 书
1. 一种在移动终端的非线性闪存上实现文件***的装置, 包括 FAT文件系 统, 其特征在于, 还包括:
文件***传输单元, 设置在所述 FAT 文件***与所述非线性闪存 之间, 用于对所述非线性闪存进行垃圾回收、 坏块管理、 以及地址映射。
2. 根据权利要求 1所述的装置, 其特征在于, 还包括:
初始化模块, 用于获取所迷非线性闪存的相关参数信息, 并通过扫 描整个所述文件***的管理区域来获取所述管理区域中每一块的状态信 息和地址映射信息, 以在内存中形成块状态映射表和块地址映射表。
3. 根据权利要求 2所述的装置, 其特征在于, 所述相关参数信息包括页面 大小、 块大小、 和所述文件***的管理区域的大小。
4. 根据权利要求 3所述的装置, 其特征在于, 还包括垃圾回收模块, 用于 当在所迷非线性闪存上存在待更新的数据时执行以下步骤:
通过所述地址映射表得到待更新的数据块的物理地址,并通过所述 文件***传输单元将所述待更新的数据读取到所述内存中;
在所述内存中进行数据更新,并通过所述文件***传输单元将更新 的数据写入到新的物理地址; 以及 擦除所述待更新的数据块,并更新所述状态映射表和所述块地址映 射表。
5. 根据权利要求 3所述的装置, 其特征在于, 所述坏块管理包括坏块检测 和坏块标志。
6. 根据权利要求 5所述的装置, 其特征在于, 还包括:
坏块检测模块,用于使所述文件***传输单元在所述初始化期间扫 描整个所述文件***的管理区域, 通过检查每一个块的第一页和第二页 的冗余区的坏块标志位来判断所述块是否为坏块, 如果所述块为坏块则 在块状态映射表中将所述块记录为坏块, 如果所述块不是坏块则在块状 态映射表中将所述块记录为有效块。
7. 根据权利要求 5所述的装置, 其特征在于, 还包括: 坏块标志模块,用于使所述文件***传输单元在通过所述文件*** 传输单元对所述非线性闪存进行写操作时, 判断所述写操作是否成功, 如果所述写操作成功则将所述非线性闪存中进行写入操作的块的第一页 和第二页的冗余区中的坏块标志位标志为已用状态, 如果所述写操作失 败则将所述坏块标志位标志为坏块, 然后更新所述块地址映射表。
8. 根据权利要求 3所述的装置, 其特征在于, 所述文件***传输单元在进 行读取操作和写入操作时, 将其接收的逻辑地址转换为物理地址。
9. 根据权利要求 8所述的装置, 其特征在于, 还包括写入模块, 用于在进 行写操作时执行以下步骤:
在所述文件***传输单元緩存将写入的数据, 当所述将写入的数据 达到一个逻辑块时, 在所述状态映射表中查找有效块, 在所述地址映射 表中才艮据所述逻辑块的地址映射到物理块地址;
将所述将写入的数据循环写入所述非线性闪存的物理块,所述物理 块的最后一页的冗余区内记录所述物理块的状态和逻辑地址; 以及
更新所述内存中的所述状态映射表和所述块地址映射表。
10. 根据权利要求 8所述的装置, 其特征在于, 还包括: 读取模块, 用于在 进行读取操作时执行以下步骤:
通过所述块地址映射表来映射寻读取页面的物理块地址,通过所述 物理块地址查找物理页面地址; 以及 的数据。
PCT/CN2008/000361 2008-02-18 2008-02-18 在移动终端的非线性闪存上实现文件***的装置 WO2009103181A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2008/000361 WO2009103181A1 (zh) 2008-02-18 2008-02-18 在移动终端的非线性闪存上实现文件***的装置
CN200880109716A CN101809546A (zh) 2008-02-18 2008-02-18 在移动终端的非线性闪存上实现文件***的装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2008/000361 WO2009103181A1 (zh) 2008-02-18 2008-02-18 在移动终端的非线性闪存上实现文件***的装置

Publications (1)

Publication Number Publication Date
WO2009103181A1 true WO2009103181A1 (zh) 2009-08-27

Family

ID=40985033

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2008/000361 WO2009103181A1 (zh) 2008-02-18 2008-02-18 在移动终端的非线性闪存上实现文件***的装置

Country Status (2)

Country Link
CN (1) CN101809546A (zh)
WO (1) WO2009103181A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541676A (zh) * 2011-12-22 2012-07-04 福建新大陆通信科技股份有限公司 一种nand flash的状态检测及映射方法
CN109144897A (zh) * 2018-09-04 2019-01-04 杭州阿姆科技有限公司 一种实现大容量ssd磁盘的方法
CN109491930A (zh) * 2018-11-16 2019-03-19 杭州阿姆科技有限公司 一种ssd中优化写地址分配的方法
CN111949212A (zh) * 2020-07-10 2020-11-17 深圳宏芯宇电子股份有限公司 基于自定义开放通道ssd的文件***及文件管理方法

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113742283B (zh) * 2021-07-20 2023-11-24 电信科学技术第五研究所有限公司 一种基于linux操作***的nandflash无文件***的坏块管理方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1447242A (zh) * 2002-03-25 2003-10-08 太和科技股份有限公司 可适用于快闪存储卡的控制装置及其建构方法
CN1851672A (zh) * 2006-04-05 2006-10-25 北京飞天诚信科技有限公司 一种闪存的安全读写方法
US20070103992A1 (en) * 2005-11-10 2007-05-10 Sony Corporation Memory system
CN101013397A (zh) * 2007-02-08 2007-08-08 深圳万利达电子工业有限公司 一种nandflash文件***实现方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1447242A (zh) * 2002-03-25 2003-10-08 太和科技股份有限公司 可适用于快闪存储卡的控制装置及其建构方法
US20070103992A1 (en) * 2005-11-10 2007-05-10 Sony Corporation Memory system
CN1851672A (zh) * 2006-04-05 2006-10-25 北京飞天诚信科技有限公司 一种闪存的安全读写方法
CN101013397A (zh) * 2007-02-08 2007-08-08 深圳万利达电子工业有限公司 一种nandflash文件***实现方法

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102541676A (zh) * 2011-12-22 2012-07-04 福建新大陆通信科技股份有限公司 一种nand flash的状态检测及映射方法
CN109144897A (zh) * 2018-09-04 2019-01-04 杭州阿姆科技有限公司 一种实现大容量ssd磁盘的方法
CN109144897B (zh) * 2018-09-04 2023-07-14 杭州阿姆科技有限公司 一种实现大容量ssd磁盘的方法
CN109491930A (zh) * 2018-11-16 2019-03-19 杭州阿姆科技有限公司 一种ssd中优化写地址分配的方法
CN111949212A (zh) * 2020-07-10 2020-11-17 深圳宏芯宇电子股份有限公司 基于自定义开放通道ssd的文件***及文件管理方法
CN111949212B (zh) * 2020-07-10 2024-03-08 深圳宏芯宇电子股份有限公司 基于自定义开放通道ssd的文件***及文件管理方法

Also Published As

Publication number Publication date
CN101809546A (zh) 2010-08-18

Similar Documents

Publication Publication Date Title
US11048624B2 (en) Methods for multi-stream garbage collection
CN108073363B (zh) 数据存储方法、存储设备及计算机可读存储介质
US7515500B2 (en) Memory device performance enhancement through pre-erase mechanism
US8392690B2 (en) Management method for reducing utilization rate of random access memory (RAM) used in flash memory
KR101465789B1 (ko) 페이지 복사 횟수를 줄일 수 있는 메모리 카드 시스템의쓰기 및 병합 방법
KR20180123192A (ko) 직접 판독 액세스를 갖는 메모리 장치
US20080195801A1 (en) Method for operating buffer cache of storage device including flash memory
US7287117B2 (en) Flash memory and mapping control apparatus and method for flash memory
EP1562122A2 (en) Method of remapping flash memory
TWI592799B (zh) 映射表更新方法、記憶體控制電路單元及記憶體儲存裝置
TWI423026B (zh) 資料寫入方法、記憶體控制器與記憶體儲存裝置
JP2013544414A (ja) トランザクションログの復元
TW200926182A (en) Memory apparatus and method for accessing a flash memory, and method of evenly using blocks of the flash memory
US20130166828A1 (en) Data update apparatus and method for flash memory file system
JPWO2006067923A1 (ja) メモリコントローラ、不揮発性記憶装置、不揮発性記憶システム及びメモリ制御方法
JP2008123473A (ja) 記憶装置及びその制御方法
CN107590080B (zh) 映射表更新方法、存储器控制电路单元及存储器存储装置
WO2009103181A1 (zh) 在移动终端的非线性闪存上实现文件***的装置
CN109840218B (zh) 有效数据管理方法以及存储控制器
CN113885808B (zh) 映射信息记录方法以及存储器控制电路单元与存储装置
TWI417720B (zh) 快閃記憶體管理方法與計算機系統
TWI390548B (zh) 資料儲存方法及其儲存裝置
KR100924021B1 (ko) 플래시 메모리의 사상 관리 방법
CN111913890B (zh) 一种基于安全模组的非易失存储器随机化读写方法
JPWO2008032711A1 (ja) メモリコントローラ、不揮発性記憶装置、アクセス装置、及び不揮発性記憶システム

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 200880109716.8

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 08706533

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 08706533

Country of ref document: EP

Kind code of ref document: A1