mirror of https://github.com/digint/btrbk
btrbk: remove superfluous checks on volume
parent
47ea1f9481
commit
e1c5fd0029
16
btrbk
16
btrbk
|
@ -6644,12 +6644,7 @@ MAIN:
|
||||||
# read volume btrfs tree, and make sure subvolume exist
|
# read volume btrfs tree, and make sure subvolume exist
|
||||||
foreach my $sroot (vinfo_subsection($config, 'volume')) {
|
foreach my $sroot (vinfo_subsection($config, 'volume')) {
|
||||||
DEBUG "Initializing volume section: $sroot->{PRINT}";
|
DEBUG "Initializing volume section: $sroot->{PRINT}";
|
||||||
unless(vinfo_init_root($sroot)) {
|
unless(scalar(vinfo_subsection($sroot, 'subvolume', 1))) {
|
||||||
ABORTED($sroot, "Failed to fetch subvolume detail");
|
|
||||||
WARN "Skipping volume \"$sroot->{PRINT}\": " . ABORTED_TEXT($sroot), @stderr;
|
|
||||||
next;
|
|
||||||
}
|
|
||||||
unless(scalar(vinfo_subsection($sroot, 'subvolume'))) {
|
|
||||||
WARN "No subvolume configured for \"volume $sroot->{URL}\"";
|
WARN "No subvolume configured for \"volume $sroot->{URL}\"";
|
||||||
}
|
}
|
||||||
foreach my $svol (vinfo_subsection($sroot, 'subvolume')) {
|
foreach my $svol (vinfo_subsection($sroot, 'subvolume')) {
|
||||||
|
@ -6674,15 +6669,6 @@ MAIN:
|
||||||
WARN "Skipping subvolume \"$svol->{PRINT}\": " . ABORTED_TEXT($svol);
|
WARN "Skipping subvolume \"$svol->{PRINT}\": " . ABORTED_TEXT($svol);
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
if(_is_child_of($sroot->{node}, $svol->{node}{uuid}) ||
|
|
||||||
($svol->{node}{uuid} eq $sroot->{node}{uuid}))
|
|
||||||
{
|
|
||||||
DEBUG "Found \"$svol->{PRINT}\" (id=$svol->{node}{id}) in btrfs tree of: $sroot->{PRINT}";
|
|
||||||
} else {
|
|
||||||
ABORTED($svol, "Not a child subvolume of: $sroot->{PRINT}");
|
|
||||||
WARN "Skipping subvolume \"$svol->{PRINT}\": " . ABORTED_TEXT($svol);
|
|
||||||
next;
|
|
||||||
}
|
|
||||||
|
|
||||||
my $snaproot = vinfo_snapshot_root($svol);
|
my $snaproot = vinfo_snapshot_root($svol);
|
||||||
unless(vinfo_init_root($snaproot)) {
|
unless(vinfo_init_root($snaproot)) {
|
||||||
|
|
Loading…
Reference in New Issue