Commit a48f6b8
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>1 parent a21f9ed commit a48f6b8
1 file changed
Lines changed: 4 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1419 | 1419 | | |
1420 | 1420 | | |
1421 | 1421 | | |
1422 | | - | |
1423 | | - | |
| 1422 | + | |
1424 | 1423 | | |
1425 | 1424 | | |
1426 | 1425 | | |
1427 | 1426 | | |
1428 | 1427 | | |
1429 | 1428 | | |
1430 | 1429 | | |
1431 | | - | |
| 1430 | + | |
1432 | 1431 | | |
1433 | 1432 | | |
1434 | 1433 | | |
| |||
1959 | 1958 | | |
1960 | 1959 | | |
1961 | 1960 | | |
1962 | | - | |
| 1961 | + | |
1963 | 1962 | | |
1964 | 1963 | | |
1965 | 1964 | | |
| |||
2008 | 2007 | | |
2009 | 2008 | | |
2010 | 2009 | | |
2011 | | - | |
| 2010 | + | |
2012 | 2011 | | |
2013 | 2012 | | |
2014 | 2013 | | |
| |||
2017 | 2016 | | |
2018 | 2017 | | |
2019 | 2018 | | |
2020 | | - | |
2021 | | - | |
2022 | 2019 | | |
2023 | 2020 | | |
2024 | 2021 | | |
| |||
0 commit comments