From 84a5c56a8351e2561d510be56e7dc1e4baaa9ca9 Mon Sep 17 00:00:00 2001 From: Tobias Grosser Date: Sat, 6 Aug 2016 09:23:57 +0200 Subject: [PATCH] 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. --- btrbk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/btrbk b/btrbk index 6dc7bf9..87a14b1 100755 --- a/btrbk +++ b/btrbk @@ -1092,7 +1092,7 @@ sub btrfs_send_to_file($$$$;@) if($opts{encrypt}) { die unless($opts{encrypt}->{type} eq "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, ( '--default-recipient', $opts{encrypt}->{recipient} )) if($opts{encrypt}->{recipient}); push @cmd_pipe, {