All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Btrfs-prog/send: fix wrong best-parent assignment in, find_good_parent()
@ 2013-01-24 11:53 Chen Yang
  2013-01-24 16:54 ` Jan Schmidt
  0 siblings, 1 reply; 2+ messages in thread
From: Chen Yang @ 2013-01-24 11:53 UTC (permalink / raw)
  To: linux-btrfs

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

Signed-off-by: Cheng Yang <chenyang.fnst@cn.fujitsu.com>
---
 cmds-send.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/cmds-send.c b/cmds-send.c
index 9b47e70..3a88c54 100644
--- a/cmds-send.c
+++ b/cmds-send.c
@@ -150,7 +150,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;
 		}
 	}
-- 
1.7.7.6

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Btrfs-prog/send: fix wrong best-parent assignment in, find_good_parent()
  2013-01-24 11:53 [PATCH] Btrfs-prog/send: fix wrong best-parent assignment in, find_good_parent() Chen Yang
@ 2013-01-24 16:54 ` Jan Schmidt
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Schmidt @ 2013-01-24 16:54 UTC (permalink / raw)
  To: Chen Yang; +Cc: linux-btrfs


On Thu, January 24, 2013 at 12:53 (+0100), Chen Yang wrote:
> 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
> 
> Signed-off-by: Cheng Yang <chenyang.fnst@cn.fujitsu.com>
> ---
>  cmds-send.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/cmds-send.c b/cmds-send.c
> index 9b47e70..3a88c54 100644
> --- a/cmds-send.c
> +++ b/cmds-send.c
> @@ -150,7 +150,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;
>  		}
>  	}
> 

Reviewed-by: Jan Schmidt <list.btrfs@jan-o-sch.net>

Thanks,
-Jan

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-24 17:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-24 11:53 [PATCH] Btrfs-prog/send: fix wrong best-parent assignment in, find_good_parent() Chen Yang
2013-01-24 16:54 ` Jan Schmidt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.