Skip to content

Commit

Permalink
Merge pull request jimsalterjrs#916 from 0xFelix/zstdmt
Browse files Browse the repository at this point in the history
syncoid: Add zstdmt compress options
  • Loading branch information
jimsalterjrs committed Apr 22, 2024
2 parents fa2c16d + 8b7d29d commit b31ed6e
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions syncoid
Original file line number Diff line number Diff line change
Expand Up @@ -1147,12 +1147,24 @@ sub compressargset {
decomrawcmd => 'zstd',
decomargs => '-dc',
},
'zstdmt-fast' => {
rawcmd => 'zstdmt',
args => '-3',
decomrawcmd => 'zstdmt',
decomargs => '-dc',
},
'zstd-slow' => {
rawcmd => 'zstd',
args => '-19',
decomrawcmd => 'zstd',
decomargs => '-dc',
},
'zstdmt-slow' => {
rawcmd => 'zstdmt',
args => '-19',
decomrawcmd => 'zstdmt',
decomargs => '-dc',
},
'xz' => {
rawcmd => 'xz',
args => '',
Expand All @@ -1175,7 +1187,7 @@ sub compressargset {

if ($value eq 'default') {
$value = $DEFAULT_COMPRESSION;
} elsif (!(grep $value eq $_, ('gzip', 'pigz-fast', 'pigz-slow', 'zstd-fast', 'zstd-slow', 'lz4', 'xz', 'lzo', 'default', 'none'))) {
} elsif (!(grep $value eq $_, ('gzip', 'pigz-fast', 'pigz-slow', 'zstd-fast', 'zstdmt-fast', 'zstd-slow', 'zstdmt-slow', 'lz4', 'xz', 'lzo', 'default', 'none'))) {
writelog('WARN', "Unrecognised compression value $value, defaulting to $DEFAULT_COMPRESSION");
$value = $DEFAULT_COMPRESSION;
}
Expand Down Expand Up @@ -2308,7 +2320,7 @@ syncoid - ZFS snapshot replication tool
Options:
--compress=FORMAT Compresses data during transfer. Currently accepted options are gzip, pigz-fast, pigz-slow, zstd-fast, zstd-slow, lz4, xz, lzo (default) & none
--compress=FORMAT Compresses data during transfer. Currently accepted options are gzip, pigz-fast, pigz-slow, zstd-fast, zstdmt-fast, zstd-slow, zstdmt-slow, lz4, xz, lzo (default) & none
--identifier=EXTRA Extra identifier which is included in the snapshot name. Can be used for replicating to multiple targets.
--recursive|r Also transfers child datasets
--skip-parent Skips syncing of the parent dataset. Does nothing without '--recursive' option.
Expand Down

0 comments on commit b31ed6e

Please sign in to comment.