Skip to content

Commit

Permalink
dm mpath: log device name
Browse files Browse the repository at this point in the history
Make the mapped device structure accessible to hardware handlers so error
messages can include the device name.

Signed-off-by: Edward Goggin <egoggin@emc.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Edward Goggin authored and Linus Torvalds committed May 9, 2007
1 parent 46b4773 commit 79eb885
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/md/dm-hw-handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
struct hw_handler_type;
struct hw_handler {
struct hw_handler_type *type;
struct mapped_device *md;
void *context;
};

Expand Down
3 changes: 3 additions & 0 deletions drivers/md/dm-mpath.c
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,9 @@ static int parse_hw_handler(struct arg_set *as, struct multipath *m)
return -EINVAL;
}

m->hw_handler.md = dm_table_get_md(ti->table);
dm_put(m->hw_handler.md);

r = hwht->create(&m->hw_handler, hw_argc - 1, as->argv);
if (r) {
dm_put_hw_handler(hwht);
Expand Down
1 change: 1 addition & 0 deletions drivers/md/dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1236,6 +1236,7 @@ void dm_put(struct mapped_device *md)
free_dev(md);
}
}
EXPORT_SYMBOL_GPL(dm_put);

/*
* Process the deferred bios
Expand Down

0 comments on commit 79eb885

Please sign in to comment.