Whamcloud - gitweb
LU-9859 lnet: simplify cfs_parse_nidlist() 41/50841/11
authorMr NeilBrown <neilb@suse.de>
Tue, 25 Jul 2023 18:47:27 +0000 (14:47 -0400)
committerOleg Drokin <green@whamcloud.com>
Sat, 19 Aug 2023 05:36:52 +0000 (05:36 +0000)
commitc08795f9526e8904a45ea9a8517f2f3771a41d18
tree2c12a5af84c7ba182fe5a39c94b6e92199d7c8f7
parentc0e881a8e10f4bf980b5b704c029c2bce74946ec
LU-9859 lnet: simplify cfs_parse_nidlist()

By duplicating the string being parsed, we can use mutating parsign
primitives and simplify the code.

Note that the kernel-space cfs_parse_nidlist() is now different from
the user-space version.  As they are both declared in the same header
file, this needs an #ifdef until the headers can be separated.

Change some function that return 0 on error to match the kernel
convention of 0 on success and -ve on error.

Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: I1d5155a1cee82f798bec0863d80d75af92399cf1
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50841
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/include/uapi/linux/lnet/nidstr.h
lnet/lnet/nidstrings.c
lustre/obdclass/lprocfs_status.c
lustre/obdclass/obd_mount.c
lustre/ptlrpc/nrs_tbf.c