On 2/15/06, Dave Kleikamp <shaggy@austin.ibm.com> wrote:
I got part of it done.  From here you can either further modify what
I've done to look for specific blocks within each extent, or parse the
output to do the same.

Here's what I sent Chris offline:

I don't have it all done, but I did make a utility that dumps the
extents for a given list of inodes.  You can call it like this:
find . | xargs ls -i | dump_extents /dev/dm-5 > output.file

You'd still need to search through the output for the extents that
include the blocks in the dmesg output.

In order to reuse code from jfs_debugfs, I built it as a patch to
jfsutils-1.1.10.  I've attached the binary, but you should be able to
build it from the jfsutils source as well.
David Kleikamp
IBM Linux Technology Center
It did work fine for what I needed to.  This tool made me realize I have some files that just scream "defragment me" ;). 
# echo "222432 M30_sub_model1_V23_4.odb" | dump_extents /dev/dm-5 | wc -l