Whamcloud - gitweb
LU-18357 ptlrpc: Add alternate fileset data structure handler 00/57600/11
authorMarc Vef <mvef@whamcloud.com>
Fri, 27 Dec 2024 17:17:16 +0000 (18:17 +0100)
committerOleg Drokin <green@whamcloud.com>
Fri, 28 Feb 2025 08:11:58 +0000 (08:11 +0000)
commitf6bb1b38f0814c2f8cab103fe228820aadbf2ee9
treef426470fe90597f780259b43166d985bf3a6a469
parent2b8dca3fa31ef47c6131e4f9a7f99ee6ceabb62a
LU-18357 ptlrpc: Add alternate fileset data structure handler

Handling multiple future alternate filesets requires an in-memory data
structure that is synchronized with the nodemap IAM storage for
filesets. Specifically, it is necessary to properly handle gaps in the
cluster idx subid range that is reserved for filesets which occur when
filesets are deleted.

To easily synchronize the IAM filesets with the in-memory nodemap, an
this patch implements an ordered associative array, rb tree in this
case, which is naturally ordered by a node key - in this case the
global fileset id that can later be directly mapped to the IAM cluster
idx subid range for filesets.

This patch sets the maximum number of alternate filesets to 255 (+1
primary fileset).

This patch only includes the management of the fileset rb tree and
includes all necessary functions. The next patch connects the rb tree
to the IAM and add the API for adding and deleting filesets.

Test-Parameters: trivial
Test-Parameters: testlist=conf-sanity env=ONLY=134
Test-Parameters: testlist=sanity-hsm env=ONLY=411
Test-Parameters: testlist=sanity-quota env=ONLY=75
Test-Parameters: testlist=sanity-sec
Test-Parameters: testlist=sanity-selinux env=ONLY=21
Signed-off-by: Marc Vef <mvef@whamcloud.com>
Change-Id: Ia532894880e5fe65692c699de14e93794c2da483
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57600
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/include/lustre_nodemap.h
lustre/include/uapi/linux/lustre/lustre_disk.h
lustre/ptlrpc/Makefile.in
lustre/ptlrpc/nodemap_fileset_alt.c [new file with mode: 0644]
lustre/ptlrpc/nodemap_internal.h
lustre/ptlrpc/nodemap_storage.c