HomeFreeBSD

ZTS: test response of various sync methods under different failmodes

Description

ZTS: test response of various sync methods under different failmodes

These are all the same shape: set up the pool to suspend on first write,
then perform some write+sync operation. The pool should suspend, and the
sync operation should respond according to the failmode= property.

We test fsync(), msync() and two forms of write() (open with O_SYNC, and
async with sync=always), which all take slightly different paths to
zil_commit() and back.

A helper function is included to do the write+sync sequence with mmap()
and msync(), since I didn't find a convenient tool to do that.

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com>
Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
Closes #17398

Details

Provenance
rob.norris_klarasystems.comAuthored on May 16 2025, 5:25 AM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Aug 8 2025, 11:42 PM
Parents
rGb270663e8a94: linux/zvol_os: fix crash with blk-mq on Linux 4.19
Branches
Unknown
Tags
Unknown