[dm-devel] [PATCH] dm raid1: the device-mapper 'mirror' target errors written bios erroneously

heinzm at redhat.com heinzm at redhat.com
Wed Mar 23 20:06:27 UTC 2016


From: Heinz Mauelshagen <heinzm at redhat.com>

	The device-mapper 'mirror' target errors correctly written
	bios erroneously in hold_bio() in case the mapped device is
	suspended and flushs are allowed.

	Because the caller already copes with erroring such bios in
	case all mirror legs got failed, any getting to hold_bio()
	are good, thus the patch sets bio->bi_error to 0.

	Resolves: rhbz1307111
---
 drivers/md/dm-raid1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c
index b3ccf1e..2285ab2 100644
--- a/drivers/md/dm-raid1.c
+++ b/drivers/md/dm-raid1.c
@@ -492,7 +492,7 @@ static void hold_bio(struct mirror_set *ms, struct bio *bio)
 		if (dm_noflush_suspending(ms->ti))
 			bio->bi_error = DM_ENDIO_REQUEUE;
 		else
-			bio->bi_error = -EIO;
+			bio->bi_error = 0;
 
 		bio_endio(bio);
 		return;
-- 
2.5.0




More information about the dm-devel mailing list