Commit ac75b09f authored by Mike Snitzer's avatar Mike Snitzer

dm: use DMDEBUG macros now that they use pr_debug variants

Now that DMDEBUG uses pr_debug and DMDEBUG_LIMIT uses
pr_debug_ratelimited cleanup DM's 2 direct pr_debug callers to use
them to get the benefit of consistent DM_FMT formatting of debugging
messages.

While doing so, dm-mpath.c:dm_report_EIO() was switched over to using
DMDEBUG_LIMIT due to the potential for error handling floods in the IO
completion path.
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
parent 49de3b7d
...@@ -439,7 +439,7 @@ static struct pgpath *choose_pgpath(struct multipath *m, size_t nr_bytes) ...@@ -439,7 +439,7 @@ static struct pgpath *choose_pgpath(struct multipath *m, size_t nr_bytes)
} }
/* /*
* dm_report_EIO() is a macro instead of a function to make pr_debug() * dm_report_EIO() is a macro instead of a function to make pr_debug_ratelimited()
* report the function name and line number of the function from which * report the function name and line number of the function from which
* it has been invoked. * it has been invoked.
*/ */
...@@ -447,11 +447,11 @@ static struct pgpath *choose_pgpath(struct multipath *m, size_t nr_bytes) ...@@ -447,11 +447,11 @@ static struct pgpath *choose_pgpath(struct multipath *m, size_t nr_bytes)
do { \ do { \
struct mapped_device *md = dm_table_get_md((m)->ti->table); \ struct mapped_device *md = dm_table_get_md((m)->ti->table); \
\ \
pr_debug("%s: returning EIO; QIFNP = %d; SQIFNP = %d; DNFS = %d\n", \ DMDEBUG_LIMIT("%s: returning EIO; QIFNP = %d; SQIFNP = %d; DNFS = %d", \
dm_device_name(md), \ dm_device_name(md), \
test_bit(MPATHF_QUEUE_IF_NO_PATH, &(m)->flags), \ test_bit(MPATHF_QUEUE_IF_NO_PATH, &(m)->flags), \
test_bit(MPATHF_SAVED_QUEUE_IF_NO_PATH, &(m)->flags), \ test_bit(MPATHF_SAVED_QUEUE_IF_NO_PATH, &(m)->flags), \
dm_noflush_suspending((m)->ti)); \ dm_noflush_suspending((m)->ti)); \
} while (0) } while (0)
/* /*
......
...@@ -2609,7 +2609,7 @@ static int __dm_suspend(struct mapped_device *md, struct dm_table *map, ...@@ -2609,7 +2609,7 @@ static int __dm_suspend(struct mapped_device *md, struct dm_table *map,
if (noflush) if (noflush)
set_bit(DMF_NOFLUSH_SUSPENDING, &md->flags); set_bit(DMF_NOFLUSH_SUSPENDING, &md->flags);
else else
pr_debug("%s: suspending with flush\n", dm_device_name(md)); DMDEBUG("%s: suspending with flush", dm_device_name(md));
/* /*
* This gets reverted if there's an error later and the targets * This gets reverted if there's an error later and the targets
......
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