]> git.baikalelectronics.ru Git - kernel.git/commitdiff
dm mpath: add DM device name to Failing/Reinstating path log messages
authorMike Snitzer <snitzer@redhat.com>
Thu, 4 Jun 2020 14:44:34 +0000 (10:44 -0400)
committerMike Snitzer <snitzer@redhat.com>
Fri, 5 Jun 2020 18:59:58 +0000 (14:59 -0400)
When there are many DM multipath devices it really helps to have
additional context for which DM device a failed or reinstated path is
part of.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-mpath.c

index b17da3046611da4c5633768357f03a7aacb12d12..78cff42d987ee5274346aefff184075366a2a777 100644 (file)
@@ -1285,7 +1285,9 @@ static int fail_path(struct pgpath *pgpath)
        if (!pgpath->is_active)
                goto out;
 
-       DMWARN("Failing path %s.", pgpath->path.dev->name);
+       DMWARN("%s: Failing path %s.",
+              dm_device_name(dm_table_get_md(m->ti->table)),
+              pgpath->path.dev->name);
 
        pgpath->pg->ps.type->fail_path(&pgpath->pg->ps, &pgpath->path);
        pgpath->is_active = false;
@@ -1324,7 +1326,9 @@ static int reinstate_path(struct pgpath *pgpath)
        if (pgpath->is_active)
                goto out;
 
-       DMWARN("Reinstating path %s.", pgpath->path.dev->name);
+       DMWARN("%s: Reinstating path %s.",
+              dm_device_name(dm_table_get_md(m->ti->table)),
+              pgpath->path.dev->name);
 
        r = pgpath->pg->ps.type->reinstate_path(&pgpath->pg->ps, &pgpath->path);
        if (r)