forked from opensvc/multipath-tools
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libmultipath: don't set max_sectors_kb on reloads
Multipath was setting max_sectors_kb on the multipath device and all its path devices both when the device was created, and when it was reloaded. The problem with this is that while this would set max_sectors_kb on all the devices under multipath, it couldn't set this on devices on top of multipath. This meant that if a user lowered max_sectors_kb on an already existing multipath device with a LV on top of it, the LV could send down IO that was too large for the new max_sectors_kb value, because the LV was still using the old value. The solution to this is to only set max_sectors_kb to the configured value when the device is originally created, not when it is later reloaded. Since not all paths may be present when the device is original created, on reloads multipath still needs to make sure that the max_sectors_kb value on all the path devices is the same as the value of the multipath device. But if this value doesn't match the configuration value, that's o.k. This means that the max_sectors_kb value for a multipath device won't change after it have been initially created. All of the devices created on top of the multipath device will inherit that value, and all of the devices will use it all the way down, so IOs will never be mis-sized. I also moved sysfs_set_max_sectors_kb to configure.c, since it is only called from there, and it it makes use of static functions from there. Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
- Loading branch information
Showing
3 changed files
with
58 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters