Whamcloud - gitweb
LU-17297 grant: move tgt_grant_sanity_check() calls
authorVladimir Saveliev <vladimir.saveliev@hpe.com>
Fri, 17 Nov 2023 15:30:06 +0000 (18:30 +0300)
committerAndreas Dilger <adilger@whamcloud.com>
Mon, 15 Apr 2024 09:55:39 +0000 (09:55 +0000)
commit04f67c68540f044f2a1ccfcf6285de9538221747
tree415a8f60649a4de0d3d2ef3704edc92ffaacc800
parentfe50daacbedb7d1a1639cf273c8de1d4f9c12f5f
LU-17297 grant: move tgt_grant_sanity_check() calls

Call tgt_grant_sanity_check() in ofd_obd_disconnect() and in
mdt_obd_disconnect() after call to tgt_grant_discard().

Otherwise, sum of grants does not match to total grant counter which
is reported as LustreError:
    ofd_obd_disconnect: tot_granted 0 != fo_tot_granted 8388608

This is because on stale export eviction
class_disconnect_stale_exports() moves stale exports to separate list
but does not update obd's grant counters.

Test to illustrate the issue is included.

Lustre-change: https://review.whamcloud.com/53171
Lustre-commit: 9df01eee755bbac5bed560f365fab85c1b1164ae

Test-Parameters: trivial testlist=recovery-small env=ONLY=156 serverversion=EXA5
Test-Parameters: trivial testlist=recovery-small env=ONLY=156 serverversion=2.15.4
HPE-bug-id: LUS-11469
Signed-off-by: Vladimir Saveliev <vladimir.saveliev@hpe.com>
Change-Id: I0b4568b88a2fe7b50f4eac50b4b064d7afbc7a75
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/54672
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/include/obd_support.h
lustre/mdt/mdt_handler.c
lustre/ofd/ofd_obd.c
lustre/ptlrpc/client.c
lustre/tests/recovery-small.sh