Whamcloud - gitweb
LU-12191 utils: Make "lctl list_param" read exact path under sysfs tree 52/36852/5
authorSonia Sharma <sharmaso@whamcloud.com>
Tue, 4 Feb 2020 18:34:02 +0000 (13:34 -0500)
committerOleg Drokin <green@whamcloud.com>
Tue, 25 Feb 2020 05:51:17 +0000 (05:51 +0000)
commit45d71469226485c7bb348ffcb1700667c1fb2fa2
treef2fac9e9639595e5fcba48dbc0b64967198b027f
parent8fe28cfe925cc0266ba44c502a33d8ac6e5f4489
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" doesn't 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 checking 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/36852
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/utils/lustre_cfg.c