[dm-devel] [PATCH 5/7] dm-mpath: Complain about unsupported __multipath_map_bio() return values

Bart Van Assche bart.vanassche at wdc.com
Wed Aug 9 18:32:14 UTC 2017


The only behavior change introduced by this patch is that WARN_ON_ONCE()
is called if __multipath_map_bio() would return an unsupported return
value.

Signed-off-by: Bart Van Assche <bart.vanassche at wdc.com>
Cc: Christoph Hellwig <hch at lst.de>
Cc: Laurence Oberman <loberman at redhat.com>
---
 drivers/md/dm-mpath.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index 6e20deac4add..f2ffa20c69b9 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -632,6 +632,11 @@ static void process_queued_bios(struct work_struct *work)
 		case DM_MAPIO_REMAPPED:
 			generic_make_request(bio);
 			break;
+		case 0:
+			break;
+		default:
+			WARN_ONCE(true, "__multipath_map_bio() returned %d\n",
+				  r);
 		}
 	}
 	blk_finish_plug(&plug);
-- 
2.13.3




More information about the dm-devel mailing list