xfs-rolling-transaction · shipping · also XFS transaction rolling

XFS rolling transaction

An XFS rolling transaction commits one step of a transaction chain and continues with a fresh transaction using a permanent log reservation.

An inode lock can conceal intermediate changes from callers needing that lock, but the journal chain is not atomic. [1] Allocation-group observers have different locking boundaries. [2]

A permanent reservation is a unit reservation multiplied by a log count, and each roll consumes one whole unit. Log space is reserved again only when the count reaches zero. An inode allocation usually takes two transactions, one for a free inode chunk and one for the inode, so its log count can be 2. [1]

In Linux v6.16 the default permanent log count is 2. Directory creation, symlink creation and attribute set or removal use 3, and the reflink variants of write and truncate use 8. [4]

Items held locked across a roll must be logged again in every new transaction so they do not pin the log tail, otherwise the chain can deadlock the log. Extent removal from an inode proceeds at two extents per transaction because of reservation size limits. [1]

Relations

related
XFS relogging, XFS deferred operation, XFS intent log item, XFS

Advantages

  • A matched log count lets common multi-step changes reserve log space once instead of on every roll. [1]

Limitations

  • Every caller must relog the items it keeps locked, so a missed relog is a correctness bug rather than a slowdown. [1]
  • Long chains such as large extent removals need many rolls and regrants of log space. [1, 4]

Citations

  1. Linux v6.16: XFS Logging Design, log space accounting and re-logging (accessed 2026-10-22)
  2. Linux v6.16: XFS Online Fsck Design, transaction chains and intent drains (accessed 2026-10-16)
  3. Linux v6.16 fs/xfs/libxfs/xfs_trans_resv.h: transaction reservation log counts (accessed 2026-10-22)

Further reading

  1. Hesela: XFS delayed logging and commit boundaries (accessed 2026-10-16)
Sources & caveats
  • design is the Linux v6.16 XFS logging design document, reread on the access date in Transaction Reservations, Log Space Accounting and Re-logging.
  • online-fsck is the Linux v6.16 XFS online fsck design, cited for transaction-chain locking and not reread.
  • resv-header is fs/xfs/libxfs/xfs_trans_resv.h at tag v6.16, read for the *_LOG_COUNT definitions.
  • 2 and two extents come from design. 2, 3 and 8 come from resv-header.

JSON: /data/terms/xfs-rolling-transaction.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. XFS rolling transaction. Hesela. 2026-10-24. https://hesela.dev/terms/xfs-rolling-transaction/