diff mbox

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

Message ID 20170809183216.526-6-bart.vanassche@wdc.com (mailing list archive)
State Accepted, archived
Delegated to: Mike Snitzer
Headers show

Commit Message

Bart Van Assche Aug. 9, 2017, 6:32 p.m. UTC
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@wdc.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Laurence Oberman <loberman@redhat.com>
---
 drivers/md/dm-mpath.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Christoph Hellwig Aug. 10, 2017, 9:29 a.m. UTC | #1
On Wed, Aug 09, 2017 at 11:32:14AM -0700, Bart Van Assche wrote:
> 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.

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
diff mbox

Patch

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);