Whamcloud - gitweb
LU-3527 nodemap: add NID range management 57/8057/15
authorJoshua Walgenbach <jjw@iu.edu>
Fri, 17 Jan 2014 21:21:31 +0000 (22:21 +0100)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 28 Feb 2014 23:13:07 +0000 (23:13 +0000)
commit4642f30970c8737f31d63c75eeda2cff15c68a77
tree283931c7eec70bba0203d9f30f23307bf817a6ab
parente88992a3b5b9d9ba0a69883671f1b5888514e05d
LU-3527 nodemap: add NID range management

The nodemap module defines a nodemap as a set of NID ranges
and a policy that is applied to them. This adds the range
management functions to nodemap. The definition of a range
is kept in the range_node structure.

The range_node structures are kept in a global rb_tree for
ease and speed of managing the range_nodes (each range_node
can be a member of eexactly one nodemap). The range_node
contains a pointer back to the nodemap of which it is a
member. The range_node also keeps the (inclusive) start and
end of the NID range is represents.

Additionally, each nodemap contains a linked list of the
pointers to the range_node in encompasses, for use in
management of the nodemap (deleting, checking ranges, etc)
to prevent walking the range_node tree.

Commands have been added to lctl to control the range management
and other nodemap policy features (squash ids, admin, trusted)
that will control its behavior with regards to ID mapping.

Unit tests have been added to sanity-sec.sh to check the
range management and policy controls.

Signed-off-by: Joshua Walgenbach <jjw@iu.edu>
Change-Id: I2b93f15de8f07a2bcef16fde27fb03a41a2063bc
Reviewed-on: http://review.whamcloud.com/8057
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andrew Perepechko <andrew_perepechko@xyratex.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Ken Hornstein <kenh@cmf.nrl.navy.mil>
16 files changed:
libcfs/include/libcfs/libcfs_private.h
libcfs/libcfs/nidstrings.c
lustre/Makefile.in
lustre/include/lustre_cfg.h
lustre/include/lustre_nodemap.h
lustre/mgs/mgs_handler.c
lustre/mgs/mgs_llog.c
lustre/nodemap/Makefile.in
lustre/nodemap/nodemap_handler.c
lustre/nodemap/nodemap_internal.h
lustre/nodemap/nodemap_lproc.c
lustre/nodemap/nodemap_range.c [new file with mode: 0644]
lustre/tests/sanity-sec.sh
lustre/utils/lctl.c
lustre/utils/obd.c
lustre/utils/obdctl.h