ZFS Intent Log
The ZFS Intent Log is a per-dataset recovery log that can persist filesystem operations before their transaction group reaches stable storage.
Intent records stay in memory until their TXG commits or until a synchronous request such as fsync or O_DSYNC commits them to the on-disk ZIL. After a crash, persisted records replay when the dataset is first instantiated. Log blocks are allocated from the main pool by default, or preferably from a dedicated log device. [1] [2] A copied record carries the data, up to zil_maxcopied of 7.5 KiB by default, while an indirect record points to a block written outside the log. Writes larger than zfs_immediate_write_sz, 32 KiB by default, are handled as with logbias=throughput. [3] [4] Transaction-data byte counters do not measure physical SLOG writes. [3]
Relations
Advantages
- A synchronous request can complete once its records are on the log, without waiting for the next transaction group to sync. [1]
Limitations
- zil_slog_bulk, 64 MiB by default, caps the synchronous-priority SLOG write size per commit, and larger commits continue at asynchronous priority. [4]
- Disabling cache flushes with zil_nocacheflush can corrupt the log on power loss when a volatile out-of-order write cache is enabled. [4]
Citations
- OpenZFS 2.3.4: zil.c, log lifecycle, zil_commit and zil_replay
- OpenZFS 2.3: zpoolconcepts(7), Intent Log and Cache Devices
- OpenZFS 2.3.4: zil.h, indirect and copied log records; statistics units
- zfs(4) module parameters at tag zfs-2.3.4: ZIL tunables
Sources & caveats
- zil-source and zil-header re-read 2026-10-23 at tag zfs-2.3.4 for the in-memory lifecycle, replay point and record types. pool-man re-read for log placement. zfs-params is the zfs(4) page at the same tag, read for zil_maxcopied, zfs_immediate_write_sz, zil_slog_bulk and zil_nocacheflush.
- The database-checkpoint entry links here because intent records become discardable once their transaction group commits, as log records do after a checkpoint.