Systems and protocols · Intermediate

XFS: allocation groups and recoverable metadata updates

Understand parallel allocation and delayed metadata logging, with explicit limits on durability and recovery claims.

Ask Logeia about this articleTry the three questionsReview your answers

Updated

On this page
  1. Partition allocation management
  2. Follow delayed allocation
  3. Separate logging from home-location writes
  4. Compare explicit guarantees
  5. Ask Logeia about this articleCheck your understanding

Partition allocation management

XFS divides a filesystem into allocation groups that manage structures such as free space and inodes. This organization provides opportunities for parallel management instead of concentrating every update on a single global allocation structure. It does not create unlimited device bandwidth or remove application-level locks. Contention depends on which files, ranges and metadata a workload updates. Filesystem capacity and workload performance are therefore different properties. Analyze allocation structure together with access patterns rather than assuming that a design intended to scale guarantees a particular throughput on every storage device.

Follow delayed allocation

Imagine one hundred small writes extending a file. Choosing final physical placement independently for every tiny write can promote fragmentation. Delayed allocation leaves room to place a larger combined range later, and extents describe consecutive mappings compactly. However, accepting data into memory and allocating its final blocks need not be the same event. A lack of available space can therefore become visible later in the writeback or synchronization path. Correct application error handling must consider both immediate write results and errors reported when data is finally synchronized.

Separate logging from home-location writes

XFS uses write-ahead logging to make covered metadata changes recoverable. Delayed logging can combine frequently updated information and reduce repeated logging overhead. Distinguish in-memory changes, committed log information and later writes to the metadata’s home location. Longer operations can use intent mechanisms rather than logging a complete filesystem image for every action. Log-space reservations and forward-progress rules are part of the design, not merely implementation bookkeeping. They help explain why a metadata-heavy workload can wait even when an application sees little change in its own data payload size.

Compare explicit guarantees

Recoverable metadata does not mean that every file’s newest contents are always durable. Application persistence still depends on synchronization calls and the storage guarantees underneath them. A comparison with ext4 must control synchronization frequency, file counts, concurrency, free space and device characteristics, not merely the total data volume. The presence of a journal is not enough to rank filesystems. Backups address additional failure modes such as deletion and media loss. State the workload and failure model before interpreting a benchmark or claiming that one recovered state must follow a crash.

Reading and practice are recorded separately in this browser, for each language.

Learn this in order

Understand the systems behind the web · STEP 14

Choose a learning path