linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] btrfs: Fix missed backrefs in backref walking code
@ 2012-05-04 18:54 Alexander Block
  2012-05-04 18:54 ` [PATCH 2/3] btrfs: Fix ulist related problems " Alexander Block
  2012-05-04 18:54 ` [PATCH 3/3] btrfs: Update comment above ulist_next Alexander Block
  0 siblings, 2 replies; 4+ messages in thread
From: Alexander Block @ 2012-05-04 18:54 UTC (permalink / raw)
  To: chris.mason; +Cc: linux-btrfs, Alexander Block

__merge_refs was deleting unresolved prelim refs resulting in missed
backrefs in the backref walking code. Thanks to Arne and Jan for finding
this.

Signed-off-by: Alexander Block <ablock84@googlemail.com>
---
 fs/btrfs/backref.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
index b4b940e..f28ecba 100644
--- a/fs/btrfs/backref.c
+++ b/fs/btrfs/backref.c
@@ -265,6 +265,8 @@ static int __merge_refs(struct list_head *head, int mode)
 
 		if (mode == 1 && ref1->key.type == 0)
 			continue;
+		if (ref1->parent)
+			continue;
 		for (pos2 = pos1->next, n2 = pos2->next; pos2 != head;
 		     pos2 = n2, n2 = pos2->next) {
 			struct __prelim_ref *ref2;
-- 
1.7.3.4


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

end of thread, other threads:[~2012-05-04 19:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-04 18:54 [PATCH 1/3] btrfs: Fix missed backrefs in backref walking code Alexander Block
2012-05-04 18:54 ` [PATCH 2/3] btrfs: Fix ulist related problems " Alexander Block
2012-05-04 18:54 ` [PATCH 3/3] btrfs: Update comment above ulist_next Alexander Block
2012-05-04 19:10   ` Arne Jansen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).