The cfs_num_min_max() function is called using the nf_min_max function
pointer. It returns the minimum and maximum values for a given
range. However, if a network type uses cfs_num_min_max()
to find the min and max of the range, it will encounter an issue
where the start and end values of the range will be same.
This occurs because cfs_num_min_max() was returning the same value
for both the max and min
Here's an example specific to the "kfi" type, which utilizes
"cfs_num_min_max()" to find the minimum and maximum values.
As a result of the bug, the start and end values of
the range are the same.
Added range for kfi type--
lctl nodemap_add_range --name alps --range [0-131071]@kfi
show the range added
lctl get_param nodemap.alps.ranges
nodemap.alps.ranges=
[
{ id: 1, start_nid: 0@kfi, end_nid: 0@kfi }
]
Signed-off-by: Rajeev Mishra <rajeevm@hpe.com>
Test-Parameters: testlist=sanity-sec.sh
Change-Id: I368f8563648c1819a89e76fa8974818b5f8f6111
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58856
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
if (tmp_min_addr < min_addr || min_addr == 0)
min_addr = tmp_min_addr;
if (tmp_max_addr > max_addr)
- max_addr = tmp_min_addr;
+ max_addr = tmp_max_addr;
}
}
if (max_nid != NULL)