HomeFreeBSD

Add a function that syncs to stable storage, not just the ZIL.

Description

Add a function that syncs to stable storage, not just the ZIL.

Use it to try to stamp out intermittent failures in the ZFS test suite's
redundancy tests.

tests/sys/cddl/zfs/include/libtest.kshlib:

  • Add force_sync_path(), which (ab)uses the fact that 'zpool
	  history' always does a txg_wait_synced() for its first ioctl call.
	  sync(8) doesn't have the flexibility to handle this type of call,
	  and there isn't a better option available that does not mutate the
	  pool.
  • Leave a XXX comment to flag this implementation as a hack.
  • Some history: Previously, I had changed zfs_sync(), ZFS's
	  VFS_SYNC(9), so that it would call txg_wait_synced(), as a
	  workaround for a performance drop off issue.  gibbs later fixed
	  this by changing zfs_sync() to ignore syncer(4)'s periodic
	  requests to sync to stable storage, and reverted the
	  txg_wait_synced() call back to zil_commit().

tests/sys/cddl/zfs/tests/redundancy/redundancy.kshlib:

  • Use foce_sync_path instead of $SYNC for the redundancy test suite,
	  which relies on the data actually getting written to the target
	  devices so they can be corrupted directly.  These may not be the
	  only place this would be useful, but this is somewhat of an
	  experiment to determine whether the intermittent failures stop.

Submitted by: Will
Sponsored by: Spectra Logic Corp

Details

Provenance
asomersAuthored on
Parents
rS292368: Account for the fact that zpool clear can race error stat bumps.
Branches
Unknown
Tags
Unknown