openzfs
openzfs copied to clipboard
WIP : Do more syncing when kstat.zfs.darwin.tunable.use_system_sync != 0
- Optionally set B_FUA on ZIO_PRIORITY_SYNC_WRITEs, which is uses for label and zil writes
- Optionally issue a full sync rather than a barrier sync
- Avoid a panic if a device goes offline during a full sync or barrier sync; higher layers in o3x will fault the affected device
- Tidy taskq_empty_ent, eliminating a source of DEBUG logspam
Open questions:
- Default to "paranoia"? With reasonably current Macs, performance hit may be worth the safety.
- Tidy naming of the tunable, maybe split tunable into 3 parts (barrier vs full; FUA vs no FUA; and bail out early from zfs_vfs_sync() or not).
- A fourth option: do zfs_vfs_sync() except for spa_sync_allpools()
On a busy multipool system with a mix of spinnydisks-alone, spinnydisks+SSD-slogs, and SSDs-alone, doing all the sync (except not-yet-tested B_FUA) does not hurt performance in practice.
Maybe-todo, maybe kick to future: look into zvols in the sync=standard case.