LogFS
   HOME

TheInfoList



OR:

LogFS is a
Linux Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, whi ...
log-structured and
scalable Scalability is the property of a system to handle a growing amount of work by adding resources to the system. In an economic context, a scalable business model implies that a company can increase sales given increased resources. For example, a ...
flash file system A flash file system is a file system designed for storing files on flash memory–based storage devices. While flash file systems are closely related to file systems in general, they are optimized for the nature and characteristics of flash me ...
, intended for use on large devices of
flash memory Flash memory is an electronic non-volatile computer memory storage medium that can be electrically erased and reprogrammed. The two main types of flash memory, NOR flash and NAND flash, are named for the NOR and NAND logic gates. Both use ...
. It is written by Jörn Engel and in part sponsored by the CE Linux Forum. LogFS was introduced in the mainline
Linux kernel The Linux kernel is a free and open-source, monolithic, modular, multitasking, Unix-like operating system kernel. It was originally authored in 1991 by Linus Torvalds for his i386-based PC, and it was soon adopted as the kernel for the GNU ...
in version 2.6.34, released on May 16, 2010. It was removed from the codebase during the
merge window The merge window is a software development process which is sometimes used by large projects. The merge window is a period of time that occurs directly after the release of a new version of the software. During this time, many patches are merged an ...
of version 4.10, in December 2016, because it was "unmaintained for years and seemingly unused".


History

, LogFS was mature enough to pass its entire test suite, and was subsequently included in the mainline Linux kernel, marked as 'experimental', in version 2.6.34 released on May 16, 2010. However, it did not attract a large user base and was removed from the kernel in December 2016.


Operation

LogFS was motivated by the difficulties of JFFS2 with larger flash-memory drives. LogFS stores the inode tree on the drive; JFFS2 does not, which requires it to scan the entire drive at mount and
cache Cache, caching, or caché may refer to: Places United States * Cache, Idaho, an unincorporated community * Cache, Illinois, an unincorporated community * Cache, Oklahoma, a city in Comanche County * Cache, Utah, Cache County, Utah * Cache County ...
the entire tree in RAM. For larger drives, the scan can take dozens of seconds and the tree can take a significant amount of main memory. LogFS avoids these penalties, but it does do more work while the system is running and uses some of the drive's space for holding the inode tree. LogFS stores a file's inode tree on the drive, which means on a write to the file, each ancestor node in the tree must be rewritten. This is done by a "wandering tree" update. The lowest node in the tree (i.e., the data) is written first, each node is written ascending the tree, until the root inode is updated. Writing the root last maintains atomicity of the update. A flash-memory block is the unit for erasures and is usually larger than the file-system block. LogFS handles this disparity by packing multiple file-system blocks into a single flash-memory block. A "sum" entry at the end of the flash-memory block records what data is stored in it. When the flash-memory block has all its file-system blocks moved or deleted, it can be erased and used for new data. For peak usage of the flash-memory drive, it is necessary to compact data so that flash-memory blocks are full of useful data. This is accomplished by
garbage collection Waste collection is a part of the process of waste management. It is the transfer of solid waste from the point of use and disposal to the point of treatment or landfill. Waste collection also includes the curbside collection of recyclabl ...
. LogFS's garbage collection strategy relies on file data being placed in a certain way into flash-memory blocks: a flash-memory block will hold only file data from the same level in the inode tree. LogFS can garbage collect the top level of the trees using just 1 empty flash-memory block. It can garbage collect the top 2 levels of the trees using 2 empty flash-memory blocks. And can garbage collect all N levels of the trees using N empty flash memory blocks. The algorithm is
exponential time In computer science, the time complexity is the computational complexity that describes the amount of computer time it takes to run an algorithm. Time complexity is commonly estimated by counting the number of elementary operations performed by t ...
in the worst case, but the worst case is rare and the algorithm requires reserving only a handful of flash-memory blocks.


See also

*
UBIFS UBIFS (UBI File System, more fully Unsorted Block Image File System) is a flash file system for unmanaged flash memory devices. UBIFS works on top of an UBI (unsorted block image) layer, which is itself on top of a memory technology device (M ...
*
Inode pointer structure The inode pointer structure is a structure adopted by the inode of a file in the Unix File System (UFS) to list the addresses of a file's data blocks. It is also adopted by many related file systems, including the ext3 file system, popular with ...


References


External links

*
Introduction to LogFS
(video) {{Filesystem Disk file systems Embedded Linux Flash file systems Flash file systems supported by the Linux kernel