Whamcloud - gitweb
LU-17431 nodemap: make dynamic nodemaps hierarchical
Introduce a new rn_subtree field in struct lu_nid_range.
This allows to have NID ranges included into other NID ranges,
hence creating a NID range hierarchy. NID ranges are created in
a subtree only if there is already a range in the parent tree
that includes it. Overlapping NID ranges remain forbidden.
Introduce new fields nm_subnodemaps, nm_parent_entry in struct
lu_nodemap to keep track of the sub-nodemaps attached to a given
nodemap. Also use a new nm_parent_nm field that points to the parent
nodemap. This allows to create a nodemap hierarchy, based on the
NID ranges.
Introduce a new -p|--parent option to lctl nodemap_add to specify
the parent nodemap of a dynamic nodemap at creation time. The NID
ranges of the child nodemap must be included in the ranges of the
parent nodemap. A dynamic nodemap can have only one parent.
Make a sub-nodemap inherit all the parent nodemap's properties,
and the id mapping as well. And expose parent name as part of nodemap
properties. This is valid for dynamic nodemaps only.
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I04a14db92c068f3cb5b6b39e75feb802cebacd8a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54739
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Marc Vef <mvef@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>