Whamcloud - gitweb
LU-12191 utils: Make "lctl list_param" read exact path under sysfs tree
authorSonia Sharma <sharmaso@whamcloud.com>
Tue, 16 Apr 2019 11:54:33 +0000 (04:54 -0700)
committerSonia Sharma <sharmaso@whamcloud.com>
Wed, 29 May 2019 07:08:15 +0000 (03:08 -0400)
commitb25e466f2e64d6ffbf3fee3847d1db01f5baddfb
treee18c3561040de3da5263f02bae61a09bd3158bac
parent6733fbff9a682bcec5fdca6f7062c24f0fe27cfe
LU-12191 utils: Make "lctl list_param" read exact path under sysfs tree

"lctl list_param -R" currently checks for the param_name
in the path and reads the sysfs tree under that. But it can
give erroneous results in the following example -

For path like /sys/fs/lnet/net/o2ib1/ib0, command
"lctl list_param -R" doesnt go down the "net" tree
because it matches "net" with "lnet" and just stop
there.

This patch changes how param_name is checked for
in the path. Like in the above example, instead
of checkign for "net", it should check for
"/net/". So, this patch adds this change in
param_display() in lustre/utils/lustre_cfg.c

Change-Id: Ieb3ad0d1248eee2192246ff5c4d77a71d87dc446
Signed-off-by: Sonia Sharma <sharmaso@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/34693
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Jenkins
Reviewed-by: Amir Shehata <ashehata@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/utils/lustre_cfg.c