-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This patch adds a new module tunable: zfs_trim_zero. When this parameter is set to 1, ZFS makes sure that DKIOCTRIM zeroes the range being TRIMmed. This makes data corruption issues easier to reproduce, at the cost of greatly decreased performance. On disk vdevs, zfs_trim_zero replaces DISCARD with zero page writes, which means it will work even with vdevs that do not support DISCARD. Note that DISCARD won't be used even on vdevs that support it. On file vdevs, if FALLOC_FL_PUNCH_HOLE fails and zfs_trim_zero=1, then a zero buffer will be written instead. It is not necessary to write zeroes if hole punching works because FALLOC_FL_PUNCH_HOLE specifies that the specified range must appear as zeroes after hole punching.
- Loading branch information
Showing
4 changed files
with
85 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters