Check the uptodate flag in sub-bios to see if there was an error.
[Mike Christie]
--- diff/drivers/md/dm.c	2004-04-06 15:53:42.563157624 +0100
+++ source/drivers/md/dm.c	2004-04-06 15:54:03.482977328 +0100
@@ -294,6 +294,9 @@ static int clone_endio(struct bio *bio, 
 	if (bio->bi_size)
 		return 1;
 
+	if (!bio_flagged(bio, BIO_UPTODATE) && !error)
+		error = -EIO;
+
 	if (endio) {
 		r = endio(tio->ti, bio, error, &tio->info);
 		if (r < 0)