summaryrefslogtreecommitdiff
path: root/cmds-send.c
diff options
context:
space:
mode:
authorChen Yang <chenyang.fnst@cn.fujitsu.com>2013-01-24 19:53:40 +0800
committerDavid Sterba <dsterba@suse.cz>2013-01-25 11:50:51 +0100
commitaf7c373fdf08c2345acf319223b2edba41f977b6 (patch)
treecbd7a89504509a8dfca1835ece5922fa790422a9 /cmds-send.c
parentc11d32446ddba1f7cd597859aba0c58c4fd7c1c1 (diff)
downloadbtrfs-progs-af7c373fdf08c2345acf319223b2edba41f977b6.tar.gz
btrfs-progs-af7c373fdf08c2345acf319223b2edba41f977b6.tar.bz2
btrfs-progs-af7c373fdf08c2345acf319223b2edba41f977b6.zip
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>
Diffstat (limited to 'cmds-send.c')
-rw-r--r--cmds-send.c2
1 files changed, 1 insertions, 1 deletions
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;
}
}