Whamcloud - gitweb
LU-16937 utils: avoid lctl shmget() if not needed 26/51526/2
authorAndreas Dilger <adilger@whamcloud.com>
Fri, 30 Jun 2023 19:41:23 +0000 (13:41 -0600)
committerOleg Drokin <green@whamcloud.com>
Fri, 14 Jul 2023 03:10:28 +0000 (03:10 +0000)
commit1e9ca8bbf444a7a18505199d8e3da05fd731685e
treef8f7a19e946c2d49ae82592088458a88dfac615a
parent7a7df5b1beba3f48b8737d680469d216530244ce
LU-16937 utils: avoid lctl shmget() if not needed

lctl is dynamically allocating an IPC shared memory segment
during every startup, even though it is only needed for a
small number of uncommon debug commands:

    shmget(IPC_PRIVATE, 65680, 0600)        = 196641
    shmat(196641, NULL, 0)                  = 0x7f752b1c5000
    shmctl(196641, IPC_RMID, NULL)          = 0

This setup can be moved to sub-commands that actually need it.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I41c790ce7cba2d9c48c1ec06eb23eb94aa548242
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51526
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/utils/obd.c