Note that the image I've attached to the previous mail uses btrfs, but the
problem is in no way btrfs-specific. It's the only mainline filesystem
that has data checksums, making it trivial to simulate an I/O error without
physically damaging a disk or using a block device simulator.
To use the image:
mount -oloop img.xz /mnt/somehwere
Obviously, a bad sector can hit a directory rather than a plain file, which
results in a different kind of "fun", but this reproducer does the far
more likely case of bad files.
. ZFS can do this too but is an out-of-tree module.
Autotools hint: to do a zx-spectrum build on a pdp11 host, type:
./configure --host=zx-spectrum --build=pdp11