diff options
author | Benjamin Marzinski <bmarzins@redhat.com> | 2024-07-04 16:18:44 +0200 |
---|---|---|
committer | Mikulas Patocka <mpatocka@redhat.com> | 2024-07-10 13:10:06 +0200 |
commit | a48f6b82c5c444b6c4e2f3394c7e5719031c6b00 (patch) | |
tree | 61ce3e4de27ab2ce8fe0de54067798b363dd7f4d /lib/kunit/hooks-impl.h | |
parent | a21f9edb13b0d8066775cbd5efa7261e41871182 (diff) |
dm mpath: don't call dm_get_device in multipath_message
When mutipath_message is called with an action and a device, it needs to
find the pgpath that matches that device. dm_get_device() is not the
right function for this. dm_get_device() will look for a table_device
matching the requested path in use by either the live or inactive table.
If it doesn't find the device, dm_get_device() will open it and add it
to the table. Means that multipath_message will accept any block device,
add it to the table if not present, and then look through the pgpaths
to see if it finds a match. Afterwards it will remove the device if it
was not previously in the table devices list.
This is the only function that can modify the device list of a table
besides the constructors and destructors, and it can only do this when
it was passed an invalid message. Instead, multipath_message() should
call dm_devt_from_path() to get the device dev_t, and match that against
its pgpaths.
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Diffstat (limited to 'lib/kunit/hooks-impl.h')
0 files changed, 0 insertions, 0 deletions