mirror of https://github.com/digint/btrbk
btrbk: limit search depth to 256 when resolving ancestors
Note that the current implementation is not very optimized, we should introduce a parent/child hash table for all queries in get_latest_common().pull/204/head
parent
3be65b9f67
commit
e3ee674085
2
btrbk
2
btrbk
|
@ -2845,7 +2845,7 @@ sub get_latest_common($$$;$)
|
|||
# add read-only ancestors from parent chain (recursive!)
|
||||
my $rnode = $svol->{node};
|
||||
my $search_depth = 0;
|
||||
while($rnode && ($search_depth < 16)) {
|
||||
while($rnode && ($search_depth < 256)) {
|
||||
last if($rnode->{parent_uuid} eq '-');
|
||||
TRACE "get_latest_common: searching parent chain (depth=$search_depth): $rnode->{uuid}";
|
||||
my @parents = grep { $_->{node}{uuid} eq $rnode->{parent_uuid} } @$sroot_subvol_list;
|
||||
|
|
Loading…
Reference in New Issue