aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@redhat.com>2017-12-15 15:41:46 -0500
committerMike Snitzer <snitzer@redhat.com>2017-12-20 10:51:14 -0500
commit806f913a543e30d0d608a823b11613bbeeba1f6d (patch)
treeb8593bd5fe25b681bd1af9442d516e08681d0a08
parentd07a241d4f9aaab61b4a2ce7ec8053ad429c4232 (diff)
downloadlinux-dm-806f913a543e30d0d608a823b11613bbeeba1f6d.tar.gz
dm mpath: rename noretry_error() to retry_error() and invert logic
Notice: this object is not reachable from any branch.
Makes it easier to reason through what is happening in calling code. Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Notice: this object is not reachable from any branch.
-rw-r--r--drivers/md/dm-mpath.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index 40d721df11d31..ac3e2cf3600f8 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -1465,7 +1465,7 @@ static void activate_path_work(struct work_struct *work)
activate_or_offline_path(pgpath);
}
-static int noretry_error(blk_status_t error)
+static bool retry_error(blk_status_t error)
{
switch (error) {
case BLK_STS_NOTSUPP:
@@ -1473,11 +1473,11 @@ static int noretry_error(blk_status_t error)
case BLK_STS_TARGET:
case BLK_STS_NEXUS:
case BLK_STS_MEDIUM:
- return 1;
+ return false;
}
/* Anything else could be a path failure, so should be retried */
- return 0;
+ return true;
}
static int multipath_end_io(struct dm_target *ti, struct request *clone,
@@ -1498,7 +1498,7 @@ static int multipath_end_io(struct dm_target *ti, struct request *clone,
* request into dm core, which will remake a clone request and
* clone bios for it and resubmit it later.
*/
- if (error && !noretry_error(error)) {
+ if (error && retry_error(error)) {
struct multipath *m = ti->private;
r = DM_ENDIO_REQUEUE;
@@ -1534,7 +1534,7 @@ static int multipath_end_io_bio(struct dm_target *ti, struct bio *clone,
unsigned long flags;
int r = DM_ENDIO_DONE;
- if (!*error || noretry_error(*error))
+ if (!*error || !retry_error(*error))
goto done;
if (pgpath)