Commit 6afbc01d authored by Mike Snitzer's avatar Mike Snitzer

dm mpath: eliminate pg_ready() wrapper

pg_ready() is not comprehensive in its logic and only serves to
obfuscate code.  Replace pg_ready() with the appropriate logic in
multipath_map().
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
parent 97e7cdf1
...@@ -373,8 +373,6 @@ static int __must_push_back(struct multipath *m) ...@@ -373,8 +373,6 @@ static int __must_push_back(struct multipath *m)
dm_noflush_suspending(m->ti))); dm_noflush_suspending(m->ti)));
} }
#define pg_ready(m) (!(m)->queue_io && !(m)->pg_init_required)
/* /*
* Map cloned requests * Map cloned requests
*/ */
...@@ -402,11 +400,11 @@ static int multipath_map(struct dm_target *ti, struct request *clone, ...@@ -402,11 +400,11 @@ static int multipath_map(struct dm_target *ti, struct request *clone,
if (!__must_push_back(m)) if (!__must_push_back(m))
r = -EIO; /* Failed */ r = -EIO; /* Failed */
goto out_unlock; goto out_unlock;
} } else if (m->queue_io || m->pg_init_required) {
if (!pg_ready(m)) {
__pg_init_all_paths(m); __pg_init_all_paths(m);
goto out_unlock; goto out_unlock;
} }
if (set_mapinfo(m, map_context) < 0) if (set_mapinfo(m, map_context) < 0)
/* ENOMEM, requeue */ /* ENOMEM, requeue */
goto out_unlock; goto out_unlock;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment