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
Chen Yang 2013-01-24 19:53:40 +08:00 committed by David Sterba
parent c11d32446d
commit af7c373fdf
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}
}