Skip to content

Commit

Permalink
Use zfs_trim_zero=1 in ztest.
Browse files Browse the repository at this point in the history
For ztest to reliably check for corruption issues in the TRIM code, we
need to make sure TRIM zeroes data, even if the underlying filesystem
doesn't support file hole punching.
  • Loading branch information
dechamps committed Sep 18, 2012
1 parent 37806f0 commit 4cb878d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/ztest/ztest.c
Original file line number Diff line number Diff line change
Expand Up @@ -5683,6 +5683,9 @@ main(int argc, char **argv)
VERIFY(asprintf((char **)&spa_config_path, "%s/zpool.cache",
zopt_dir) != -1);

/* Make sure TRIM zeroes data so that we can test it */
zfs_trim_zero = 1;

/*
* Blow away any existing copy of zpool.cache
*/
Expand Down

0 comments on commit 4cb878d

Please sign in to comment.