Whamcloud - gitweb
LU-17431 nodemap: make dynamic nodemaps hierarchical 39/54739/18
authorSebastien Buisson <sbuisson@ddn.com>
Wed, 20 Mar 2024 14:40:56 +0000 (15:40 +0100)
committerOleg Drokin <green@whamcloud.com>
Thu, 10 Apr 2025 06:52:30 +0000 (06:52 +0000)
commite9278b8da16338db30ac34abff1f6bc3489352b0
treec8a19e1fc6f69f6aec9c1663714a92448dad89bd
parent976a14cd8c5c805b10294a921eec7a943d80bf47
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>
lustre/doc/lctl-nodemap-add.8
lustre/include/lustre_nodemap.h
lustre/ptlrpc/nodemap_handler.c
lustre/ptlrpc/nodemap_idmap.c
lustre/ptlrpc/nodemap_internal.h
lustre/ptlrpc/nodemap_lproc.c
lustre/ptlrpc/nodemap_range.c
lustre/ptlrpc/nodemap_storage.c
lustre/tests/sanity-sec.sh
lustre/utils/lctl.c
lustre/utils/obd.c