forked from Mirrors/btrfs-progs
Btrfs-prog/send: fix wrong best-parent assignment in, find_good_parent()
We use find_good_parent() to look for a suit snapshot in the clone source snapshots as the parent, not the source subvolume of the snapshot which is about to be sent. fix it Reviewed-by: Jan Schmidt <list.btrfs@jan-o-sch.net> Signed-off-by: Cheng Yang <chenyang.fnst@cn.fujitsu.com>master
parent
c11d32446d
commit
af7c373fdf
|
@ -152,7 +152,7 @@ static int find_good_parent(struct btrfs_send *s, u64 root_id, u64 *found)
|
|||
if (tmp < 0)
|
||||
tmp *= -1;
|
||||
if (tmp < best_diff) {
|
||||
best_parent = parent;
|
||||
best_parent = parent2;
|
||||
best_diff = tmp;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue