All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chen Yang <chenyang.fnst@cn.fujitsu.com>
To: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: [PATCH] Btrfs-prog/send: fix wrong best-parent assignment in, find_good_parent()
Date: Thu, 24 Jan 2013 19:53:40 +0800	[thread overview]
Message-ID: <510120C4.10406@cn.fujitsu.com> (raw)

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-

             reply	other threads:[~2013-01-24 11:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-24 11:53 Chen Yang [this message]
2013-01-24 16:54 ` [PATCH] Btrfs-prog/send: fix wrong best-parent assignment in, find_good_parent() Jan Schmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=510120C4.10406@cn.fujitsu.com \
    --to=chenyang.fnst@cn.fujitsu.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.