xfs-ail · shipping · also XFS AIL

XFS Active Item List

The XFS Active Item List is the LSN-ordered list of metadata items already in the journal but not yet written in place, whose oldest entry holds the log tail.

An item enters the AIL with its commit LSN when the checkpoint containing it completes, and it leaves after its metadata has been written back in place, which moves the log tail. An item in the AIL can be modified and logged again, after which it moves forward to the newer LSN, so the AIL is tracked separately from the CIL that collects items before a checkpoint. [1] [4]

The xfsaild thread pushes items from the oldest end. In Linux v6.16 background pushing aims to keep at least 25% of the log free, and when that much is already free it keeps a target that slowly advances the tail. Pinned items cannot be written until the log is forced, so meeting them makes the next pass start a background CIL push. [4]

A pass stops after more than 100 stuck items, or after 1000 items once the LSN changes. When the target is reached or the list is empty the thread waits 50 ms, when more than 90% of tried items were pinned, locked or already flushing it waits 20 ms and restarts from the oldest item, and otherwise it continues at once. An LSN holds a cycle in its upper 32 bits and an offset in 512-byte basic blocks in the lower 32 bits. [4] [1]

Relations

related
XFS Committed Item List, XFS delayed logging, Journal checkpoint, XFS relogging, Log sequence number, XFS rolling transaction, XFS

Advantages

  • Writeback in place can be deferred and batched, because a logged item only has to reach its home location before the tail needs to pass its LSN. [1]

Limitations

  • An item held locked across rolling transactions without being relogged would pin the tail and can deadlock log space reservation, so such code must relog every held item on each roll. [1]
  • The stuck-item limit that ends a pass is described in the source as an arbitrary value based on observation rather than a derived bound. [4]

Citations

  1. Linux v6.16: XFS Logging Design, asynchronous transactions, checkpoints and item lifecycle (accessed 2026-10-23)
  2. Linux v6.16: xfs_trans_ail.c, ordered item movement and log-tail updates (accessed 2026-10-23)

Further reading

  1. Linux v6.16: xfs_log_cil.c, per-CPU insertion, aggregation and asynchronous flush (accessed 2026-10-15)
  2. Hesela: XFS delayed logging and commit boundaries (accessed 2026-10-15)
Sources & caveats
  • design is the Linux v6.16 XFS Logging Design document, read in the sections on log space accounting, relogging, delayed logging and the log item life cycle.
  • ail-code is the Linux v6.16 fs/xfs/xfs_trans_ail.c source, read in xfs_ail_calc_push_target, xfsaild_push and xfsaild.
  • No running system was traced, so the timings are source constants rather than measurements.

JSON: /data/terms/xfs-ail.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. XFS Active Item List. Hesela. 2026-10-24. https://hesela.dev/terms/xfs-ail/