[PATCH] Add debuging info.

From: Jan Kara
Date: Thu Feb 26 2009 - 11:56:32 EST


Signed-off-by: Jan Kara <jack@xxxxxxx>
---
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--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/