Whamcloud - gitweb
LU-18357 ptlrpc: Use dynamic memory allocation for filesets
Currently, a nodemap's fileset uses a static-sized array which may be
much larger than needed. This patch adds dynamic memory allocation for
a nodemap's fileset to reduce the future memory footprint when
multiple filesets per nodemap are specified.
Note, when reading fileset fragments from the nodemap IAM, the needed
size is not known yet. Therefore, each fileset is initially
preallocated with "PATH_MAX + 1" and then shrunk when the actual size
is know. This is done on the last step, when a nodemap is set active,
e.g., after reading all IAM idx pages.
The nodemap's fileset is further renamed as future "lctl
nodemap_set_fileset" commands can only modify the primary fileset.
Test-Parameters: trivial testlist=sanity-sec
Signed-off-by: Marc Vef <mvef@whamcloud.com>
Change-Id: I39bd3355c96fcf3938aaa52c8e5ff1eb70617378
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57523
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>