60 likes | 190 Vues
As SSDs become the primary storage devices in PCs, the traditional NTFS behavior may not optimally support flash memory, particularly regarding metadata file handling. SSDs can experience performance degradation due to large RAM consumption and a high frequency of small writes. To address these limitations, a transformation scheme in the Flash Translation Layer (FTL) is necessary, incorporating log-based mechanisms and facilitating sequential access. We also explore YAFFS and JFFS2 file systems along with their constraints, aiming for a robust solution that enhances fast mount times and simplifies recovery processes.
E N D
Motivation • SSDs will become the primary storage devices on PC, but NTFS behavior may not suitable to flash memory especially on metadata files. • When considering the ram consumption, the mapping unit of the SSDs may become large; this situation will degrade the performance since there are a lot of small writes come from metadata files access. • Design a transformation scheme in FTL to make the NTFS behavior compatible to SSDs. • Log-based mechanism and sequential access on flash memory. • Fast mount time and easy to recover.
YAFFS • Every file has a file id, which is 18 bits. • File data is stored in chunks, which is the same size as flash page. • Chunk 0 is used to store file header. • Each flash contains file id and chunk number, which is 20 bits, in the spare area. • Each page contains 2-bit serial number for crash-recovery.
YAFFS Slot = file id % 256 Hash Link
JFFS2 • JFFS is a log-structured file system for NOR flash memory. • Changes to files and directories are "logged" to flash in nodes, of which there are two types: • inodes: a header with file metadata, followed by the file data (if any). A file can correspond to mulipleinodes. • dirent nodes: directory entries each holding a name and an inode number.
Disadvantages of YAFFS and JFFS • When mounting the device, each page need to be scanned to establish the whole file system information. • There are a lot of structure need to be maintained in the ram, such as inodes, yaffs_objects. • They are both designed for embedded system, so there are a lot of limitations in the file system, such as file size, number of files. • They all need to mark invalid pages, which is not allowed in MLC flash.
Ext2/3 File system layout • When modifying a file, file system need to update group descriptor table, block bitmap, inode bitmap, inode table, and journaling blocks; all of these accesses are small writes and go fixed location in the file system. File system journaling