Would it be possible to add the ability to write test data to a specified
block, perhaps verifying that the block isn't in use first? I appear to
have 2 bad blocks on an md device, on a partition other that the first
one, that badblocks appears to be identifying incorrectly. It marks
2 blocks bad, but they don't seem to be the correct blocks (the sector
numbers that badblocks finds don't correspond with the badblocks list
given by dumpe2fs by any calculation I can discover). I continue to
get crashes when writing on this filesystem and would like to be able
to see if badblocks has a bug but debugfs doesn't seem to support this
kind of testing.
I tried manually constructing a file and creating a directory entry for
it using a specified block, but the first thing that happens when you
mount the fs and write to the file is that a new block gets allocated
and the old one freed so this "workaround" doesn't work.
TIA,
Steve Bowman