btrbk: disable compression in gpg

We already perform compression before gpg, such that compressing in gpg
is just a waste of time. Interestingly, it seems gpg is not trying to
recompress gzip[ed] input streams, as for the default gzip compression
this patch does not change performance. However, it is necessary for
the upcoming lz4 compression to show its real benefit.
pull/100/merge
Tobias Grosser 2016-08-06 09:23:57 +02:00 committed by Axel Burri
parent 66c36187ed
commit 84a5c56a83
1 changed files with 1 additions and 1 deletions

2
btrbk
View File

@ -1092,7 +1092,7 @@ sub btrfs_send_to_file($$$$;@)
if($opts{encrypt}) { if($opts{encrypt}) {
die unless($opts{encrypt}->{type} eq "gpg"); die unless($opts{encrypt}->{type} eq "gpg");
$target_filename .= '.gpg'; $target_filename .= '.gpg';
my @gpg_options = ( '--batch', '--no-tty', '--trust-model', 'always' ); my @gpg_options = ( '--batch', '--no-tty', '--trust-model', 'always', '--compress-algo', 'none' );
push(@gpg_options, ( '--no-default-keyring', '--keyring', $opts{encrypt}->{keyring} )) if($opts{encrypt}->{keyring}); push(@gpg_options, ( '--no-default-keyring', '--keyring', $opts{encrypt}->{keyring} )) if($opts{encrypt}->{keyring});
push(@gpg_options, ( '--default-recipient', $opts{encrypt}->{recipient} )) if($opts{encrypt}->{recipient}); push(@gpg_options, ( '--default-recipient', $opts{encrypt}->{recipient} )) if($opts{encrypt}->{recipient});
push @cmd_pipe, { push @cmd_pipe, {