Cloud Computing 6 min read

EROFS Cluster Mode Analysis in Linux Kernel 6.x

This article analyzes the EROFS cluster modes (INFLIGHT, HOOKED, FOLLOWED, FOLLOWED_NOINPLACE) in Linux kernel 6.x, explaining how they determine whether in-place I/O can be used based on the current status of pclusters in the chain.

Coolpad Technology Team
Coolpad Technology Team
Coolpad Technology Team
EROFS Cluster Mode Analysis in Linux Kernel 6.x

This article provides an in-depth analysis of EROFS (Enhanced Read-Only File System) cluster modes in Linux kernel 6.x. The EROFS cluster modes are used to determine whether in-place I/O can be utilized based on the current status of pclusters in the chain.

The article explains four main cluster modes: INFLIGHT, HOOKED, FOLLOWED, and FOLLOWED_NOINPLACE. Each mode has specific characteristics and use cases:

1. FOLLOWED mode: Indicates that the current collection has been linked with the owned chain and can safely use the whole page for in-place I/O if it's the tail page of the collection.

2. HOOKED mode: Represents a situation where the current pcluster is at the end of an existing chain, requiring the creation of a new chain for remaining pclusters.

3. INFLIGHT mode: Used when a pcluster belongs to a chain but isn't the end of the chain.

4. FOLLOWED_NOINPLACE mode: A weak form of FOLLOWED mode that doesn't require in-place I/O, typically used when all compressed pages are available in managed cache or for inline pclusters.

The article includes detailed code examples and explanations of how these modes interact with the EROFS decompression process, particularly in the context of page attachment and in-place I/O decisions. It also discusses the conditions under which in-place I/O is attempted and the role of the 'tight' variable in determining whether a page can be used for in-place I/O.

Overall, this technical analysis provides valuable insights into the inner workings of EROFS cluster management and its impact on I/O operations in the Linux kernel.

cloud computingStorage OptimizationLinux KernelFile SystemEROFSCluster ModesIn-place I/O
Coolpad Technology Team
Written by

Coolpad Technology Team

Committed to advancing technology and supporting innovators. The Coolpad Technology Team regularly shares forward‑looking insights, product updates, and tech news. Tech experts are welcome to join; everyone is invited to follow us.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.