LU-16341 quota: fix panic in qmt_site_recalc_cb
The panic occurred due to empty qit_lqes array after
qmt_pool_lqes_lookup_spec. Sometimes it is possible if
global lqe is not enforced. Return -ENOENT from
qmt_pool_lqes_lookup_spec if no lqes have been added.
It fixes following panic:
BUG: unable to handle NULL pointer dereference at
00000000000000f8
...
RIP: 0010:qmt_site_recalc_cb+0x2ec/0x780 [lquota]
...
cfs_hash_for_each_tight at
ffffffffc0c72c81 [libcfs]
qmt_pool_recalc at
ffffffffc142dec7 [lquota]
kthread at
ffffffffb45043a6
ret_from_fork at
ffffffffb4e00255
Add test sanity-quota_14 that reproduces above panic without the fix,
but skip it for older MDS that do not have this fix.
Lustre-change: https://review.whamcloud.com/49241
Lustre-commit:
dfe7d2dd2b0d4c0c08faa613f44d2ab1f74c7420
HPE-bug-id: LUS-11007
Change-Id: Ie51396269fae7ed84379bef5fc964cce789eba7c
Signed-off-by: Sergey Cheremencev <sergey.cheremencev@hpe.com>
Reviewed-by: Andriy Skulysh <c17819@cray.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: jsimmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55518
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Sergey Cheremencev <scherementsev@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>