请输入您要查询的百科知识:

 

词条 LogFS
释义

  1. History

  2. Operation

  3. Logfs in Action

  4. See also

  5. External links

  6. References

{{primary sources|date=February 2013}}{{Infobox filesystem|
| name = LogFS
| developer = Jörn Engel, Prasad Joshi
| full_name =
| introduction_date =
| introduction_os =
| partition_id =
| directory_struct =
| file_struct =
| bad_blocks_struct =
| max_file_size =
| max_files_no =
| max_filename_size =
| max_volume_size =
| dates_recorded =
| date_range =
| date_resolution =
| forks_streams =
| attributes =
| file_system_permissions =
| compression =
| encryption =
| OS = Linux
}}

LogFS is a Linux log-structured and scalable flash file system, intended for use on large devices of flash memory. It is written by Jörn Engel and in part sponsored by the CE Linux Forum.

LogFS was introduced in the mainline Linux kernel in version 2.6.34, released on May 16, 2010. It was removed from the codebase during the merge window of version 4.10, in December 2016, because it was "unmaintained for years and seemingly unused".[1]

History

{{As of|2008|11}}, 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 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. 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 the worst case, but the worst case is rare and the algorithm requires reserving only a handful of flash-memory blocks.

Logfs in Action

The latest logfs source is available from [https://github.com/prasad-joshi/logfs_upstream logfs git tree].

See also

  • UBIFS
  • Flash Memory
  • Inode pointer structure
  • Flash file system

External links

  • Logfs initial design document
  • [https://github.com/prasad-joshi/logfsprogs LogFS format utility]
  • Intro to logfs video
  • [https://web.archive.org/web/20090311142444/http://logfs.org/logfs LogFS (wiki)]

References

1. ^https://lwn.net/Articles/709556/
{{Filesystem}}

3 : Disk file systems|Embedded Linux|Flash file systems supported by the Linux kernel

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/11/13 10:54:43