Skip to contentSkip to conversation

__getblk() spinning when size != bdev->...i_blkbits

DISCUSSION Zach Brown 1 participant 1 message Jan 27, 2005

lore
Share & tools
lore

Zach Brown

author
#0 lore raw

Recently I debugged something that was spinning in the for(;;) in __getblk_slow(). It turned out it was calling __getblk() with a size argument that didn't match the bdev's inode's i_blkbits.

grow_buffers() would add a page at the index calculated from the 4k size argument but when __getblk_slow() got back around to looking for the instantiated page __find_get_block_slow() would look at the index calculated from the 1k i_blkbits and not find the new page. Round and round she goes.

If the different size inputs are intentional, would a simple BUG_ON() be acceptible so that we can tell straight away if the caller messed up?

- z