diff mbox

panic during rebalance, and now upon mount

Message ID 3d0408631001301800y5de8a412w1d29bdb5e5e79f84@mail.gmail.com (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Yan, Zheng Jan. 31, 2010, 2 a.m. UTC
None
diff mbox

Patch

diff -urp 1/fs/btrfs/extent-tree.c 2/fs/btrfs/extent-tree.c
--- 1/fs/btrfs/extent-tree.c	2010-01-22 12:16:34.203525744 +0800
+++ 2/fs/btrfs/extent-tree.c	2010-01-31 09:29:01.131484542 +0800
@@ -5372,9 +5372,19 @@  static noinline int walk_up_proc(struct
 	if (eb == root->node) {
 		if (wc->flags[level] & BTRFS_BLOCK_FLAG_FULL_BACKREF)
 			parent = eb->start;
-		else
-			BUG_ON(root->root_key.objectid !=
-			       btrfs_header_owner(eb));
+		else {		
+			if (root->root_key.objectid != btrfs_header_owner(eb)) {
+				printk("root %llu %llu\n",
+					root->root_key.objectid, root->root_key.offset);
+				printk("node %llu refs %llu flags %llu owner %llu "
+					"reloc %d level %d nritems %d\n",
+					eb->start, wc->refs[level], wc->flags[level],
+					btrfs_header_owner(eb),
+					btrfs_header_flag(eb, BTRFS_HEADER_FLAG_RELOC),
+					btrfs_header_level(eb), btrfs_header_nritems(eb));
+				BUG();
+			}
+		}
 	} else {
 		if (wc->flags[level + 1] & BTRFS_BLOCK_FLAG_FULL_BACKREF)
 			parent = path->nodes[level + 1]->start;
@@ -5496,6 +5506,8 @@  int btrfs_drop_snapshot(struct btrfs_roo
 		       sizeof(wc->update_progress));
 	} else {
 		btrfs_disk_key_to_cpu(&key, &root_item->drop_progress);
+		printk("drop progress %llu %d %llu\n", key.objectid,
+			key.type, key.offset);
 		memcpy(&wc->update_progress, &key,
 		       sizeof(wc->update_progress));

---

For btrfsck:
---
diff -urp btrfs-progs-unstable/btrfsck.c btrfs-progs-2/btrfsck.c
--- btrfs-progs-unstable/btrfsck.c	2009-09-28 15:54:55.980479398 +0800
+++ btrfs-progs-2/btrfsck.c	2010-01-31 09:46:24.645485459 +0800
@@ -581,7 +581,6 @@  again:
 		}
 		ret = insert_existing_cache_extent(dst, &ins->cache);
 		if (ret == -EEXIST) {
-			WARN_ON(src == &src_node->root_cache);
 			conflict = get_inode_rec(dst, rec->ino, 1);
 			merge_inode_recs(rec, conflict, dst);
 			if (rec->checked) {