Upon detecting an out-of-range block, fsck(1M) prints the bad block number and its containing inode (after I=).
In fsck(1M) phases 2 and 4, you decide whether or not to clear these bad blocks. Before committing to repair with fsck(1M), you could determine which file contains this inode by passing the inode number to the ncheck(1M) command:
# ncheck -i inum filesystem
For more information, see the chapter on checking file system integrity in the System Administration Guide, Volume 1.