btrbk: tidy comments

ionice
Axel Burri 2022-10-19 11:24:11 +02:00
parent 25c8eb1705
commit 51b2a5a9f5
1 changed files with 8 additions and 17 deletions

25
btrbk
View File

@ -337,18 +337,14 @@ my %raw_info_sort = (
FILE => 2, FILE => 2,
RECEIVED_UUID => 3, RECEIVED_UUID => 3,
RECEIVED_PARENT_UUID => 4, RECEIVED_PARENT_UUID => 4,
INCOMPLETE => 5, compress => 10,
# disabled for now, as its not very useful and might leak information split => 11,
#source_url => 6, encrypt => 12,
#parent_url => 7, cipher => 13,
#target_url => 8, iv => 14,
compress => 9,
split => 10,
encrypt => 11,
cipher => 12,
iv => 13,
# kdf_* (generated by kdf_backend) # kdf_* (generated by kdf_backend)
); INCOMPLETE => 100,
);
my %raw_url_cache; # map URL to (fake) btr_tree node my %raw_url_cache; # map URL to (fake) btr_tree node
my %mountinfo_cache; # map MACHINE_ID to mount points (sorted descending by file length) my %mountinfo_cache; # map MACHINE_ID to mount points (sorted descending by file length)
@ -1636,12 +1632,9 @@ sub btrfs_send_to_file($$$;$$)
TYPE => 'raw', TYPE => 'raw',
RECEIVED_UUID => $received_uuid, RECEIVED_UUID => $received_uuid,
INCOMPLETE => 1, INCOMPLETE => 1,
# source_url => $source->{URL},
); );
my $target_filename = $source->{NAME} || die; my $target_filename = $source->{NAME} || die;
# $target_filename .= "--$received_uuid";
# $target_filename .= '@' . $parent_uuid if($parent_uuid);
$target_filename .= ".btrfs"; $target_filename .= ".btrfs";
my $compress = config_compress_hash($target, "raw_target_compress"); my $compress = config_compress_hash($target, "raw_target_compress");
@ -1863,11 +1856,9 @@ sub btrfs_send_to_file($$$;$$)
rsh => vinfo_rsh($target), rsh => vinfo_rsh($target),
); );
if(defined($ret)) { if(defined($ret)) {
# Write raw info file again, this time wihtout incomplete flag
delete $raw_info{INCOMPLETE}; delete $raw_info{INCOMPLETE};
$ret = system_write_raw_info($vol_received, \%raw_info); $ret = system_write_raw_info($vol_received, \%raw_info);
} } else {
else {
push @cmd_err, "failed to check target file (not present or zero length): $check_file"; push @cmd_err, "failed to check target file (not present or zero length): $check_file";
} }
} }