dm delay: Use DM_MAPIO macros instead of open-coded equivalents
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Tue, 27 Oct 2015 19:38:55 +0000 (04:38 +0900)
committerMike Snitzer <snitzer@redhat.com>
Sat, 31 Oct 2015 23:06:04 +0000 (19:06 -0400)
.map function of dm-delay returns return value of delay_bio(),
hence it's supposed to return using a defined DM_MAPIO macro.

Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@gmail.com>
Acked-By: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-delay.c

index b34f6e2..e10f69a 100644 (file)
@@ -237,7 +237,7 @@ static int delay_bio(struct delay_c *dc, int delay, struct bio *bio)
        unsigned long expires = 0;
 
        if (!delay || !atomic_read(&dc->may_delay))
-               return 1;
+               return DM_MAPIO_REMAPPED;
 
        delayed = dm_per_bio_data(bio, sizeof(struct dm_delay_info));
 
@@ -257,7 +257,7 @@ static int delay_bio(struct delay_c *dc, int delay, struct bio *bio)
 
        queue_timeout(dc, expires);
 
-       return 0;
+       return DM_MAPIO_SUBMITTED;
 }
 
 static void delay_presuspend(struct dm_target *ti)