Commit e6238ac5 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] buffer.c debugging

We get a bug report about once per month wherein find_get_block_slow() spits
an error message.  For some reason we have buffers against a blockdev page
which have the incorrect b_size.

Probably, an earlier set_blcoksize() failed to invalidate all the apges for
some reason.  I just don't know.

The patch adds a bit of extra debug info to aid in diagnosing this.
parent 6beadb3b
......@@ -414,6 +414,9 @@ __find_get_block_slow(struct block_device *bdev, sector_t block, int unused)
bh = bh->b_this_page;
} while (bh != head);
buffer_error();
printk("block=%llu, b_blocknr=%llu\n",
(unsigned long long)block, (unsigned long long)bh->b_blocknr);
printk("b_state=0x%08lx, b_size=%u\n", bh->b_state, bh->b_size);
out_unlock:
spin_unlock(&bd_mapping->private_lock);
page_cache_release(page);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment