Whamcloud - gitweb
LU-16937 utils: avoid lctl shmget() if not needed
authorAndreas Dilger <adilger@whamcloud.com>
Fri, 30 Jun 2023 10:29:49 +0000 (04:29 -0600)
committerAndreas Dilger <adilger@whamcloud.com>
Thu, 6 Jul 2023 04:15:57 +0000 (04:15 +0000)
commit7c0e319042869b066bb3a6a0d9dba0bffcbfaef6
treef8e77592ca0f2a6d8ae10066839e690aeb9ddbe4
parentfdcafc209a7e7ada5c84c16d2296987742f4d3e0
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.

Lustre-change: https://review.whamcloud.com/51526
Lustre-commit: TBD (from 309713169fde9e162c26e909bc83cb43cccd67ba)

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I41c790ce7cba2d9c48c1ec06eb23eb94aa548242
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/51516
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/utils/obd.c