From af7c373fdf08c2345acf319223b2edba41f977b6 Mon Sep 17 00:00:00 2001 From: Chen Yang Date: Thu, 24 Jan 2013 19:53:40 +0800 Subject: 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 Signed-off-by: Cheng Yang --- cmds-send.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmds-send.c') diff --git a/cmds-send.c b/cmds-send.c index d2f76914..4a8478de 100644 --- a/cmds-send.c +++ b/cmds-send.c @@ -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; } } -- cgit v1.2.3