Whamcloud - gitweb
LU-18462 nodemap: sanity checks for nodemap_activate 72/57072/6
authorSebastien Buisson <sbuisson@ddn.com>
Tue, 19 Nov 2024 15:51:25 +0000 (16:51 +0100)
committerOleg Drokin <green@whamcloud.com>
Thu, 2 Jan 2025 20:50:33 +0000 (20:50 +0000)
commitfd51fda67c83afd011480b8323e0f3e05e96cfc1
tree4182a26f24fd0cb2de8ff3ef62f359225edb62cd
parentb4c141326236cf02276e32117e2490dc29a8d214
LU-18462 nodemap: sanity checks for nodemap_activate

Input parameter of 'lctl nodemap_activate' should be checked to return
an error in case of invalid input value. Allowed values are, case
insensitive:
- to activate: 1, on, true, t, yes, y
- to deactivate: 0, off, false, f, no, n
We do not use kstrtobool() to parse the input parameter, as it is too
permissive and looks mostly at the first character only.

Test-Parameters: trivial testlist=sanity-sec
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Ifc8528f76af0ff75bfef1febe85dc688af06321d
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57072
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Marc Vef <mvef@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/doc/lctl-nodemap-activate.8
lustre/ptlrpc/nodemap_handler.c