[PATCH] Add debuging info.

Jan Kara jack at suse.cz
Thu Feb 26 10:56:32 CST 2009


Signed-off-by: Jan Kara <jack at suse.cz>
---
 fs/buffer.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/fs/buffer.c b/fs/buffer.c
index 9f69741..1d42c02 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -531,6 +531,14 @@ static void end_buffer_async_write(struct buffer_head *bh, int uptodate)
 		SetPageError(page);
 	}
 
+	if (!PagePrivate(page)) {
+		printk("Buffer %p of page %p not private! Some data to debug:\n", bh, page);
+		printk("flags: %lx, mapping: %p, index: %ld, private: %lx\n", page->flags, page->mapping, page->index, page->private);
+		printk("Buffer: state=%lx, block=%llu, b_size=%lu, b_this_page=%p\n", bh->b_state, (unsigned long long)bh->b_blocknr, (unsigned long)bh->b_size, bh->b_this_page);
+		printk("Other buffers in the page:\n");
+		for (tmp = bh->b_this_page; tmp != bh; tmp = tmp->b_this_page)
+			printk("Buffer %p: state=%lx, block=%llu, b_size=%lu, b_page=%p\n", tmp, tmp->b_state, (unsigned long long)tmp->b_blocknr, (unsigned long)tmp->b_size, tmp->b_page);
+	}
 	first = page_buffers(page);
 	local_irq_save(flags);
 	bit_spin_lock(BH_Uptodate_Lock, &first->b_state);
-- 
1.6.0.2


--NzB8fVQJ5HfG6fxh--




More information about the xfs mailing list