diff mbox series

[4/8] Revert "libmultipath: fix max_sectors_kb on adding path"

Message ID 20240417184644.6193-5-mwilck@suse.com (mailing list archive)
State Not Applicable, archived
Delegated to: christophe varoqui
Headers show
Series multipath-tools: max_sectors_kb rework | expand

Commit Message

Martin Wilck April 17, 2024, 6:46 p.m. UTC
This reverts commit bbb77f318ee483292f50a7782aecaecc7e60f727.
---
 libmultipath/configure.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/libmultipath/configure.c b/libmultipath/configure.c
index 89ac03d..13602f3 100644
--- a/libmultipath/configure.c
+++ b/libmultipath/configure.c
@@ -575,12 +575,11 @@  sysfs_set_max_sectors_kb(struct multipath *mpp, int is_reload)
 	ssize_t len;
 	int i, j, ret, err = 0;
 	struct udev_device *udd;
-	int max_sectors_kb = mpp->max_sectors_kb;
+	int max_sectors_kb;
 
-	/* by default, do not initialize max_sectors_kb on the device */
-	if (max_sectors_kb == MAX_SECTORS_KB_UNDEF && !is_reload)
+	if (mpp->max_sectors_kb == MAX_SECTORS_KB_UNDEF)
 		return 0;
-	/* on reload, re-apply the user tuning on all the path devices */
+	max_sectors_kb = mpp->max_sectors_kb;
 	if (is_reload) {
 		if (!has_dm_info(mpp) &&
 		    dm_get_info(mpp->alias, &mpp->dmi) != 0) {