staging: lustre: add a service that prints a nidlist
authorGregoire Pichon <gregoire.pichon@bull.net>
Thu, 22 Oct 2015 01:52:39 +0000 (21:52 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Oct 2015 01:52:21 +0000 (18:52 -0700)
commita1dfc93af0462117db3754846d386e7c47144709
tree0f04f00c2780cd850b74f53a9f78a084961ef76e
parent185938e06f9608de836169c8ff5492154272cec0
staging: lustre: add a service that prints a nidlist

The libcfs already provides services to parse a string into a nidlist
and to match a nid into a nidlist. This patch implements a service
that prints a nidlist into a buffer.

This is required for instance to print the nosquash_nids parameter
of the MDT procfs component.

Additionally, this patch fixes a bug in return code of
parse_addrange() routine, so that parsing of nids including
a * character works fine ('*@elan' for instance).

Signed-off-by: Gregoire Pichon <gregoire.pichon@bull.net>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-1778
Reviewed-on: http://review.whamcloud.com/9221
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/include/linux/libcfs/libcfs_string.h
drivers/staging/lustre/include/linux/lnet/nidstr.h
drivers/staging/lustre/lustre/libcfs/libcfs_string.c
drivers/staging/lustre/lustre/libcfs/nidstrings.c