# F2FS

> file system

**Wikidata**: [Q1442119](https://www.wikidata.org/wiki/Q1442119)  
**Wikipedia**: [English](https://en.wikipedia.org/wiki/F2FS)  
**Source**: https://4ort.xyz/entity/f2fs

## Summary
F2FS (Flash-Friendly File System) is a file system specifically designed for flash-based storage devices such as SSDs and eMMC/NAND flash memory used in smartphones and embedded systems. It was developed to address performance issues and wear leveling challenges inherent in traditional file systems when used with flash storage.

## Key Facts
- **Developed by**: Samsung Electronics, Motorola Mobility, Huawei; primarily designed by Kim Jaegeuk
- **Inception date**: August 3, 2012
- **Primary use cases**: Android devices, Linux systems using flash storage
- **Classifications**: Instance of both flash file system and log-structured file system
- **Supported features**: Filesystem-level compression (using LZO, LZ4, Zstandard), volume size up to 16 exabytes, maximum file size of approximately 3.94 exabytes, filename lengths up to 512 characters, filesystem-level encryption, and support for MAC times metadata
- **Related tools**: Userspace utilities available via `f2fs-tools`
- **Documentation sources**: Described in detail in the paper “F2FS: A New File System for Flash Storage”
- **Website**: https://f2fs.wiki.kernel.org/

## FAQs
### Q: What is F2FS used for?
A: F2FS is optimized for flash-based storage media like NAND flash and SSDs. It's commonly used in Android devices and Linux environments where efficient handling of flash memory characteristics—such as wear leveling and garbage collection—is critical.

### Q: Who created F2FS?
A: F2FS was primarily designed by Kim Jaegeuk and developed collaboratively by Samsung Electronics, Motorola Mobility, and Huawei.

### Q: Does F2FS support encryption and compression?
A: Yes, F2FS supports filesystem-level encryption and offers built-in compression through algorithms including LZO, LZ4, and Zstandard.

## Why It Matters
F2FS plays a crucial role in optimizing data management on modern flash storage devices, which differ significantly from conventional hard drives due to their limited write cycles and erase block constraints. Traditional file systems often suffer from poor performance and reduced lifespan when applied to flash memory without modifications tailored to its behavior. By implementing a log-structured design and incorporating techniques like segment-based allocation and adaptive cleaning policies, F2FS improves both speed and endurance. Its adoption in major platforms like Android has made it essential for mobile computing efficiency and reliability. Additionally, its open-source nature under Linux allows continuous improvements and integration into various embedded and server-grade applications requiring high I/O performance over flash storage.

## Notable For
- Being one of the first mainstream file systems purpose-built for NAND flash and SSD technologies
- Supporting multiple advanced compression formats at the filesystem level
- Integration into Android since version 4.4 KitKat, making it widely deployed across billions of mobile devices
- Offering large file and volume limits suitable for enterprise-scale deployments
- Providing native support for TRIM operations and atomic node updates to reduce write amplification

## Body
### Design Philosophy
F2FS adopts a log-structured approach to efficiently manage writes on flash storage. Unlike traditional file systems that overwrite existing blocks directly, F2FS appends new data sequentially, reducing random writes and improving garbage collection efficiency. This method aligns well with how flash memory operates internally.

### Technical Specifications
- Maximum Volume Size: Up to 16 Exabytes
- Maximum File Size: Approximately 3.94 Exabytes
- Filename Length Limit: Up to 512 bytes
- Supported Compression Algorithms: LZO, LZ4, Zstandard
- Metadata Support: Includes MAC times (modified/accessed/created timestamps)

### Development History
The development of F2FS began around early 2012, led by Kim Jaegeuk while working at Samsung. The initial implementation was submitted to the mainline Linux kernel in December 2012. Since then, contributions have come from several organizations including Motorola Mobility and Huawei.

### Operating System Compatibility
While originally intended for Linux-based systems, F2FS gained significant traction after being adopted by Android starting with version 4.4 ("KitKat"). Today, it remains a default option for many smartphone manufacturers utilizing flash storage solutions.

### Tools & Utilities
Userspace tooling for managing F2FS volumes is provided through the package `f2fs-tools`, which includes utilities for formatting (`mkfs.f2fs`), checking integrity (`fsck.f2fs`), and resizing partitions (`resize.f2fs`).

### Performance Characteristics
Due to its design choices—including checkpointing mechanisms, segment-based organization, and proactive garbage collection—F2FS delivers improved sustained write speeds compared to older alternatives like ext4 when used on raw flash hardware.

```json
{
  "@context": "https://schema.org",
  "@type": "Thing",
  "name": "F2FS",
  "description": "Flash-Friendly File System is a file system designed for flash-based storage devices.",
  "url": "https://f2fs.wiki.kernel.org/",
  "sameAs": [
    "https://www.wikidata.org/wiki/Q16979884",
    "https://en.wikipedia.org/wiki/F2FS"
  ],
  "additionalType": "http://wikidata.org/entity/Q2085278"
}

## References

1. F2FS: A New File System for Flash Storage
2. Freebase Data Dumps. 2013
3. [Source](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1571f84a1f65f6bf35d99d59ba52bdee6722e4b6)
4. Quora