Check the uptodate flag in sub-bios to see if there was an error.
[Mike Christie]
--- diff/drivers/md/dm.c	2004-04-07 11:30:08.254501480 +0100
+++ source/drivers/md/dm.c	2004-04-07 11:32:21.545238208 +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)