@startuml
skinparam shadowing false
title OpenZFS transaction group lifecycle model

[*] --> Open
Open : accept dirty records
Open : count dirty MB and block count
Open --> Quiescing : dirty_data_max reached\nor txg_timeout elapsed
Quiescing : close current TXG\nopen next TXG immediately
Quiescing --> Syncing : enqueue sync task
Syncing : checksum/compress overhead\nmedia write time\nDPU/RDMA path limit\nflush/FUA barrier
Syncing --> Synced : sync_done_us reached
Synced : commit visible\nwriteback lag cleared
Synced --> [*]

note right of Open
The simulator allows a new Open TXG while older TXGs are syncing,
matching the pipelined behavior required for writeback pressure studies.
end note
@enduml
