Whamcloud - gitweb
LU-17431 nodemap: allow add/del of a dynamic nodemap 07/54507/17
authorSebastien Buisson <sbuisson@ddn.com>
Wed, 20 Mar 2024 09:05:22 +0000 (10:05 +0100)
committerOleg Drokin <green@whamcloud.com>
Mon, 2 Dec 2024 05:42:56 +0000 (05:42 +0000)
commitabaa91c12c9bc89a88fa4607accd27aa31900cce
tree763c4a94615145cb2f91803f59d745226053b76b
parent34903b22e51422db14828f898974cf0d1e81b56e
LU-17431 nodemap: allow add/del of a dynamic nodemap

Adding a dynamic nodemap requires specifying the '-d' option to
'lctl nodemap_add'. This in turn sends the appropriate ioctl to
the MDS or OSS device.
Deleting a dynamic nodemap does not require this flag, as we can
figure out if the nodemap to be deleted is dynamic or not.
On kernel side, we need to allow handling a nodemap even if the
nodemap config file is not accessible (i.e. we are not on the MGS).
This dynamic nodemap is not stored on disk.
And we prevent modifications of static, on-disk nodemaps on non-MGS
servers. On these servers it is only possible to modify dynamic
nodemaps.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I10019ad131825c3db520689e01b4c931d90c1c89
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54507
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
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_lproc.c
lustre/ptlrpc/nodemap_storage.c
lustre/tests/sanity-sec.sh
lustre/utils/lctl.c
lustre/utils/obd.c